From: Ruslan Bilovol <ruslan.bilovol@gmail.com>
To: Felipe Balbi <balbi@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support
Date: Tue, 7 Nov 2017 03:52:01 +0200 [thread overview]
Message-ID: <1510019522-15155-1-git-send-email-ruslan.bilovol@gmail.com> (raw)
Hi,
This patch adds USB Audio Device Class 3.0 [1] function
support to gadget subsystem.
I didn't add UAC3 support to legacy gadget as it will
make preprocessor configuration too complex (UAC3 device
must have two configurations for backward compatibility,
first is UAC1/2 and second is UAC3), yet also I'm too lazy
to do that and verify all possible configurations.
For modern ConfigFS interface I'll provide my configuration
for testing below; testing was done on a BeagleBone Black
board.
This patch depends on uac3 header files from include dir
which I'll post as part of ALSA host UAC3 patch and will
provide the link to it here.
uac_3
------------
mkdir cfg
mount none cfg -t configfs
mkdir cfg/usb_gadget/g1
cd cfg/usb_gadget/g1
mkdir configs/c.1
mkdir functions/uac3.0
mkdir strings/0x409
mkdir configs/c.1/strings/0x409
echo 0x0101 > idProduct
echo 0x1d6b > idVendor
echo my-serial-num > strings/0x409/serialnumber
echo my-manufacturer > strings/0x409/manufacturer
echo "Test gadget" > strings/0x409/product
echo "Conf 1" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
ln -s functions/uac3.0 configs/c.1
echo musb-hdrc.0 > UDC
uac_3 + uac2
------------
mkdir cfg
mount none cfg -t configfs
mkdir cfg/usb_gadget/g1
cd cfg/usb_gadget/g1
mkdir configs/c.1
mkdir functions/uac2.0
mkdir strings/0x409
mkdir configs/c.1/strings/0x409
echo "Test gadget" > strings/0x409/product
echo "Conf 1" > configs/c.1/strings/0x409/configuration
echo 120 > configs/c.1/MaxPower
ln -s functions/uac2.0 configs/c.1
mkdir configs/c.2
mkdir functions/uac3.0
mkdir strings/0x409
mkdir configs/c.2/strings/0x409
echo "Conf 2" > configs/c.2/strings/0x409/configuration
echo 120 > configs/c.2/MaxPower
ln -s functions/uac3.0 configs/c.2
echo 0x0101 > idProduct
echo 0x1d6b > idVendor
echo my-serial-num > strings/0x409/serialnumber
echo my-manufacturer > strings/0x409/manufacturer
echo musb-hdrc.0 > UDC
[1] http://www.usb.org/developers/docs/devclass_docs/USB_Audio_v3.0.zip
Ruslan Bilovol (1):
usb: gadget: add USB Audio Device Class 3.0 gadget support
Documentation/ABI/testing/configfs-usb-gadget-uac3 | 14 +
Documentation/usb/gadget-testing.txt | 41 +
drivers/usb/gadget/Kconfig | 22 +
drivers/usb/gadget/function/Makefile | 2 +
drivers/usb/gadget/function/f_uac3.c | 1497 ++++++++++++++++++++
drivers/usb/gadget/function/u_uac3.h | 38 +
drivers/usb/gadget/legacy/Kconfig | 3 +-
7 files changed, 1616 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ABI/testing/configfs-usb-gadget-uac3
create mode 100644 drivers/usb/gadget/function/f_uac3.c
create mode 100644 drivers/usb/gadget/function/u_uac3.h
--
1.9.1
next reply other threads:[~2017-11-07 1:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 1:52 Ruslan Bilovol [this message]
2017-11-07 1:52 ` [PATCH 1/1] usb: gadget: add USB Audio Device Class 3.0 gadget support Ruslan Bilovol
2017-11-07 11:34 ` kbuild test robot
2017-11-07 13:20 ` kbuild test robot
2017-11-07 2:04 ` [PATCH 0/1] USB Audio Device Class 3.0 Gadget support Ruslan Bilovol
2017-12-04 11:36 ` Felipe Balbi
2017-12-07 11:18 ` Ruslan Bilovol
2018-06-13 0:28 ` Ruslan Bilovol
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=1510019522-15155-1-git-send-email-ruslan.bilovol@gmail.com \
--to=ruslan.bilovol@gmail.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.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).