diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-06-11 11:34:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-06-11 12:05:38 -0400 |
commit | 11bcbc443a17653c65bc20029172fae76f4bcca4 (patch) | |
tree | 29cbf68f8e64bdb237ca4e0b6a8da9e3211119b1 /sound/usb/format.c | |
parent | d07140ba7fe1b41713627c6dc3f169a00019fb0e (diff) |
ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE
Control messages directed to an interface must have the interface number
set in the lower 8 bits of wIndex. This wasn't done correctly for some
clock and mixer messages.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/format.c')
-rw-r--r-- | sound/usb/format.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c index df5b29fed000..8eccf17a4ac6 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c | |||
@@ -227,7 +227,8 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip, | |||
227 | /* get the number of sample rates first by only fetching 2 bytes */ | 227 | /* get the number of sample rates first by only fetching 2 bytes */ |
228 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE, | 228 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE, |
229 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, | 229 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, |
230 | UAC2_CS_CONTROL_SAM_FREQ << 8, clock << 8, | 230 | UAC2_CS_CONTROL_SAM_FREQ << 8, |
231 | snd_usb_ctrl_intf(chip) | (clock << 8), | ||
231 | tmp, sizeof(tmp), 1000); | 232 | tmp, sizeof(tmp), 1000); |
232 | 233 | ||
233 | if (ret < 0) { | 234 | if (ret < 0) { |
@@ -247,7 +248,8 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip, | |||
247 | /* now get the full information */ | 248 | /* now get the full information */ |
248 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE, | 249 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE, |
249 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, | 250 | USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN, |
250 | UAC2_CS_CONTROL_SAM_FREQ << 8, clock << 8, | 251 | UAC2_CS_CONTROL_SAM_FREQ << 8, |
252 | snd_usb_ctrl_intf(chip) | (clock << 8), | ||
251 | data, data_size, 1000); | 253 | data, data_size, 1000); |
252 | 254 | ||
253 | if (ret < 0) { | 255 | if (ret < 0) { |