diff options
author | James O'Shannessy <james.oshannessy@fiberdyne.com.au> | 2018-09-13 17:20:37 -0700 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-26 17:27:44 +1100 |
commit | 7e4db2ff6865d723a2a6233a9542730876d06260 (patch) | |
tree | 91d37a48772711cd9a3ad85195799cd356377f12 | |
parent | 83ab0cdf84def71eebdebf0c813cebfce8f99d06 (diff) |
Updating build instructions
Cleaning up build instructions for building AVIRT
Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
-rw-r--r-- | README.md | 89 | ||||
-rw-r--r-- | docs/1. Introduction.md | 21 | ||||
-rw-r--r-- | docs/2. Building.md | 24 | ||||
-rw-r--r-- | docs/4. 4A Integration | 17 |
4 files changed, 45 insertions, 106 deletions
@@ -11,95 +11,6 @@ A sample dummy Audio Path is provided as an example to show how a low-level audi Currently, the Fiberdyne DSP hardmixer is supported on the Renesas R-Car M3 AGL reference platform, and a default loopback softmixer is in development. -## Building - -### Out Of Tree - -The kernel modules can be built either in-tree, or out-of-tree. -To build both AVIRT and the dummy Audio Path out-of-tree, use the following command: - -```sh -$ make all -``` - -If building for [AGL](http://docs.automotivelinux.org/), 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 - -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 `<M>`. 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 -``` - -## Running - -Firstly, install the resulting kernel modules to the appropriate modules -directory, and run`depmod`. For example, in AGL: - -```sh -cp avirt_core.ko avirt_dummyap.ko /lib/modules/4.14.0-yocto-standard/ -depmod -``` - -Now we can load the modules: - -```sh -modprobe avirt_core -modprobe avirt_dummyap -``` - -We must now configure AVIRT. We can do this with the test script: - -```sh -source scripts/test_configfs.sh -``` - -We can see the newly created streams by using the `aplay` utility. For example: - -```sh -aplay -l -... -card 2: avirt [avirt], device 0: multimedia [multimedia] - Subdevices: 1/1 - Subdevice #0: subdevice #0 -card 2: avirt [avirt], device 1: navigation [navigation] - Subdevices: 1/1 - Subdevice #0: subdevice #0 -card 2: avirt [avirt], device 2: emergency [emergency] - Subdevices: 1/1 - Subdevice #0: subdevice #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. - ## TODO - Currently, playback only - implementing capture is WIP. diff --git a/docs/1. Introduction.md b/docs/1. Introduction.md index f2d088d..29cac71 100644 --- a/docs/1. Introduction.md +++ b/docs/1. Introduction.md @@ -1,18 +1,13 @@ Introduction =================== -## Problem -- Insecure -- Limited -- Not fully optimised for use case (ie. Routing Audio to DSP vs. Loopback) -- Not generic interface for highly configurable hardware -- +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. -## Solution +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". -## Added Features -- Dynamic Runtime Alsa Front end -- Adjustable Audio Path -- Mappable Audio Path -- Secure Audio Routing w/ SMACK --
\ No newline at end of file +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 index 983db8d..0016822 100644 --- a/docs/2. Building.md +++ b/docs/2. Building.md @@ -2,20 +2,34 @@ Building AVIRT =================================== ## Table of Contents -1. [Out of Tree](#out-of-tree) -2. [In Tree](#in-tree) +1. [Introduction](#intro) +2. [Out of Tree](#out-of-tree) +3. [In Tree](#in-tree) + +<a name="intro"/> + +## 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. + <a name="out-of-tree"/> ## Out Of Tree -The kernel modules can be built either in-tree, or out-of-tree. -To build both AVIRT and the dummy Audio Path out-of-tree, use the following command: +### 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 @@ -26,6 +40,7 @@ $ ./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 `<M>`. The drivers can be found here: ``` @@ -33,6 +48,7 @@ $ make menuconfig # Navigate to: Device Drivers--->Staging Drivers--->AVIRT Support ``` + Finally build the kernel with the configuration selected by making. ``` $ make diff --git a/docs/4. 4A Integration b/docs/4. 4A Integration new file mode 100644 index 0000000..7c9b980 --- /dev/null +++ b/docs/4. 4A Integration @@ -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 |