AWE Manager Shell
AWE-Q includes a command line utility called “AWE Manager Shell” which is used during system bring up and testing. The utility allows you to set and get parameter values, load designs, load subcanvases, and do profiling. It also includes basic scripting which provides automation for testing the system. awemgr_shell is essentially a command line interface to the AWE Manager library which interfaces to tinymix. This section gives a quick introduction to the most frequently used commands while detailed documentation can be found here.
To start AWE Manager Shell, issue this command on the ADP in an ADB shell:
awemgr_shell
After it launches, the command will change to:
awemgr-shell>
The first command to type is shown below. This initializes awemgr_shell.
awemgr-shell> mgr_init
[INFO ] awemgr_init(115): MGR Log configuration: info
Next, load the text file used by AWE Manager when the system booted. The file is always stored in the same location.
awemgr-shell> load_awc -awc /etc/awc_index.txt
[INFO ] awemgr_load_awc(155): AWC context created and control info loaded for instanceId 0
awemgr_shell now has visibility into all exposed modules. You can list them:
awemgr-shell> show -modules
=> A2DTrim : objid = 30006, classid = 0x00000013
=> Meter1 : objid = 30002, classid = 0x0000006B
=> PinkTrim : objid = 30004, classid = 0x00000013
=> PinkTrim1 : objid = 30005, classid = 0x00000013
=> SourceMux : objid = 30003, classid = 0x00000068
To get more details on a specific module
awemgr-shell> module -name A2DTrim -full
state = ACTIVE
classId = 3203336211 (0xBEEF0813)
You can list all tunable variables
awemgr-shell> show -controls
=> A2DTrim.gain : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> A2DTrim.smoothingTime : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> A2DTrim.isDB : type = AWEMGR_VARTYPE_INTEGER, size = 1
=> A2DTrim.targetGain : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> A2DTrim.currentGain : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> A2DTrim.smoothingCoeff : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> Meter1.meterType : type = AWEMGR_VARTYPE_INTEGER, size = 1
=> Meter1.attackTime : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> Meter1.releaseTime : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> Meter1.attackCoeff : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> Meter1.releaseCoeff : type = AWEMGR_VARTYPE_FLOAT, size = 1
=> Meter1.value : type = AWEMGR_VARTYPE_FLOAT, size = 16
...
To set a variable
awemgr-shell> set_value -var SourceMux.index -values "3"
[INFO ] awemgr_control_write( 96): Write to 'SourceMux.index'
To get a variable
awemgr-shell> get_value -var SourceMux.index
[INFO ] awemgr_control_read_partial(175): Read from 'SourceMux.index'
=> RX: 0x00000003
The same syntax is used to set and get array variables.
awemgr-shell> get_value -var Meter1.value
[INFO ] awemgr_control_read_partial(175): Read from 'Meter1.value'
=> RX: 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000
=> RX: 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000
awemgr-shell> set_value -var Meter1.value -values "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"
[INFO ] awemgr_control_write( 96): Write to 'Meter1.value'
How do you get range information?
When you issue these commands, AWE Manager Shell constructs tuning packets and interacts with the running AWE Core instances. You can also turn on tracing of the low-level tuning interface packets and this causes the contents of all binary packets to be logged to the console window:
awemgr-shell> comm_trace -on
awemgr-shell> get_value -var SourceMux.index
[INFO ] awemgr_control_read_partial(175): Read from 'SourceMux.index'
[DUMP] awectrl_buf_dump(158): [chn:0] TX: 0 : 0x00040008, 0x07533008, 0x00000000, 0x07573000
[DUMP] awectrl_buf_dump(158): [chn:0] RX: 0 : 0x00040000, 0x00000000, 0x00000000, 0x00040000
=> RX: 0x00000000
awemgr-shell> comm_trace -off
To show the CPU load and memory used in instance 0
awemgr-shell> info -cpu
CPU 6.82%
awemgr-shell> info -mem
heaps used: 4
- fast_a: 6178/250000 (2.47%)
- fast_b: 1/450000 (0.00%)
- slow : 290/250000 (0.12%)
- shared: 752/262000 (0.29%)
To show the same information for instance 1
awemgr-shell> info -cpu -core 1
CPU 1.42%
awemgr-shell> info -mem -core 1
heaps used: 4
fast_a: 6178/250000 (2.47%)
fast_b: 1/450000 (0.00%)
slow : 290/250000 (0.12%)
shared: 752/262000 (0.29%)
This shows what AWB context is available to load
awemgr-shell> show -designs
=> Main : size = 4988 bytes, coreid 0, objectid = 0
These commands load and unload signal flows. Unloading a design essentially destroys the Audio Weaver signal flow and halts audio processing.
awemgr-shell> load_design -name Main
[INFO ] awemgr_load_design( 61): Found design: Main; instanceId: 0, objectId: 0, file: full_design.awb
[INFO ] awemgr_load_design( 71): Loading AWB file /etc/full_design.awb (instanceId: 0)
[INFO ] awemgr_load_design(125): AWB data applied for Main (instanceId: 0)
AWB Design loaded and started.
awemgr-shell> unload_design -name Main
[INFO ] awemgr_unload_design(183): AWE design stopped and unloaded: Main
To show Target Information and software versions
awemgr-shell> info
[INFO ] awemgr_get_target_info(104): Endpoint 0 Instance 0
[INFO ] awemgr_get_target_info(137): Target Info: AWECore: 8.C.0.13 at ADSP(0) : sr=48000.00Hz; bs=48; threads=10
[INFO ] awemgr_get_target_info(104): Endpoint 0 Instance 1
[INFO ] awemgr_get_target_info(137): Target Info: AWECore: 8.C.0.13 at GPDSP0(1) : sr=48000.00Hz; bs=48; threads=10
[INFO ] awemgr_get_target_info(104): Endpoint 0 Instance 2
[INFO ] awemgr_get_target_info(137): Target Info: AWECore: 8.C.0.13 at GPDSP1(2) : sr=48000.00Hz; bs=48; threads=10
[INFO ] awemgr_get_target_info(104): Endpoint 0 Instance 3
[INFO ] awemgr_get_target_info(137): Target Info: AWECore: 8.C.0.0 at ARM(3) : sr=48000.00Hz; bs=48; threads=8
target_info:
name: ADSP
sw_version: AWECore: 8.C.0.13
name: GPDSP0
sw_version: AWECore: 8.C.0.13
name: GPDSP1
sw_version: AWECore: 8.C.0.13
name: ARM
sw_version: AWECore: 8.C.0.0
To get and set the run-time status of a module
awemgr-shell> module -name MasterGain
state = ACTIVE
awemgr-shell> module -name MasterGain -state MUTED
awemgr-shell> module -name MasterGain
state = MUTED
To list Event modules which exist in the signal flow:
event -list
Thus far, we have been demonstrating AWE Manager Shell in interactive mode. The application can also run in a scripted manner taking commands from a file. Use this syntax
awemgr_shell -f commands.txt