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_number\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_number\ndat:json:{JSON_data}\nerror::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 SCO stream is connected. | |
volumecontrol | String | Indicates type of volume control supported by the paired device:
|
|
audioprocessing | Boolean | Indicates whether the paired device supports audio processing. | |
free_handle | audioman_handle | Number | Releases handle returned by get_handle. |
get_alias_handle | target | Number | Retrieves a unique handle from the Audio Manager, based on the target handle. Audio on the new handle will be impacted by audio ducking whenever the target handle is impacted. |
audioman_handle | Number | New handle, an alias to the target handle, that the client should use for all other actions. | |
get_handle | type | String | Audio source type, one of:
|
pid | Number | Process ID of the caller (returned by the getpid() call). Note that Audio Manager will get this automatically if it's not filled. | |
suspended | Boolean | Indicates whether the audio handle is activated right away. Default is true. | |
audioman_handle | Number | New handle, returned by Audio Manager, 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 is muting the given handle. | |
muted_by_pid | String | Process ID of the audio source that is muting the given handle. There may be multiple sources muting this handle; if so, this field contains the ID of the first process doing the muting. | |
get_type_concurrency_status | type | String | Name of the audio type for which the audio concurrency policy is being returned. |
attenuated | Boolean | Indicates whether the audio type is being attenuated. | |
muted | Boolean | Indicates whether the audio type is being muted. | |
muted_by | String | Name of the audio source that is muting the given audio type. | |
muted_by_pid | String | Process ID of the audio source that is muting the given audio type. There may be multiple sources muting this type; if so, this field contains the ID of the first process doing the muting. | |
get_voice_enhanced_audio_option | source | String | Name of the voice source, one of:
|
output | String | Name of the specific output device for this enhanced audio option. Default is handset. | |
option | String | Name of the enhanced audio option, one of:
|
|
get_voice_mode | source | String | Name of the voice source, one of:
|
mode | String | Voice mode, one of:
|
|
numchans | number | Number | Number of channels (1 or 2). |
pcm_input_closed | audioman_handle | Number |
Handle returned by get_handle. This command notifies apps that a PCM channel for input has been closed/suspended by the libasound library. |
pcm_input_opened | audioman_handle | Number |
Handle returned by get_handle. This command notifies apps that a PCM channel for input has been opened through the libasound library. The Audio Manager uses a default type of generic for the source. |
pcm_output_closed | audioman_handle | Number |
Handle returned by get_handle. This command notifies apps that a PCM channel for output has been closed/suspended by the libasound library. |
pcm_output_opened | audioman_handle | Number |
Handle returned by get_handle. This command notifies apps that a PCM channel for output has been opened by the libasound library. |
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 | Audio source type, one of:
|
|
input | String | Name of input device, overridden by the audio source (see /pps/services/audio/devices/ for the supported devices). The default device clears the input setting. | |
output | String |
Name of output device, overridden by the audio source. A client should set the input and output parameters only to override the default routing path. For example, if the user has a headset during a phone call, the default routing that the Audio Manager picks is through the headset. However, the user could force the device to send output through the loudspeaker and get input from the handset, in which case the phone app would have to tell phone-pps to override the output to speaker and the input to handset. |
|
set_voice_enhanced_audio_option | source | String | Name of the voice source, one of:
|
output | String | Name of the specific output device for this enhanced audio option. Default is handset. | |
option | String | Name of the enhanced audio option, one of:
|
|
set_voice_mode | source | String | Name of the voice source, one of:
|
mode | String | Voice mode, one of:
|