NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
Audio Capacitive Touch BoosterPack Virtual Registers and Commands
Contents
- 1 Notation Convention
- 2 Mapping Short-hand Notation to Host API's
- 3 operation
- 3.1 NOP command
- 3.2 PLAY_LIST command
- 3.3 PAUSE_PLAY command
- 3.4 RESUME_PLAY command
- 3.5 PLAY_NEXT command
- 3.6 PLAY_PREV command
- 3.7 FF_NORMAL command
- 3.8 REWIND_NORMAL command
- 3.9 CYCLE command
- 3.10 SHUFFLE command
- 3.11 STOP_PLAY command
- 3.12 RECORD command
- 3.13 PAUSE_RECORD command
- 3.14 RESUME_RECORD command
- 3.15 MUTE_UNMUTE command
- 3.16 VOLUME_UPxx command
- 3.17 VOLUME_DOWNxx command
- 3.18 CD command
- 3.19 DIR command
- 3.20 DEL command
- 3.21 MKDIR command
- 3.22 NEXTF command
- 3.23 PREVF command
- 3.24 NEXTD command
- 3.25 FSTF command
- 3.26 FSTD command
- 3.27 VOLUME_RESET command
- 3.28 BALANCE_RESET command
- 3.29 SIDSLxx command
- 3.30 SIDxx command
- 3.31 PRTSxx command
- 3.32 PRTSLNxx command
- 3.33 SETCUR command
- 3.34 SETVP command
- 3.35 SETSC command
- 3.36 SCON command
- 3.37 SCOFF command
- 3.38 SLEEP command
- 3.39 DPON command
- 3.40 DPOFF command
- 4 play_file
- 5 record_file
- 6 volume
- 7 balance
- 8 stereo
- 9 control_eq
- 10 control_ks
- 11 record_bit_rate
- 12 record_sample_rate
- 13 record_format
- 14 play_format
- 15 play_bit_rate
- 16 play_sample_rate
- 17 audio_output
- 18 audio_input
- 19 dir_info
- 20 sys_file
- 21 power_io
- 22 power_core
- 23 baurate
- 24 play_number
- 25 current_play_file
- 26 record_status
- 27 current_record_file
- 28 time_out
- 29 power_mode
- 30 sys_status
- 31 file_count
- 32 dir_count
- 33 play_status
- 34 play_mode
- 35 shuffle_status
- 36 usb_ctrl
- 37 usb_status
- 38 event_ctrl
- 39 version
- 40 param
- 41 str
Notation Convention[edit]
A simple short-hand notation is used to describe the function of each virtual registers and its usage examples.
- Writng to a scalar virtual register:
- $<name of scalar virtual register>= <value>
- $<name of scalar virtual register>= <value>
- Reading from a scalar virtual register:
- <name of host scalar variable>= $<name of scalar virtual register>
- <name of host scalar variable>= $<name of scalar virtual register>
- Wrting to an array virtual register:
- $<name of array virtual register>= "<string value>"
- $<name of array virtual register>= "<string value>"
- Reading from an array virtual register:
- <name of host array variable>= $<name of array virtual register>
- <name of host array variable>= $<name of array virtual register>
- Insert a comment
- message <comment>
- message <comment>
- Show the value of a host scalar or array variable
- display <host scalar or array variable>
- display <host scalar or array variable>
Mapping Short-hand Notation to Host API's[edit]
Type of access | Short-hand Notation | Host API Call |
Scalar Read | my_scalar=$scalar_reg | uif_ReadScalar(uif, scalar_reg_addr, &my_scalar, time_out) |
Scalar Write | $scalar_reg=my_scalar | uif_WriteScalar(uif, scalar_reg_addr, my_scalar, time_out) |
Array Read | my_array=$array_reg | uif_ReadArray(uif, array_reg_addr, &my_array[0], time_out) |
Array Write | $array_reg=my_array | uif_WriteArray(uif, array_reg_addr, &my_array[0], time_out) |
scalar_reg_addr is the address of the scalar register that is being accessed. array_reg_addr is the address of the array register that is being accessed. Both types of virtual registers can be referenced using symbolic names from UifRegNames enum in acbp_vreg.h. The values of my_scalar assumes values from UifCommand or the enum related to the specific virtual register.
For details of host APIs, refer to Host APIs for a reference design of host APIs.
Host APIs and Virtual Registers Details The most accurate and detailed description of Host APIs and Virtual Registers can be found File:C55 uif host api.chm and File:C55 acbp vreg.chm |
operation[edit]
$operation is a general purpose register. A user writes to this register to initiate an operation. The supported operations are listed below, which include operations related to audio playback and recording, display operations and other system operations.
Syntax:
$operation=<value>
Where <value> can be
NOP
PLAY_LIST
PAUSE_PLAY
RESUME_PLAY
PLAY_NEXT
PLAY_PREV
FF_NORMAL
REWIND_NORMAL
CYCLE
SHUFFLE
STOP_PLAY
RECORD
STOP_RECORD
PAUSE_RECORD
RESUME_RECORD
MUTE_UNMUTE
VOLUME_UP01
VOLUME_UP02
...........
VOLUME_UP16
VOLUME_DOWN01
...........
VOLUME_DOWN16
BALANCE_LEFT01
...........
BALANCE_LEFT16
BALANCE_RIGHT01
BALANCE_RIGHT02
BALANCE_RIGHT16
FORMAT
CD
DIR
DEL
MKDIR
NXTF
PREVF
NEXTD
CMD_PREVD
FSTF
FSTD
VOLUME_RESET
BALANCE_RESET
SIDSL00
SIDSL01
...........
SIDSL31
PRTS00
PRTS01
...........
PRTS31
PRTSLN00
PRTSLN01
..........
PRTSLN31
SETCUR
SETVP
SETSPD
SCPY
SETFB
GETFB
SETWIN
SETSC
SCON
SCOFF
SLEEP
RAGA00
RAGA01
..........
RAGA19
DPON
DPOFF
LCD00
LCD01
..........
LCD19
NOP command[edit]
This command performs no operation.
Syntax:
$operation=NOP
PLAY_LIST command[edit]
This command starts the playback. Files to play can be configured using $play_file register. By default playback starts from the root directory. This command can be executed only when playback or record is not running. The playing sequence of PLAY_LIST command depends on the following operation commands and registers:
- CYCLE
- SHUFFLE
- $play_file
- $play_number
Please refer to the sections that describe the functions of these commands and virtual registers for details.
Syntax:
$operation=PLAY_LIST
Example:
message Play files in the root directory $play_file=\ message Enable CYCLE mode $operation=CYCLE message Start the play $operation=PLAY_LIST message Fast forward $operation=FF_NORMAL message Play next file $operation=PLAY_NEXT $operation=PAUSE_PLAY $operation=RESUME_PLAY $operation=STOP_PLAY
PAUSE_PLAY command[edit]
Command to pause the playback. This command can be executed only when playback is running.
Syntax:
$operation= PAUSE_PLAY
Example:
$play_file=\ $operation=PLAY_LIST $operation=PAUSE_PLAY $operation=RESUME_PLAY
RESUME_PLAY command[edit]
Command to resume the playback. This command can be executed only when playback is paused.
Syntax:
$operation= RESUME_PLAY
Example:
$play_file=\ $operation=PLAY_LIST $operation=PAUSE_PLAY $operation=RESUME_PLAY
PLAY_NEXT command[edit]
Command to play next file in the play list. This command can be executed only when playback is running. If CYCLE mode is enabled, when the last file of the playlist in $play_file has bee reached, the play will continue at the first file of the list. If CYCLE mode is not enabled, the play will stop.
Syntax:
$operation=PLAY_NEXT
Example:
$play_file=RecDir\ $operation=PLAY_LIST $operation=PLAY_NEXT $operation=PLAY_NEXT
PLAY_PREV command[edit]
Command to play previous file in the play list. This command can be executed only when playback is running.
Syntax:
$operation=PLAY_PREV
Example:
$play_file=RecDir\ $operation=PLAY_LIST $operation=PLAY_NEXT $operation=PLAY_NEXT $operation=PLAY_PREV
FF_NORMAL command[edit]
Command to enable/disable the fast-forward of the playback. This command can be executed only when playback is running.
When executed during playback, starts the fast-forward.
When executed during fast-forward, disables the fast-forward.
Syntax:
$operation= FF_NORMAL
REWIND_NORMAL command[edit]
Command to enable/disable the rewind of the playback. This command can be executed only when playback is running.
When executed during playback, starts the rewind.
When executed during rewind, disables the rewind.
Syntax:
$operation= REWIND_NORMAL
CYCLE command[edit]
Command to enable/disable the cycle of the playback. When cycle is enabled payback cycles through the play list else playback stops after playing last file of the list. By default cycle will be disabled. This command can be executed only when record is not running.
When executed for the first time, enables the cycle.
When executed for the second time, disables the cycle.
Syntax:
$operation= CYCLE
SHUFFLE command[edit]
Command to enable/disable the shuffle of the playback. When shuffle is enabled, files for the playback are picked up randomly. This command can be executed only when record is not running.
When executed for the first time, enables the shuffle.
When executed for the second time, disables the shuffle.
Syntax:
$operation= SHUFFLE
STOP_PLAY command[edit]
Command to stop the playback. This command can be executed only when playback is running.
Syntax:
$operation= STOP_PLAY
RECORD command[edit]
Command to start the record. Different commands are provided to configure the record parameters. By default record starts with 128kbps bit rate, 48KHz sample rate and MP3 format. This command can be executed only when playback or record is not running.
Syntax:
$operation= RECORD
PAUSE_RECORD command[edit]
Command to pause the record. This command can be executed only when record is running.
Syntax:
$operation= PAUSE_RECORD
RESUME_RECORD command[edit]
Command to resume the record. This command can be executed only when record is paused.
Syntax:
$operation= RESUME_RECORD
MUTE_UNMUTE command[edit]
Command to mute/unmute the playback volume. This command can be executed only when playback is running.
Syntax:
$operation= MUTE_UNMUTE
When executed for the first time, mutes the audio.
When executed for the second time, un-mutes the audio.
VOLUME_UPxx command[edit]
Command to increase the volume by steps indicated by last two digits in the command. This command can be executed only when playback is running.
Syntax:
$operation=VOLUME_UPxx
xx ranges from 01 to 16.
VOLUME_DOWNxx command[edit]
Command to decrease the volume by steps indicated by last two digits in the command. This command can be executed only when playback is running.
Syntax:
$operation= VOLUME_DOWNxx
xx ranges from 01 to 16.
CD command[edit]
Command to change the directory to the directory name stored in sys_file. This command can be executed only when playback or record is not running.
Syntax:
$sys_file=”<DirName>” $operation=CD
DIR command[edit]
Command to get the directory listing of the directory stored sys_file to the dir_info register. This command can be executed only when playback or record is not running.
Syntax:
$sys_file=”<DirName>” $operation=DIR my_dir_info=$dir_info display my_dir_info - Displays the contents of the directory ‘DirName’
Note: For getting the directory listing of sub-directories complete path needs to be given. Refer to dir_info register description for more details
DEL command[edit]
Command to delete a file or directory pointed by sys_file register. This command can be executed only when playback or record is not running.
Syntax:
$sys_file=”<FileDirName>” $operation=DEL
Note:
- Deleting <FileDirName> is limited to root directory. DEL command cannot be executed inside sub-directories
- After deleting <FileDirName> sys_file needs to be set to a valid value from the command console
- Non-empty directories cannot be deleted
MKDIR command[edit]
Command to create directory with name stored in sys_file register. This command can be executed only when playback or record is not running.
Syntax:
$sys_file=”<Dir Name>” $operation= MKDIR
Note: Creating the directories is limited to root directory. MKDIR command cannot be executed inside sub-directories
NEXTF command[edit]
Command to navigate to the next file in the directory. Make sure $dir_info register contains valid directory information before issuing this command. $sys_file will be updated to contain the name of the file. This command can be used during playback or when playback is stopped.
Syntax:
$operation= NEXTF
Example:
message Change directory to RecDir\ $sys_file=RecDir message Update directory information $operation=CD $operation=DIR message Display directory information my_dir=$dir_info display my_dir message Navigate to the first file $operation=FSTF message Navigate to the next file $operation=NEXTF my_file=$sys_file display my_file
PREVF command[edit]
Command to navigate to the previous file in the directory. Make sure $dir_info register contains valid directory information before issuing this command. $sys_file will be updated to contain the name of the file. This command can be used during playback or when playback is stopped.
Syntax:
$operation= PREVF
Example:
message Change directory to RecDir\ $sys_file=RecDir message Update directory information $operation=CD $operation=DIR message Display directory information my_dir=$dir_info display my_dir message Navigate to the first file $operation=FSTF message Navigate to the next file $operation=NEXTF message Navigate to the next file $operation=NEXTF message Navigate to the next file $operation=NEXTF message Navigate to the previous file $operation=PREVF my_file=$sys_file display my_file
NEXTD command[edit]
Command to navigate to the next sub-directory in the directory. Make sure $dir_info register contains valid directory information before issuing this command. $sys_file will be updated to contain the name of the sub-directory each time this command is issued. This command can be used during playback or when playback is stopped.
Syntax:
$operation= NEXTD
Example:
message Change directory to root directory $sys_file=\ message Update directory information $operation=CD $operation=DIR message Display directory information my_dir=$dir_info display my_dir message Navigate to the first directory $operation=FSTD message Navigate to the next directory $operation=NEXTD my_file=$sys_file display my_file
FSTF command[edit]
Command to navigate to the first file in the directory. Make sure $dir_info register contains valid directory information before issuing this command. $sys_file will be updated to contain the name of the file each time this command is issued. This command can be used during playback or when playback is stopped.
Syntax:
$operation= FSTF
Example:
message Change directory to RecDir $sys_file=RecDir message Update directory information $operation=CD $operation=DIR message Display directory information my_dir=$dir_info display my_dir message Navigate to the first file $operation=FSTF my_file=$sys_file display my_file
FSTD command[edit]
Command to navigate to the first sub-directory in the directory. Make sure $dir_info register contains valid directory information before issuing this command. $sys_file will be updated to contain the name of the sub-directory each time this command is issued. This command can be used during playback or when playback is stopped.
Syntax:
$operation= FSTD
Example:
message Change directory to root directory $sys_file=\ message Update directory information $operation=CD $operation=DIR message Display directory information my_dir=$dir_info display my_dir message Navigate to the first directory $operation=FSTD my_file=$sys_file display my_file
VOLUME_RESET command[edit]
Command to reset the volume to its default value.
Syntax:
$operation= VOLUME_RESET
Example:
$operation=VOLUME_RESET my_vol=$volume display my_vol $operation=VOLUME_UP10 my_vol=$volume display my_vol $operation=VOLUME_RESET my_vol=$volume display my_vol
BALANCE_RESET command[edit]
Command to reset the balance to its default value.
Syntax:
$operation= BALANCE_RESET
Example:
$operation=BALANCE_RESET my_bal=$balance display my_bal $operation=BALANCE_RIGHT10 my_bal=$balance display my_bal $operation=BALANCE_RESET my_bal=$balance display my_bal
SIDSLxx command[edit]
Command to reserve a slot from the string memory pool for a string with ID xx. xx ranges from 0 to 31. Each ID number identifies a unique string. With this command, a user can reserve memeory large enough to hold a string to be assigned later with SIDxx commands. The size, in terms of number of characters, of the memory is set using $param register.
Syntax:
$param=<value> $operation= SIDSLxx
Example:
message Reserve 20 characters for string #3 $param=20 $operation=SIDSL03 message String #3 is "abc" $str="abc" $operation=SID03 message String #3 is now "abcdef" $str="abcdef" $operation=SID03
SIDxx command[edit]
Command to assign an ID of xx to a string. xx ranges from 0 to 31. Each ID number identifies a unique string. The string to be assigned an ID is set in $str register. The ID xx can be a new ID or an existing ID previously set by SIDSLxx or SIDxx commands. If the ID is a new ID, a memory slot large enough to hold the string in $string will be allocated and the string will be copied to occupy the slot. The size of the memory slot associate with the ID is then fixed and will not change. The ID may be reused for other strings. However, the string will be cliiped to fit the existing memory slot.
Syntax:
$str=<value> $operation=SIDxx
Example:
message String #3 is "0123456789" $str="0123456789" $operation=SID03 message String #3 is now "01234" $str="01234" $operation=SID03 message Attemp to make String #3 "0123456789ab" message But string #3 actually is "0123456789" $str="0123456789ab" $operation=SID03
PRTSxx command[edit]
Command to print a string with ID xx to the display at the current cursor postion. xx ranges from 0 to 31. Each ID number identifies a unique string. ID xx must have been assigned to a string previoulsy suing SIDSLxx or SIDxx commands. A user may use SETCUR command to move the cursor to a new location before issuing the PRTSxx commands.
Syntax:
$operation=PRTSxx
Example:
message String #3 is "0123456789" $str="0123456789" $operation=SID03 message Move the cursor to line 2 and character 3 $param=0x0203 $operation=SETCUR message Print string #3 $operation=PRTS03
PRTSLNxx command[edit]
Command to print a string with ID xx to the display at the current cursor postion. The cursor automatically moves to the beginning of the next line at the end of printing. xx ranges from 0 to 31. Each ID number identifies a unique string. ID xx must have been assigned to a string previoulsy using SIDSLxx or SIDxx commands. A user may use SETCUR command to move the cursor to a new location before issuing the PRTSxx commands.
Syntax:
$operation=PRTSxx
Example:
message String #3 is "0123456789" $str="0123456789" $operation=SID03 message Move the cursor to line 2 and character 3 $param=0x0203 $operation=SETCUR message Print string #3 $operation=PRTSLN03 message Print the same string at the beginning of next line $operation=PRTSLN03
SETCUR command[edit]
Command to move the cursor to a new location. This command is used with PRTSxx and PRTSLNxx commands to print a string on the display. The location of the cursor in set in the $param register. Syntax:
$param=<value> $operation=SETCUR
Example:
message String #2 is "0123456789" $str="0123456789" $operation=SID02 message Move the cursor to line 1 and character 5 $param=0x0105 $operation=SETCUR message Print string #2 $operation=PRTSLN02
SETVP command[edit]
Command to set the viewport on the display frame buffer. A viewport is a rectangular area of the frame buufer, the content of which is rendered on the screen of display. On many display controllers, the size of display screen is smaller than the size of the display frame buffer. Only a partial area of display frame buffer can be displayed at once on the display screen. SERTVP command is used to define "the area of interest to be doisplayed on the screen. The coordinate of the area of interset is defined by $param register. The coordinate parameter $param=0xpqrs means the origin of the viewport is located in vertical 0xpq "dot" postion and 0xrs character postiton.
Syntax:
$param=<value> $operation=SETVP
Example:
message String #2 is "0123456789" $str="0123456789" $operation=SID02 message Move the cursor to line 0 and character 0 $param=0x0000 $operation=SETCUR message Print string #2 $operation=PRTSLN02 message Print more strings on subsequent lines $str="1234567890" $operation=SID02 $opeation=PRTSLN02 $str="2345678901" $operation=SID02 $opeation=PRTSLN02 $str="3456789012" $operation=SID02 $opeation=PRTSLN02 $str="4567890123" $operation=SID02 $opeation=PRTSLN02 $str="5678901234" $operation=SID02 $opeation=PRTSLN02 $str="6789012345" $operation=SID02 $opeation=PRTSLN02 $str="7890123456" $operation=SID02 $opeation=PRTSLN02 message Show lines 0 and 1 $param=0 $operation=SETVP message Show lines 1 and 2 $param=0x1000 $operation=SETVP message Show lines 5 and 6 $param=0x2800 $operation=SETVP message Scroll vertically by one line $param=0x2900 $operation=SETVP $param=0x2a00 $operation=SETVP $param=0x2b00 $operation=SETVP $param=0x2c00 $operation=SETVP $param=0x2d00 $operation=SETVP $param=0x2e00 $operation=SETVP $param=0x2f00 $operation=SETVP $param=0x3000 $operation=SETVP
SETSC command[edit]
Command to set up the horizontal scroll. Use this command with $param register to set up the configuration parameter of the scoll. The parameter define the direction, the speed and the scrolling area. After isssuing this command, to start the scroll, issue the SCON command. To stop it, issue the SCOFF command.
Syntax:
$param=<value> $operation=SETSC
Definition of <value>:
Bit 11 Direction 0=left 1=right Bits 10-8 Interval 0= 5 frames 1= 64 frames 2= 128 frames 3= 256 frames 4= 3 frames 5= 4 frames 6= 25 frames 7= 2 frames Bits 6-4 Start Line 0-7 Bits 2-0 Stop Line 0-7
Example:
message Set up to scroll lines 0 and 1 to the left. 5 frames between scrolls. $param=0x0001 $operation=SETSC message Set up the viewport so we could see it $param=0 $operation=SETVP message Start the scroll $operation=SCON message Stop the scroll $operation=SCOFF message Set up to scroll lines 2 and 3 to the right. 25 frames between scrolls. $param=0x0e23 $operation=SETSC $operation=SCON message Move the viewport so we could see it $param=0x1000 $operation=SETVP
SCON command[edit]
Command to start horizontal scroll. Use SETSC command to set up the scroll configuration parameters before issuing this command.
Syntax:
$param=<value> $operation=SCON
Example:
$param=0x0001 $operation=SETSC $operation=SCON $operation=SCOFF $operation=SCON
SCOFF command[edit]
Command to stop horizontal scroll.
Syntax:
$param=<value> $operation=SCOFF
Example:
$param=0x0001 $operation=SETSC $operation=SCON $operation=SCOFF $operation=SCON
SLEEP command[edit]
Command to put Audio Player Recorder Framework software and c55xx in SLEEP mode to save power. Upon issuing of this command, if there is no playback, recording or other on-going activities, RAGA will go to sleep immediately. Otherwsie, Audio Player Recorder Framework will wait until the activities have stopped and enter SLEEP mode. In SLEEP mode, RAGA/UIF is in a very low-power state with all the clocks disabled with the exception of RTC clock. Audio Player Recorder Framework will stop accepting commands via Virtual Register Control Interface. To wake up Audio Player Recorder Framework and C55xx, assert the external INT0 pin.
Warning: | Please note depending on the version of the software, Audio Player Recorder Framework may go to sleep without returning the acknowledge packet to the host. The host software should take provision to prevent the system from hanging. |
Syntax:
$operation=SLEEP
Example:
$operation=PLAY_LIST $operation=STOP_PLAY $operation=SLEEP
DPON command[edit]
Command to turn on the display.
Syntax:
$operation=DPON
DPOFF command[edit]
Command to turn off the display to save power. The content of the display frame buffer is unchanged. This command shall be issued before SLEEP command is issued. Syntax:
$operation=DPOFF
Example:
$operation=PLAY_LIST $operation=STOP_PLAY $operation=DPOFF $operation=SLEEP
play_file[edit]
This command configures name of the file to play or the directory which contains the files to play. This command can be executed only when no playback or record is running.
Syntax:
$play_file=”<FileDirName>”
Where <FileDirName> is the file or directory name. When specifying the file name, make sure that the file name is available in the current directory.
Example:
$operation=DIR my_dir_info=$dir_info display my_dir
Assume below is the directory listing for root directory
Dir1\
TRACK001.mp3
TRACK002.mp3
Dir2\
Playing files in root directory
$play_file=”\” $operation=PLAY_LIST
Playing files inside a sub-directory in root
$play_file=”Dir2” $operation=PLAY_LIST
Playing files in a sub-directory in the current directory
$play_file=. $operation=PLAY_LIST
Playing a single file in root
$play_file=” TRACK001.mp3” $operation=PLAY_LIST
Playing a single inside a sub-directory
$play_file=”Dir2\TRACK003.mp3” $operation=PLAY_LIST
Note:
- Specifying multiple file names (as a list) or multiple directory names separated by <space> is not supported
- Length of the name of the play_file is limited to 50 characters
- When playing single file using play_file configuration, playback stops after playing the file if CYCLE is not enabled and same file will be repeated when CYCLE is enabled
record_file[edit]
This command configures name of the file to record. This command can be executed only when no playback or record is running.
Syntax:
$record_file=”<FileName>” Where FileName is the name of the file to record
Note: Need to specify the record file name along with the extension
volume[edit]
This virtual register is read-only. It indicates the current level of volume. Use operation commands VOLUUME_UPxx and VOLUME_DOWNxx and VOLUME_RESET to control the volume.
Syntax:
my_vol=$volume
Example:
$operation=VOLUME_UP10 my_vol=$volume display play_vol $operation=VOLUME_DOWN10 my_vol=$volume display my_vol
balance[edit]
This virtual register is read-only. It indicates the level of balance. To adjust the balance, use operation commands BALANCE_LEFTxx, BALANCE_RIGHTxx and BALANCE_RESET.
Syntax:
my_bal= $balance
Example:
$operation=BALANCE_RESET my_bal=$balance $operation=BALANCE_LEFT10 my_bal=$balance display my_bal $operation=BALANCE_RIGHT10 my_bal=$balance display my_bal
stereo[edit]
Configures channel for record operation. This command can be executed only when no playback or record is running.
Syntax
$stereo=<Value>
Where Value can be either 0 (mono) or 1 (stereo)
Example:
$stereo=0
control_eq[edit]
This command configures the equalizer settings. This command can be executed only when no playback is running
Syntax
$control_eq=<Value>
Where Value should be five digit hex value where each digit indicates one band of the equalizer.
Example:
$control_eq=0xf0a0e
control_ks[edit]
This command configures the TSM settings. This command can be executed only when playback is running.
Syntax
$control_ks=<value>
Where <value> can be anywhere from 1 - 4
1 – Sets the TSM to 0.5x
2 – Sets the TSM to 1x
3 – Sets the TSM to 1.5x
4 – Sets the TSM to 2x
Example:
$control_ks=1
record_bit_rate[edit]
This command configures the bit rate for record operation. This command can be executed only when no playback or record is running
Syntax
$record_bit_rate=<Value>
Where the value can be any one of the bit rates supported by audio encoder. Valid values for RAGA demo are 8000, 16000, 24000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 192000, 224000, 256000, 320000.
Example:
$record_bit_rate=128000
record_sample_rate[edit]
This command configures the sample rate for record operation. This command can be executed only when no playback or record is running
Syntax
$record_sample_rate= <Value>
Where the value can be any one of the sample rates supported by audio encoder. Valid values for RAGA demo are 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000.
Example:
$record_sample_rate= 48000
record_format[edit]
This command configures format for the record operation. This command can be executed only when no playback or record is running.
Syntax
$record_format= <Value>
Where Value can be
- 0=MP3
- 1=WMA
- 2=AAC
In current implementation, only MP3 is supported.
Example:
$record_format=MP3
play_format[edit]
This command reads the format of the file being played. This command can be executed only when playback is running.
Syntax
format=$play_format display format
format will contains the value 0, 1 or 2 which indicates
- 0=MP3
- 1=WMA
- 2=AAC
In current implementation, only MP3 is supported.
play_bit_rate[edit]
This command reads the bit rate of the file being played. This command can be executed only when playback is running.
Syntax
my_bit_rate=$play_bit_rate display my_bit_rate
play_sample_rate[edit]
This command reads the sample rate of the file being played. This command can be executed only when playback is running.
Syntax
my_sample_rate=$play_sample_rate display my_sample_rate
audio_output[edit]
This command configures the output for the playback. This command can be executed only when no playback or record is running.
Syntax
$audio_output=<Value>
Where Value can be
SPK1 – Configures HEADPHONE port on the EVM for audio playback
SPK2 – Configures STEREO port on the EVM for audio playback
audio_input[edit]
This command configures the input for the record. This command can be executed only when no playback or record is running.
Syntax
$audio_input=<Value>
Where Value can be
MIC1 - Configures MIC on the EVM as input for record
MIC2 - Configures LINEIN on the EVM as input for record
dir_info[edit]
This command gets the content of the dir_info registers. DIR operation command needs to be sent before sending this command. DIR command fills the dir_info with the content of the directory pointed by sys_file register.
Syntax
my_dir_info =$dir_info display my_dir_info
Example
Getting the content of the root directory
$sys_file=”\” $operation=DIR my_dir_info=$dir_info display my_dir_info
Assume below is the directory listing for root directory
Dir1\
TRACK001.mp3
TRACK002.mp3
Dir2\
Getting the content of the sub-directory in root
$sys_file=”Dir1” $operation=DIR my_dir_info=$dir_info display my_dir_info
Getting the content of the sub-directory in a sub-directory
$sys_file=”Dir1\Dir3” $operation=DIR my_dir_info=$dir_info display my_dir_info
Note: Length of the sys_file is limited to 50 characters
sys_file[edit]
This command sets the value of the sys_info registers. sys_file register content is used when executing the operation commands CD, DIR, DEL, MKDIR and NXTF
Syntax
$sys_info=”dir_name”
Example
Using the sys_file with CD command
$sys_info=”my_dir_name” $operation=CD $play_file=. - Plays songs in the directory ‘my_dir_name’
Using the sys_file with DIR command
$sys_info=”my_dir_name” $operation=DIR my_dir_info=$dir_info - Gets the directory listing for the directory ‘my_dir_name’ display my_dir_info
Using the sys_file with DEL command
$sys_info=”my_<dir/file>_name” $operation=DEL - Deletes the directory/file pointed by ‘my_<dir/file>_name’ $sys_info=\
Using the sys_file with MKDIR command
$sys_info=”new_dir_name” $operation=MKDIR - Creates a directory with name ‘new_dir_name’ in root directory
power_io[edit]
Reads IO power value
Syntax
my_power_io=$power_io display my_power_io
power_core[edit]
Reads core power value
Syntax
my_power_core=$power_core display my_power_core
baurate[edit]
To read the current baud rate of UART interface, issue the following command on the command console:
Syntax
my_baudrate=$baudrate display my_baudrate
To set a new baud rate for the UART interface, issue the following command on the command console:
Syntax
$baudrate=<value>
In the current implementation, only the follwoing baudrate values are supported:
9600, 14400, 19200, 38400, 57600,115200 and 230400.
play_number[edit]
Reads/Writes play number. Reading play_number gives index of the song being played. Play number will be ‘0’ when playback is not running.
When play number is written before staring the playback, playback starts from the song with index as play_number
When play number is written during the playback, next song played will be play_number + 1.
Syntax
Reading the play number
my_play_num = $play_number display my_play_num
Writing the play number
$play_number=2
Note: Play number should be less than the number of songs in the current directory
current_play_file[edit]
Reads name of the file being played. This command can be executed only when playback is running.
Syntax
my_play_file=$current_play_file display my_play_file
The currently played file is returned as string to identifier specified with my_play_file
record_status[edit]
This command reads status of the record operation.
Syntax
my_record_status=$record_status display my_record_status
The current recording status is read and it can either be 0 or 1
0 – Record is stopped
1 – Record is running
2 - Record is paused
current_record_file[edit]
This command reads the name of the file being recorded. This command can be executed only when record is running.
Syntax
my_rec_file=$current_record_file display my_rec_file
The currently recorded file is returned as string to identifier specified with my_rec_file
time_out[edit]
In the current implementation, the value of this register is ignored.
power_mode[edit]
This command is not supported by the current version of the command console
sys_status[edit]
This register is read-only. It indicates the current status of the system.
file_count[edit]
This register is read-only. It contains the number of MP3 files in the current directory.
dir_count[edit]
This register is read-only. It contains the number of sub-directories in the current directory.
play_status[edit]
This register is read-only. It indicates the status of playback.
- 0=Playback is stopped
- 1=Playback is running
- 2=Playback is paused
- 3=Playback is in FAST-FORWARD
- 4=Playback is in REWIND
play_mode[edit]
This register is read-only. It indicates the mode of playback.
- 0=Play one file once with CYCLE disabled
- 1=Play the playlist with CYCLE disabled
- 2=Play one file repeatedly
- 3=Play the playlist with CYCLE enabled
- 4=Playback is stopped
shuffle_status[edit]
This register is read-only. It indicates the status of shuffle.
- 0=SHUFFLE disabled
- 1=SHUFFLE enabled
usb_ctrl[edit]
This register enables or disable USB Mass Storage Class Device (MSC).
- 0=USB MSC disabled
- 1=USB MSC enabled
usb_status[edit]
This register is read-only. It indicates the connection status of the USB cable.
- 0=USB cable is connected
- 1=USB cable is disconnected
event_ctrl[edit]
This register enables or disables the event processing.
In current implementation. This register is not supported and is ignored.
version[edit]
This register is read-only and contains a string indicating the version of Audio Player Recorder Framework software.
param[edit]
This is a general-purpose scalar register that works with $operation register and is used to specify parameters for an operaion command.
str[edit]
It is a general-purpose array register that works with $operation register and is used to specify the string parameter for display operation commands.