summaryrefslogtreecommitdiffstats
path: root/sound/usb/format.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-06-11 17:34:20 +0200
committerTakashi Iwai <tiwai@suse.de>2010-06-11 18:05:38 +0200
commit11bcbc443a17653c65bc20029172fae76f4bcca4 (patch)
tree29cbf68f8e64bdb237ca4e0b6a8da9e3211119b1 /sound/usb/format.c
parentd07140ba7fe1b41713627c6dc3f169a00019fb0e (diff)
downloadop-kernel-dev-11bcbc443a17653c65bc20029172fae76f4bcca4.zip
op-kernel-dev-11bcbc443a17653c65bc20029172fae76f4bcca4.tar.gz
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c
index df5b29f..8eccf17 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,
/* get the number of sample rates first by only fetching 2 bytes */
ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
- UAC2_CS_CONTROL_SAM_FREQ << 8, clock << 8,
+ UAC2_CS_CONTROL_SAM_FREQ << 8,
+ snd_usb_ctrl_intf(chip) | (clock << 8),
tmp, sizeof(tmp), 1000);
if (ret < 0) {
@@ -247,7 +248,8 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip,
/* now get the full information */
ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
- UAC2_CS_CONTROL_SAM_FREQ << 8, clock << 8,
+ UAC2_CS_CONTROL_SAM_FREQ << 8,
+ snd_usb_ctrl_intf(chip) | (clock << 8),
data, data_size, 1000);
if (ret < 0) {
OpenPOWER on IntegriCloud