Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
a2dp-codec.h File Reference

Advance Audio Distribution Profile - SBC Codec header. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bt_a2dp_codec_sbc_params
 SBC Codec. More...
 

Macros

#define BT_A2DP_SBC_SAMP_FREQ(preset)   ((preset->config[0] >> 4) & 0x0f)
 Gets the sampling rate from a codec preset.
 
#define BT_A2DP_SBC_CHAN_MODE(preset)   ((preset->config[0]) & 0x0f)
 Gets the channel mode from a codec preset.
 
#define BT_A2DP_SBC_BLK_LEN(preset)   ((preset->config[1] >> 4) & 0x0f)
 Gets the block length from a codec preset.
 
#define BT_A2DP_SBC_SUB_BAND(preset)   ((preset->config[1] >> 2) & 0x03)
 Gets the number subbands from a codec preset.
 
#define BT_A2DP_SBC_ALLOC_MTHD(preset)   ((preset->config[1]) & 0x03)
 Gets the bitpool allocation method from a codec preset.
 
Sampling Frequency
#define A2DP_SBC_SAMP_FREQ_16000   BIT(7)
 16 kHz
 
#define A2DP_SBC_SAMP_FREQ_32000   BIT(6)
 32 kHz
 
#define A2DP_SBC_SAMP_FREQ_44100   BIT(5)
 44.1 kHz
 
#define A2DP_SBC_SAMP_FREQ_48000   BIT(4)
 48 kHz
 
Channel Mode
#define A2DP_SBC_CH_MODE_MONO   BIT(3)
 Mono.
 
#define A2DP_SBC_CH_MODE_DUAL   BIT(2)
 Dual Channel.
 
#define A2DP_SBC_CH_MODE_STREO   BIT(1)
 Stereo.
 
#define A2DP_SBC_CH_MODE_JOINT   BIT(0)
 Joint Stereo.
 
Block Length
#define A2DP_SBC_BLK_LEN_4   BIT(7)
 4 blocks
 
#define A2DP_SBC_BLK_LEN_8   BIT(6)
 8 blocks
 
#define A2DP_SBC_BLK_LEN_12   BIT(5)
 12 blocks
 
#define A2DP_SBC_BLK_LEN_16   BIT(4)
 16 blocks
 
Subbands
#define A2DP_SBC_SUBBAND_4   BIT(3)
 4 subbands
 
#define A2DP_SBC_SUBBAND_8   BIT(2)
 8 subbands
 
Bit pool Allocation Method
#define A2DP_SBC_ALLOC_MTHD_SNR   BIT(1)
 Allocate based on loudness of the subband signal.
 
#define A2DP_SBC_ALLOC_MTHD_LOUDNESS   BIT(0)
 Allocate based on the signal-to-noise ratio.
 

Detailed Description

Advance Audio Distribution Profile - SBC Codec header.

Macro Definition Documentation

◆ A2DP_SBC_ALLOC_MTHD_LOUDNESS

#define A2DP_SBC_ALLOC_MTHD_LOUDNESS   BIT(0)

Allocate based on the signal-to-noise ratio.

◆ A2DP_SBC_ALLOC_MTHD_SNR

#define A2DP_SBC_ALLOC_MTHD_SNR   BIT(1)

Allocate based on loudness of the subband signal.

◆ A2DP_SBC_BLK_LEN_12

#define A2DP_SBC_BLK_LEN_12   BIT(5)

12 blocks

◆ A2DP_SBC_BLK_LEN_16

#define A2DP_SBC_BLK_LEN_16   BIT(4)

16 blocks

◆ A2DP_SBC_BLK_LEN_4

#define A2DP_SBC_BLK_LEN_4   BIT(7)

4 blocks

◆ A2DP_SBC_BLK_LEN_8

#define A2DP_SBC_BLK_LEN_8   BIT(6)

8 blocks

◆ A2DP_SBC_CH_MODE_DUAL

#define A2DP_SBC_CH_MODE_DUAL   BIT(2)

Dual Channel.

◆ A2DP_SBC_CH_MODE_JOINT

#define A2DP_SBC_CH_MODE_JOINT   BIT(0)

Joint Stereo.

◆ A2DP_SBC_CH_MODE_MONO

#define A2DP_SBC_CH_MODE_MONO   BIT(3)

Mono.

◆ A2DP_SBC_CH_MODE_STREO

#define A2DP_SBC_CH_MODE_STREO   BIT(1)

Stereo.

◆ A2DP_SBC_SAMP_FREQ_16000

#define A2DP_SBC_SAMP_FREQ_16000   BIT(7)

16 kHz

◆ A2DP_SBC_SAMP_FREQ_32000

#define A2DP_SBC_SAMP_FREQ_32000   BIT(6)

32 kHz

◆ A2DP_SBC_SAMP_FREQ_44100

#define A2DP_SBC_SAMP_FREQ_44100   BIT(5)

44.1 kHz

◆ A2DP_SBC_SAMP_FREQ_48000

#define A2DP_SBC_SAMP_FREQ_48000   BIT(4)

48 kHz

◆ A2DP_SBC_SUBBAND_4

#define A2DP_SBC_SUBBAND_4   BIT(3)

4 subbands

◆ A2DP_SBC_SUBBAND_8

#define A2DP_SBC_SUBBAND_8   BIT(2)

8 subbands

◆ BT_A2DP_SBC_ALLOC_MTHD

#define BT_A2DP_SBC_ALLOC_MTHD (   preset)    ((preset->config[1]) & 0x03)

Gets the bitpool allocation method from a codec preset.

Parameters
presetCodec preset

◆ BT_A2DP_SBC_BLK_LEN

#define BT_A2DP_SBC_BLK_LEN (   preset)    ((preset->config[1] >> 4) & 0x0f)

Gets the block length from a codec preset.

Parameters
presetCodec preset

◆ BT_A2DP_SBC_CHAN_MODE

#define BT_A2DP_SBC_CHAN_MODE (   preset)    ((preset->config[0]) & 0x0f)

Gets the channel mode from a codec preset.

Parameters
presetCodec preset

◆ BT_A2DP_SBC_SAMP_FREQ

#define BT_A2DP_SBC_SAMP_FREQ (   preset)    ((preset->config[0] >> 4) & 0x0f)

Gets the sampling rate from a codec preset.

Parameters
presetCodec preset

◆ BT_A2DP_SBC_SUB_BAND

#define BT_A2DP_SBC_SUB_BAND (   preset)    ((preset->config[1] >> 2) & 0x03)

Gets the number subbands from a codec preset.

Parameters
presetCodec preset