Skip to content

Commit 51cb8e2

Browse files
jhovoldtiwai
authored andcommitted
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: 93db51d ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3") Cc: [email protected] # 5.10 Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 05ca447 commit 51cb8e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/usb/format.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ static bool check_valid_altsetting_v2v3(struct snd_usb_audio *chip, int iface,
436436
if (snd_BUG_ON(altsetting >= 64 - 8))
437437
return false;
438438

439-
err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
439+
err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_CUR,
440440
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
441441
UAC2_AS_VAL_ALT_SETTINGS << 8,
442442
iface, &raw_data, sizeof(raw_data));

0 commit comments

Comments
 (0)