diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-06-11 17:34:20 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-06-11 18:05:38 +0200 |
commit | 11bcbc443a17653c65bc20029172fae76f4bcca4 (patch) | |
tree | 29cbf68f8e64bdb237ca4e0b6a8da9e3211119b1 /sound/usb/helper.h | |
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/helper.h')
-rw-r--r-- | sound/usb/helper.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/helper.h b/sound/usb/helper.h index a6b0e51b3a9a..09bd943c43bf 100644 --- a/sound/usb/helper.h +++ b/sound/usb/helper.h @@ -28,5 +28,9 @@ unsigned char snd_usb_parse_datainterval(struct snd_usb_audio *chip, #define snd_usb_get_speed(dev) ((dev)->speed) #endif +static inline int snd_usb_ctrl_intf(struct snd_usb_audio *chip) +{ + return get_iface_desc(chip->ctrl_intf)->bInterfaceNumber; +} #endif /* __USBAUDIO_HELPER_H */ |