Commit 04129a41 authored by John Keeping's avatar John Keeping Committed by Khalid Elmously

usb: gadget: f_uac2: fix bFirstInterface in composite gadget

BugLink: https://bugs.launchpad.net/bugs/1775771

[ Upstream commit 8813a59e ]

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: default avatarKrzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: default avatarJohn Keeping <john@metanate.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent a64c9439
...@@ -1052,6 +1052,8 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) ...@@ -1052,6 +1052,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;
agdev->ac_intf = ret; agdev->ac_intf = ret;
agdev->ac_alt = 0; agdev->ac_alt = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment