summaryrefslogtreecommitdiffstats
path: root/docs/3.Usage.md
diff options
context:
space:
mode:
authorJames O'Shannessy <james.oshannessy@fiberdyne.com.au>2018-10-08 15:19:34 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-26 17:27:45 +1100
commit056c3754bc7be349de1a41ac6d4819f3d032bd0c (patch)
tree558603c87a397f72726437ad95b10037ebd648d3 /docs/3.Usage.md
parent13610114b7f283718a678c42e0421c3c51de636e (diff)
Fixing table of contents in README documentation
Restructure docs file tree Signed-off-by: James O'Shannessy <james.oshannessy@fiberdyne.com.au>
Diffstat (limited to 'docs/3.Usage.md')
-rw-r--r--docs/3.Usage.md80
1 files changed, 80 insertions, 0 deletions
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)
+
+<a name="un-load-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
+```
+
+<a name="configure-avirt" />
+
+## 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.