提交 8813a59e 编写于 作者: J John Keeping 提交者: Felipe Balbi

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: NKrzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: NJohn Keeping <john@metanate.com>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 f035d139
...@@ -524,6 +524,8 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) ...@@ -524,6 +524,8 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__); dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
return ret; return ret;
} }
iad_desc.bFirstInterface = ret;
std_ac_if_desc.bInterfaceNumber = ret; std_ac_if_desc.bInterfaceNumber = ret;
uac2->ac_intf = ret; uac2->ac_intf = ret;
uac2->ac_alt = 0; uac2->ac_alt = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册