diff options
| author | Johan Rastén <johan@oljud.se> | 2014-11-17 02:39:33 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2014-11-17 08:01:24 -0500 |
| commit | a358a0ef861dae6f8330fb034aaa43adae71ebc1 (patch) | |
| tree | b3e4099f9f61c85bd194ff1cc8253b01fab8533a | |
| parent | 6e84a8d7ac3ba246ef44e313e92bc16a1da1b04a (diff) | |
ALSA: usb-audio: Set the Control Selector to SU_SELECTOR_CONTROL for 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 <johan@oljud.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
| -rw-r--r-- | sound/usb/mixer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 2e4a9dbc51fa..6e354d326858 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
| @@ -2033,10 +2033,11 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, | |||
| 2033 | cval->res = 1; | 2033 | cval->res = 1; |
| 2034 | cval->initialized = 1; | 2034 | cval->initialized = 1; |
| 2035 | 2035 | ||
| 2036 | if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) | 2036 | if (state->mixer->protocol == UAC_VERSION_1) |
| 2037 | cval->control = UAC2_CX_CLOCK_SELECTOR; | ||
| 2038 | else | ||
| 2039 | cval->control = 0; | 2037 | cval->control = 0; |
| 2038 | else /* UAC_VERSION_2 */ | ||
| 2039 | cval->control = (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) ? | ||
| 2040 | UAC2_CX_CLOCK_SELECTOR : UAC2_SU_SELECTOR; | ||
| 2040 | 2041 | ||
| 2041 | namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL); | 2042 | namelist = kmalloc(sizeof(char *) * desc->bNrInPins, GFP_KERNEL); |
| 2042 | if (!namelist) { | 2043 | if (!namelist) { |
