com.webos.service.audio
API Summary
Controls the audio policy of a webOS system. Implements audio routing (sending audio streams to the proper destinations) and setting volumes in different scenarios..
Its functionality is categorized into the following modules:
- Master: Controls the master volume of audio output devices.
- UMI: Handles connections and manages volume for audio resources, when playing audio from applications like YouTube.
- System: Controls audio policy for DTMF (touch tones), alarm, calendar, and effects.
- Media: Controls audio policy for media playback.
- Ringtone: Controls audio policy for ringtones.
- Alert: Controls audio policy for alerts.
In addition, there is a soundSettings category, to manage sound settings such as setting the output device for the audio.
Note: [ Applicable for Master, UMI, and SoundSettings ] The audio service calls the audiooutput service to communicate with the audio hardware layer.
Overview of the API
-NA-
Methods
media/setVolume
Description
Sets the volume level of the current or the specified scenario.
Parameters
Name | Required | Type | Description |
---|---|---|---|
volume | Required | Number | Indicates the volume level to be set. |
sessionId | Optional | Number | Indicates the display/session to which the operation is applicable. Possible values are:
Note: If not provided, the operation is applied to session 0. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "Error Codes" section of this method for details. |
Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
1 | Could not validate json message against schema | Wrong JSON message format |
2 | "Missing 'volume' integer parameter." | Mandatory Parameter Volume has to be specified |
3 | "failed to set parameter (invalid scenario name?)" | Volume for the scenario could not be set. Check for the validity of scenario |
3 | Invalid 'volume' integer parameter value or file not found. | Volume value is not valid. It should be between 0 and 100. |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":10}'
Response:
{
"returnValue": true
}
# luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":50, "sessionId":0}'
Response:
{
"returnValue": true
}
# luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":50, "sessionId":1}'
Response:
{
"returnValue": true
}
systemsounds/playFeedback
Description
Plays the various system alert sounds based on the name passed to it.
Parameters
Name | Required | Type | Description |
---|---|---|---|
name | Optional | String | Name of the system sound. |
sink | Optional | String | Sink to use to play sound (default: pfeedback). |
play | Optional | Boolean |
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean |
|
Example
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{
"name":"voicestart",
"sink":"pfeedback",
"play":true
}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{
"name":"voicestart",
"sink":"pfeedback",
"play":false
}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "voicestart", "play":false}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "voicestart"}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{}'
Response:
{
"errorCode": 2,
"returnValue": false,
"errorText": "Missing 'name' string parameter."
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"namex": "voicestart"}'
Response:
{
"errorCode": 1,
"returnValue": false,
"errorText": "Could not validate json message against schema"
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "shutter"}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "shutter_test"}'
Response:
{
"errorCode": 3,
"returnValue": false,
"errorText": "Invalid 'name' string parameter value or file not found."
}
udev/event
Description
Gives the audiod information regarding the USB Mic/Headset Connected/Disconnected events based on the udev rules.
It also provides the sound card number and device number information.
Parameters
Name | Required | Type | Description |
---|---|---|---|
event | Required | String | The event to be passed to audiod by the udev rule when USB soundcard is detected.It is a simple string defined by audiod. |
soundcard_no | Optional | Number | sound card number as of now is being extracted from the device path where USB sound card is detected by udev. |
device_no | Optional | Number | device number as of now is being extracted from the device path where USB sound card is detected by udev. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | If the method succeeds, returnValue will contain true. |
errorCode | Optional | Number | errorCode contains the error code if the method fails. The method will return errorCode only if it fails. |
errorText | Optional | String | errorText contains the error text if the method fails. The method will return errorText only if it fails. |
Example
# luna-send -n 1 luna://com.webos.service.audio/udev/event '{
"event":"usb-mic-inserted",
"soundcard_no":"1",
"device_no":"0"
}'
# luna-send -n 1 luna://com.webos.service.audio/udev/event '{"event":"headset-inserted"}'
Response:
{
"returnValue":true
}
# luna-send -n 1 luna://com.webos.service.audio/udev/event '{"event":"headset-removed"}'
Response:
{
"returnValue":true
}
UMI/connect
Description
Establishes connection for the audio resource.
Parameters
Name | Required | Type | Description |
---|---|---|---|
outputMode | Required | String | Indicates the audio output device. Possible values are:
|
audioType | Required | String | Indicates the type of the audio stream. Possible values for Open are:
|
sink | Required | String | Indicates the audio sink. Possible values are:
|
source | Required | String | Indicates the audio source. Possible values are:
|
sourcePort | Required | Number | Audio source port. Possible values are 0 ~1 for ADEC source and 0~7 for AMIXER source |
context | Optional | String | Indicates the audio pipeline ID. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
source | Required | String | Indicates the audio source. Possible values are:
|
sink | Required | String | Indicates the audio sink. Possible values are:
|
Example
# luna-send -f -n 1 luna://com.webos.service.audio/UMI/connect '{
"outputMode":"alsa",
"audioType":"umimedia",
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0
}'
Response:
{
"source": "AMIXER",
"sink": "ALSA",
"returnValue": true
}
# luna-send -f -n 1 luna://com.webos.service.audio/UMI/connect '{
"outputMode":"alsa",
"audioType":"umimedia",
"sink":"ALSA",
"source":"AMIXERTEST",
"sourcePort":0
}'
Response:
{
"errorCode": 4,
"returnValue": false,
"errorText": "Invalid parameters"
}
# luna-send -f -n 1 luna://com.webos.service.audio/UMI/connect '{
"outputMode":"alsa",
"audioType":"radio",
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0
}'
Response:
{
"source": "AMIXER",
"sink": "ALSA",
"returnValue": true
}
UMI/disconnect
Description
Disconnects the connection.
Parameters
Name | Required | Type | Description |
---|---|---|---|
sink | Required | String | Indicates the audio sink. Possible values are:
|
source | Required | String | Indicates the audio source. Possible values are:
|
sourcePort | Required | Number | Audio source port. Possible values are 0 ~1 for ADEC source and 0~7 for AMIXER source |
audioType | Required | String | Indicates the audio stream type. Possible values for Open are:
|
context | Optional | String | Indicates the audio pipeline ID. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
source | Required | String | Indicates the audio source. Possible values are:
|
sink | Required | String | Indicates the audio sink. Possible values are:
|
Example
# luna-send -f -n 1 luna://com.webos.service.audio/UMI/disconnect '{
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0,
"audioType":"umimedia"
}'
Response:
{
"source": "AMIXER",
"sink": "ALSA",
"returnValue": true
}
UMI/getStatus
Description
Shows the connection status of audio resources.
Parameters
None
Call Returns
Name | Required | Type | Description |
---|---|---|---|
audio | Required | Object array: audio | Audio connection details. |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/UMI/getStatus '{}'
Response:
{
"audio": [
{
"source": "AMIXER",
"sink": "ALSA",
"muted": false,
"outputMode": "alsa"
}
],
"returnValue": true
}
UMI/mute
Description
Mutes or unmutes the input volume of the requested connection.
Note: This method is added for future-use. It does not have any impact on the audio setting.
Parameters
Name | Required | Type | Description |
---|---|---|---|
sink | Required | String | Audio sink. Possible values are:
|
source | Required | String | Audio source. Possible values are:
|
sourcePort | Required | Number | Audio source port |
mute | Required | Boolean | Indicates if the input volume is to be muted. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Example
# luna-send -n 1 -f luna://com.webos.service.audio/UMI/mute '{
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0,
"mute":true
}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/UMI/mute '{
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0,
"mute":false
}'
Response:
{
"returnValue": true
}
# luna-send -n 1 -f luna://com.webos.service.audio/UMI/mute '{
"sink":"ALSA",
"source":"AMIXER",
"sourcePort":0,
"mute":1
}'
Response:
{
"errorCode": 1,
"returnValue": false,
"errorText": "Could not validate json message against schema"
}
master/getVolume
Description
Gives the current master volume of the audio output device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Indicates if subscribed to get notifications. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
volumeStatus | Optional | Object array: VolumeStatus | Indicates the status of volume for different audio output devices. |
callerId | Optional | String | Indicates the luna service name of the calling application. |
Example
# luna-send -n i -f luna://com.webos.service.audio/master/getVolume '{
"subscribe":true
}'
Response:
{
"volumeStatus":{
"sessionId":0,
"muted":false,
"volume":100,
"soundOutput":"alsa"
},
"returnValue":true,
"callerId":"com.webos.lunasend-2027"
}
After change volume for session 1:
{
"volumeStatus":{
"sessionId":1,
"muted":false,
"volume":50,
"soundOutput":"alsa"
},
"returnValue":true,
"callerId":"com.webos.lunasend-2057"
}
master/setVolume
Description
Sets the master volume of the audio output device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
sessionId | Optional | Number | Indicates the display/session applicable to the operation. Possible values are:
Note: If not provided, the operation is applied to session 0. |
soundOutput | Required | String | Indicates the target sound output device. Possible value: "alsa" |
volume | Required | Number | Indicates the volume level to be set. Possible range: 0-100 |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
volume | Required | Number | Indicates the current volume level. Possible range: 0-100 |
soundOutput | Required | String | Indicates the target sound output device. Possible value: "alsa" |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
errorCode | Optional | Number | The error code for the failed operation. |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/master/setVolume '{
"soundOutput":"alsa",
"volume":57,
"sessionId":0
}'
Response:
{
"volume": 57,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/setVolume '{
"soundOutput":"alsa",
"volume":50,
"sessionId":1
}'
Response:
{
"volume": 50,
"returnValue": true,
"soundOutput": "alsa"
}
master/volumeUp
Description
Increases the master volume of the device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
sessionId | Optional | Number | Indicates the display/session applicable to the operation. Possible values are:
Note: If not provided, the operation is applied to session 0. |
soundOutput | Required | String | Indicates the audio output device. Possible value:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
volume | Required | Number | Indicates the current level of volume. Possible range: 0-100 |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
soundOutput | Required | String | Indicates the audio output device. Possible value: "alsa" |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/master/volumeUp '{
"soundOutput":"alsa",
"sessionId":0
}'
Response:
{
"volume": 12,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/volumeUp '{
"soundOutput":"alsa",
"sessionId":1
}'
Response:
{
"volume": 20
"returnValue": true,
"soundOutput": "alsa"
}
master/volumeDown
Description
Reduces the master volume of the device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
soundOutput | Required | String | Indicates the audio output device. Possible value: "alsa" |
sessionId | Optional | Number | Indicates the display/session applicable to the operation. Possible values are:
Note: If not provided, the operation is applied to session 0. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
volume | Required | Number | Indicates the current level of volume. Possible range: 0-100 |
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
soundOutput | Required | String | Indicates the audio sound output device. Possible value: "alsa" |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/master/volumeDown '{
"soundOutput":"alsa",
"sessionId":0
}'
Response:
{
"volume": 11,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/volumeDown '{
"soundOutput":"alsa",
"sessionId":1
}'
Response:
{
"volume": 49,
"returnValue": true,
"soundOutput": "alsa"
}
master/muteVolume
Description
Mutes or unmutes the master volume of the audio output device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
mute | Required | Boolean | Indicates if the master volume is to be muted. Possible values are:
|
sessionId | Optional | Number | Indicates the display/session applicable to the operation. Possible values are:
Note: If not provided, the operation is applied to the audio device connected to both the displays/sessions. |
soundOutput | Required | String | Indicates the audio output device. Possible values:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
mute | Required | Boolean | Indicates if the master volume is on mute or not. Possible values are:
|
soundOutput | Required | String | Indicates the audio output device. Possible value: "alsa" |
return1905 | Optional | String | Description here |
Example
# luna-send -f -n 1 luna://com.webos.service.audio/master/muteVolume '{
"soundOutput":"alsa",
"mute":true,
"sessionId":0
}'
Response:
{
"mute": true,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/muteVolume '{
"soundOutput":"alsa",
"mute":false,
"sessionId":0
}'
Response:
{
"mute": false,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/muteVolume '{
"soundOutput":"alsa",
"mute":true,
"sessionId":1
}'
Response:
{
"mute": true,
"returnValue": true,
"soundOutput": "alsa"
}
# luna-send -f -n 1 luna://com.webos.service.audio/master/muteVolume '{
"soundOutput":"alsa",
"mute":false,
"sessionId":1
}'
Response:
{
"mute": false,
"returnValue": true,
"soundOutput": "alsa"
}
soundSettings/setSoundOut
Description
Sets the audio output device.
Parameters
Name | Required | Type | Description |
---|---|---|---|
soundOut | Required | String | Indicates the audio output device. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
soundOut | Required | String | Indicates the audio output device. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Example
# luna-send -n 1 -f luna://com.webos.service.audio/soundSettings/setSoundOut '{
"soundOut":"alsa"
}'
Response:
{
"soundOut": "alsa",
"returnValue": true
}
playSound
Description
Plays PCM audio files through PulseAudio sound server.
Parameters
Name | Required | Type | Description |
---|---|---|---|
fileName | Required | String | Indicates the absolute path of the PCM file to be played. |
sink | Required | String | Indicates the virtual PulseAudio sink used by the application. Possible virtual sinks are:
|
format | Required | String | Indicates the sample format to be set. Possible formats are:
|
sampleRate | Required | Number | Indicates the sample rate to be set. Possible rates are:
|
channels | Required | Number | Indicates the number of audio channels to be used while playing the file. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
errorCode | Optional | Number | The error code for the failed operation. |
Example
# luna-send -n 1 luna://com.webos.service.audio/playSound '{
"fileName":"/usr/share/audiod/systemsounds/voicestart-ondemand.pcm",
"sink":"default1",
"sampleRate":48000,
"format":"PA_SAMPLE_S16LE",
"channels":2
}'
Response:
{
"returnValue":true
}
setInputVolume
Description
Sets the input volume for audio streams.
Parameters
Name | Required | Type | Description |
---|---|---|---|
streamType | Required | String | Indicates the stream name of the input volume to be applied. Possible values for Open are:
|
volume | Required | Number | Indicates the volume to be applied. Possible range: 0-100 |
ramp | Optional | Boolean | Indicates if the volume is to be applied in steps. Possible values are:
Default: false |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
volume | Optional | Number | Returns the value of applied volume in case of success. Possible range: 0-100 |
streamType | Optional | String | Returns the stream name of the volume applied. |
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Example
# luna-send -n 1 luna://com.webos.service.audio/setInputVolume '{
"streamType":"default1",
"volume":50
}'
Response:
{
"volume":50,
"returnValue":true,
"streamType":"default1"
}
getInputVolume
Description
Gets the input volume for audio streams.
Parameters
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Indicates if subscribed to get the notifications. Possible values are:
Default: false |
streamType | Required | String | Indicates the stream name of the input volume to be received. Possible values for Open are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if the input volume is subscribed to get the notifications. Possible values are:
|
streamType | Optional | String | Indicates the stream name of the input volume to be applied. Check "Parameters" section for list of possible values. |
volume | Optional | Number | Returns the value of applied volume in case of success. Possible range: 0-100 |
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
subscribed | Required | Boolean | Indicates if the input volume is subscribed to get the notifications. Possible values are:
Note: Always returns true. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
Note: Always returns value as true. |
streamType | Required | String | Indicates the stream name of the input volume to be applied. Check "Parameters" section for list of possible values. |
volume | Required | Number | Returns the value of applied volume in case of success. Possible range: 0-100 |
Example
# luna-send -n i -f luna://com.webos.service.audio/getInputVolume '{
"streamType":"default1",
"subscribe":true
}'
Response:
{
"subscribed":true,
"volume":50,
"streamType":"default1",
"returnValue":true
}
Subscription response:
{
"subscribed":true,
"volume":100,
"streamType":"default1",
"returnValue":true
}
getStreamStatus
Description
Gets the status and information of the active stream.
Parameters
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Indicates if subscribed to get the notifications. Possible values are:
Default: false |
streamType | Optional | String | Indicates the type of the stream. Note: If not specified, all active stream details are provided. |
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of operation. Possible values are:
|
subscribed | Optional | Boolean | Indicates if subscribed to get the notifications. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details. |
streamObject | Optional | Object array: streamObject | Indicates the list of active connections. |
Subscription Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
subscribed | Required | Boolean | Indicates if subscribed to get the notifications. Possible values are:
Note: Always returns true |
streamObject | Required | Object array: streamObject | Indicates the list of active connections. |
Example
# luna-send -n i -f luna://com.webos.service.audio/getStreamStatus '{
"streamType":"default1",
"subscribe":true
}'
Response:
{
"streamObject":[
{
"policyStatus":false,
"source":"source",
"inputVolume":100,
"muteStatus":false,
"sink":"sink",
"streamType":"default1",
"activeStatus":false
}
],
"subscribed":true,
"returnValue":true
}
Subscription response:
{
"streamObject":[
{
"policyStatus":false,
"source":"source",
"inputVolume":100,
"muteStatus":false,
"sink":"sink",
"streamType":"default2",
"activeStatus":true
}
],
"subscribed":true,
"returnValue":true
}
Objects
audio
Object returned by the UMI/getStatus.
Name | Required | Type | Description |
---|---|---|---|
source | Required | String | Indicates the audio source. Possible values are:
|
sink | Required | String | Indicates the audio sink. Possible values are:
|
muted | Required | Boolean | Indicates if the audio is muted. Possible values are:
|
outputMode | Required | String | Indicates the audio output device. Possible values are:
|
VolumeStatus
Provides the volume details of the target sound output device.
Name | Required | Type | Description |
---|---|---|---|
muted | Required | Boolean | Indicates if the audio is on mute or not. Possible values are:
|
volume | Required | Number | Indicates the current volume level. Note: Returns a value only if the audio is not on mute. |
soundOutput | Required | String | Indicates the target sound output device. Possible value: alsa |
sessionId | Required | Number | Indicates the volume status of the targeted display/session. Possible values are:
|
streamObject
Contains the list of active connections.
Name | Required | Type | Description |
---|---|---|---|
activeStatus | Required | Boolean | Indicates whether the stream is active. Possible values are:
|
inputVolume | Required | Number | Indicates the input volume of the stream. Possible range: 0~100 |
muteStatus | Required | Boolean | Indicates if the audio is muted. Possible values are:
|
policyStatus | Required | Boolean | Indicates if the policy for the streams is in progress. Possible values are:
|
sink | Optional | String | Indicates the audio sink ( MAIN, SUB and ALSA). |
source | Optional | String | Indicates the audio source ( ADEC, AMIXER). |
streamType | Required | String | Indicates the active stream names Possible values for Open are:
|
API Error Codes Reference
Error Code | Error Text | Error Description |
---|---|---|
200 | Audio not connected | Audio not connected |
17 | Audiod internal error | AUDIOD_ERRORCODE_FAILED_MIXER_CALL |
19 | Audiod internal error | AUDIOD_ERRORCODE_INVALID_AUDIO_TYPE |
18 | Audiod internal error | AUDIOD_ERRORCODE_INVALID_ENVELOPE_INSTANCE |
16 | Audiod internal error | AUDIOD_ERRORCODE_INVALID_MIXER_INSTANCE |
21 | Invalid parameters | AUDIOD_ERRORCODE_INVALID_PARAMS |
23 | Invalid schema | AUDIOD_ERRORCODE_INVALID_SCHEMA |
3 | Invalid volume control | AUDIOD_ERRORCODE_NOT_SUPPORT_VOLUME_CHANGE |
3 | Volume limit reached | AUDIOD_ERRORCODE_NOT_SUPPORT_VOLUME_CHANGE |
22 | Not supported | AUDIOD_ERRORCODE_NOT_SUPPORTED |
22 | Driver error | AUDIOD_ERRORCODE_NOT_SUPPORTED |
22 | Audio not connected | AUDIOD_ERRORCODE_NOT_SUPPORTED |
22 | Soundout type not supported | AUDIOD_ERRORCODE_NOT_SUPPORTED |
22 | Connection not supported | AUDIOD_ERRORCODE_NOT_SUPPORTED |
20 | Unknown error | AUDIOD_ERRORCODE_UNKNOWN_ERROR |
1 | Could not validate json message against schema | Invalid number of input parameters against defined schema of the method |
204 | Volume control is not supported | Volume control is not supported |
1 | Not a valid json message | Wrong JSON message format |