summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-05-21 15:37:42 +0200
committerTakashi Iwai <tiwai@suse.de>2021-05-21 16:19:22 +0200
commit51cb8e206afd463e66f16869e5ddc95bef107142 (patch)
tree99a46a052b6b6998f2962cfe59b9ea5144655132 /sound
parent05ca447630334c323c9e2b788b61133ab75d60d3 (diff)
downloadlinux-51cb8e206afd463e66f16869e5ddc95bef107142.tar.bz2
ALSA: usb-audio: fix control-request direction
The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the UAC2_CS_CUR request which erroneously used usb_sndctrlpipe(). Fixes: 93db51d06b32 ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3") Cc: stable@vger.kernel.org # 5.10 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://lore.kernel.org/r/20210521133742.18098-1-johan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c
index e6ff317a6785..2287f8c65315 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -436,7 +436,7 @@ static bool check_valid_altsetting_v2v3(struct snd_usb_audio *chip, int iface,
if (snd_BUG_ON(altsetting >= 64 - 8))
return false;
- err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
+ err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
UAC2_AS_VAL_ALT_SETTINGS << 8,
iface, &raw_data, sizeof(raw_data));