blob: 88024d91eec15e5519c678f1592ecea805e1be70 [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001#ifndef __MSM_AUDIO_AAC_H
2#define __MSM_AUDIO_AAC_H
3
4#include <linux/msm_audio.h>
5
6#define AUDIO_SET_AAC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \
7 (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
8#define AUDIO_GET_AAC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
9 (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
10
11#define AUDIO_SET_AAC_ENC_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \
12 (AUDIO_MAX_COMMON_IOCTL_NUM+3), struct msm_audio_aac_enc_config)
13
14#define AUDIO_GET_AAC_ENC_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
15 (AUDIO_MAX_COMMON_IOCTL_NUM+4), struct msm_audio_aac_enc_config)
16
Amal Paul62536982013-02-25 15:54:11 -080017#define AUDIO_SET_AAC_MIX_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
18(AUDIO_MAX_COMMON_IOCTL_NUM+5), unsigned)
19
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020#define AUDIO_AAC_FORMAT_ADTS -1
21#define AUDIO_AAC_FORMAT_RAW 0x0000
22#define AUDIO_AAC_FORMAT_PSUEDO_RAW 0x0001
23#define AUDIO_AAC_FORMAT_LOAS 0x0002
Swaminathan Sathappan150f7882011-08-01 18:31:58 -070024#define AUDIO_AAC_FORMAT_ADIF 0x0003
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070025
26#define AUDIO_AAC_OBJECT_LC 0x0002
27#define AUDIO_AAC_OBJECT_LTP 0x0004
28#define AUDIO_AAC_OBJECT_ERLC 0x0011
29#define AUDIO_AAC_OBJECT_BSAC 0x0016
30
31#define AUDIO_AAC_SEC_DATA_RES_ON 0x0001
32#define AUDIO_AAC_SEC_DATA_RES_OFF 0x0000
33
34#define AUDIO_AAC_SCA_DATA_RES_ON 0x0001
35#define AUDIO_AAC_SCA_DATA_RES_OFF 0x0000
36
37#define AUDIO_AAC_SPEC_DATA_RES_ON 0x0001
38#define AUDIO_AAC_SPEC_DATA_RES_OFF 0x0000
39
40#define AUDIO_AAC_SBR_ON_FLAG_ON 0x0001
41#define AUDIO_AAC_SBR_ON_FLAG_OFF 0x0000
42
43#define AUDIO_AAC_SBR_PS_ON_FLAG_ON 0x0001
44#define AUDIO_AAC_SBR_PS_ON_FLAG_OFF 0x0000
45
46/* Primary channel on both left and right channels */
47#define AUDIO_AAC_DUAL_MONO_PL_PR 0
48/* Secondary channel on both left and right channels */
49#define AUDIO_AAC_DUAL_MONO_SL_SR 1
50/* Primary channel on right channel and 2nd on left channel */
51#define AUDIO_AAC_DUAL_MONO_SL_PR 2
52/* 2nd channel on right channel and primary on left channel */
53#define AUDIO_AAC_DUAL_MONO_PL_SR 3
54
55struct msm_audio_aac_config {
56 signed short format;
57 unsigned short audio_object;
58 unsigned short ep_config; /* 0 ~ 3 useful only obj = ERLC */
59 unsigned short aac_section_data_resilience_flag;
60 unsigned short aac_scalefactor_data_resilience_flag;
61 unsigned short aac_spectral_data_resilience_flag;
62 unsigned short sbr_on_flag;
63 unsigned short sbr_ps_on_flag;
64 unsigned short dual_mono_mode;
65 unsigned short channel_configuration;
Sidipotu Ashok4ef84072012-09-13 14:03:25 +053066 unsigned short sample_rate;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070067};
68
69struct msm_audio_aac_enc_config {
70 uint32_t channels;
71 uint32_t sample_rate;
72 uint32_t bit_rate;
73 uint32_t stream_format;
74};
75
76#endif /* __MSM_AUDIO_AAC_H */