diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-05-27 20:15:14 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-05-28 07:48:17 +0200 |
commit | e8d0fee70b66694959eab10c41788b9279d73629 (patch) | |
tree | 3e7e3754298f1e1ccb994149427980f1afb6d052 /sound/usb | |
parent | 3ee317fe9cf08d81501b142bf0054c25e3ed5e7d (diff) | |
download | op-kernel-dev-e8d0fee70b66694959eab10c41788b9279d73629.zip op-kernel-dev-e8d0fee70b66694959eab10c41788b9279d73629.tar.gz |
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 <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 97dd176..03ce971 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -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; } |