summaryrefslogtreecommitdiffstats
path: root/Documentation/usb
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-12-16 14:56:41 +0100
committerFelipe Balbi <balbi@ti.com>2015-01-12 12:13:25 -0600
commit020c6f93484370672060fabebc49aed5d1a7c58f (patch)
tree4731309e120008c0f0194b14ae07e1ae1c384ff5 /Documentation/usb
parentdae0358694abe0bbca3b83a922698b1f24c4299a (diff)
downloadlinux-020c6f93484370672060fabebc49aed5d1a7c58f.tar.bz2
Documentation: usb: UAC2 function testing
Summary of how to test UAC2 function of USB gadget. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'Documentation/usb')
-rw-r--r--Documentation/usb/gadget-testing.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/Documentation/usb/gadget-testing.txt b/Documentation/usb/gadget-testing.txt
index 40d22d82cc5a..5ac9dc702c0e 100644
--- a/Documentation/usb/gadget-testing.txt
+++ b/Documentation/usb/gadget-testing.txt
@@ -17,6 +17,7 @@ provided by gadgets.
14. SERIAL function
15. SOURCESINK function
16. UAC1 function
+17. UAC2 function
1. ACM function
@@ -614,3 +615,41 @@ Testing the UAC1 function
device: run the gadget
host: aplay -l # should list our USB Audio Gadget
+
+17. UAC2 function
+=================
+
+The function is provided by usb_f_uac2.ko module.
+
+Function-specific configfs interface
+------------------------------------
+
+The function name to use when creating the function directory is "uac2".
+The uac2 function provides these attributes in its function directory:
+
+ chmask - capture channel mask
+ c_srate - capture sampling rate
+ c_ssize - capture sample size (bytes)
+ p_chmask - playback channel mask
+ p_srate - playback sampling rate
+ p_ssize - playback sample size (bytes)
+
+The attributes have sane default values.
+
+Testing the UAC2 function
+-------------------------
+
+device: run the gadget
+host: aplay -l # should list our USB Audio Gadget
+
+This function does not require real hardware support, it just
+sends a stream of audio data to/from the host. In order to
+actually hear something at the device side, a command similar
+to this must be used at the device side:
+
+$ arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0 &
+
+e.g.:
+
+$ arecord -f dat -t wav -D hw:CARD=UAC2Gadget,DEV=0 | \
+aplay -D default:CARD=OdroidU3