mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ALSA: usb-audio: fix feature unit parser for UAC2
Fix a small off-by-one bug which causes the feature unit to announce a wrong number of channels. This leads to illegal requests sent to the firmware eventually. Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
3ee317fe9c
commit
e8d0fee70b
1 changed files with 1 additions and 1 deletions
|
|
@ -1126,7 +1126,7 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void
|
|||
} else {
|
||||
struct uac2_feature_unit_descriptor *ftr = _ftr;
|
||||
csize = 4;
|
||||
channels = (hdr->bLength - 6) / 4;
|
||||
channels = (hdr->bLength - 6) / 4 - 1;
|
||||
bmaControls = ftr->bmaControls;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue