lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue,  7 Nov 2017 03:52:01 +0200
From:   Ruslan Bilovol <ruslan.bilovol@...il.com>
To:     Felipe Balbi <balbi@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 0/1] USB Audio Device Class 3.0 Gadget support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ