diff --git a/README.md b/README.md index 65a2cf6..6b4f3fb 100644 --- a/README.md +++ b/README.md @@ -85,12 +85,12 @@ This directory contains a the daemon configuration and status files used to run The daemon and the demo have been tested with **Ubuntu 18.04** distro on **ARMv7** and with **Ubuntu 18.04, 19.10 and 20.04** distros on **x86** using: -* Linux kernel version >= 4.14.x -* GCC version >= 7.4 / clang >= 6.0.0 (C++17 support required) -* cmake version >= 3.10.2 +* Linux kernel version >= 4.10.x +* GCC version >= 7.x / clang >= 6.x (C++17 support required) +* cmake version >= 3.7 * node version >= 8.10.0 * npm version >= 3.5.2 -* boost libraries version >= 1.65.1 +* boost libraries version >= 1.65 * Avahi service discovery (if enabled) >= 0.7 The BeagleBone® Black board with ARM Cortex-A8 32-Bit processor was used for testing on ARMv7. @@ -145,6 +145,9 @@ The demo performs the following operations: ## Devices and interoperability tests ## See [Devices and interoperability tests with the AES67 daemon](DEVICES.md) +## AES67 USB Receiver and Transmitter ## +See [Use your board as AES67 USB Receiver and Transmitter](USB_GADGET.md) + ## Notes ## diff --git a/USB_GADGET.md b/USB_GADGET.md new file mode 100644 index 0000000..fe7dfd8 --- /dev/null +++ b/USB_GADGET.md @@ -0,0 +1,69 @@ +# AES67 USB Receiver and Transmitter # + +This document describes how to use the AES67 Daemon on a board to operate as AES67 USB Receiver and Transmitter. + +The board doesn't need to have an audio codec but a USB client or OTG connector that is able to operate in device mode. + +Eventually you will connect your card to your PC (*Windows* / *Linux* / *MAC*) via USB and use the PC as a player or recorder and the card to relay audio from USB to Ethernet and vice versa. + +## Kernel configuration ## + +You need to enable support for USB gadget and compile and enable the USB Audio Gadget 1.0 module of the Linux Kernel. +For this make sure you have the following kernel config options enabled: + + CONFIG_USB_F_UAC1=m + CONFIG_USB_CONFIGFS_F_UAC1=y + CONFIG_GADGET_UAC1=y +In the Kernel menu config the location of these option is: + + -> Device Drivers + -> USB support (USB\_SUPPORT [=y]) + -> USB Gadget Support (USB\_GADGET [=y]) +Transfer the new kernel and modules to the board. +Also make sure your board is properly configured to use the USB connector in device mode. + +**_NOTE:_** The reason for configuring USB Audio Gadget 1.0 instead of 2.0 is that 2.0 does not currently work properly with *Windows*. + +## Install the USB Audio Gadget 1.0 ## + +Install the Audio Gadget module with: + + sudo modprobe g\_audio + +If the negotiation with the connected PC is succefull on the board a new virtual audio card shows up. +To verify run: + + cat /proc/asound/card +The expected output is: + + 0 [UAC1Gadget ]: UAC1_Gadget - UAC1_Gadget + UAC1_Gadget 0 +By default this new audio codec works with a sample rate of 48Khz, 2 channels and sample format *S16_LE*. + +On the PC new audio input and output devices show up. +The name assigned to these depend on the OS. +On *Windows* a new speaker and microphone named *AC interface* get configured. + + +## AES67 USB Transmitter ## + +Before starting make sure that the [AES67 daemon basic setup](DEVICES.ms#daemon_setup) is done. + +On the board run the following command to relay the audio from the USB to the AES67 Source: + + sudo nice -n -10 ./alsaloop -c 2 -r 48000 -f S16_LE -C plughw:UAC1Gadget -P plughw:RAVENNA +On the PC start the audio playback on the new device. + +**_NOTE:_** The *ALSA RAVENNA driver* will perform the format conversion from *S16\_LE* to the *Source* format. + +## AES67 USB Receiver ## + +Before starting make sure that the [AES67 daemon basic setup](DEVICES.ms#daemon_setup) is done. +You also need to configure a new stereo *Sink* on the daemon. + +On the board run the following command to relay the audio from AES67 Sink to the USB: + + sudo nice -n -10 ./alsaloop -c 2 -r 48000 -f S16\_LE -P plughw:RAVENNA -C plughw:UAC1Gadget +On the PC start the audio recording on the new device. + +**_NOTE:_** The *ALSA RAVENNA driver* will perform the format conversion from *S16\_LE* to the *Sink* format.