From 056c3754bc7be349de1a41ac6d4819f3d032bd0c Mon Sep 17 00:00:00 2001 From: James O'Shannessy Date: Mon, 8 Oct 2018 15:19:34 +1100 Subject: Fixing table of contents in README documentation Restructure docs file tree Signed-off-by: James O'Shannessy --- docs/1. Introduction.md | 13 -------- docs/1.Introduction.md | 13 ++++++++ docs/2. Building.md | 55 --------------------------------- docs/2.Building.md | 56 +++++++++++++++++++++++++++++++++ docs/3. Usage.md | 80 ------------------------------------------------ docs/3.Usage.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ docs/4. 4A Integration | 17 ---------- docs/4.4A-Integration.md | 17 ++++++++++ 8 files changed, 166 insertions(+), 165 deletions(-) delete mode 100644 docs/1. Introduction.md create mode 100644 docs/1.Introduction.md delete mode 100644 docs/2. Building.md create mode 100644 docs/2.Building.md delete mode 100644 docs/3. Usage.md create mode 100644 docs/3.Usage.md delete mode 100644 docs/4. 4A Integration create mode 100644 docs/4.4A-Integration.md (limited to 'docs') diff --git a/docs/1. Introduction.md b/docs/1. Introduction.md deleted file mode 100644 index 29cac71..0000000 --- a/docs/1. Introduction.md +++ /dev/null @@ -1,13 +0,0 @@ -Introduction -=================== - -The ALSA Virtual Sound Driver (AVIRT) aims to provide a Linux kernel solution to the issue of audio routing in kernel-space, as well as security per-stream, and dynamic configuration of streams at the kernel level. - -A top-level abstract dynamic audio driver is presented to the user-space via an ALSA middle-layer card. From there, respective low-level "real" audio drivers can subscribe to it as an "Audio Path". - -The top-level driver is configured (currently) using module parameters, as is the norm for sound drivers in the Linux tree, however this will utilise a configfs configuration implementation in future. - -A sample dummy Audio Path is provided as an example to show how a low-level audio driver would subscribe to AVIRT, and accept audio routing for playback. - -Currently, the Fiberdyne DSP hardmixer is supported on the Renesas R-Car M3 AGL -reference platform, and a default loopback softmixer is in development. \ No newline at end of file diff --git a/docs/1.Introduction.md b/docs/1.Introduction.md new file mode 100644 index 0000000..29cac71 --- /dev/null +++ b/docs/1.Introduction.md @@ -0,0 +1,13 @@ +Introduction +=================== + +The ALSA Virtual Sound Driver (AVIRT) aims to provide a Linux kernel solution to the issue of audio routing in kernel-space, as well as security per-stream, and dynamic configuration of streams at the kernel level. + +A top-level abstract dynamic audio driver is presented to the user-space via an ALSA middle-layer card. From there, respective low-level "real" audio drivers can subscribe to it as an "Audio Path". + +The top-level driver is configured (currently) using module parameters, as is the norm for sound drivers in the Linux tree, however this will utilise a configfs configuration implementation in future. + +A sample dummy Audio Path is provided as an example to show how a low-level audio driver would subscribe to AVIRT, and accept audio routing for playback. + +Currently, the Fiberdyne DSP hardmixer is supported on the Renesas R-Car M3 AGL +reference platform, and a default loopback softmixer is in development. \ No newline at end of file diff --git a/docs/2. Building.md b/docs/2. Building.md deleted file mode 100644 index 0016822..0000000 --- a/docs/2. Building.md +++ /dev/null @@ -1,55 +0,0 @@ -Building AVIRT -=================================== - -## Table of Contents -1. [Introduction](#intro) -2. [Out of Tree](#out-of-tree) -3. [In Tree](#in-tree) - - - -## Introduction -The AVIRT module and submodules can be built using a variety of methods. There are Visual Code build tasks for in and out of tree builds, make file support for CLI building (both in and out of tree), and xds build support. - - - - -## Out Of Tree - -### Building with CLI -To build both AVIRT and the additional Audio Paths out-of-tree, use the following command: - -```sh -$ make -``` - -or -```sh -$ CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y CONFIG_AVIRT_DUMMYAP=m make -C /lib/modules/$(uname -r)/build/ M=$(pwd) -``` -The latter is executed internally with the make file. - -### Building with XDS SDK -To build both AVIRT and the dummy Audio Path out-of-tree for [AGL](http://docs.automotivelinux.org/) (`aarch64` currently supported), use the [XDS](http://docs.automotivelinux.org/docs/devguides/en/dev/reference/xds/part-1/0_Abstract.html) build system together with the `make_agl.sh` script: - -```sh -$ ./make_agl.sh ${XDS_SDK_ID} -``` - - - -## In tree - -The kernal modules can be built in tree, dependent on the avirt repository being located in drivers/staging - If using your own fork of the linux kernel, you will need to update the staging Makefiles and Kconfigs accordingly. - -To build in tree, use the [Fiberdyne Linux fork](https://github.com/fiberdyne/linux), which will automatically clone the AVIRT Driver and required AudioPath modules to the `drivers/staging` directory. You can then turn AVIRT Support on by setting to ``. The drivers can be found here: -``` -$ make menuconfig - -# Navigate to: Device Drivers--->Staging Drivers--->AVIRT Support -``` - -Finally build the kernel with the configuration selected by making. -``` -$ make -``` \ No newline at end of file diff --git a/docs/2.Building.md b/docs/2.Building.md new file mode 100644 index 0000000..237d834 --- /dev/null +++ b/docs/2.Building.md @@ -0,0 +1,56 @@ +Building AVIRT +=================================== + +## Table of Contents +1. [Introduction](#intro) +2. [Out of Tree](#out-of-tree) +3. [In Tree](#in-tree) + + + +## Introduction +The AVIRT module and submodules can be built using a variety of methods. There are Visual Code build tasks for in and out of tree builds, make file support for CLI building (both in and out of tree), and xds build support. + + + + +## Out Of Tree + +### Building with CLI +To build both AVIRT and the additional Audio Paths out-of-tree, use the following command: + +```sh +$ make +``` + +or +```sh +$ CONFIG_AVIRT=m CONFIG_AVIRT_BUILDLOCAL=y CONFIG_AVIRT_DUMMYAP=m make -C /lib/modules/$(uname -r)/build/ M=$(pwd) +``` +The latter is executed internally with the make file. + +### Building with XDS SDK +To build both AVIRT and the dummy Audio Path out-of-tree for [AGL](http://docs.automotivelinux.org/) (`aarch64` currently supported), use the [XDS](http://docs.automotivelinux.org/docs/devguides/en/dev/reference/xds/part-1/0_Abstract.html) build system together with the `make_agl.sh` script: + +```sh +$ ./make_agl.sh ${XDS_SDK_ID} +``` + + + +## In tree + +The kernal modules can be built in tree, dependent on the avirt repository being located in drivers/staging - If using your own fork of the linux kernel, you will need to update the staging Makefiles and Kconfigs accordingly. + +To build in tree, use the [Fiberdyne Linux fork](https://github.com/fiberdyne/linux), which will automatically clone the AVIRT Driver and required AudioPath modules to the `drivers/staging` directory. You can then turn AVIRT Support on by setting to ``. The drivers can be found here: + +``` +$ make menuconfig + +# Navigate to: Device Drivers--->Staging Drivers--->AVIRT Support +``` + +Finally build the kernel with the configuration selected by making. +``` +$ make +``` \ No newline at end of file diff --git a/docs/3. Usage.md b/docs/3. Usage.md deleted file mode 100644 index 7eb46d3..0000000 --- a/docs/3. Usage.md +++ /dev/null @@ -1,80 +0,0 @@ -Using AVIRT -=================================== - -## Introduction - -## Table of Contents -1. [Load/Unload AVIRT](#un-load-avirt) -2. [Configuring AVIRT](#configuring-avirt) - - - -## Loading and Unloading AVIRT - -As root, load the required ```avirt_core.ko``` and subsequent audio path. -As an example, the Dummy Audiopath is being loaded here. - -```sh -insmod avirt_core.ko -insmod dummy/dummy_audiopath.ko -``` - -### Note: -The loading and unloading of drivers can be performed using the helper scripts. -To run, we must load the kernel modules using the `loadDrivers.sh` script, which contains sample module parameters to AVIRT: -```sh -$ ./loadDrivers.sh -``` -To unload the drivers use: -```sh -$ ./unload.sh -``` - - - -## Configuring AVIRT - -AVIRT is configured using configfs. -### Note: -A sample script for the following is supplied inside the ```scripts``` folder. - -First, verify the kernel supports the use of configfs. -```sh -fgrep configfs /proc/filesystems -``` - -the expected output is: -``` -nodev configfs -``` - -Once confirmed, we can mount the configfs at the conventional point: -```sh -#Check configfs is mounted on the system -mkdir -p /config -mount -t configfs none /config -``` - -Finally, we can configure AVIRT: - -```sh -# Set up each of the cards channels -mkdir /config/avirt/streams/playback_media -echo "2">/config/avirt/streams/playback_media/channels - -mkdir /config/avirt/streams/playback_navigation -echo "1">/config/avirt/streams/playback_navigation/channels - -mkdir /config/avirt/streams/playback_emergency -echo "1">/config/avirt/streams/playback_emergency/channels - -mkdir /config/avirt/streams/capture_voice -echo "1">/config/avirt/streams/capture_voice/channels - -# Finally, seal the card, and initiate configuration -echo "1">/config/avirt/streams/sealed -``` - -### Note: -A simplified helper library, libavirt, is available [here](https://github.com/fiberdyne/libavirt). -Please refer to the readme in libavirt for further details. diff --git a/docs/3.Usage.md b/docs/3.Usage.md new file mode 100644 index 0000000..7eb46d3 --- /dev/null +++ b/docs/3.Usage.md @@ -0,0 +1,80 @@ +Using AVIRT +=================================== + +## Introduction + +## Table of Contents +1. [Load/Unload AVIRT](#un-load-avirt) +2. [Configuring AVIRT](#configuring-avirt) + + + +## Loading and Unloading AVIRT + +As root, load the required ```avirt_core.ko``` and subsequent audio path. +As an example, the Dummy Audiopath is being loaded here. + +```sh +insmod avirt_core.ko +insmod dummy/dummy_audiopath.ko +``` + +### Note: +The loading and unloading of drivers can be performed using the helper scripts. +To run, we must load the kernel modules using the `loadDrivers.sh` script, which contains sample module parameters to AVIRT: +```sh +$ ./loadDrivers.sh +``` +To unload the drivers use: +```sh +$ ./unload.sh +``` + + + +## Configuring AVIRT + +AVIRT is configured using configfs. +### Note: +A sample script for the following is supplied inside the ```scripts``` folder. + +First, verify the kernel supports the use of configfs. +```sh +fgrep configfs /proc/filesystems +``` + +the expected output is: +``` +nodev configfs +``` + +Once confirmed, we can mount the configfs at the conventional point: +```sh +#Check configfs is mounted on the system +mkdir -p /config +mount -t configfs none /config +``` + +Finally, we can configure AVIRT: + +```sh +# Set up each of the cards channels +mkdir /config/avirt/streams/playback_media +echo "2">/config/avirt/streams/playback_media/channels + +mkdir /config/avirt/streams/playback_navigation +echo "1">/config/avirt/streams/playback_navigation/channels + +mkdir /config/avirt/streams/playback_emergency +echo "1">/config/avirt/streams/playback_emergency/channels + +mkdir /config/avirt/streams/capture_voice +echo "1">/config/avirt/streams/capture_voice/channels + +# Finally, seal the card, and initiate configuration +echo "1">/config/avirt/streams/sealed +``` + +### Note: +A simplified helper library, libavirt, is available [here](https://github.com/fiberdyne/libavirt). +Please refer to the readme in libavirt for further details. diff --git a/docs/4. 4A Integration b/docs/4. 4A Integration deleted file mode 100644 index 7c9b980..0000000 --- a/docs/4. 4A Integration +++ /dev/null @@ -1,17 +0,0 @@ -4A Integration -=================== - -AVIRT has been integrated with [4a-softmixer](https://github.com/iotbzh/4a-softmixer) -and [4a-hal-generic](https://github.com/iotbzh/4a-hal-generic) to provide a smooth -transition from the existing aloop implementation to the future AVIRT loopback implementation. - -### User-space Library - -The user-space library [libavirt](https://github.com/fiberdyne/libavirt) can be used to configure AVIRT from within a given AGL 4A binding. - -### Hardmixer - -A new 4A mixer binding has been developed to demonstrate the capabilities of the -Fiberdyne DSP mixer operating on the HiFi2 core on-board the Renesas R-Car M3 M3ULCB -AGL reference platform. This is called the 'hardmixer', and is a faster, lower -latency alternative to the softmixer. \ No newline at end of file diff --git a/docs/4.4A-Integration.md b/docs/4.4A-Integration.md new file mode 100644 index 0000000..7c9b980 --- /dev/null +++ b/docs/4.4A-Integration.md @@ -0,0 +1,17 @@ +4A Integration +=================== + +AVIRT has been integrated with [4a-softmixer](https://github.com/iotbzh/4a-softmixer) +and [4a-hal-generic](https://github.com/iotbzh/4a-hal-generic) to provide a smooth +transition from the existing aloop implementation to the future AVIRT loopback implementation. + +### User-space Library + +The user-space library [libavirt](https://github.com/fiberdyne/libavirt) can be used to configure AVIRT from within a given AGL 4A binding. + +### Hardmixer + +A new 4A mixer binding has been developed to demonstrate the capabilities of the +Fiberdyne DSP mixer operating on the HiFi2 core on-board the Renesas R-Car M3 M3ULCB +AGL reference platform. This is called the 'hardmixer', and is a faster, lower +latency alternative to the softmixer. \ No newline at end of file -- cgit 1.2.3-korg