diff options
-rw-r--r-- | include/linux/usb/audio.h | 2 | ||||
-rw-r--r-- | sound/usb/mixer.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h index 905a87caf3fb..57f20551939d 100644 --- a/include/linux/usb/audio.h +++ b/include/linux/usb/audio.h | |||
@@ -244,7 +244,7 @@ struct uac_selector_unit_descriptor { | |||
244 | static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) | 244 | static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc) |
245 | { | 245 | { |
246 | __u8 *raw = (__u8 *) desc; | 246 | __u8 *raw = (__u8 *) desc; |
247 | return raw[desc->bLength - 1]; | 247 | return raw[9 + desc->bLength - 1]; |
248 | } | 248 | } |
249 | 249 | ||
250 | /* 4.3.2.5 Feature Unit Descriptor */ | 250 | /* 4.3.2.5 Feature Unit Descriptor */ |
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 1deef623c081..e350f053440a 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -656,7 +656,7 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_ | |||
656 | case UAC_FEATURE_UNIT: { | 656 | case UAC_FEATURE_UNIT: { |
657 | /* the header is the same for v1 and v2 */ | 657 | /* the header is the same for v1 and v2 */ |
658 | struct uac_feature_unit_descriptor *d = p1; | 658 | struct uac_feature_unit_descriptor *d = p1; |
659 | id = d->bUnitID; | 659 | id = d->bSourceID; |
660 | break; /* continue to parse */ | 660 | break; /* continue to parse */ |
661 | } | 661 | } |
662 | case UAC_MIXER_UNIT: { | 662 | case UAC_MIXER_UNIT: { |