The custom module development workflow involves the following high-level steps:
-
-
Start custom algorithm using standard industrial tool such as Matlab and optimize the algorithm
-for intended processor architecture
-
Develop the Common Audio Processor Interface (CAPI) wrapper for the
-custom algorithm. For examples and detailed instructions, see the CAPI Module Development Guide
-
Develop an API header file consisting of Module ID and configuration
-parameters related to the custom algorithm.
-
Generate an API XML file by running the h2xml conversion tool on the API
-header file. The XML file provides the necessary information about configuration
-interfaces, supported containers, stack size, and any other policies
-that are required for the AudioReach configuration tool (ARC platform).
-
Compile the CAPI-wrapped module as a built-in module as part of ARE image
-or standalone shared object.
-
Import the custom module into the ARC platform through a module
-discovery workflow, and create use case graphs by placing the module
-in the appropriate container and subgraphs.
-
Calibrate or configure the module together with an end-to-end use
-case, and store the data in the file system (through the ACDB file
-provided by the ARC platform).
-
Launch the end-to-end use case from the application, which in turn
-uses the use case graph and calibration information from the ACDB
-file and provides them to the ARE to realize the use case.
The first step is to integrate AudioReach components
into a Yocto build that can be loaded onto the Raspberry Pi device. This involves syncing a Yocto build and then integrating the meta-audioreach layer, which is currently available as a Github repository.
Now the build setup is complete, and the full Yocto image can be generated. Navigate to the “build” directory
-and run the command bitbake core-image-sato
+and run the below command to generate the image:
+
+
bitbakecore-image-sato
+
+
+
If the bitbake command gives a “umask” error, run the command umask 022 and try again.
If there is a “restricted license” error, navigate to the “<yocto_build_root>/build/conf/local.conf” file and append the below line:
The generated Yocto image can be flashed to an SD card using Raspberry Pi Imager. This can be installed from raspberrypi.com/software, or by running sudo apt install rpi-imager on a Linux terminal. Then follow the below steps to flash the device:
-
Open Raspberry Pi Imager, and select “RaspberryPi4” as the device type.
-
Under the “Choose OS” options, select the “Use custom” option. Make sure to search for all file types. Then navigate to the “.wic” file and select it.
+
Open Raspberry Pi Imager, and if there is a “Choose Device” option, select “RaspberryPi4” as the device type.
+
Under the “Choose OS” option, select “Use custom”. Make sure to search for all file types. Then navigate to the “.wic” file and select it.
Next, please complete the following steps to enable the audio and update
the logging settings. The files mentioned below can be updated directly on the Raspberry Pi 4 UI if the device is plugged into an external monitor, or through a local computer using SCP.
+
+
+
Note: Users can also connect to the Raspberry Pi through SSH by opening a connection to “root@<Raspberry PI IP address>”. By default, there is no password required to connect to SSH.
By default, the system logs printed while running a Raspberry Pi usecase will be short. The system log settings should be updated to capture the additional usecase logs that will be printed by AudioReach:
ARC (AudioReach Creator) is a tool that allows the user to perform several functionalities related to the audio usecase, including creating and editing audio usecase graphs, and editing audio configurations while running an
audio usecase in real time. For more information on ARC, please refer to the AudioReach Creator Design page.
+
+
+
Please note that at this time, AudioReach Creator is only available on Windows.
+
+
The below steps will demonstrate how to connect ARC to the Raspberry Pi so that the usecase graph can be viewed in real time.
On the Raspberry Pi, open the file “/proc/asound/cards”. There should be a few
-sound card entries in this list. If the file instead says “no sound cards available”, you likely
-forgot to enable the sound card (see section Configure bootup settings).
+
On the Raspberry Pi terminal, run the below command:
+
cat/proc/asound/cards
+
+
+
This should output the available sound cards. If the output instead says “no sound cards available”, you likely
+forgot to enable the sound cards (see section Configure bootup settings).