diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-08 16:47:25 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-26 17:27:46 +1100 |
commit | 3b62055c816764ff02aeb3a548e9bba36df8aae4 (patch) | |
tree | 172a0cf6fab98068182730479389546501ceff1b /docs/3.Usage.md | |
parent | 07505fddec4f96f187ec79a55f4363a68f083a03 (diff) |
Update documentation
Add 'map' to configfs test, remove old mentions of module parameters
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'docs/3.Usage.md')
-rw-r--r-- | docs/3.Usage.md | 53 |
1 files changed, 46 insertions, 7 deletions
diff --git a/docs/3.Usage.md b/docs/3.Usage.md index 7eb46d3..6d4d9f1 100644 --- a/docs/3.Usage.md +++ b/docs/3.Usage.md @@ -4,6 +4,7 @@ Using AVIRT ## Introduction ## Table of Contents + 1. [Load/Unload AVIRT](#un-load-avirt) 2. [Configuring AVIRT](#configuring-avirt) @@ -11,7 +12,9 @@ Using AVIRT ## Loading and Unloading AVIRT -As root, load the required ```avirt_core.ko``` and subsequent audio path. +### Load Out of Tree + +As root, load the required `avirt_core.ko` and subsequent audio path. As an example, the Dummy Audiopath is being loaded here. ```sh @@ -20,14 +23,38 @@ 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: +To run, we must load the kernel modules using the `scripts/load.sh` script: + ```sh -$ ./loadDrivers.sh +$ ./scripts/load.sh ``` + To unload the drivers use: + +```sh +$ ./scripts/unload.sh +``` + +### Load In Tree + +#### Note: + +Either build the module in tree, or you can copy the modules manually and then run `depmod` to generate dependencies. +For example, in AGL: + ```sh -$ ./unload.sh +mkdir -p /lib/modules/$(uname -r)/extra +cp avirt_core.ko avirt_dummyap.ko /lib/modules/$(uname -r)/extra +depmod +``` + +Once the modules are in place, we can load the modules using: + +```sh +modprobe avirt_core +modprobe avirt_dummyap ``` <a name="configure-avirt" /> @@ -35,22 +62,27 @@ $ ./unload.sh ## Configuring AVIRT AVIRT is configured using configfs. -### Note: -A sample script for the following is supplied inside the ```scripts``` folder. + +### 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 +# Check configfs is mounted on the system mkdir -p /config mount -t configfs none /config ``` @@ -61,20 +93,27 @@ Finally, we can configure AVIRT: # Set up each of the cards channels mkdir /config/avirt/streams/playback_media echo "2">/config/avirt/streams/playback_media/channels +echo "ap_dummy">/config/avirt/streams/playback_media/map mkdir /config/avirt/streams/playback_navigation echo "1">/config/avirt/streams/playback_navigation/channels +echo "ap_dummy">/config/avirt/streams/playback_navigation/map mkdir /config/avirt/streams/playback_emergency echo "1">/config/avirt/streams/playback_emergency/channels +echo "ap_dummy">/config/avirt/streams/playback_emergency/map mkdir /config/avirt/streams/capture_voice echo "1">/config/avirt/streams/capture_voice/channels +echo "ap_dummy">/config/avirt/streams/capture_voice/map # Finally, seal the card, and initiate configuration echo "1">/config/avirt/streams/sealed ``` +Alternatively, the test script at `scripts/test_configfs.sh` can be used. + ### Note: + A simplified helper library, libavirt, is available [here](https://github.com/fiberdyne/libavirt). Please refer to the readme in libavirt for further details. |