summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/f_uac1.c
diff options
context:
space:
mode:
authorliangshengjun <liangshengjun@hisilicon.com>2018-12-24 02:36:28 +0000
committerFelipe Balbi <felipe.balbi@linux.intel.com>2019-02-07 13:14:51 +0200
commit44a9d1b9a6bb41b5dba3d6d345421385b0843e4d (patch)
treeff368f1d3632ecf388140fde67d268f7f0b84330 /drivers/usb/gadget/function/f_uac1.c
parent10209abe87f5ebfd482a00323f5236d6094d0865 (diff)
usb: gadget: function: sync f_uac1 ac header baInterfaceNr
f_uac1 audio control header descriptor default set baInterfaceNr[]={1,2}, but usb gadget make a configuration descriptor with more interfaces combination, it can not confirm f_uac1 function linked first. So always keep baInterfaceNr[]={1,2} is correct, and it is necessary to sync baInterfaceNr[] with usb_interface_id() value. Signed-off-by: Liang Shengjun <liangshengjun@hisilicon.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_uac1.c')
-rw-r--r--drivers/usb/gadget/function/f_uac1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index fe42ffccb020..00d346965f7a 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -568,6 +568,7 @@ static int f_audio_bind(struct usb_configuration *c, struct usb_function *f)
goto fail;
as_out_interface_alt_0_desc.bInterfaceNumber = status;
as_out_interface_alt_1_desc.bInterfaceNumber = status;
+ ac_header_desc.baInterfaceNr[0] = status;
uac1->as_out_intf = status;
uac1->as_out_alt = 0;
@@ -576,6 +577,7 @@ static int f_audio_bind(struct usb_configuration *c, struct usb_function *f)
goto fail;
as_in_interface_alt_0_desc.bInterfaceNumber = status;
as_in_interface_alt_1_desc.bInterfaceNumber = status;
+ ac_header_desc.baInterfaceNr[1] = status;
uac1->as_in_intf = status;
uac1->as_in_alt = 0;