mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
usb: gadget: f_uac2: Define specific wTerminalType
Several users have reported that their Win10 does not enumerate UAC2 gadget with the existing wTerminalType set to UAC_INPUT_TERMINAL_UNDEFINED/UAC_INPUT_TERMINAL_UNDEFINED, e.g. https://github.com/raspberrypi/linux/issues/4587#issuecomment-926567213. While the constant is officially defined by the USB terminal types document, e.g. XMOS firmware for UAC2 (commonly used for Win10) defines no undefined output terminal type in its usbaudio20.h header. Therefore wTerminalType of EP-IN is set to UAC_INPUT_TERMINAL_MICROPHONE and wTerminalType of EP-OUT to UAC_OUTPUT_TERMINAL_SPEAKER for the UAC2 gadget. Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220131071813.7433-1-pavel.hofman@ivitera.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
459702eea6
commit
5432184107
@ -203,7 +203,7 @@ static struct uac2_input_terminal_descriptor io_in_it_desc = {
|
||||
|
||||
.bDescriptorSubtype = UAC_INPUT_TERMINAL,
|
||||
/* .bTerminalID = DYNAMIC */
|
||||
.wTerminalType = cpu_to_le16(UAC_INPUT_TERMINAL_UNDEFINED),
|
||||
.wTerminalType = cpu_to_le16(UAC_INPUT_TERMINAL_MICROPHONE),
|
||||
.bAssocTerminal = 0,
|
||||
/* .bCSourceID = DYNAMIC */
|
||||
.iChannelNames = 0,
|
||||
@ -231,7 +231,7 @@ static struct uac2_output_terminal_descriptor io_out_ot_desc = {
|
||||
|
||||
.bDescriptorSubtype = UAC_OUTPUT_TERMINAL,
|
||||
/* .bTerminalID = DYNAMIC */
|
||||
.wTerminalType = cpu_to_le16(UAC_OUTPUT_TERMINAL_UNDEFINED),
|
||||
.wTerminalType = cpu_to_le16(UAC_OUTPUT_TERMINAL_SPEAKER),
|
||||
.bAssocTerminal = 0,
|
||||
/* .bSourceID = DYNAMIC */
|
||||
/* .bCSourceID = DYNAMIC */
|
||||
|
Loading…
Reference in New Issue
Block a user