summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTorstein Hegge <hegge@resisty.net>2013-03-19 17:12:14 +0100
committerBen Hutchings <ben@decadent.org.uk>2013-09-10 01:57:09 +0100
commitd546eadecc19fa06a326c051640ae7a24d43de2e (patch)
tree19991f46d71fe18cdc2f5e87de3d35b286b2fa50 /sound
parent2ca3bc2ba143bdaf753b88310455074a3d2ed7e4 (diff)
ALSA: usb: Parse UAC2 extension unit like for UAC1
commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream. UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in the same way when parsing the unit. Otherwise parse_audio_unit() fails when it sees an extension unit on a UAC2 device. UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1. Signed-off-by: Torstein Hegge <hegge@resisty.net> Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/mixer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index ae878f9f979d..41b9fe0ae177 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -722,7 +722,8 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
case UAC1_PROCESSING_UNIT:
case UAC1_EXTENSION_UNIT:
/* UAC2_PROCESSING_UNIT_V2 */
- /* UAC2_EFFECT_UNIT */ {
+ /* UAC2_EFFECT_UNIT */
+ case UAC2_EXTENSION_UNIT_V2: {
struct uac_processing_unit_descriptor *d = p1;
if (state->mixer->protocol == UAC_VERSION_2 &&
@@ -1967,6 +1968,8 @@ static int parse_audio_unit(struct mixer_build *state, int unitid)
return parse_audio_extension_unit(state, unitid, p1);
else /* UAC_VERSION_2 */
return parse_audio_processing_unit(state, unitid, p1);
+ case UAC2_EXTENSION_UNIT_V2:
+ return parse_audio_extension_unit(state, unitid, p1);
default:
snd_printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]);
return -EINVAL;