usb: gadget: f_uac2: fix bFirstInterface in composite gadget
authorJohn Keeping <john@metanate.com>
Fri, 12 Jan 2018 18:43:32 +0000 (18:43 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:35 +0000 (16:17 +0200)
commit0cc948e8ddb5dab378a2648f384dd87350aa7776
tree8dbf4c45b4fb43eba07f38e6b7e6bcb9c07f9469
parent0ff6b2cac941e05ba436ca9468d21e478999e101
usb: gadget: f_uac2: fix bFirstInterface in composite gadget

[ Upstream commit 8813a59ed892305b5ac1b5b901740b1ad4b5fefa ]

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 <k.opasiak@samsung.com>
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_uac2.c