The Audio Manager listens for routing commands on this control object
Commands sent to the /pps/services/audio/audio_router_control object are of the form:
msg::command_string\nid::ID\ndat:json:{JSON_data}
Responses always reflect the command_string and ID_number that were sent in the message, along with any errors:
res::command_string\nid::ID\ndat:json:{JSON_data}\n error::error_description
Commands | Parameters | Data type | Description |
---|---|---|---|
BT_A2DP_capability | supported | Boolean | Indicates whether the paired device supports A2DP. |
connected | Boolean | Indicates whether the A2DP stream is connected. | |
BT_SCO_capability | supported | Boolean | Indicates whether the paired device supports SCO. |
connected | Boolean | Indicates whether the A2DP stream is connected. | |
volumecontrol | String | Type of volume control supported by the paired device:
|
|
audioprocessing | Boolean | Indicates whether the paired device supports audio processing. | |
free_handle | audioman_handle | Number | Handle returned by get_handle. |
get_alias_handle | target | Number | The Audio Manager returns a unique handle given the target handle. Audio on the new handle will be impacted by audio ducking whenever the target handle is impacted. |
audioman_handle | Number | The returned Audio Manager handle that the client should use for all other actions. | |
get_handle | type | String | The audio source type:
|
pid | Number | The process ID of the caller (returned by the getpid() call). Note that Audio Manager will get this automatically if not filled. | |
suspended | Boolean | Indicates whether the audio handle is activated right away. Default is true. | |
audioman_handle | Number | The returned Audio Manager handle that the client should use for all other actions. | |
get_handle_concurrency_status | audioman_handle | Number | Handle returned by get_handle. |
attenuated | Boolean | Indicates whether the given handle's audio type is being attenuated. | |
muted | Boolean | Indicates whether the given handle's audio type is being muted. | |
muted_by | String | Name of the audio type that mutes the given handle. | |
muted_by_pid | String | The process ID of the audio source that mutes the given handle. | |
get_type_concurrency_status | type | String | Name of the audio type whose audio concurrency policy is being returned. |
attenuated | Boolean | Indicates whether the given handle's audio type is being attenuated. | |
muted | Boolean | Indicates whether the given handle's audio type is being muted. | |
muted_by | String | Name of the audio type that mutes the given handle. | |
muted_by_pid | String | The process ID of the audio source that mutes the given handle. | |
get_voice_enhanced_audio_option | source | String | Name of the voice source:
|
output | String | Name of the specific output device for this enhanced audio option. Default is handset. | |
option | String | Name of the enhanced audio option:
|
|
get_voice_mode | source | String | Name of the voice source:
|
mode | String | The voice mode:
|
|
numchans | number | Number | Number of channels (1 or 2). |
pcm_input_closed
Note:
This command notifies apps that a PCM channel for input has been closed/suspended by the libasound library.
|
audioman_handle | Number | Handle returned by get_handle. |
pcm_input_opened
Note:
This command notifies apps that a PCM channel for input has been opened through the libasound library. The Audio Manager will default the type of this source to generic.
|
audioman_handle | Number | Handle returned by get_handle. |
pcm_output_closed | audioman_handle | Number | Handle returned by get_handle. |
pcm_output_opened | audioman_handle | Number | Handle returned by get_handle. |
print_audio_srcs | n/a | n/a | This command causes the Audio Manager to log all the active audio sources. |
set_audio_src | audioman_handle | Number | Handle returned by get_handle. |
type | String | The audio source type:
|
|
input | String | The input device name overridden by the audio source. (See /pps/services/audio/devices/ for the supported devices.) The default device clears the input setting. | |
output | String | The output device name overridden by the audio source.
Note:
A client normally shouldn't need to set the input and output parameters. Use these fields only to override the default routing path. For example, if the user has a headset in during a phone call, the default routing
audio manager picks would be through the headset. However, the user could force the device to send output through the loud
speaker and get input from the handset, in which case the phone app would have to tell phone-pps to override the output to speaker(3) and input to handset(1).
|
|
set_voice_enhanced_audio_option | source | String | Name of the voice source:
|
output | String | Name of the specific output device for this enhanced audio option. Default is handset. | |
option | String | Name of the enhanced audio option:
|
|
set_voice_mode | source | String | Name of the voice source:
|
mode | String | The voice mode:
|