Package: android.hardware.audio@2.0

IPrimaryDevice

interface IPrimaryDevice extends IDevice

Properties

Result

typedef android.hardware.audio@2.0::Result Result

TtyMode

enum TtyMode: int32_t
Details
Members
OFF
VCO
HCO
FULL

Methods

setVoiceVolume

setVoiceVolume (float volume)
generates (Result retval)

Sets the audio volume of a voice call.

Details
Parameters
volume
1.0f means unity, 0.0f is zero.
Generates
retval
operation completion status.

setMode

setMode (AudioMode mode)
generates (Result retval)

This method is used to notify the HAL about audio mode changes.

Details
Parameters
mode
new mode.
Generates
retval
operation completion status.

getBtScoNrecEnabled

getBtScoNrecEnabled ()
generates (Result retval, bool enabled)

Gets whether BT SCO Noise Reduction and Echo Cancellation are enabled.Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_NREC on the legacy HAL.

Details
Generates
retval
operation completion status.
enabled
whether BT SCO NR + EC are enabled.

setBtScoNrecEnabled

setBtScoNrecEnabled (bool enabled)
generates (Result retval)

Sets whether BT SCO Noise Reduction and Echo Cancellation are enabled.Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_NREC on the legacy HAL.

Details
Parameters
enabled
whether BT SCO NR + EC are enabled.
Generates
retval
operation completion status.

getBtScoWidebandEnabled

getBtScoWidebandEnabled ()
generates (Result retval, bool enabled)

Gets whether BT SCO Wideband mode is enabled.Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.

Details
Generates
retval
operation completion status.
enabled
whether BT Wideband is enabled.

setBtScoWidebandEnabled

setBtScoWidebandEnabled (bool enabled)
generates (Result retval)

Sets whether BT SCO Wideband mode is enabled.Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.

Details
Parameters
enabled
whether BT Wideband is enabled.
Generates
retval
operation completion status.

getTtyMode

getTtyMode ()
generates (Result retval, TtyMode mode)

Gets current TTY mode selection.Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.

Details
Generates
retval
operation completion status.
mode
TTY mode.

setTtyMode

setTtyMode (TtyMode mode)
generates (Result retval)

Sets current TTY mode.Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.

Details
Parameters
mode
TTY mode.
Generates
retval
operation completion status.

getHacEnabled

getHacEnabled ()
generates (Result retval, bool enabled)

Gets whether Hearing Aid Compatibility - Telecoil(HAC-T)mode is enabled.Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_HAC on the legacy HAL.

Details
Generates
retval
operation completion status.
enabled
whether HAC mode is enabled.

setHacEnabled

setHacEnabled (bool enabled)
generates (Result retval)

Sets whether Hearing Aid Compatibility - Telecoil(HAC-T)mode is enabled.Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_HAC on the legacy HAL.

Details
Parameters
enabled
whether HAC mode is enabled.
Generates
retval
operation completion status.