From: Jack Pham <jackp@codeaurora.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Ruslan Bilovol <ruslan.bilovol@gmail.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Pavel Hofman <pavel.hofman@ivitera.com>
Cc: linux-usb@vger.kernel.org, Ferry Toth <fntoth@gmail.com>,
Wesley Cheng <wcheng@codeaurora.org>,
Pawel Laszczak <pawell@cadence.com>,
Jack Pham <jackp@codeaurora.org>
Subject: [PATCH] usb: gadget: f_uac2: Add missing companion descriptor for feedback EP
Date: Wed, 1 Sep 2021 18:43:17 -0700 [thread overview]
Message-ID: <20210902014317.16775-1-jackp@codeaurora.org> (raw)
The f_uac2 function fails to enumerate when connected in SuperSpeed
due to the feedback endpoint missing the companion descriptor.
We can reuse the ss_epin_desc_comp descriptor and append it behind the
ss_epin_fback_desc both in the static definition of the ss_audio_desc
structure as well as its dynamic construction in setup_headers().
Fixes: 24f779dac8f3 ("usb: gadget: f_uac2/u_audio: add feedback endpoint support")
Signed-off-by: Jack Pham <jackp@codeaurora.org>
---
drivers/usb/gadget/function/f_uac2.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index 3c34995276e7..5c4917f157e2 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -597,6 +597,7 @@ static struct usb_descriptor_header *ss_audio_desc[] = {
(struct usb_descriptor_header *)&ss_epout_desc_comp,
(struct usb_descriptor_header *)&as_iso_out_desc,
(struct usb_descriptor_header *)&ss_epin_fback_desc,
+ (struct usb_descriptor_header *)&ss_epin_desc_comp,
(struct usb_descriptor_header *)&std_as_in_if0_desc,
(struct usb_descriptor_header *)&std_as_in_if1_desc,
@@ -773,8 +774,11 @@ static void setup_headers(struct f_uac2_opts *opts,
headers[i++] = USBDHDR(&as_iso_out_desc);
- if (EPOUT_FBACK_IN_EN(opts))
+ if (EPOUT_FBACK_IN_EN(opts)) {
headers[i++] = USBDHDR(epin_fback_desc);
+ if (epin_desc_comp)
+ headers[i++] = USBDHDR(epin_desc_comp);
+ }
}
if (EPIN_EN(opts)) {
--
2.24.0
next reply other threads:[~2021-09-02 1:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-02 1:43 Jack Pham [this message]
2021-09-09 5:53 ` [PATCH] usb: gadget: f_uac2: Add missing companion descriptor for feedback EP Jack Pham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902014317.16775-1-jackp@codeaurora.org \
--to=jackp@codeaurora.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=fntoth@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbrunet@baylibre.com \
--cc=linux-usb@vger.kernel.org \
--cc=pavel.hofman@ivitera.com \
--cc=pawell@cadence.com \
--cc=ruslan.bilovol@gmail.com \
--cc=wcheng@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).