This makes sure we don't perform a check on record stream volumes for
clients that don't support them.
peak_detect = FALSE,
early_requests = FALSE,
dont_inhibit_auto_suspend = FALSE,
peak_detect = FALSE,
early_requests = FALSE,
dont_inhibit_auto_suspend = FALSE,
muted_set = FALSE,
fail_on_suspend = FALSE,
relative_volume = FALSE,
muted_set = FALSE,
fail_on_suspend = FALSE,
relative_volume = FALSE,
}
if (c->version >= 22) {
}
if (c->version >= 22) {
+ /* For newer client versions (with per-source-output volumes), we try
+ * to make the behaviour for playback and record streams the same. */
+ volume_set = TRUE;
if (pa_tagstruct_getu8(t, &n_formats) < 0) {
protocol_error(c);
if (pa_tagstruct_getu8(t, &n_formats) < 0) {
protocol_error(c);
if (n_formats == 0) {
CHECK_VALIDITY_GOTO(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID, finish);
if (n_formats == 0) {
CHECK_VALIDITY_GOTO(c->pstream, pa_sample_spec_valid(&ss), tag, PA_ERR_INVALID, finish);
- CHECK_VALIDITY_GOTO(c->pstream, map.channels == ss.channels && volume.channels == ss.channels, tag, PA_ERR_INVALID, finish);
+ CHECK_VALIDITY_GOTO(c->pstream, map.channels == ss.channels, tag, PA_ERR_INVALID, finish);
+ CHECK_VALIDITY_GOTO(c->pstream, c->version < 22 || (volume.channels == ss.channels), tag, PA_ERR_INVALID, finish);
CHECK_VALIDITY_GOTO(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID, finish);
} else {
PA_IDXSET_FOREACH(format, formats, i) {
CHECK_VALIDITY_GOTO(c->pstream, pa_channel_map_valid(&map), tag, PA_ERR_INVALID, finish);
} else {
PA_IDXSET_FOREACH(format, formats, i) {