Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
wiced_audio_manager.h File Reference

(c) 2016-2025, Infineon Technologies AG, or an affiliate of Infineon Technologies AG. More...

Data Structures

struct  codec_config_t
 Codec configuration. More...
 
struct  audio_config_t
 Audio configuration. More...
 
struct  nrec_config_t
 NREC configuration. More...
 
struct  stream_interface_t
 Stream Interface Functions. More...
 
struct  capture_stream_interface_t
 Capture stream interface. More...
 
struct  render_stream_interface_t
 Render stream interface. More...
 

Macros

#define DEFAULT_VOLUME   80
 
#define DEFAULT_BITSPSAM   16
 
#define DEFAULT_PLAYBACK_SR   44100
 
#define DEFAULT_RECORD_SR   8000
 
#define DEFAULT_CH   2
 
#define AM_VOL_LEVEL_HIGH   10
 
#define AM_VOL_LEVEL_LOW   0
 
#define AM_PLAYBACK_SR_8K   8000
 
#define AM_PLAYBACK_SR_11K   11025
 
#define AM_PLAYBACK_SR_12K   12000
 
#define AM_PLAYBACK_SR_16K   16000
 
#define AM_PLAYBACK_SR_22K   22050
 
#define AM_PLAYBACK_SR_32K   32000
 
#define AM_PLAYBACK_SR_44K   44100
 
#define AM_PLAYBACK_SR_48K   48000
 
#define AM_PLAYBACK_SR_64K   64000
 
#define AM_PLAYBACK_SR_88K   88200
 
#define AM_PLAYBACK_SR_96K   96000
 
#define WICED_AUDIO_MANAGER_STREAM_ID_INVALID   -1
 

Enumerations

enum  stream_type_t {
  CAPTURE, RENDER, FILE_PLAYBACK, A2DP_PLAYBACK,
  HFP, MAX_NO_OF_STREAMS, STREAM_TYPE_INVALD = MAX_NO_OF_STREAMS
}
 Audio Streams. More...
 
enum  param_type_t {
  AM_CODEC_CONFIG, AM_AUDIO_CONFIG, AM_SAMPLE_RATE, AM_CHANNELS,
  AM_BITS_PER_SAMPLE, AM_MIC_GAIN_LEVEL, AM_SPEAKER_VOL_LEVEL, AM_NREC_ENABLE,
  AM_NREC_DISABLE, AM_GAIN_CONFIG, AM_NREC_CONFIG, AM_IO_DEVICE
}
 Audio Parameter types. More...
 
enum  am_audio_io_device_t { AM_SPEAKERS, AM_HEADPHONES, AM_UART }
 audio output type
 

Functions

void wiced_am_init (void)
 The application should call this function to Initialize the Audio Manager. More...
 
int32_t wiced_am_stream_open (uint32_t stream_type)
 The application should call this function to open the stream This will construct the graph of various components in the chain based on the stream type. More...
 
wiced_result_t wiced_am_stream_start (int32_t stream_id)
 The application should call this function to start the stream. More...
 
wiced_result_t wiced_am_stream_stop (int32_t stream_id)
 The application should call this function to stop the stream. More...
 
wiced_result_t wiced_am_stream_close (int32_t stream_id)
 The application should call this function to close the stream. More...
 
wiced_result_t wiced_am_stream_set_param (int32_t stream_id, uint32_t param_type, void *param_config)
 The application should call this function to set the parameters of the stream. More...
 
int32_t wiced_am_stream_get_param (uint32_t stream_id, uint32_t param_type, void *param_config)
 The application should call this function to get parameters of the stream. More...
 
stream_interface_twiced_am_stream_get_intf (uint32_t stream_id, uint32_t inf_type)
 The application should call this function to get interface of the stream. More...
 

Detailed Description

(c) 2016-2025, Infineon Technologies AG, or an affiliate of Infineon Technologies AG.

All rights reserved. This software, associated documentation and materials ("Software") is owned by Infineon Technologies AG or one of its affiliates ("Infineon") and is protected by and subject to worldwide patent protection, worldwide copyright laws, and international treaty provisions. Therefore, you may use this Software only as provided in the license agreement accompanying the software package from which you obtained this Software. If no license agreement applies, then any use, reproduction, modification, translation, or compilation of this Software is prohibited without the express written permission of Infineon.

Disclaimer: UNLESS OTHERWISE EXPRESSLY AGREED WITH INFINEON, THIS SOFTWARE IS PROVIDED AS-IS, WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ALL WARRANTIES OF NON-INFRINGEMENT OF THIRD-PARTY RIGHTS AND IMPLIED WARRANTIES SUCH AS WARRANTIES OF FITNESS FOR A SPECIFIC USE/PURPOSE OR MERCHANTABILITY. Infineon reserves the right to make changes to the Software without notice. You are responsible for properly designing, programming, and testing the functionality and safety of your intended application of the Software, as well as complying with any legal requirements related to its use. Infineon does not guarantee that the Software will be free from intrusion, data theft or loss, or other breaches ("Security Breaches"), and Infineon shall have no liability arising out of any Security Breaches. Unless otherwise explicitly approved by Infineon, the Software may not be used in any application where a failure of the Product or any consequences of the use thereof can reasonably be expected to result in personal injury.

Audio manager is a high level interface for applications to use platform audio capabilities. It supports different streams like A2DP_PLAYBACK, HFP etc. Audio manager also has interface for specific stream Start, Stop and also stream specific volume control.

Enumeration Type Documentation

Audio Parameter types.

Enumerator
AM_CODEC_CONFIG 

Codec Configuration.

AM_AUDIO_CONFIG 

Audio Configuration.

AM_SAMPLE_RATE 

Sample rate.

AM_CHANNELS 

No of channels.

AM_BITS_PER_SAMPLE 

No of bits per sample.

AM_MIC_GAIN_LEVEL 

Mic gain level.

AM_SPEAKER_VOL_LEVEL 

volume level

AM_NREC_ENABLE 

NREC enable.

AM_NREC_DISABLE 

NREC disable.

AM_GAIN_CONFIG 

Gain Configuration.

AM_NREC_CONFIG 

NREC Configuration.

AM_IO_DEVICE 

Input/Output device.

Audio Streams.

Enumerator
CAPTURE 

Audio Capture stream.

RENDER 

Audio Render stream.

FILE_PLAYBACK 

File Play back Stream.

A2DP_PLAYBACK 

A2DP Play back Stream.

HFP 

Hands free profile stream.

MAX_NO_OF_STREAMS 

Used to accumulate total stream types.

Function Documentation

void wiced_am_init ( void  )

The application should call this function to Initialize the Audio Manager.

Parameters
NOparameters required.
Returns
none
wiced_result_t wiced_am_stream_close ( int32_t  stream_id)

The application should call this function to close the stream.

Parameters
stream_id: Id of the stream.
Returns
WICED_NOT_FOUND WICED_SUCCESS
stream_interface_t* wiced_am_stream_get_intf ( uint32_t  stream_id,
uint32_t  inf_type 
)

The application should call this function to get interface of the stream.

Parameters
stream_id: Id of the stream.
inf_type: Interface type.
Returns
result
int32_t wiced_am_stream_get_param ( uint32_t  stream_id,
uint32_t  param_type,
void *  param_config 
)

The application should call this function to get parameters of the stream.

Parameters
stream_id: Id of the stream.
param_type: Type of the parameters to be set.
param_configParameter configurations
Returns
result
int32_t wiced_am_stream_open ( uint32_t  stream_type)

The application should call this function to open the stream This will construct the graph of various components in the chain based on the stream type.

Parameters
stream_type: Type of the stream to register (stream_type_t)
args: Arguments to be passed if any.
Returns
stream id invalid if WICED_AUDIO_MANAGER_STREAM_ID_INVALID
wiced_result_t wiced_am_stream_set_param ( int32_t  stream_id,
uint32_t  param_type,
void *  param_config 
)

The application should call this function to set the parameters of the stream.

Parameters
stream_id: Id of the stream.
param_type: Type of the parameters to be set.
param_configParameter configurations
Returns
WICED_NOT_FOUND WICED_ERROR WICED_SUCCESS
wiced_result_t wiced_am_stream_start ( int32_t  stream_id)

The application should call this function to start the stream.

Parameters
stream_id: Id of the stream.
Returns
WICED_NOT_FOUND WICED_SUCCESS
wiced_result_t wiced_am_stream_stop ( int32_t  stream_id)

The application should call this function to stop the stream.

Parameters
stream_id: Id of the stream.
Returns
WICED_NOT_FOUND WICED_SUCCESS