Skip to content

Commit f380c09

Browse files
pavhofmanSasha Levin
authored and
Sasha Levin
committed
usb: gadget: f_uac2: Define specific wTerminalType
commit 5432184 upstream. 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. raspberrypi/linux#4587 (comment). 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 <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 71d2f58 commit f380c09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/gadget/function/f_uac2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static struct uac2_input_terminal_descriptor io_in_it_desc = {
203203

204204
.bDescriptorSubtype = UAC_INPUT_TERMINAL,
205205
/* .bTerminalID = DYNAMIC */
206-
.wTerminalType = cpu_to_le16(UAC_INPUT_TERMINAL_UNDEFINED),
206+
.wTerminalType = cpu_to_le16(UAC_INPUT_TERMINAL_MICROPHONE),
207207
.bAssocTerminal = 0,
208208
/* .bCSourceID = DYNAMIC */
209209
.iChannelNames = 0,
@@ -231,7 +231,7 @@ static struct uac2_output_terminal_descriptor io_out_ot_desc = {
231231

232232
.bDescriptorSubtype = UAC_OUTPUT_TERMINAL,
233233
/* .bTerminalID = DYNAMIC */
234-
.wTerminalType = cpu_to_le16(UAC_OUTPUT_TERMINAL_UNDEFINED),
234+
.wTerminalType = cpu_to_le16(UAC_OUTPUT_TERMINAL_SPEAKER),
235235
.bAssocTerminal = 0,
236236
/* .bSourceID = DYNAMIC */
237237
/* .bCSourceID = DYNAMIC */

0 commit comments

Comments
 (0)