diff options
Diffstat (limited to 'audio/a2dp.h')
| -rw-r--r-- | audio/a2dp.h | 77 | 
1 files changed, 57 insertions, 20 deletions
diff --git a/audio/a2dp.h b/audio/a2dp.h index 8227296f..cfd1c47d 100644 --- a/audio/a2dp.h +++ b/audio/a2dp.h @@ -27,26 +27,37 @@  #define A2DP_CODEC_MPEG24		0x02  #define A2DP_CODEC_ATRAC		0x03 -#define A2DP_SAMPLING_FREQ_16000	(1 << 3) -#define A2DP_SAMPLING_FREQ_32000	(1 << 2) -#define A2DP_SAMPLING_FREQ_44100	(1 << 1) -#define A2DP_SAMPLING_FREQ_48000	1 - -#define A2DP_CHANNEL_MODE_MONO		(1 << 3) -#define A2DP_CHANNEL_MODE_DUAL_CHANNEL	(1 << 2) -#define A2DP_CHANNEL_MODE_STEREO	(1 << 1) -#define A2DP_CHANNEL_MODE_JOINT_STEREO	1 - -#define A2DP_BLOCK_LENGTH_4		(1 << 3) -#define A2DP_BLOCK_LENGTH_8		(1 << 2) -#define A2DP_BLOCK_LENGTH_12		(1 << 1) -#define A2DP_BLOCK_LENGTH_16		1 - -#define A2DP_SUBBANDS_4			(1 << 1) -#define A2DP_SUBBANDS_8			1 - -#define A2DP_ALLOCATION_SNR		(1 << 1) -#define A2DP_ALLOCATION_LOUDNESS	1 +#define SBC_SAMPLING_FREQ_16000		(1 << 3) +#define SBC_SAMPLING_FREQ_32000		(1 << 2) +#define SBC_SAMPLING_FREQ_44100		(1 << 1) +#define SBC_SAMPLING_FREQ_48000		1 + +#define SBC_CHANNEL_MODE_MONO		(1 << 3) +#define SBC_CHANNEL_MODE_DUAL_CHANNEL	(1 << 2) +#define SBC_CHANNEL_MODE_STEREO		(1 << 1) +#define SBC_CHANNEL_MODE_JOINT_STEREO	1 + +#define SBC_BLOCK_LENGTH_4		(1 << 3) +#define SBC_BLOCK_LENGTH_8		(1 << 2) +#define SBC_BLOCK_LENGTH_12		(1 << 1) +#define SBC_BLOCK_LENGTH_16		1 + +#define SBC_SUBBANDS_4			(1 << 1) +#define SBC_SUBBANDS_8			1 + +#define SBC_ALLOCATION_SNR		(1 << 1) +#define SBC_ALLOCATION_LOUDNESS		1 + +#define MPEG_LAYER_MP1			(1 << 2) +#define MPEG_LAYER_MP2			(1 << 1) +#define MPEG_LAYER_MP3			1 + +#define MPEG_SAMPLING_FREQ_16000	(1 << 5) +#define MPEG_SAMPLING_FREQ_22050	(1 << 4) +#define MPEG_SAMPLING_FREQ_24000	(1 << 3) +#define MPEG_SAMPLING_FREQ_32000	(1 << 2) +#define MPEG_SAMPLING_FREQ_44100	(1 << 1) +#define MPEG_SAMPLING_FREQ_48000	1  #define MAX_BITPOOL 64  #define MIN_BITPOOL 2 @@ -64,6 +75,19 @@ struct sbc_codec_cap {  	uint8_t max_bitpool;  } __attribute__ ((packed)); +struct mpeg_codec_cap { +	struct avdtp_media_codec_capability cap; +	uint8_t channel_mode:4; +	uint8_t crc:1; +	uint8_t layer:3; +	uint8_t frequency:6; +	uint8_t mpf:1; +	uint8_t rfa:1; +	uint8_t bitrate0:7; +	uint8_t vbr:1; +	uint8_t bitrate1; +} __attribute__ ((packed)); +  #elif __BYTE_ORDER == __BIG_ENDIAN  struct sbc_codec_cap { @@ -77,6 +101,19 @@ struct sbc_codec_cap {  	uint8_t max_bitpool;  } __attribute__ ((packed)); +struct mpeg_codec_cap { +	struct avdtp_media_codec_capability cap; +	uint8_t layer:3; +	uint8_t crc:1; +	uint8_t channel_mode:4; +	uint8_t rfa:1; +	uint8_t mpf:1; +	uint8_t frequency:6; +	uint8_t vbr:1; +	uint8_t bitrate0:7; +	uint8_t bitrate1; +} __attribute__ ((packed)); +  #else  #error "Unknown byte order"  #endif  | 
