mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
usb: gadget: f_uac2: fix bFirstInterface in composite gadget
If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Reviewed-by: Krzysztof Opasiak <[email protected]> Signed-off-by: John Keeping <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
f035d139ff
commit
8813a59ed8
1 changed files with 2 additions and 0 deletions
|
|
@ -524,6 +524,8 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
|||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
iad_desc.bFirstInterface = ret;
|
||||
|
||||
std_ac_if_desc.bInterfaceNumber = ret;
|
||||
uac2->ac_intf = ret;
|
||||
uac2->ac_alt = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue