diff options
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 03ce971e0027..43d6417b811e 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -1188,9 +1188,9 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void | |||
1188 | 1188 | ||
1189 | for (j = 0; j < channels; j++) { | 1189 | for (j = 0; j < channels; j++) { |
1190 | unsigned int mask = snd_usb_combine_bytes(bmaControls + csize * (j+1), csize); | 1190 | unsigned int mask = snd_usb_combine_bytes(bmaControls + csize * (j+1), csize); |
1191 | if (mask & (1 << (i * 2))) { | 1191 | if (uac2_control_is_readable(mask, i)) { |
1192 | ch_bits |= (1 << j); | 1192 | ch_bits |= (1 << j); |
1193 | if (~mask & (1 << ((i * 2) + 1))) | 1193 | if (!uac2_control_is_writeable(mask, i)) |
1194 | ch_read_only |= (1 << j); | 1194 | ch_read_only |= (1 << j); |
1195 | } | 1195 | } |
1196 | } | 1196 | } |
@@ -1198,9 +1198,9 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void | |||
1198 | /* FIXME: the whole unit is read-only if any of the channels is marked read-only */ | 1198 | /* FIXME: the whole unit is read-only if any of the channels is marked read-only */ |
1199 | if (ch_bits & 1) /* the first channel must be set (for ease of programming) */ | 1199 | if (ch_bits & 1) /* the first channel must be set (for ease of programming) */ |
1200 | build_feature_ctl(state, _ftr, ch_bits, i, &iterm, unitid, !!ch_read_only); | 1200 | build_feature_ctl(state, _ftr, ch_bits, i, &iterm, unitid, !!ch_read_only); |
1201 | if (master_bits & (1 << i * 2)) | 1201 | if (uac2_control_is_readable(master_bits, i)) |
1202 | build_feature_ctl(state, _ftr, 0, i, &iterm, unitid, | 1202 | build_feature_ctl(state, _ftr, 0, i, &iterm, unitid, |
1203 | ~master_bits & (1 << ((i * 2) + 1))); | 1203 | !uac2_control_is_writeable(master_bits, i)); |
1204 | } | 1204 | } |
1205 | } | 1205 | } |
1206 | 1206 | ||