com.webos.service.audio

Note
This API has been available since API level 11.

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

UMI/connect

ACG: audio.operation
  • Added: API level 11

Description

Establishes connection for the audio resource.

Parameters

Name

Required

Type

Description

outputModeRequiredString

Indicates the audio output device.

Possible values are:

  • alsa
audioTypeRequiredString

Indicates the type of the audio stream.

Possible values are:

  • umimedia
sinkRequiredString

Indicates the audio sink.

Possible values are:

  • ALSA
sourceRequiredString

Indicates the audio source.

Possible values are:

  • AMIXER
sourcePortRequiredNumber

Audio source port.

Possible values are:

  • 0~7 for AMIXER source
contextOptionalString

Indicates the audio pipeline ID.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details.

sourceOptionalString

Indicates the audio source.

sinkOptionalString

Indicates the audio sink.

Example

Example code

# 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
}

Example scenario

# 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"
}

Example scenario

# 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

ACG: audio.operation
  • Added: API level 11

Description

Disconnects the connection. 

Parameters

Name

Required

Type

Description

sinkRequiredString

Indicates the audio sink.

Possible values are:

  • ALSA
sourceRequiredString

Indicates the audio source.

Possible values are:

  • AMIXER
sourcePortRequiredNumber

Audio source port.

Possible values are:

  • 0~7 for AMIXER source
audioTypeRequiredString

Indicates the audio stream type.

Possible values are:

  • umimedia
contextOptionalString

Indicates the audio pipeline ID.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details.

sourceOptionalString

Indicates the audio source.

sinkOptionalString

Indicates the audio sink.

Example

Example code

# 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

ACG: audio.query
  • Added: API level 11

Description

Shows the connection status of audio resources. 

Parameters

None

Call Returns

Name

Required

Type

Description

audioOptionalObject array: audio

Audio connection details.

returnValueRequiredBoolean

 Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details.

Example

Example code

# 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

ACG: audio.operation
  • Added: API level 11

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

sinkRequiredString

Audio sink.

Possible values are:

  • ALSA
sourceRequiredString

Audio source.

Possible values are:

  • AMIXER
sourcePortRequiredNumber

Audio source port

muteRequiredBoolean

Indicates if the input volume is to be muted. Possible values are: 

  • true - If the input volume is to be muted.
  • false - If the input volume is not to be muted. 

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details. 
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details.

Example

Example code

# luna-send -n 1 -f luna://com.webos.service.audio/UMI/mute '{
   "sink":"ALSA",
   "source":"AMIXER",
   "sourcePort":0,
   "mute":true
}'

Response:

{
    "returnValue": true
}

Example scenario

# luna-send -n 1 -f luna://com.webos.service.audio/UMI/mute '{
   "sink":"ALSA",
   "source":"AMIXER",
   "sourcePort":0,
   "mute":false
}'

Response:

{
    "returnValue": true
}

checkAudioEffectStatus

ACG: audio.query
  • Added: API level 21

Description

Check the status of an audio effect.

Parameters

Name

Required

Type

Description

effectNameRequiredString

Audio effect name. Possible values are:

  • speech enhancement
  • gain control
  • beamforming
  • dynamic compressor
  • equalizer
  • bass boost

Call Returns

Name

Required

Type

Description

enabledOptionalBoolean

Indicates the current state of the audio effect. Possible values are:

  • true: Audio effect is enabled.
  • false: Audio effect is not enabled.
returnValueRequiredBoolean

Indicates the status of the operation. Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

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

1Could not validate json message against schema

Invalid number of input parameters against defined schema of the method

15Audiod Internal Error

Internal error

19Invalid parameters

Invalid parameters error

Example

Example : Checks the status of the speech enhancement audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"speech enhancement"}'

Response:
{
    "returnValue": true,
    "enabled": true,
}

Example : Checks the status of the gain control audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"gain control"}'

Response:

{
    "returnValue" : true,
    "enabled": true
}

Example : Checks the status of the beamforming audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"beamforming"}'

Response:

{
    "returnValue" : true,
    "enabled": true
}

Example : Checks the status of the dynamic compressor audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"dynamic compressor"}'

Response:

{
    "returnValue" : true,
    "enabled": true
}

Example : Checks the status of the equalizer audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"equalizer"}'

Response:

{
    "returnValue" : true,
    "enabled": true
}

Example: Check the status of the bass boost audio effect

# luna-send -f -n 1 luna://com.webos.service.audio/checkAudioEffectStatus '{"effectName":"bass boost"}'

Response:

{
    "returnValue" : true,
    "enabled": true
}

getAudioEffectList

ACG: audio.query
  • Added: API level 21

Description

Lists all the supported audio effects.

Parameters

None

Call Returns

Name

Required

Type

Description

audioEffectListOptionalString array

List of the available audio effects. Possible values are:

  • speech enhancement
  • gain control
  • beamforming (not listed if none of the array microphones support beamforming)
  • dynamic compressor
  • equalizer
  • bass boost
returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

Error Codes Reference

Error Code

Error Text

Error Description

1Could not validate json message against schema

Invalid number of input parameters against defined schema of the method

15Audiod Internal Error

Internal error

Example

Example : Lists the supported audio effects

# luna-send -f -n 1 luna://com.webos.service.audio/getAudioEffectList '{}'

Response:

{
    "returnValue" : true
    "audioEffectList": [
        "speech enhancement",
        "gain control",
        "beamforming",
        "dynamic compressor",
        "equalizer"
        "bass boost"
    ]
}

getAudioEffectsStatus

ACG: audio.query
  • Added: API level 24

Description

Gets the status of all the audio effects.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe for notifications on changes to the status of audio effects. Possible values are:

  • true: Subscribed.
  • false: (default) Not subscribed.

Call Returns

Name

Required

Type

Description

subscribedOptionalBoolean

Indicates if subscribed to get notifications. Possible values are:

  • true: Subscribed.
  • false: Not subscribed.
returnValueRequiredBoolean

Indicates the status of the operation. Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation. See the 'Error Codes' section of this method for details.

statusOptionalObject array: effectStatus

Indicates status of audio effects.

Subscription Returns

Name

Required

Type

Description

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

statusRequiredObject array: effectStatus

Indicates status of audio effects.

returnValueRequiredBoolean

Indicates status of the operation.

Error Codes Reference

Error Code

Error Text

Error Description

1Could not validate json message against schema

Input parameters provided are incorrect.

15Audiod Internal Error

Internal error

Example

Example scenario

# luna-send -f -n 1 luna://com.webos.service.audio/getAudioEffectsStatus '{"subscribe":false }'

Response:

{

    "subscribed": false,
    "returnValue": true,
    "status": [
        {
            "name": "speech enhancement",
            "enabled": false
        },
        {
            "name": "gain control",
            "enabled": false
        },
        { 
            "name": "beamforming",  
            "enabled": false      
        }, 
        {
            "name": "dynamic compressor",
            "enabled": false
        }, 
        {
            "name": "equalizer",
            "enabled": false
        }, 
        {
            "name": "bass boost",
            "enabled": false
        }
     ]

}

getInputVolume

ACG: audio.query
  • Added: API level 12

Description

Gets the input volume for audio streams.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Indicates if subscribed to get the notifications.

Possible values are:

  • true: Subscribed to get notifications.
  • false: Not subscribed (default).
streamTypeRequiredString

Indicates the stream name of the input volume to be received.

Possible values are:

  • palerts
  • pfeedback
  • pringtones
  • pmedia
  • pdefaultapp
  • peffects
  • pvoicerecognition
  • ptts
  • default1
  • default2
  • tts1
  • tts2

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
subscribedOptionalBoolean

Indicates if the input volume is subscribed to get the notifications.

Possible values are:

  • true: Subscribed to get notifications.
  • false: Not subscribed.
streamTypeOptionalString

Indicates the stream name of the input volume to be applied. Check "Parameters" section for list of possible values.

volumeOptionalNumber

Returns the value of applied volume in case of success.

Possible range: 0-100

errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation.

Subscription Returns

Name

Required

Type

Description

subscribedOptionalBoolean

Indicates if the input volume is subscribed to get the notifications.

Possible values are:

  • true: Subscribed for notifications.
  • false: Not subscribed.
returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Indicates that the operation was successful.
  • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.

 

streamTypeOptionalString

Indicates the stream name of the input volume to be applied. Check "Parameters" section for list of possible values.

volumeOptionalNumber

Returns the value of applied volume in case of success.

Possible range: 0-100

Error Codes Reference

Error Code

Error Text

Error Description

1Could not validate json message against schema

Error occurs due to wrong json request.

15Audiod Internal Error

Internal error

17Audiod Unknown Stream

A wrong streamType is requested.

Example

Example scenario

# luna-send -i -f luna://com.webos.service.audio/getInputVolume '{
   "streamType":"default1",
   "subscribe":true
}'

Response:

{
   "subscribed":true,
   "volume":100,
   "streamType":"default1",
   "returnValue":true
}

getSoundInput

ACG: audio.query
  • Added: API level 13

Description

Gets the current active sound input device.

Parameters

Name

Required

Type

Description

subscribeOptionalString

Subscribe for notifications on changes in the sound input device.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed.
displayIdOptionalNumber

The display ID with which the sound input device is associated.

Possible values are: 0, 1.

Call Returns

Name

Required

Type

Description

soundInputOptionalString

The active sound input device.

returnValueRequiredBoolean

Indicates the status of the operation. 

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
subscribedOptionalBoolean

Indicates if subscribed to get notifications.

displayIdOptionalNumber

The display ID with which the sound input device is associated.

errorTextOptionalString

The reason for the failure of the operation.

errorCodeOptionalNumber

The error code for the failed operation.

Subscription Returns

Name

Required

Type

Description

soundInputRequiredString

The active sound input device.

returnValueRequiredBoolean

Indicates the status of the operation.

subscribedRequiredBoolean

Indicates whether the request is subscription or not

displayIdRequiredNumber

The display ID with which the sound input device is associated.

Error Codes Reference

Error Code

Error Text

Error Description

1Could not validate json message against schema

Error occurs due to wrong JSON request.

15Audiod internal error

Error occurs due to insufficient resource availability in Audiod.

Example

Example scenario

# luna-send -n 1 luna://com.webos.service.audio/getSoundInput '{}'

Response:

{
   "subscribed":false,
   "displayId":0,
   "returnValue":true,
   "soundInput":"pcm_input"
}

getSoundOutput

ACG: audio.query
  • Added: API level 13

Description

Gets the current active sound output device.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe for notifications on changes in the sound output device.

Possible values are:

  • true: Subscribed.
  • false: (default) Not subscribed.
displayIdOptionalNumber

The display ID with which the sound output device is associated.

Possible values are 0, 1.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation.

soundOutputOptionalString

The audio output device.

subscribedOptionalBoolean

Indicates if subscribed to get the notifications.

displayIdOptionalNumber

The display ID with which the sound output device is associated.

Error Codes Reference

Error Code

Error Text

Error Description

1Could not validate json message against schema

Error occurs due to wrong JSON request.

15Audiod internal error

Error occurs due insufficient resource availability in Audiod.

Example

Example scenario

# luna-send -n 1 -f luna://com.webos.service.audio/getSoundOutput '{"subscribe":false}'

Response:

{
    "subscribed": true,
    "returnValue": true,
    "displayId": 0,
    "soundOutput": "pcm_output"
}

getSourceInputVolume

ACG: audio.query
  • Added: API level 13

Description

Gets input volume of the source.

Parameters

Name

Required

Type

Description

sourceTypeRequiredString

The source for which volume is required. 

Possible values are:  

  • record
  • btcallsource
  • alexa
  • webcall
  • voiceassistance
subscribeOptionalBoolean

Subscribe for notifications on changes in the source volume.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed (default).

Call Returns

Name

Required

Type

Description

subscribedOptionalBoolean

Indicates if subscribed to get notifications.

sourceTypeOptionalString

The source for the volume.

returnValueRequiredBoolean

Indicates the status of the operation. Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
volumeOptionalNumber

The source volume.

errorTextOptionalString

The reason for the failure of the operation.

errorCodeOptionalNumber

The error code for the failed operation.

Subscription Returns

Name

Required

Type

Description

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

sourceTypeRequiredString

The source for the volume.

returnValueRequiredBoolean

Indicates the status of the operation.

    volumeRequiredNumber

    The source volume.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Audiod invalid schema

    Error occurs due to wrong JSON request.

    15Audiod internal error

    Error occurs due to insufficient resource availability.

    23AAudiod Unknown Source

    Error occurs due to wrong sourceType requested.

    Example

    Example : Without subscription

    # luna-send -n -i luna://com.webos.service.audio/getSourceInputVolume '{"sourceType":"record"}'

    Response:

    {
       "subscribed":false,
       "returnValue":true,
       "sourceType":"record",
       "volume":100
    }

    Example : With subscription

    # luna-send -n -i luna://com.webos.service.audio/getSourceInputVolume '{"sourceType":"record","subscribe":true}'

    Response:

    {
       "subscribed":true,
       "returnValue":true,
       "sourceType":"record",
       "volume":100
    }

    Subscription Response:

    {
       "subscribed":true,
       "returnValue":true,
       "sourceType":"record",
       "volume":75
    }

    getSourceStatus

    ACG: audio.query
    • Added: API level 13

    Description

    Gets the status of the source.

    Parameters

    Name

    Required

    Type

    Description

    sourceTypeOptionalString

    Type of source. 

    Possible values are:

    • record
    • btcallsource
    • alexa
    • webcall
    • voiceassistance

    Note: If not specified, all active source details are provided.

    subscribeOptionalBoolean

    Subscribe for notifications on changes in the source.

    Possible values are:

    • true: Subscribed.
    • false: Not subscribed (default).

    Call Returns

    Name

    Required

    Type

    Description

    subscribedOptionalBoolean

    Indicates if subscribed to get notifications.

    returnValueRequiredBoolean

    Indicates the status of the operation. 

    Possible values are:

    • true: Operation is successful.
    • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
    errorTextOptionalString

    The reason for the failure of the operation. 

    errorCodeOptionalNumber

    The error code for the failed operation.

    sourceObjectOptionalObject array: sourceObject

    The list of active source connections.

    Subscription Returns

    Name

    Required

    Type

    Description

    subscribedRequiredBoolean

    Indicates if subscribed to get notifications.

    sourceObjectRequiredObject array: sourceObject

    The list of active source connections.

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Audiod invalid schema

    Error occurs due to wrong JSON request.

    15Audiod internal error

    Error occurs due insufficient resource availability in Audiod.

    23Audiod Unknown Source

    Error occurs due to wrong sourceType requested.

    Example

    Example : Without sourceType and with subscription

    # luna-send -n 1 luna://com.webos.service.audio/getSourceStatus '{"subscribe":true}'

    Response:

    {
        "subscribed": true,
        "returnValue": true,
        "sourceObject": [
        ]
    }

    Example : With sourceType and without subscription

    # luna-send -n 1 -f luna://com.webos.service.audio/getSourceStatus '{"sourceType":"record"}'

    Response:
    {
        "subscribed": false,
        "returnValue": true,
        "sourceObject": [
            {
                "source": "source",
                "sink": "sink",
                "activeStatus": true,
                "muteStatus": false,
                "sourceType": "record",
                "inputVolume": 100,
                "policyStatus": false
            }
        ]
    }

    getStreamStatus

    ACG: audio.query
    • Added: API level 12

    Description

    Gets the status and information of the active stream.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Indicates if subscribed to get the notifications.

    Possible values are:

    • true: Subscribed for notifications.
    • false: (default) Not subscribed .
    streamTypeOptionalString

    Indicates the type of the stream.

    Note: If not specified, all active stream details are provided.

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of operation.

    Possible values are:

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    subscribedOptionalBoolean

    Indicates if subscribed to get the notifications.

    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    Indicates the reason for the failure of the operation.

    streamObjectOptionalObject array: streamObject

    Indicates the list of active connections.

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    subscribedOptionalBoolean

    Indicates if subscribed to get the notifications.

    streamObjectOptionalObject array: streamObject

    Indicates the list of active connections.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Error occurs due to wrong json request.

    15Audiod Internal Error

    Internal error

    17Audiod Unknown Stream

    A wrong streamType is requested.

    Example

    With subscription

    # luna-send -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":true
          }
       ],
       "subscribed":true,
       "returnValue":true
    }

    listSupportedDevices

    ACG: audio.query
    • Added: API level 20

    Description

    Gets the list of supported audio input and output devices and their connection status.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe for notifications on changes.

    Possible values are:

    • true: Subscribed.
    • false: Not subscribed.
    queryOptionalString

    Requested category of sound devices.

    Possible values are:

    • input
    • output
    • all (default)

    Call Returns

    Name

    Required

    Type

    Description

    subscribedOptionalBoolean

    Indicates if subscribed to get notifications.

    returnValueRequiredBoolean

    Indicates the status of the request.

    Possible values are:

    • true: Operation is successful.
    • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    The reason for the failure of the operation. See the 'Error Codes' section of the method for details.

    deviceListOptionalObject array: deviceList

    List of input and output devices.

    Subscription Returns

    Name

    Required

    Type

    Description

    subscribedRequiredBoolean

    Indicates if subscribed to get notifications.

    deviceListRequiredObject array: deviceList

    List of input and output devices.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    15Audiod Internal Error

    Internal error

    21Invalid Parameter

    Invalid query provided Wrong value for query parameter.

    Example

    Example : List supported input and output devices

    # luna-send –n –i luna://com.webos.service.audio/listSupportedDevices '{"subscribe":true,"query":"all"}'

    Response:

    {
        "returnValue" : true,
        "subscribed" : true,
        "deviceList" : [
            {
                "type" : "output",
                "deviceType" : "internal",
                "deviceName": "pcm_output",
                "deviceNameDetail" : "bcm HDMI",
                "connected" : true,
                "displayId" :  0,
                "active": true,
                "deviceIcon": "audio-card"

            },
            {
                "type" : "output",
                "deviceType" : "internal",
                "deviceName": "pcm_output1",
                "deviceNameDetail" : "bcm HDMI",
                "connected" : true,
                "displayId" :  1,
                "active": true,
                "deviceIcon": "audio-card"
            },
            {
                "type" : "output",
                "deviceType" : "internal",
                "deviceName": "pcm_headphone",
                "deviceNameDetail" : "bcm HDMI",
                "connected" : true,
                "displayId" :  0,
                "active": false,
                "deviceIcon": "audio-card"
            },
            {
                "type" : "output",
                "deviceType" : "external",
                "deviceName": "bluetooth_speaker0",
                "deviceNameDetail" : "bluetooth_speaker0",
                "connected" : false,
                "displayId" :  0,
                "active": false,
                "deviceIcon": ""
            },
            {
                "type" : "output",
                "deviceType" : "external",
                "deviceName": "usb_speaker0",
                "deviceNameDetail" : "usb_speaker0",
                "connected" : false,
                "displayId" :  0,
                "active": false,
                "deviceIcon": ""
            },
            {
                "type" : "output",
                "deviceType" : "external",
                "deviceName": "usb_speaker1",
                "deviceNameDetail" : "usb_speaker1",
                "connected" : false,
                "displayId" :  0,
                "active": false,
                "deviceIcon": ""
            },
            {
                "type" : "input",
                "deviceType" : "external",
                "deviceName": "usb_mic0",
                "deviceNameDetail" : "usb_mic0",
                "connected" : false,
                "displayId" :  0,
                "active": false,
                "deviceIcon": ""
            },
            {
                "type" : "input",
                "deviceType" : "external",
                "deviceName": "usb_mic1",
                "deviceNameDetail" : "usb_mic1",
                "connected" : false,
                "displayId" :  0,
                "active": false,
                "deviceIcon": ""
            }
        ]
    }

    master/getMicVolume

    ACG: audio.query
    • Added: API level 20

    Description

    Gets volume of currently active microphone input.

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Subscribe for notifications on changes. Possible values are:

    • true: Subscribed.
    • false: Not subscribed.
    displayIdOptionalNumber (int8_t)

    The display associated with the microphone. Possible values are:

    • 0 (default value)
    • 1
    soundInputOptionalString

    Indicates the audio input device. Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input (available only for OSE Emulator)

    Call Returns

    Name

    Required

    Type

    Description

    subscribedOptionalBooleanIndicates if subscribed to get notifications.
    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Operation is successful.
    • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    The reason for the failure of the operation. See the 'Error Codes' section of the method for details.

    soundInputOptionalString

    Input device name.

    Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input (Applicable only for OSE Emulator)
    volumeOptionalNumber (int8_t)

    Device volume.

    Possible values 0 - 100.

    muteStatusOptionalBoolean

    Mute status of input device.

    Possible values are:

    • true: Device is muted.
    • false: Device is not muted.

    Subscription Returns

    Name

    Required

    Type

    Description

    subscribedOptionalBooleanIndicates if subscribed to get notifications.
    returnValueOptionalBoolean

    Indicates the status of the operation.

    soundInputOptionalString

    Input device name.

    Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input
    volumeOptionalNumber (int8_t)

    Device volume.

    Possible values 0 - 100.

    muteStatusOptionalString

    Mute status of input device.

    Possible values are:

    • true: Device is muted.
    • false: Device is not muted.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    15Audiod Internal Error

    Internal error

    20DisplayId Not in Range

    Wrong displayId parameter supplied

    204Volume control is not supported

    Invalid sound input value given

    Example

    Example : Get volume of active mic input for display 0

    #luna-send –n 1 luna://com.webos.service.audio/master/getMicVolume '{}'

    Response: 

    {
       "returnValue":true,
       "subscribed":false,
       "soundInput":"usb_mic0",
       "volume":100,
       "muteStatus":false
    }

    master/getVolume

    ACG: audio.query
    • Added: API level 11

    Description

    Gives the current master volume of the audio output device. 

    Parameters

    Name

    Required

    Type

    Description

    subscribeOptionalBoolean

    Indicates if subscribed to get notifications. Possible values are:

    • true: Subscribed for notifications
    • false: Not subscribed
    soundOutputOptionalString

    Audio output device. Possible values are:

    • pcm_output
    • pcm_output1
    • pcm_headphone
    • usb_speaker0
    • usb_speaker1
    • bluetooth_speaker0
    • alsa

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    Indicates the reason for the failure of the operation.

    volumeStatusOptionalObject: VolumeStatus

    Indicates the status of volume for different audio output devices.

    callerIdOptionalString

    Indicates the luna service name of the calling application.

    Subscription Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    volumeStatusOptionalObject: VolumeStatus

    Indicates the status of volume for different audio output devices.

    callerIdOptionalString

    Indicates the luna service name of the calling application.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    15Audiod Internal Error

    Internal error

    204Volume control is not supported

    Invalid sound input value given

    Example

    Example : Get master volume

    # luna-send -n i -f luna://com.webos.service.audio/master/getVolume '{"subscribe":true}'

    Response:

    {
       "volumeStatus":{
          "sessionId":0,
          "muted":false,
          "volume":100,
          "soundOutput":"pcm_output"
       },
       "returnValue":true,
       "callerId":"com.webos.lunasend-2027"
    }

    Subscription response (after change volume for session 1):

    {
       "volumeStatus":{
          "sessionId":1,
          "muted":false,
          "volume":50,
          "soundOutput":"pcm_output1"
       },
       "returnValue":true,
       "callerId":"com.webos.lunasend-2057"
    }

    master/muteMic

    ACG: audio.operation
    • Added: API level 20

    Description

    Mutes/unmutes the currently active microphone input device.

    Parameters

    Name

    Required

    Type

    Description

    displayIdOptionalNumber (int8_t)

    The display associated with the microphone. Possible values are:

    • 0 (default value)
    • 1
    muteRequiredBoolean

    Mute status of the device. Possible values are:

    • true: Muted.
    • false: Not muted.
    soundInputOptionalString

    Indicates the audio input device. Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input (available only for OSE Emulator)

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Operation is successful.
    • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    The reason for the failure of the operation. See the 'Error Codes' section of the method for details.

    soundInputOptionalString

    Input device name.

    Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input (Applicable only for OSE Emulator)
    muteOptionalBoolean

    Device mute status.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    15Audiod Internal Error

    Internal Error

    20DisplayId Not in Range

    Wrong displayId parameter supplied

    204Volume control is not supported

    Invalid sound input value given

    Example

    Example : Mute mic input device

    # luna-send –n 1 luna://com.webos.service.audio/master/muteMic '{"soundInput":"usb_mic0","mute":true}'

    Response:

    {
       "returnValue":true,
       "soundInput":"usb_mic0",
       "mute":true
    }

    master/muteVolume

    ACG: audio.operation
    • Added: API level 11

    Description

    Mutes or unmutes the master volume of the audio output device. 

    Parameters

    Name

    Required

    Type

    Description

    muteRequiredBoolean

    Indicates if the master volume is to be muted. Possible values are: 

    • true: Master volume to be muted.
    • false: Master volume not to be muted.
    sessionIdOptionalNumber

    Indicates the display/session applicable to the operation. Possible values are:

    • 0
    • 1

    Note: If not provided, the operation is applied to the audio device connected to both the displays/sessions.

    soundOutputRequiredString

    Indicates the audio output device. Possible values are:

    • pcm_output
    • pcm_output1
    • pcm_headphone
    • usb_speaker0
    • usb_speaker1
    • bluetooth_speaker0
    • alsa

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    errorCodeOptionalNumber

    The error code for the failed operation. 

    errorTextOptionalString

    Indicates the reason for the failure of the operation. 

    muteOptionalBoolean

    Indicates if the master volume is on mute or not. Possible values are:

    • true: Master volume is on mute. 
    • false: Master volume is not on mute.
    soundOutputOptionalString

    Indicates the audio output device.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    15Audiod Internal error

    Internal error

    19Invalid muteVolume Parameters requested

    Wrong parameters in request

    20sessionId Not in Range

    session id parameter wrong

    204"Volume control is not supported

    Invalid sound output value given

    Example

    Example: Mute volume for sessionId: 0

    # luna-send -f -n 1 luna://com.webos.service.audio/master/muteVolume '{
       "soundOutput":"pcm_output",
       "mute":true,
       "sessionId":0
    }'

    Response:

    {
        "mute": true,
        "returnValue": true,
        "soundOutput": "pcm_output"
    }

    Example: Mute volume for sessionId 1

    # 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"
    }

    Example: Unmute volume for sessionId 1

    # 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"
    }

    master/setMicVolume

    ACG: audio.operation
    • Added: API level 20

    Description

    Sets the volume of the currently active microphone input device.

    Parameters

    Name

    Required

    Type

    Description

    displayIdOptionalNumber (int8_t)

    The display associated with the microphone. Possible values are:

    • 0 (default value)
    • 1
    volumeRequiredNumber (int8_t)

    The volume to be set.

    Possible values : 0 - 100.

    soundInputOptionalString

    Indicates the audio input device. Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input (available only for OSE Emulator)

    Call Returns

    Name

    Required

    Type

    Description

    returnValueRequiredBoolean

    Indicates the status of the operation.

    Possible values are:

    • true: Operation is successful.
    • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    The reason for the failure of the operation. See the 'Error Codes' section of the method for details.

    soundInputOptionalString

    Input device name.

    Possible values are:

    • usb_mic0
    • usb_mic1
    • pcm_input  (Applicable only for OSE Emulator)
    volumeOptionalNumber (int8_t)

    Device volume.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    3SoundInput volume is not in range

    Sound Input volume is not in range

    15Audiod Internal Error

    Internal error

    20DisplayId Not in Range

    Wrong displayId parameter supplied

    204Volume control is not supported

    Invalid sound input value given

    Example

    Example : Set volume as 50

    #luna-send –n 1 luna://com.webos.service.audio/master/setMicVolume '{"soundInput":usb_mic0,"volume":50}'
    Response:

    {
       "returnValue":true,
       "soundInput":"usb_mic0",
       "volume":50
    }

    master/setVolume

    ACG: audio.operation
    • Added: API level 11

    Description

    Sets the master volume of the audio output device.

    Parameters

    Name

    Required

    Type

    Description

    sessionIdOptionalNumber

    Indicates the display/session applicable to the operation. Possible values are:

    • 0
    • 1

    Note: If not provided, the operation is applied to session 0.

    soundOutputRequiredString

    Indicates the target sound output device. â€‹Possible values are:

    • pcm_output
    • pcm_output1
    • pcm_headphone
    • usb_speaker0
    • usb_speaker1
    • bluetooth_speaker0
    • alsa
    volumeRequiredNumber

    Indicates the volume level to be set.

    Possible range: 0-100 

    Call Returns

    Name

    Required

    Type

    Description

    volumeOptionalNumber

    Indicates the current volume level.

    Possible range: 0-100

    soundOutputOptionalString

    Indicates the target sound output device.

    returnValueRequiredBoolean

    Indicates the status of operation.

    Possible values are:

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    errorTextOptionalString

    Indicates the reason for the failure of the operation. 

    errorCodeOptionalNumber

    The error code for the failed operation.

    Error Codes Reference

    Error Code

    Error Text

    Error Description

    1Could not validate json message against schema

    Invalid number of input parameters against defined schema of the method

    3SoundOutput volume is not in range

    Volume value not in range

    15Audiod Internal error

    Internal error

    20sessionId Not in Range

    session id parameter wrong

    204Volume control is not supported

    Invalid sound output value given

    Example

    Example: Set volume as 57 for sessionId 0

    # luna-send -f -n 1 luna://com.webos.service.audio/master/setVolume '{
       "soundOutput":"pcm_output",
       "volume":57,
       "sessionId":0
    }'

    Response:

    {
        "volume": 57,
        "returnValue": true,
        "soundOutput": "pcm_output"
    }

    master/volumeDown

    ACG: audio.operation
    • Added: API level 11

    Description

    Reduces the master volume of the device. 

    Parameters

    Name

    Required

    Type

    Description

    soundOutputRequiredString

    Indicates the audio output device. Possible values are:

    • pcm_output
    • pcm_output1
    • pcm_headphone
    • usb_speaker0
    • usb_speaker1
    • bluetooth_speaker0
    • alsa
    sessionIdOptionalNumber

    Indicates the display/session applicable to the operation. Possible values are:

    • 0
    • 1

    Note: If not provided, the operation is applied to session 0.

    Call Returns

    Name

    Required

    Type

    Description

    volumeOptionalNumber

    Indicates the current level of volume.

    Possible range: 0-100

    returnValueRequiredBoolean

    Indicates the status of operation.

    Possible values are: 

    • true: Indicates that the operation was successful.
    • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
    errorCodeOptionalNumber

    The error code for the failed operation.

    errorTextOptionalString

    Indicates the reason for the failure of the operation.

    soundOutputOptionalString

    Indicates the audio sound output device.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Invalid number of input parameters against defined schema of the method

      15Audiod Internal error

      Internal error

      19Invalid volumeDown Parameters requested

      Wrong parameters in request

      20sessionId Not in Range

      session id parameter wrong

      204Volume control is not supported

      Invalid sound output value given

      Example

      Example: Reduce the volume for sessionId 0

      # luna-send -f -n 1 luna://com.webos.service.audio/master/volumeDown '{
         "soundOutput":"pcm_output",
         "sessionId":0
      }'

      Response:

      {
          "volume": 11,
          "returnValue": true,
          "soundOutput": "pcm_output"
      }

      Example: Reduce the volume for sessionId 1

      # luna-send -f -n 1 luna://com.webos.service.audio/master/volumeDown '{
         "soundOutput":"alsa",
         "sessionId":1
      }'

      Response:

      {
          "volume": 49,
          "returnValue": true,
          "soundOutput": "alsa"
      }

      master/volumeUp

      ACG: audio.operation
      • Added: API level 11

      Description

      Increases the master volume of the device. 

      Parameters

      Name

      Required

      Type

      Description

      sessionIdOptionalNumber

      Indicates the display/session applicable to the operation. Possible values are:

      • 0
      • 1

      Note: If not provided, the operation is applied to session 0.

      soundOutputRequiredString

      Indicates the audio output device. Possible values are:

      • pcm_output,
      • pcm_output1
      • pcm_headphone
      • usb_speaker0
      • usb_speaker1
      • bluetooth_speaker0
      • alsa

      Call Returns

      Name

      Required

      Type

      Description

      volumeOptionalNumber

      Indicates the current level of volume.

      Possible range: 0-100

      returnValueRequiredBoolean

      Indicates the status of operation.

      Possible values are:

      • true: Indicates that the operation was successful.
      • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      Indicates the reason for the failure of the operation.

      soundOutputOptionalString

      Indicates the audio output device.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Invalid number of input parameters against defined schema of the method

      15Audiod Internal error

      Internal error

      20sessionId Not in Range

      session id parameter wrong

      204Volume control is not supported

      Invalid sound output value given

      Example

      Example: Increase the volume for sessionId 0

      # luna-send -f -n 1 luna://com.webos.service.audio/master/volumeUp '{
         "soundOutput":"pcm_output",
         "sessionId":0
      }'

      Response:

      {
          "volume": 12,
          "returnValue": true,
          "soundOutput": "pcm_output"
      }

      Example: Increase the volume for sessionId 1

      # luna-send -f -n 1 luna://com.webos.service.audio/master/volumeUp '{
         "soundOutput":"alsa",
         "sessionId":1
      }'

      Response:

      {
          "volume": 20
          "returnValue": true,
          "soundOutput": "alsa"
      }

      media/setVolume

      ACG: audio.operation
      • Added: API level 11

      Description

      Sets the volume level of the current or the specified scenario.

      Parameters

      Name

      Required

      Type

      Description

      volumeRequiredNumber

      Indicates the volume level to be set.

      sessionIdOptionalNumber

      Indicates the display/session to which the operation is applicable.

      Possible values are:

      • 0
      • 1

      Note: If not provided, the operation is applied to session 0.

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of operation.

      Possible values are:

      • true: Indicates that the operation was successful.
      • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      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

      1Could 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

      3Invalid 'volume' integer parameter value or file not found.

      Volume value is not valid. It should be  between 0 and 100.

      Example

      Example: With volume

      # luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":10}'

      Response:

      {
          "returnValue": true
      }

      Example: display1

      # luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":50, "sessionId":0}'

      Response:

      {   
         "returnValue": true
      }

      Example: display 2

      # luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":50, "sessionId":1}'

      Response:

      {   
         "returnValue": true
      }

      muteSink

      ACG: audio.operation
      • Added: API level 13

      Description

      Mutes the sink volume.

      Parameters

      Name

      Required

      Type

      Description

      streamTypeRequiredString

      The sink to be muted. 

      Possible values are:

      • palerts
      • pfeedback
      • pringtones
      • pmedia
      • pdefaultapp
      • peffects
      • pvoicerecognition
      • ptts
      • default1
      • default2
      • tts1
      • tts2
      muteRequiredBoolean

      Mute or unmute the sink.

      Possible values are:

      • true: Mute the sink.
      • false: Unmute the sink.

      Call Returns

      Name

      Required

      Type

      Description

      streamTypeOptionalString

      The sink that is muted/unmuted.

      returnValueRequiredBoolean

      Indicates the status of the operation. 

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
      muteOptionalBoolean

      Indicates the mute status of the sink.

      errorTextOptionalString

      The reason for the failure of the operation.

      errorCodeOptionalNumber

      The error code for the failed operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Audiod invalid schema

      Error occurs due to wrong JSON request.

      15Audiod internal error

      Error occurs due insufficient resource availability in Audiod.

      17Audiod Unknown Source

      A wrong streamType is requested.

      Example

      Example : Mute the sink default1

      # lluna-send -n 1 luna://com.webos.service.audio/muteSink '{"streamType":"default1","mute":true}'

      Response: 

      {
         "returnValue":true,
         "streamType":"default1",
         "mute":true
      }

      muteSource

      ACG: audio.operation
      • Added: API level 13

      Description

      Mutes the source volume.

      Parameters

      Name

      Required

      Type

      Description

      sourceTypeRequiredString

      The source to be muted.

      Possible values are:

      • record
      • btcallsource
      • alexa
      • webcall
      • voiceassistance
      muteRequiredBoolean

      Mute or unmute the source.

      Possible values are:

      • true: Mute the source.
      • false: Unmute the source.

      Call Returns

      Name

      Required

      Type

      Description

      sourceTypeOptionalString

      The source that is muted/unmuted.

      returnValueRequiredBoolean

      Indicates the status of the operation. 

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
      muteOptionalBoolean

      Indicates the mute status of the source.

      errorTextOptionalString

      The reason for the failure of the operation.

      errorCodeOptionalNumber

      The error code for the failed operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Audiod invalid schema

      Error occurs due to wrong JSON request.

      15Audiod internal error

      Error occurs due insufficient resource availability in Audiod.

      23Audiod Unknown Source

      Error occurs due to wrong sourceType requested.

      Example

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/muteSource '{"sourceType":"record","mute":true}'

      Response: 

      {
         "returnValue":true,
         "sourceType":"record",
         "mute":true
      }

      playSound

      ACG: audio.management
      • Added: API level 12

      Description

      Plays PCM audio files through PulseAudio sound server.

      Parameters

      Name

      Required

      Type

      Description

      fileNameRequiredString

      Indicates the absolute path of the PCM file to be played.

      sinkRequiredString

      Indicates the virtual PulseAudio sink used by the application.

      Possible values are:

      • default1
      • default2
      • tts1
      • tts2
      formatOptionalString

      Indicates the sample format to be set.

      Possible formats are:

      • PA_SAMPLE_S16LE
      • PA_SAMPLE_S24LE
      • PA_SAMPLE_S32LE (Default)
      sampleRateOptionalNumber

      Indicates the sample rate to be set.

      Possible rates are:

      • 44100
      • 48000 (Default)
      • 32000
      • 22500
      channelsOptionalNumber

      Indicates the number of audio channels to be used while playing the file.

      Possible values are:

      • 1 (mono)
      • 2 (stereo) (Default)
      • 3
      • 4
      • 5
      • 6

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Indicates that the operation was successful.
      • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
      errorTextOptionalString

      Indicates the reason for the failure of the operation. 

      errorCodeOptionalNumber

      The error code for the failed operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Error occurs due to wrong json request.

      19Invalid file format

      Invaild file format  provided 

      19Invalid virtual sink name

      Invaild virtual sink name provided 

      19Invalid sample format

      Invaild sample format provided 

      19Invalid channel count

      Invaild channel count provided 

      19Invalid sample rate

      Invaild sample rate provided 

      Example

      Example code

      # 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
      }

      registerTrack

      ACG: audio.operation
      • Added: API level 16

      Description

      Registers a playback by an application/service and returns a track ID.

      The track ID must be used to control the volume of that particular playback by using setTrackVolume().

      Parameters

      Name

      Required

      Type

      Description

      streamTypeRequiredString

      Type of the audio stream. Possible values are:

      • palerts
      • pfeedback
      • pringtones
      • pmedia
      • pdefaultapp
      • peffects
      • pvoicerecognition
      • ptts
      • default1
      • default2
      • tts1
      • tts2

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

      trackIdOptionalString

      Track ID of the registered playback.

      streamTypeOptionalString

      Type of the audio stream.

      Example

      Example : Register a track

      # luna-send -n 1 -f luna://com.webos.service.audio/registerTrack '{"streamType":"default1"}

      Response:

      {
          "trackId": "_OOWR1nOw9",
          "returnValue": true
      }

      setAudioEffect

      ACG: audio.operation
      • Added: API level 21

      Description

      Sets the status of an audio effect.

      Parameters

      Name

      Required

      Type

      Description

      effectNameRequiredString

      Audio effect name. Possible values are:

      • speech enhancement
      • gain control
      • beamforming
      • dynamic compressor
      • equalizer
      • bass boost
      enabledRequiredBoolean

      Status of the audio effect. Possible values are:

      • true: Audio effect is enabled.
      • false: Audio effect is disabled.

      Note: By default, all the audio effects are disabled.

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation. Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      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

      1Could not validate json message against schema

      Invalid number of input parameters against defined schema of the method

      5SoundInput not connected

      SoundInput device not available

      7AGC Already Enabled

      AGC feature is already enabled

      15Audiod Internal Error

      Internal Error

      19Invalid parameters

      Invalid parameters error

      Example

      Example : Enable speech enhancement effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"speech enhancement", "enabled":true}'

      Response:

      {
          "returnValue": true
      }

      Example : Enable gain control effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"gain control", "enabled":true}'

      Response:

      {
          "returnValue" : true
      }

      Example : Enable beamforming effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"beamforming", "enabled":true}'

      Response:


          "returnValue" : true
      }

      Example : Enable dynamic compressor effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"dynamic compressor", "enabled":true}'

      Response:


          "returnValue" : true
      }

      Example : Enable equalizer effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"equalizer", "enabled":true}'

      Response:


          "returnValue" : true
      }

      Example: Enable bass boost effect

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEffect '{"effectName":"bass boost", "enabled":true}'

      Response:


          "returnValue" : true
      }

      setAudioEqualizerBandLevel

      ACG: audio.operation
      • Added: API level 25

      Description

      Sets the equalizer band level.

      Parameters

      Name

      Required

      Type

      Description

      bandRequiredNumber

      Band index of the equalizer band.

      Value range: [0, 5] (6 bands)

      levelRequiredNumber

      New gain (in decibels) for the specified band.

      Value range: [-10, 10]

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Incorrect parameters are provided.

      15Audiod Internal Error

      Internal error

      19Invalid parameters

      Invalid parameters error

      Example

      Example : Set the equalizer band level

      # luna-send -f -n 1 luna://com.webos.service.audio/setAudioEqualizerBandLevel '{"band":1, "level":-5}'

      Response: 

      {
          "returnValue" : true
      }

      setAudioEqualizerPreset

      ACG: audio.operation
      • Added: API level 25

      Description

      Sets the equalizer preset value.

      Parameters

      Name

      Required

      Type

      Description

      presetRequiredNumber

      ID of equalizer preset.

      Possible values are:

      • 0: CLASSIC
      • 1: JAZZ
      • 2: POP
      • 3: ROCK

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Incorrect parameters are provided.

      15Audiod Internal Error

      Internal error

      19Invalid parameters

      Invalid parameters error

      Example

      Example: Set the equalizer preset

      #luna-send -f -n 1 luna://com.webos.service.audio/setAudioEqualizerPreset '{"preset":1}'

      Response:

      {
          "returnValue" : true
      }

      setInputVolume

      ACG: audio.operation
      • Added: API level 12

      Description

      Sets the input volume for audio streams.

      Parameters

      Name

      Required

      Type

      Description

      streamTypeRequiredString

      Indicates the stream name of the input volume to be applied.

      Possible values are:

      • palerts
      • pfeedback
      • pringtones
      • pmedia
      • pdefaultapp
      • peffects
      • pvoicerecognition
      • ptts
      • default1
      • default2
      • tts1
      • tts2
      volumeRequiredNumber

      Indicates the volume to be applied.

      Possible range: 0-100

      rampOptionalBoolean

      Indicates if the volume is to be applied in steps.

      Possible values are:

      • true: Volume is applied in steps.
      • false: Volume is not applied in steps.

      Default: false

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Indicates that the operation was successful.
      • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
      volumeOptionalNumber

      Returns the value of applied volume in case of success.

      Possible range: 0-100

      streamTypeOptionalString

      Returns the stream name of the volume applied.

      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      Indicates the reason for the failure of the operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Error occurs due to wrong json request.

      3Volume Not in Range

      Error occurs due to invalid volume level.

      15Audiod Internal Error

      Internal error

      17Audiod Unknown Stream

      A wrong streamType is requested.

      Example

      Example code

      # luna-send -n 1 luna://com.webos.service.audio/setInputVolume '{
         "streamType":"default1",
         "volume":50
      }'

      Response:

      {
         "volume":50,
         "returnValue":true,
         "streamType":"default1"
      }

      setSoundInput

      ACG: audio.management
      • Added: API level 13

      Description

      Sets the sound input device for recording.

      Parameters

      Name

      Required

      Type

      Description

      soundInputRequiredString

      The sound input device. 

      Possible values are:

      • pcm_input
      • usb_mic0
      • usb_mic1

      Call Returns

      Name

      Required

      Type

      Description

      soundInputOptionalString

      The sound input device that is set.

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
      errorTextOptionalString

      The reason for the failure of the operation.

      errorCodeOptionalNumber

      The error code for the failed operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Error occurs due to wrong JSON request.

      15Audiod internal error

      Error occurs due to insufficient resource availability in Audiod.

      24Audiod Unknown sound input

      Error occurs due to unsupported soundinput requested.

      Example

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/setSoundInput '{"soundInput":"pcm_input"}'

      Response:

      {
         "returnValue":true,
         "soundInput":"pcm_input"
      }

      setSoundOutput

      ACG: audio.management
      • Added: API level 13

      Description

      Sets the sound output device.

      Parameters

      Name

      Required

      Type

      Description

      soundOutputRequiredString

      The audio output device. 

      Possible values are: 

      • pcm_output
      • pcm_output1
      • usb_speaker0
      • bluetooth_speaker0
      • usb_speaker1

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. 
      errorTextOptionalString

      The reason for the failure of the operation.

      errorCodeOptionalNumber

      The error code for the failed operation.

      soundOutputOptionalString

      The audio output device.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Invalid number of input parameters against defined schema of the method

      204Audiod Unknown soundOutput

      Invalid sound output value given

      Example

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/setSoundOutput '{"soundOutput":"pcm_output"}'

      Response: 

      {
         "returnValue":true,
         "soundOutput":"pcm_output"
      }

      setSourceInputVolume

      ACG: audio.operation
      • Added: API level 13

      Description

      Sets input volume of the source.

      Parameters

      Name

      Required

      Type

      Description

      sourceTypeRequiredString

      The source to which volume must be applied.

      Possible values are:

      • record
      • btcallsource
      • alexa
      • webcall
      • voiceassistance
      volumeRequiredNumber

      The volume level to be applied to the source

      Possible range: 0-100

      rampOptionalBoolean

      Indicates if the volume is to be applied in steps.

      Possible values are:

      • true:  Applied in steps.
      • false: Not applied in steps (default).

      Call Returns

      Name

      Required

      Type

      Description

      volumeOptionalNumber

      The updated volume level.

      sourceTypeOptionalString

      The source to which the volume is set.

      returnValueRequiredBoolean

      Indicates the status of the operation. Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the "errorCode" and "errorText" fields for details. See the "Error Codes" section of this method for details.
      errorTextOptionalString

      The reason for the failure of the operation.

      errorCodeOptionalNumber

      The error code for the failed operation.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Audiod invalid schema

      Error occurs due to wrong JSON request.

      3Volume Not in Range

      Error occurs due to invalid volume level.

      15Audiod internal error

      Error occurs due to insufficient resource availability in Audiod.

      23Audiod Unknown Source

      Error occurs due to wrong sourceType requested.

      Example

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/setSourceInputVolume '{"sourceType":"record","volume":10}'

      Response:

      {
         "returnValue":true,
         "sourceType":"record",
         "volume":10
      }

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/setSourceInputVolume '{"sourceType":"record","volume":100, "ramp":false}'

      Response:

      {
         "returnValue":true,
         "sourceType":"record",
         "volume":100
      }

      setTrackVolume

      ACG: audio.operation
      • Added: API level 16

      Description

      Sets the volume for a specific playback that is identified by the track ID (obtained by using registerTrack()).

      The effective playback volume is calculated as a percentage of the stream volume of the corresponding track.

      Example 1: 

      • Stream volume: 100
      • Track (playback) volume set using setTrackVolume(): 100
      • Effective volume of the track: 100 * 100/100 = 100

      Example 2: 

      • Stream volume: 80
      • Track (playback) volume set using setTrackVolume(): 100
      • Effective volume of the track: 80 * 100/100 = 80

      Example 3:

      • Stream Volume: 40
      • Track (playback) volume set using setTrackVolume(): 50
      • Effective volume of the playback: 40 * 50/100 = 20

      Parameters

      Name

      Required

      Type

      Description

      trackIdRequiredString

      Track ID of the registered playback.

      volumeRequiredNumber

      Volume level to be set. The valid volume range is 0-100

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

      trackIdOptionalString

      Track ID for which the volume is set.

      volumeOptionalNumber

      Volume level that is set.

      streamTypeOptionalString

      Type of audio stream.

      Example

      Example : Set the playback volume

      # luna-send -n 1 -f luna://com.webos.service.audio/setTrackVolume '{"trackId":"_rKjYAlq3r","volume":50}'

      Response:

      {
          "returnValue": true,
          "trackId": "_rKjYAlq3r",
          "volume": 50,
          "streamType": "default1"
      }

      soundSettings/setSoundOut

      ACG: audio.management
      • Added: API level 11

      Description

      Sets the audio output device. 

      Parameters

      Name

      Required

      Type

      Description

      soundOutRequiredString

      Indicates the audio output device.

      Possible values are:

      • alsa

      Call Returns

      Name

      Required

      Type

      Description

      soundOutOptionalString

      Indicates the audio output device.

      Possible values are:

      • alsa
      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Indicates that the operation was successful.
      • false: Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      Indicates the reason for the failure of the operation. See the "API Error Codes Reference" section for details.

      Example

      Example code

      # luna-send -n 1 -f luna://com.webos.service.audio/soundSettings/setSoundOut '{"soundOut":"alsa"}'

      Response:

      {
          "soundOut": "alsa",
          "returnValue": true
      }

      systemsounds/playFeedback

      ACG: audio.management
      • Added: API level 11

      Description

      Plays the various system alert sounds based on the name passed to it.

      Parameters

      Name

      Required

      Type

      Description

      nameRequiredString

      Name of the system sound.

      sinkOptionalString

      Sink to use to play sound (default: pfeedback).

      playOptionalBoolean
      • To preload and play the file, set play to true.
      • To preload but not to play the file, set play to false.
      • The default value of play is true.

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean
      • If the method succeeds, returnValue will contain true.
      • If the method fails, returnValue will contain false.

      Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Error occurs due to wrong json request.

      2Missing 'name' string parameter.

      'name' parameter is missed.

      3Invalid 'name' string parameter value or file not found

      Invalid 'name' parameter is provided.

      3Invalid 'sink' string parameter value or file not found.

      Invalid 'sink' parameter is provided.

      Example

      Example code

      # luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{
         "name":"voicestart",
         "sink":"pfeedback",
         "play":true
      }'

      Response:

      {
          "returnValue": true
      }

      Example scenario

      # luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{
         "name":"voicestart",
         "sink":"pfeedback",
         "play":false
      }'

      Response:

      {
          "returnValue": true
      }

      Example scenario

      # luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "voicestart", "play":false}'

      Response:

      {
          "returnValue": true
      }

      Example scenario

      # luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "voicestart"}'

      Response:

      {
          "returnValue": true
      }

      Example scenario

      # luna-send -n 1 -f luna://com.webos.service.audio/systemsounds/playFeedback '{"name": "shutter"}'

      Response:

      {
          "returnValue": true
      }

      udev/event

      ACG: audio.management
      • Added: API level 11

      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

      eventRequiredString

      The event to be passed to audiod by the udev rule when USB soundcard is detected.It is a simple string defined by audiod. For example supported events are:

      • headset-removed
      • headset-inserted
      • headset-mic-inserted
      • usb-mic-inserted
      • usb-mic-removed
      • usb-headset-inserted
      • usb-headset-removed
      soundcard_noOptionalNumber

      Sound card number. As of now it is being extracted from the device path where USB sound card is detected by udev.

      device_noOptionalNumber

      Device number. As of now it is being extracted from the device path where USB sound card is detected by udev.

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      If the method succeeds, returnValue will contain true.
      If the method fails, returnValue will contain false. 
      The method may fail because of one the error conditions described in the Error Codes Reference of this API.

      errorCodeOptionalNumber

      errorCode contains the error code if the method fails. The method will return errorCode only if it fails.

      errorTextOptionalString

      errorText contains the error text if the method fails. The method will return errorText only if it fails.

      Example

      Example scenario

      # luna-send -n 1 luna://com.webos.service.audio/udev/event '{"event":"headset-inserted"}'

      Response:

      {
         "returnValue":true
      }

      unregisterTrack

      ACG: audio.operation
      • Added: API level 16

      Description

      Unregisters a playback by an application/service.

      Parameters

      Name

      Required

      Type

      Description

      trackIdRequiredString

      Track ID of the registered playback.

      Call Returns

      Name

      Required

      Type

      Description

      returnValueRequiredBoolean

      Indicates the status of the operation.

      Possible values are:

      • true: Operation is successful.
      • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
      errorCodeOptionalNumber

      The error code for the failed operation.

      errorTextOptionalString

      The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

      trackIdOptionalString

      Track ID that is unregistered.

      Example

      Example : Unregister a registered track

      # luna-send -n 1 -f luna://com.webos.service.audio/unregisterTrack '{"trackId":"_OOWR1nOw9"}'

      Response:

      {
          "returnValue": true,
          "trackId": "_OOWR1nOw9"
      }

      Objects

      VolumeStatus

      Provides the volume details of the target sound output device.

      Name

      Required

      Type

      Description

      mutedRequiredBoolean

      Indicates if the audio is on mute or not.

      Possible values are:

      • true: Audio is on mute.
      • false: Audio is not on mute.
      volumeRequiredNumber

      Indicates the current volume level.

      Note: Returns a value only if the audio is not on mute.

      soundOutputRequiredString

      Indicates the target sound output device.

      Possible values:

      • pcm_output
      • pcm_output1
      • pcm_headphone
      • usb_speaker0
      • usb_speaker1
      • bluetooth_speaker0
      • alsa
      sessionIdRequiredNumber

      Indicates the volume status of the targeted display/session.

      Possible values are:

      • 0
      • 1

      audio

      Object returned by the UMI/getStatus.

      Name

      Required

      Type

      Description

      sourceRequiredString

      Indicates the audio source.

      Possible values are:

      • AMIXER
      sinkRequiredString

      Indicates the audio sink.

      Possible values are:

      • ALSA
      mutedRequiredBoolean

      Indicates if the audio is muted.

      Possible values are:

      • true: If the audio is muted.
      • false: If the audio is not muted.
      outputModeRequiredString

      Indicates the audio output device.

      Possible values are:

      • ALSA

      deviceList

      Provides information about all supported input and output devices and their type and connection status.

      Name

      Required

      Type

      Description

      typeRequiredString

      Indicates if device is input or output device. Possible values are:

      • input
      • output
      deviceTypeRequiredString

      Indicates if the device is internal or external device.

      Possible values are:

      • internal
      • external
      deviceNameRequiredString

      Device name internal.

      Possible values are:

      • pcm_output
      • pcm_output1
      • pcm_headphone
      • bluetooth_speaker0
      • usb_speaker0
      • usb_speaker1
      deviceNameDetailRequiredString

      Device full name. 

      Note: It is based on name of the device which will vary based on different sound cards.

      connectedRequiredString

      Indicates device connection status. Possible values are:

      • true: Device is connected.
      • false: Device is not connected.
      displayIdRequiredString

      Display id to which the device is associated.

      Possible values are : 0, 1

      activeRequiredBoolean

      Status of the device. Possible values are:

      • true: device is active
      • false: device is not active.
      deviceIconRequiredString

      Name of the icon used for the device.

      effectStatus

      Provides the name of the audio effects and their status.

      Name

      Required

      Type

      Description

      nameRequiredString

      Name of the audio effect.

      Possible values are:

      • speech enhancement
      • gain control
      • beamforming 
      • dynamic compressor
      • equalizer
      • bass boost
      enabledRequiredBoolean

      Status of the audio effect.

      Possible values are:

      • true: Audio effect is enabled.
      • false: Audio effect is disabled.

      Note: By default, all the audio effects are disabled

      sourceObject

      Indicates the list of active source connection

      Name

      Required

      Type

      Description

      activeStatusRequiredBoolean

      Indicates whether the source is active.

      Possible values are:

      • true: Source is active.
      • false: Source is not active.
      inputVolumeRequiredNumber

      Indicates the input volume of the source.

      Possible range: 0~100

      muteStatusRequiredBoolean

      Indicates if the audio is muted.

      Possible values are:

      • true: The volume is muted.
      • false: The volume is not muted.
      policyStatusRequiredString

      Indicates if the policy for the sources is in progress.

      Possible values are:

      • true: The policy is in progress.
      • false: The policy is not in progress.
      sinkRequiredString

      Indicates the audio sink.

      Possible values are:

      • MAIN
      • SUB
      • ALSA
      sourceRequiredString

      Indicates the audio source.

      Possible values are:

      • ADEC
      • AMIXER
      sourceTypeRequiredString

      Indicates the active source connection.

      Possible values are:

      • record
      • btcallsource
      • alexa
      • webcall
      • voiceassistance

      streamObject

      Contains the list of active connections.

      Name

      Required

      Type

      Description

      activeStatusRequiredBoolean

      Indicates whether the stream is active.

      Possible values are:

      • true: Stream is active.
      • false: Streams is not active.
      inputVolumeRequiredNumber

      Indicates the input volume of the stream.

      Possible range: 0~100

      muteStatusRequiredBoolean

      Indicates if the audio is muted.

      Possible values are:

      • true: The volume is muted.
      • false: The volume is not muted.
      policyStatusRequiredBoolean

      Indicates if the policy for the streams is in progress.

      Possible values are:

      • true: The policy is in progress.
      • false: The policy is not in progress.
      sinkOptionalString

      Indicates the audio sink ( MAIN, SUB and ALSA).

      sourceOptionalString

      Indicates the audio source ( ADEC, AMIXER).

      streamTypeRequiredString

      Indicates the active stream names

      Possible values are:

      • palerts
      • pfeedback
      • pringtones
      • pmedia
      • pdefaultapp
      • peffects
      • pvoicerecognition
      • ptts
      • default1
      • default2
      • tts1
      • tts2

      API Error Codes Reference

      Error Code

      Error Text

      Error Description

      1Could not validate json message against schema

      Invalid number of input parameters against defined schema of the method

      3Invalid volume control

      AUDIOD_ERRORCODE_NOT_SUPPORT_VOLUME_CHANGE

      3Volume limit reached

      AUDIOD_ERRORCODE_NOT_SUPPORT_VOLUME_CHANGE

      16Audiod internal error

      AUDIOD_ERRORCODE_INVALID_MIXER_INSTANCE

      17Audiod Unknown Stream

      A wrong streamType is requested.

      17Audiod internal error

      AUDIOD_ERRORCODE_FAILED_MIXER_CALL

      18Audiod internal error

      AUDIOD_ERRORCODE_INVALID_ENVELOPE_INSTANCE

      19Audiod internal error

      AUDIOD_ERRORCODE_INVALID_AUDIO_TYPE

      20Unknown error

      AUDIOD_ERRORCODE_UNKNOWN_ERROR

      21Invalid parameters

      AUDIOD_ERRORCODE_INVALID_PARAMS

      22Not supported

      AUDIOD_ERRORCODE_NOT_SUPPORTED

      22Driver error

      AUDIOD_ERRORCODE_NOT_SUPPORTED

      22Audio not connected

      AUDIOD_ERRORCODE_NOT_SUPPORTED

      22Soundout type not supported

      AUDIOD_ERRORCODE_NOT_SUPPORTED

      22Connection not supported

      AUDIOD_ERRORCODE_NOT_SUPPORTED

      23Invalid schema

      AUDIOD_ERRORCODE_INVALID_SCHEMA

      25Audiod Unknown trackId

      A wrong trackId is passed.

      200Audio not connected

      Audio not connected

      204Volume control is not supported

      Volume control is not supported

      Contents