Skip to content

Custom Module Deployment

Audio Weaver allows users to extend processing capabilities by writing Custom Moduies. This is for advanced users and documentation can be found here. Writing Custom Modules requires a Matlab license and a Designer add-on called the Custom Module SDK. This section assumes that you are familiar with writing Custom Modules and that your module is already executing on the PC in Native mode. This section only describes the additional steps for building and deploying on Snapdragon.

Recompiling Shared Libraries for Hexagon and Arm

This section teaches how to rebuild your module C code to generate shared libraries for the Hexagon and the Arm.

Differences between Lemans and Nordy

Loading and Unloading Module Libraries

How do users load shared libraries without using awemgr_shell?

AWE Manager Shell can be used to load and unload dynamic libraries. Libraries are loaded based on their files names and the shared libraries must be placed in specific directories on the target.

Lemans (8255 and 8775)

CODE

ADSP:      /vendor/dsp/adsp
GPDSP0:    /vendor/dsp/gpdsp
GPDSP1:    /vendor/dsp/gpdsp1
ARM:       TBD

Nordy (8397 and 8797)

CODE

DSP0:      TBD
DSP1:      TBD
DSP2:      TBD
ARM:       TBD

awemgr_shell commands

Start AWE Manager Shell in the usual way. Typically the command is:

CODE

awemgr_shell -awc /etc/awc_index.txt

You can list which module classes are loaded on your system using the command:

CODE

awemgr-shell> info -core 0 -classes
nr_classes: 433
classes:
 - 0xBEEF0802
 - 0xBEEF0804
 - 0xBEEF08ED
 - 0xBEEF0803
   <100s more lines>

To dynamically load a module library on the first DSP core use

CODE

awemgr-shell> send_command -cmd 1 -core 0 -payload libExamplesModulePackPlugin.so
  => RX: 0x00000001

If you get a failure here, you may have to manually starts the RPC service on Lemans. Use the Linux command:

/usr/bin/awe_fastrpc_test &

If you list module classes again you will see that the number of classes has increased and the newly loaded module(s) will be added to the end of the list. In this example, the module library only contains a single custom module. It is possible to include multiple custom modules in a single shared library.

CODE

awemgr-shell> info -core 0 -classes
nr_classes: 434
classes:
 - 0xBEEF0802
 - 0xBEEF0804
 - 0xBEEF08ED
 - 0xBEEF0803
   <100s more lines>
 - 0xBEEF8802      <<< This is the new module

Audio Weaver adds a hexadecimal offset of 0xBEEF0800 to the underlying module classID. The value 0xBEEF8802 corresponds to classID 0x8002 (32770) which is the ModuleFaderExample show on the Server window (use the “Target-->List Modules” menu item).

CODE

From ExamplesDLL.dll:
32770   ModuleFaderExample

You can unload the shared library and remove the custom module with the command:

CODE

awemgr-shell> send_command -cmd 2 -core 0 -payload libExamplesModulePackPlugin.so
  => RX: 0x00000002

The next time you list module classes you will see that the number of classes has increased. The module class of your custom module will be shown at the end of the list.

Shared Libraries and Subcanvases

This is a new feature which was introduced in AWE-Q R4.5. The Subcanvas container file contains a list of module libraries used by the IP inside of the Subcanvas. When you load (or unloaded) the Subcanvas with awemgr_shell, the associated custom libraries will be automatically loaded and unloaded.

How to update YAML files to specify default and custom module libraries.