freesmartphone.org Framework DBus Interface Specification

org.freesmartphone.Audio.Manager

Description

The Manager interface is used to manage various audio related aspects. It is suited to manage the audio routing or can priorize differnt types of audio streams. For managing different audio device the volume of differnt device control types can be adjusted.

Namespace

org.freesmartphone.Audio.Manager

Methods

Signals

Properties

None

Errors

Methods

SetMode ( s )

Description: Set the current audio mode. Currently there is only a difference between normal and call. Normal means all audio use when not in a phone call and call means all audio within a phone call.

Parameters

s: mode

The new audio mode to set. Expected values are:

GetMode ( ) → s

Description: Get the current audio mode which is used.

Returns

s: mode

See SetMode for a list of expected values.

SetDevice ( s )

Description: Set the current audio output device which is used only within the current mode. If you switch mode then the manager will switch even the output to the last used one in the new mode.

Parameters

s: name

Set the current audio device to use to play audio. Expected values are:

GetDevice ( ) → s

Description: Get the current audio device.

Returns

s: device

The current device used to play audio. For Expected values see SetDevice

PushDevice ( s )

Description: Push a new audio device onto the stack and active it.

Parameters

s: device

The new active audio device. For a list of expected values see SetDevice

PullDevice ( ) → s

Description: Pull an audio device from the stack and activate the next one.

Returns

s: device

The new active audio device. For a list of expected values see SetDevice

GetAvailableDevices ( s ) → as

Description: Get all available audio outputs for the specified audio mode.

Parameters

s: mode

Mode to retrieve the possible devices for. See SetMode for a list of expected values.

Returns

as: outputs

List of available output devices. For a list of expected values see SetDevice

GetVolume ( s ) → i

Parameters

s: control

The control you want to get the volume for.

Returns

i: volume

The volume in percent (0-100).

SetVolume ( si )

Parameters

s: control

The control you want to set the volume for. Expected values are:

i: volume

The volume in percent (0-100).

SetMute ( sb )

Description: Mute current output device.

Parameters

s: control

The control you want to set the mute state for. See Manager for detailed description of the available controls.

b: mute

The mute state of the control. The possible two values are:

Please note:

GetMute ( s ) → b

Description: Mute current output device.

Parameters

s: control

The control you want to set the mute state for. See Control for detailed description of the available controls.

Returns

b: mute

The mute state of the control. The possible two values are:

RegisterSession ( s ) → s

Description: Registering a audio session with the manager. Everytime a application wants to play audio it has to register a audio session for this so the audio daemon can control the played audio and maybe mutes the stream if another audio source is more important than the current one.

Parameters

s: stream

The type of the stream the audio is playing on. Expected values are:

Returns

s: token

A four byte long byte sequence to identify the audio session. The token is needed to release the session after it is over.

ReleaseSession ( s )

Description: Release a audio session from the manager after audio playback is over.

Parameters

s: token

A four byte long byte sequence to identify the audio session. The token is generated and assigned when calling RegisterSession().

Signals

ModeChanged ( s )

Parameters

s: mode

The new audio mode. See Mode for possible values.

DeviceChanged ( s )

Parameters

s: device

The new audio output device. See SetDevice for a list of expected values.

VolumeChanged ( si )

Parameters

s: control

The control the volume was changed for. See SetVolume for a list of expected values.

i: volume

The new volume for the control in percent [0-100].

MuteChanged ( sb )

Parameters

s: control

The control the mute state was changed for. See SetVolume for a list of expected values.

b: mute

The new mute state for the control. Possible valus are:

Errors

NotSupportedDevice

Description: Raised, if the device to process is unsupported by the used router.

DeviceStackUnderflow

Description: Raised, if there is no more device to pull from the stack.


| Specified 2008-2012 by the Freesmartphone.org team. | Join us and discuss further drafts smartphones-standards (at) linuxtogo (dot) org