AWE Manager Shell
This document is currently under active development. Content may be updated, revised, or removed without notice.
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.
The components AWE Manager, AWE-TC, and awemgr_shell all work together and must be kept in sync.
The documentation for this section is fo
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>
To get a list of all available commands, do
CODE
awemgr-shell> ls
mgr_init <cmd> - Initialize AWE Manager
mgr_exit <cmd> - De-Allocate AWE Manager
cfg <cmd> - Handle AWE-Manager configuration
load_awc <cmd> - Load control config from AWC file
unload_awc <cmd> - Unload the AWC information
awc <cmd> - Selects endpoint in case multiple AWCs are loaded (multi-canvas)
show <cmd> - Prints information about controllable items and data in AWC file.
send_command <cmd> - Transmits a special tuning command to the target (BSP command)
info <cmd> - Get target information
load_design <cmd> - Load and apply a design (AWB)
unload_design <cmd> - Stops AWB processing and unloads a design
audio_stop <cmd> - Stops audio pumping, if the design is loaded and pumping
audio_start <cmd> - Starts audio pumping explicitly on a loaded design
enum_controls <cmd> - Populate an IDBG directory with control items from AWC
module <cmd> - Handle module's operating state or meta-info
controls <dir> - Filled with commands from AWC by 'enum_controls'
get_value <cmd> - Generic value retrieval
set_value <cmd> - Generic value setting
transact <cmd> - Binary buffer in and out
event <cmd> - Handle BSP system and AWE module events
comm <cmd> - Configuration of communication to AWEcore
comm-trace <cmd> - Trace communication
user_data <cmd> - Show data attached to modules/controls by system integrator
script <cmd> - Load and execute another script file
To get detailed information on a specific command, do something like:
CODE
event -h
The first command to type is shown below. This initializes awemgr_shell.
CODE
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.
CODE
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:
CODE
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
CODE
awemgr-shell> module -name A2DTrim -full
state = ACTIVE
classId = 3203336211 (0xBEEF0813)
You can list all tunable variables
CODE
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
CODE
awemgr-shell> set_value -var SourceMux.index -values "3"
[INFO ] awemgr_control_write( 96): Write to 'SourceMux.index'
To get a variable
CODE
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.
CODE
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:
CODE
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
CODE
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
CODE
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
CODE
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.
CODE
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
CODE
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
CODE
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:
CODE
event -list
To enable reporting of events in awemgr_shell use
CODE
event -report_on
To turn off reporting of events:
CODE
event -report_off
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
CODE
awemgr_shell -f commands.txt
-
Basic functionality is described here: (R4.3) AWE Manager Shell
-
Block diagram [AWE controller, AWE Manager, AWE instance]
-
AWE Manager [PC] (Not needed if not used)
-
AWE manager [On Target]
* has a good introduction
* * * Low power sleep and resume
-
Detailed documentation [Volker]
-
Loading subcanvas