* [PATCH] usb: gadget: function: sync f_uac1 ac header baInterfaceNr
@ 2018-12-19 12:08 liangshengjun
0 siblings, 0 replies; 2+ messages in thread
From: liangshengjun @ 2018-12-19 12:08 UTC (permalink / raw)
To: balbi; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel
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>
---
drivers/usb/gadget/function/f_uac1.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 28c1a78..d9aeb5c 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -581,6 +581,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;
@@ -589,6 +590,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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] usb: gadget: function: sync f_uac1 ac header baInterfaceNr
@ 2018-12-24 2:36 liangshengjun
0 siblings, 0 replies; 2+ messages in thread
From: liangshengjun @ 2018-12-24 2:36 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, Paul Elder, linux-usb, linux-kernel
Cc: Jiangheng, Caizhiyong
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>
---
drivers/usb/gadget/function/f_uac1.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 28c1a78..d9aeb5c 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -581,6 +581,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;
@@ -589,6 +590,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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-24 2:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 12:08 [PATCH] usb: gadget: function: sync f_uac1 ac header baInterfaceNr liangshengjun
2018-12-24 2:36 liangshengjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).