diff options
author | Eldad Zack <eldad@fogrefinery.com> | 2012-11-28 17:55:36 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-29 02:43:31 -0500 |
commit | 5dae5fd24071319bb67d3375217d5b0b6d16cb0b (patch) | |
tree | 7e08d0d824a6d34e27162ed7185648752808c0fc /sound/usb | |
parent | 9f814105926cbeb003b1684cd5564612bccfe45c (diff) |
ALSA: usb-audio: skip UAC2 EFFECT_UNIT
Current code mishandles the case where the device is a UAC2
and the bDescriptorSubtype is a UAC2 Effect Unit (0x07).
It tries to parse it as a Processing Unit (which is similar to two
other UAC1 units with overlapping subtypes), but since the structure
is different (See: 4.7.2.10, 4.7.2.11 in UAC2 standard), the parsing
is done incorrectly and prevents the device from initializing.
For now, just ignore the unit.
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r-- | sound/usb/mixer.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index b0fc6ae037a2..4eacbe2e2d64 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -723,8 +723,19 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_ | |||
723 | return 0; | 723 | return 0; |
724 | } | 724 | } |
725 | case UAC1_PROCESSING_UNIT: | 725 | case UAC1_PROCESSING_UNIT: |
726 | case UAC1_EXTENSION_UNIT: { | 726 | case UAC1_EXTENSION_UNIT: |
727 | /* UAC2_PROCESSING_UNIT_V2 */ | ||
728 | /* UAC2_EFFECT_UNIT */ { | ||
727 | struct uac_processing_unit_descriptor *d = p1; | 729 | struct uac_processing_unit_descriptor *d = p1; |
730 | |||
731 | if (state->mixer->protocol == UAC_VERSION_2 && | ||
732 | hdr[2] == UAC2_EFFECT_UNIT) { | ||
733 | /* UAC2/UAC1 unit IDs overlap here in an | ||
734 | * uncompatible way. Ignore this unit for now. | ||
735 | */ | ||
736 | return 0; | ||
737 | } | ||
738 | |||
728 | if (d->bNrInPins) { | 739 | if (d->bNrInPins) { |
729 | id = d->baSourceID[0]; | 740 | id = d->baSourceID[0]; |
730 | break; /* continue to parse */ | 741 | break; /* continue to parse */ |