Skip to content

Commit

Permalink
ALSA: usb-audio: Set the Control Selector to SU_SELECTOR_CONTROL for …
Browse files Browse the repository at this point in the history
…UAC2

Specified in section 5.2.5.6.1 of the USB Audio Class 2.0 definition.

Solves the following error for C-Media 6632A (Asus Xonar U7):
[ 8219.676164] cannot get ctl value: req = 0x81, wValue = 0x0, wIndex = 0x1400, type = 3

Signed-off-by: Johan Rastén <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
JohanAR authored and tiwai committed Nov 17, 2014
1 parent 6e84a8d commit a358a0e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sound/usb/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2033,10 +2033,11 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid,
cval->res = 1;
cval->initialized = 1;

if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR)
cval->control = UAC2_CX_CLOCK_SELECTOR;
else
if (state->mixer->protocol == UAC_VERSION_1)
cval->control = 0;
else /* UAC_VERSION_2 */
cval->control = (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) ?
UAC2_CX_CLOCK_SELECTOR : UAC2_SU_SELECTOR;

namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL);
if (!namelist) {
Expand Down

0 comments on commit a358a0e

Please sign in to comment.