# Audio manager

**Detailed Description**

This section contains APIs related to Audio Manager operation.

- *group* Telematics\_audio\_manager

    - Typedefs

- using GetDevicesResponseCb = std::function&lt;void(std::vector&lt;std::shared\_ptr&lt;IAudioDevice&gt;&gt; devices, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to pass the list of the supported audio devices. Used in conjunction with [IAudioManager::getDevices()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1accf9364ea58581ffad30643586d293c6).

- Param devices:

    - **[in]** List of the [IAudioDevice](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00266) devices

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the list is fetched successfully, otherwise, an appropriate error code

- using GetStreamTypesResponseCb = std::function&lt;void(std::vector&lt;[StreamType](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv410StreamType)&gt; streamTypes, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to pass the list of the supported audio stream types. Used in conjunction with [IAudioManager::getStreamTypes()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1aa5117e0bdb5dd39518c2064b36903f9b).

- Param streamTypes:

    - **[in]** List of the [StreamType](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1gaffeef52c0dd4dd322ad83a9fdc31933f) types

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the list is fetched successfully, otherwise, an appropriate error code

- using CreateStreamResponseCb = std::function&lt;void(std::shared\_ptr&lt;IAudioStream&gt; &stream, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to pass the instance of the audio stream created. Used in conjunction with [IAudioManager::createStream()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a473505b01c6005bacc7b3cdd839e973b).

Passed stream should be type casted before using it, according to the StreamType::\* type that was requested while creating it.

For StreamType::VOICE\_CALL type cast to IAudioManager::IAudioVoiceStream. For StreamType::CAPTURE type cast to IAudioManager::IAudioCaptureStream. For StreamType::PLAY cast to IAudioManager::IAudioPlayStream. For StreamType::LOOPBACK cast to IAudioManager::IAudioLoopbackStream. For StreamType::TONE\_GENERATOR cast to IAudioManager::IAudioToneGeneratorStream.

- Param stream:

    - **[in]** Audio stream created or nullptr if creation failed

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the stream is created successfully, otherwise, an appropriate error code

- using CreateTranscoderResponseCb = std::function&lt;void(std::shared\_ptr&lt;ITranscoder&gt; &transcoder, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to pass the instance of the [ITranscoder](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00277) created. Used in conjunction with [IAudioManager::createTranscoder()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a4c34d6d274f4ca26f22a70ba84e65c83).

- Param transcoder:

    - **[in]** [ITranscoder](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00277) instance or nullptr if transcoder can’t be setup

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the transcoder is set up successfully, otherwise, an appropriate error code

- using DeleteStreamResponseCb = std::function&lt;void([telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to confirm if the stream is deleted or not. Used in conjunction with [IAudioManager::deleteStream()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a87770b34fc55cc8cb64cfdd1fa3864c2).

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the stream is deleted, otherwise, an appropriate error code

- using GetCalInitStatusResponseCb = std::function&lt;void([CalibrationInitStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv421CalibrationInitStatus) calInitStatus, [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ErrorCode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common9ErrorCodeE) error)&gt;

    - Invoked to pass the audio calibration database (ACDB) initialization status. Used in conjunction with [IAudioManager::getCalibrationInitStatus()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a2ab814d241383d893f3501f4e7c16d33).

- Param calInitStatus:

    - **[in]** CalibrationInitStatus::INIT\_SUCCESS if the ACDB is initialized successfully, CalibrationInitStatus::INIT\_FAILED if initialization failed

- Param error:

    - **[in]** telux::common::ErrorCode::SUCCESS if the status is is fetched successfully, otherwise, an appropriate error code

Enums

- enum DeviceType

    - Represents an audio device. Each device is mapped to its corresponding platform specific audio device type. This mapping is done in tel.conf file by the system integrator. Refer to README specified for the tel.conf file for details on the mapping of the DeviceType to a specific device on the HW platform.

*Values:*

- enumerator DEVICE\_TYPE\_NONE

    - Default device (invalid)

- enumerator DEVICE\_TYPE\_SPEAKER

    - Sink device as per above mapping

- enumerator DEVICE\_TYPE\_SPEAKER\_2

    - Sink device as per above mapping

- enumerator DEVICE\_TYPE\_SPEAKER\_3

    - Sink device as per above mapping

- enumerator DEVICE\_TYPE\_BT\_SCO\_SPEAKER

    - Bluetooth sink device for voice call

- enumerator DEVICE\_TYPE\_PROXY\_SPEAKER

    - Virtual sink device as per above mapping

- enumerator DEVICE\_TYPE\_MIC

    - Source device as per above mapping

- enumerator DEVICE\_TYPE\_MIC\_2

    - Source device as per above mapping

- enumerator DEVICE\_TYPE\_MIC\_3

    - Source device as per above mapping

- enumerator DEVICE\_TYPE\_BT\_SCO\_MIC

    - Bluetooth source device for voice call

- enumerator DEVICE\_TYPE\_PROXY\_MIC

    - Virtual mic connected over ethernet

- enum DeviceDirection

    - Defines the direction of an audio device.

*Values:*

- enumerator NONE

    - Default direction (invalid)

- enumerator RX

    - Audio will go out of the device, for example through a speaker (sink)

- enumerator TX

    - Audio will come into the device, for example through a mic (source)

- enum StreamType

    - Defines the type of the audio stream and the type’s purpose.

*Values:*

- enumerator NONE

    - Default type (invalid)

- enumerator VOICE\_CALL

    - Used for audio over a cellular network

- enumerator PLAY

    - Used for playing audio, for example playing music and notifications

- enumerator CAPTURE

    - Used for capturing audio, for example recording sound using a mic

- enumerator LOOPBACK

    - Used for generating audio from a DeviceDirection::RX device, which is intended to be captured back by a DeviceDirection::TX device

- enumerator TONE\_GENERATOR

    - Used for single tone and DTMF tone generation

- enum StreamDirection

    - Defines the direction of an audio stream.

*Values:*

- enumerator NONE

    - Default direction (invalid)

- enumerator RX

    - Specifies that the audio data will flow towards a sink device

- enumerator TX

    - Specifies that the audio data originates from a source device

- enum AmrwbpFrameFormat

    - Defines the properties of the audio data for compressed playback and transcoding.

*Values:*

- enumerator UNKNOWN

    - Default format (invalid)

- enumerator TRANSPORT\_INTERFACE\_FORMAT

    - Unsupported

- enumerator FILE\_STORAGE\_FORMAT

    - Specifies that the AMR header has been stripped from the audio data sent

- enum EcnrMode

    - On a voice call stream, enables or disables echo cancellation and noise reduction (ECNR). Used with an audio device capable of supporting ECNR.

*Values:*

- enumerator DISABLE

    - Disables ECNR

- enumerator ENABLE

    - Enables ECNR

- enum CalibrationInitStatus

    - Represents the state of the platform calibration for audio.

*Values:*

- enumerator UNKNOWN

    - Default state

- enumerator INIT\_SUCCESS

    - Platform calibrated successfully

- enumerator INIT\_FAILED

    - Platform calibration failed

- struct FormatParams

    - Represents the base class for compressed audio formats.

Subclassed by [telux::audio::AmrwbpParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00251.html#a00251)

- struct AmrwbpParams : public [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[audio](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux5audioE)::[FormatParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio12FormatParamsE)

    - Specifies the details of the adaptive multirate wide band format frame.

Public Members

- uint32\_t bitWidth

    - Bit width of the stream (for example 16 bit)

- [AmrwbpFrameFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1ga9b7abb097408fb9f771fce9582cf0680.html#_CPPv4N5telux5audio17AmrwbpFrameFormatE) frameFormat

    - Refer to [AmrwbpFrameFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1ga9b7abb097408fb9f771fce9582cf0680)

- struct StreamConfig

    - Defines the parameters when creating an audio stream. The required parameters for a given use-case are as follows:

For regular voicecall: type, slotId, channelTypeMask, format, deviceTypes For hpcm-voicecall: type, slotId, channelTypeMask, format, deviceTypes, enableHpcm For ecall: type, slotId, channelTypeMask, format, deviceTypes, ecnrMode For proxy mic voicecall: type, slotId, channelTypeMask, format, deviceTypes, sampleRate

For playback: type, sampleRate, channelTypeMask, format, deviceTypes For incall-playback: type, sampleRate, channelTypeMask, format, deviceTypes, voicePaths For hpcm-playback: type, sampleRate, channelTypeMask, format, deviceTypes, voicePaths, enableHpcm For proxy speaker playback: type, channelTypeMask, format, deviceTypes, sampleRate

For capture: type, sampleRate, channelTypeMask, format, deviceTypes For incall-capture: type, sampleRate, channelTypeMask, format, deviceTypes, voicePaths For hpcm-capture: type, sampleRate, channelTypeMask, format, deviceTypes, voicePaths, enableHpcm

For loopback: type, sampleRate, channelTypeMask, format, deviceTypes

For tone-generation: type, channelTypeMask, format, deviceTypes

Public Members

- [StreamType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1gaffeef52c0dd4dd322ad83a9fdc31933f.html#_CPPv4N5telux5audio10StreamTypeE) type

    - [StreamType](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1gaffeef52c0dd4dd322ad83a9fdc31933f) - defines purpose of the stream

- int modemSubId = 1

    - Deprecated, use the [StreamConfig::slotId](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00252.html#a00252_1af6e1bb7714497adbe0278b84aa0892d1) field instead of this

- [SlotId](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv46SlotId) slotId = [INVALID\_SLOT\_ID](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N6SlotId15INVALID_SLOT_IDE)

    - SlotId - specifies the slot ID where the UICC card is inserted

- uint32\_t sampleRate

    - Sample rate in Hz. Typical values are 8k, 16k, 32k and 48k. For Bluetooth use-cases, supported values are 8k and 16k

- [ChannelTypeMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00018_1gaa70bd563456f23158dbbec788991cabf.html#_CPPv4N5telux5audio15ChannelTypeMaskE) channelTypeMask

    - [ChannelTypeMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00018_1gaa70bd563456f23158dbbec788991cabf) - defines audio channels to use

- [AudioFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux5audio11AudioFormatE) format

    - [AudioFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00018_1gaa91a5189b7c2acf207a92a98b457102a.html#a00018_1gaa91a5189b7c2acf207a92a98b457102a) - defines audio format

- std::vector&lt;[DeviceType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1ga8f8ad92263d7024623b1c50df54582dc.html#_CPPv4N5telux5audio10DeviceTypeE)&gt; deviceTypes

    - Defines the list of audio devices [DeviceType](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1ga8f8ad92263d7024623b1c50df54582dc) to use for this stream. For StreamType::PLAY and StreamType::TONE\_GENERATOR, a single sink device should be specified. For StreamType::CAPTURE, a single source device should be specified. For StreamType::VOICE\_CALL and StreamType::LOOPBACK, both sink and source should be specified with sink as the first device and source as the second.

- std::vector&lt;[Direction](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux5audio9DirectionE)&gt; voicePaths

    - For an in-call and hpcm audio usecase, this represents the voice path direction [Direction](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00018_1ga0dc08aff237bf23d990e94123b41233f.html#a00018_1ga0dc08aff237bf23d990e94123b41233f)

- [FormatParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio12FormatParamsE) \*formatParams

    - [FormatParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00250.html#a00250) - defines compressed playback format

- [EcnrMode](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1gafeb4ae3560432ab89d3f06c4e09710c6.html#_CPPv4N5telux5audio8EcnrModeE) ecnrMode = [EcnrMode](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1gafeb4ae3560432ab89d3f06c4e09710c6.html#_CPPv4N5telux5audio8EcnrModeE)::[DISABLE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1gafeb4ae3560432ab89d3f06c4e09710c6.html#_CPPv4N5telux5audio8EcnrMode7DISABLEE)

    - [EcnrMode](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1gafeb4ae3560432ab89d3f06c4e09710c6) - true to enable ECNR on an ecall

- bool enableHpcm = false

    - True - if voice call is used with HPCM, false otherwise

- struct FormatInfo

    - Specifies the parameters when setting up streams for transcoding.

Public Members

- uint32\_t sampleRate

    - Sample rate in Hz, typical values 8k/16k/32k/48k Sample rate is a dummy paramter for voice stream and compressed playback

- [ChannelTypeMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00018_1gaa70bd563456f23158dbbec788991cabf.html#_CPPv4N5telux5audio15ChannelTypeMaskE) mask

    - Refer to [ChannelTypeMask](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00018_1gaa70bd563456f23158dbbec788991cabf)

- [AudioFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux5audio11AudioFormatE) format

    - Refer to [AudioFormat](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00018_1gaa91a5189b7c2acf207a92a98b457102a.html#a00018_1gaa91a5189b7c2acf207a92a98b457102a)

- [FormatParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio12FormatParamsE) \*params

    - Refer to [FormatParams](https://docs.qualcomm.com/doc/80-PF458-2/topic/struct_a00250.html#a00250)

- class IAudioListener : public [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[IServiceStatusListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00049.html#_CPPv4N5telux6common22IServiceStatusListenerE)

    - Listener for the audio service availability. Refer to [telux::common::IServiceStatusListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00049.html#a00049) for details.

When audio service becomes unavailable, if the client was waiting on any outstanding response callbacks for APIs that were called just before the SSR, those response callbacks will not be called anymore. For example, if stream-&gt;setVolume(callback) is called and SSR occurs then the ‘callback’ will be never invoked.

All the stream objects (IAudioVoiceStream/IAudioPlayStream/IAudioCaptureStream/ IAudioLoopbackStream/IAudioToneGeneratorStream) becomes invalid and should not be used after SSR. When SSR occurs, the implementation cleans up all resources associated with streams that were created before SSR. Application should create new audio stream.

The [AudioFactory](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00258) and [IAudioManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265) objects remains valid even after SSR and can be used like they were used before SSR.

Public Functions

- inline virtual ~IAudioListener()

    - Destructor of [IAudioListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00262).

- class IAudioManager

    - Provides the APIs to discover the supported audio devices, create streams, and subscribe for audio service status updates.

Public Functions

- virtual bool isSubsystemReady() = 0

    - Checks if the audio service is ready for use.

Deprecated Use [getServiceStatus()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a2148729945f06ae20081b60c1538874d)

- Returns:

    - True if the audio service is ready for use, otherwise, False

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[ServiceStatus](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common13ServiceStatusE) getServiceStatus() = 0

    - Gets the audio service status.

- Returns:

    - [telux::common::ServiceStatus::SERVICE\_AVAILABLE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga22f72b0f4dcf2e9569df17174c8d0dfc.html#a00061_1gga22f72b0f4dcf2e9569df17174c8d0dfcafcbb111f642c075be2582dcb12622ee8) if the audio service is ready for use, [telux::common::ServiceStatus::SERVICE\_UNAVAILABLE](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga22f72b0f4dcf2e9569df17174c8d0dfc.html#a00061_1gga22f72b0f4dcf2e9569df17174c8d0dfcabe9852895a462e44f9529379538517cc) if the audio service is temporarily unavailable (possibly undergoing initialization), [telux::common::ServiceStatus::SERVICE\_FAILED](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00061_1ga22f72b0f4dcf2e9569df17174c8d0dfc.html#a00061_1gga22f72b0f4dcf2e9569df17174c8d0dfca209f41c5ed23fea99ebfa03068db90ae) if the audio service needs re-initialization

- virtual std::future&lt;bool&gt; onSubsystemReady() = 0

    - Suggests when the audio service is ready.

Deprecated Use [telux::common::InitResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00236_1ab92f90010203f914a62cec6bd7af0a1a.html#a00236_1ab92f90010203f914a62cec6bd7af0a1a) in [AudioFactory::getAudioManager()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00258_1aaf0f9527c091f0929fc8efaa640a56e2)

- Returns:

    - Future to block on until the service status is updated to read

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getDevices([GetDevicesResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1gafeab6d3541b94c43657836d6c7c33c3e.html#_CPPv4N5telux5audio20GetDevicesResponseCbE) callback = nullptr) = 0

    - Gets the list of the supported audio devices.

- Parameters:

    - **callback** – **[in]** Mandatory, callback that will receive the list

- Returns:

    - telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getStreamTypes([GetStreamTypesResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1gaa42ab438f6bb4b43b962fe07993ada80.html#_CPPv4N5telux5audio24GetStreamTypesResponseCbE) callback = nullptr) = 0

    - Gets the list of the supported stream types.

- Parameters:

    - **callback** – **[in]** Mandatory, callback that will receive the list

- Returns:

    - Status telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) createStream([StreamConfig](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio12StreamConfigE) streamConfig, [CreateStreamResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1gacd683283c328ecfff2086f4abe110a7e.html#_CPPv4N5telux5audio22CreateStreamResponseCbE) callback = nullptr) = 0

    - Creates an audio stream with the parameters provided.

For incall playback/capture use cases, StreamType::VOICE\_CALL should be created before StreamType::PLAY and StreamType::CAPTURE.

On platforms with access control enabled, the caller must have TELUX\_AUDIO\_VOICE, TELUX\_AUDIO\_PLAY, TELUX\_AUDIO\_CAPTURE, or TELUX\_AUDIO\_FACTORY\_TEST permission to invoke this method successfully.

- Parameters:

    - - **streamConfig** – **[in]** Parameters of the stream
- **callback** – **[in]** Mandatory, invoked to pass the stream created

- Returns:

    - telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) createTranscoder([FormatInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio10FormatInfoE) input, [FormatInfo](https://docs.qualcomm.com/doc/80-PF458-2/topic/audio_manager.html#_CPPv4N5telux5audio10FormatInfoE) output, [CreateTranscoderResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1ga2937993779e23050bb9858e146e10381.html#_CPPv4N5telux5audio26CreateTranscoderResponseCbE) callback) = 0

    - Set up the transcoder with the given parameters.

Transcoder instance is obtained in [CreateTranscoderResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1ga2937993779e23050bb9858e146e10381). It can be used only for a single transcoding operation.

On platforms with access control enabled, the caller must have TELUX\_AUDIO\_TRANSCODE permission to invoke this method successfully.

- Parameters:

    - - **input** – **[in]** Details of the input to transcode
- **output** – **[in]** Details of the transcoded output required
- **callback** – **[in]** Mandatory, invoked to pass the transcoder instance

- Returns:

    - telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) deleteStream(std::shared\_ptr&lt;[IAudioStream](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00267.html#_CPPv4N5telux5audio12IAudioStreamE)&gt; stream, [DeleteStreamResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1ga3ce1cdec95130a42c0e73ed6052b1a61.html#_CPPv4N5telux5audio22DeleteStreamResponseCbE) callback = nullptr) = 0

    - Deletes the stream created with [createStream()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1a473505b01c6005bacc7b3cdd839e973b). It closes the stream and releases all resources allocated for this stream.

For incall playback/capture use cases, StreamType::PLAY and StreamType::CAPTURE streams should be deleted before StreamType::VOICE\_CALL.

On platforms with access control enabled, the caller must have TELUX\_AUDIO\_VOICE, TELUX\_AUDIO\_PLAY, TELUX\_AUDIO\_CAPTURE, or TELUX\_AUDIO\_FACTORY\_TEST permission to invoke this method successfully.

- Parameters:

    - - **stream** – **[in]** Stream to delete
- **callback** – **[in]** Optional, invoked to pass the result of the stream deletion

- Returns:

    - telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) registerListener(std::weak\_ptr&lt;[IAudioListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00262.html#_CPPv4N5telux5audio14IAudioListenerE)&gt; listener) = 0

    - Registers the given listener to get notified when the audio service status changes. The method [IAudioListener::onServiceStatusChange()](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00049.html#a00049_1ac61541d5b486809fbadfad455522c785) is invoked to notify of the new status.

- Parameters:

    - **listener** – **[in]** Invoked to pass the new service status

- Returns:

    - telux::common::Status::SUCCESS if the listener is registered, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) deRegisterListener(std::weak\_ptr&lt;[IAudioListener](https://docs.qualcomm.com/doc/80-PF458-2/topic/class_a00262.html#_CPPv4N5telux5audio14IAudioListenerE)&gt; listener) = 0

    - Unregisters the given listener registered previously with [registerListener()](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265_1ac066acfa3b748e0f61807acf94359143).

- Parameters:

    - **listener** – **[in]** Listener to unregister

- Returns:

    - telux::common::Status::SUCCESS if the listener is deregistered, otherwise, an appropriate error code

- virtual [telux](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv45telux)::[common](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6commonE)::[Status](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#_CPPv4N5telux6common6StatusE) getCalibrationInitStatus([GetCalInitStatusResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/typedef_a00001_1ga9aeb0a2b0633f7dda821941a72930070.html#_CPPv4N5telux5audio26GetCalInitStatusResponseCbE) callback) = 0

    - Gets the current initialization status of the audio calibration database (ACDB). This status is obtained in the [GetCalInitStatusResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1ga9aeb0a2b0633f7dda821941a72930070) callback.

- Parameters:

    - **callback** – **[in]** Mandatory, invoked to pass the initialization status

- Returns:

    - telux::common::Status::SUCCESS if the request is initiated successfully, otherwise, an appropriate error code

- inline virtual ~IAudioManager()

    - Destructor of the [IAudioManager](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00265).

- class IAudioDevice

    - Represents an audio device. Used in conjunction with [GetDevicesResponseCb](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00001_1gafeab6d3541b94c43657836d6c7c33c3e).

Public Functions

- virtual [DeviceType](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1ga8f8ad92263d7024623b1c50df54582dc.html#_CPPv4N5telux5audio10DeviceTypeE) getType() = 0

    - Gets the type of the audio device.

- Returns:

    - Type of the audio device

- virtual [DeviceDirection](https://docs.qualcomm.com/doc/80-PF458-2/topic/enum_a00001_1gae3d057d370c657a4c3f618edc3fb7690.html#_CPPv4N5telux5audio15DeviceDirectionE) getDirection() = 0

    - Gets the direction of the audio device.

- Returns:

    - Direction of the audio device

- inline virtual ~IAudioDevice()

    - Destructor of the [IAudioDevice](https://docs.qualcomm.com/doc/80-PF458-2/topic/common.html#a00266).

Last Published: Apr 14, 2026

[Previous Topic
Audio](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/audio.md) [Next Topic
Audio stream](https://docs.qualcomm.com/bundle/publicresource/80-PF458-2/topics/audio_stream.md)