msm_audio_calibration.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843
  1. /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
  2. /* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */
  3. #ifndef _UAPI_MSM_AUDIO_CALIBRATION_H
  4. #define _UAPI_MSM_AUDIO_CALIBRATION_H
  5. #include <linux/types.h>
  6. #include <linux/ioctl.h>
  7. #define CAL_IOCTL_MAGIC 'a'
  8. #define AUDIO_ALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  9. 200, void *)
  10. #define AUDIO_DEALLOCATE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  11. 201, void *)
  12. #define AUDIO_PREPARE_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  13. 202, void *)
  14. #define AUDIO_SET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  15. 203, void *)
  16. #define AUDIO_GET_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  17. 204, void *)
  18. #define AUDIO_POST_CALIBRATION _IOWR(CAL_IOCTL_MAGIC, \
  19. 205, void *)
  20. /* For Real-Time Audio Calibration */
  21. #define AUDIO_GET_RTAC_ADM_INFO _IOR(CAL_IOCTL_MAGIC, \
  22. 207, void *)
  23. #define AUDIO_GET_RTAC_VOICE_INFO _IOR(CAL_IOCTL_MAGIC, \
  24. 208, void *)
  25. #define AUDIO_GET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, \
  26. 209, void *)
  27. #define AUDIO_SET_RTAC_ADM_CAL _IOWR(CAL_IOCTL_MAGIC, \
  28. 210, void *)
  29. #define AUDIO_GET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, \
  30. 211, void *)
  31. #define AUDIO_SET_RTAC_ASM_CAL _IOWR(CAL_IOCTL_MAGIC, \
  32. 212, void *)
  33. #define AUDIO_GET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, \
  34. 213, void *)
  35. #define AUDIO_SET_RTAC_CVS_CAL _IOWR(CAL_IOCTL_MAGIC, \
  36. 214, void *)
  37. #define AUDIO_GET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, \
  38. 215, void *)
  39. #define AUDIO_SET_RTAC_CVP_CAL _IOWR(CAL_IOCTL_MAGIC, \
  40. 216, void *)
  41. #define AUDIO_GET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, \
  42. 217, void *)
  43. #define AUDIO_SET_RTAC_AFE_CAL _IOWR(CAL_IOCTL_MAGIC, \
  44. 218, void *)
  45. enum {
  46. CVP_VOC_RX_TOPOLOGY_CAL_TYPE = 0,
  47. CVP_VOC_TX_TOPOLOGY_CAL_TYPE,
  48. CVP_VOCPROC_STATIC_CAL_TYPE,
  49. CVP_VOCPROC_DYNAMIC_CAL_TYPE,
  50. CVS_VOCSTRM_STATIC_CAL_TYPE,
  51. CVP_VOCDEV_CFG_CAL_TYPE,
  52. CVP_VOCPROC_STATIC_COL_CAL_TYPE,
  53. CVP_VOCPROC_DYNAMIC_COL_CAL_TYPE,
  54. CVS_VOCSTRM_STATIC_COL_CAL_TYPE,
  55. ADM_TOPOLOGY_CAL_TYPE,
  56. ADM_CUST_TOPOLOGY_CAL_TYPE,
  57. ADM_AUDPROC_CAL_TYPE,
  58. ADM_AUDVOL_CAL_TYPE,
  59. ASM_TOPOLOGY_CAL_TYPE,
  60. ASM_CUST_TOPOLOGY_CAL_TYPE,
  61. ASM_AUDSTRM_CAL_TYPE,
  62. AFE_COMMON_RX_CAL_TYPE,
  63. AFE_COMMON_TX_CAL_TYPE,
  64. AFE_ANC_CAL_TYPE,
  65. AFE_AANC_CAL_TYPE,
  66. AFE_FB_SPKR_PROT_CAL_TYPE,
  67. AFE_HW_DELAY_CAL_TYPE,
  68. AFE_SIDETONE_CAL_TYPE,
  69. AFE_TOPOLOGY_CAL_TYPE,
  70. AFE_CUST_TOPOLOGY_CAL_TYPE,
  71. LSM_CUST_TOPOLOGY_CAL_TYPE,
  72. LSM_TOPOLOGY_CAL_TYPE,
  73. LSM_CAL_TYPE,
  74. ADM_RTAC_INFO_CAL_TYPE,
  75. VOICE_RTAC_INFO_CAL_TYPE,
  76. ADM_RTAC_APR_CAL_TYPE,
  77. ASM_RTAC_APR_CAL_TYPE,
  78. VOICE_RTAC_APR_CAL_TYPE,
  79. MAD_CAL_TYPE,
  80. ULP_AFE_CAL_TYPE,
  81. ULP_LSM_CAL_TYPE,
  82. DTS_EAGLE_CAL_TYPE,
  83. AUDIO_CORE_METAINFO_CAL_TYPE,
  84. SRS_TRUMEDIA_CAL_TYPE,
  85. CORE_CUSTOM_TOPOLOGIES_CAL_TYPE,
  86. ADM_RTAC_AUDVOL_CAL_TYPE,
  87. ULP_LSM_TOPOLOGY_ID_CAL_TYPE,
  88. AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE,
  89. AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE,
  90. AFE_SIDETONE_IIR_CAL_TYPE,
  91. AFE_LSM_TOPOLOGY_CAL_TYPE,
  92. AFE_LSM_TX_CAL_TYPE,
  93. ADM_LSM_TOPOLOGY_CAL_TYPE,
  94. ADM_LSM_AUDPROC_CAL_TYPE,
  95. ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE,
  96. ADM_AUDPROC_PERSISTENT_CAL_TYPE,
  97. AFE_FB_SPKR_PROT_V4_EX_VI_CAL_TYPE,
  98. MAX_CAL_TYPES,
  99. };
  100. #define AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE AFE_FB_SPKR_PROT_TH_VI_CAL_TYPE
  101. #define AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_EX_VI_CAL_TYPE
  102. #define AFE_FB_SPKR_PROT_V4_EX_VI_CAL_TYPE AFE_FB_SPKR_PROT_V4_EX_VI_CAL_TYPE
  103. #define AFE_SIDETONE_IIR_CAL_TYPE AFE_SIDETONE_IIR_CAL_TYPE
  104. #define AFE_LSM_TOPOLOGY_CAL_TYPE AFE_LSM_TOPOLOGY_CAL_TYPE
  105. #define AFE_LSM_TX_CAL_TYPE AFE_LSM_TX_CAL_TYPE
  106. #define ADM_LSM_TOPOLOGY_CAL_TYPE ADM_LSM_TOPOLOGY_CAL_TYPE
  107. #define ADM_LSM_AUDPROC_CAL_TYPE ADM_LSM_AUDPROC_CAL_TYPE
  108. #define ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE ADM_LSM_AUDPROC_PERSISTENT_CAL_TYPE
  109. #define ADM_AUDPROC_PERSISTENT_CAL_TYPE ADM_AUDPROC_PERSISTENT_CAL_TYPE
  110. #define LSM_CAL_TYPES
  111. #define TOPOLOGY_SPECIFIC_CHANNEL_INFO
  112. #define MSM_SPKR_PROT_SPV3
  113. #define MSM_SPKR_PROT_SPV4
  114. #define MSM_CMA_MEM_ALLOC
  115. enum {
  116. VERSION_0_0,
  117. };
  118. enum {
  119. PER_VOCODER_CAL_BIT_MASK = 0x10000,
  120. };
  121. #define MAX_IOCTL_CMD_SIZE 512
  122. /* common structures */
  123. struct audio_cal_header {
  124. __s32 data_size;
  125. __s32 version;
  126. __s32 cal_type;
  127. __s32 cal_type_size;
  128. };
  129. struct audio_cal_type_header {
  130. __s32 version;
  131. __s32 buffer_number;
  132. };
  133. struct audio_cal_data {
  134. /* Size of cal data at mem_handle allocation or at vaddr */
  135. __s32 cal_size;
  136. /* If mem_handle if shared memory is used*/
  137. __s32 mem_handle;
  138. #ifdef MSM_CMA_MEM_ALLOC
  139. /* cma allocation flag if cma heap memory is used */
  140. __u32 cma_mem;
  141. #endif
  142. };
  143. /* AUDIO_ALLOCATE_CALIBRATION */
  144. struct audio_cal_type_alloc {
  145. struct audio_cal_type_header cal_hdr;
  146. struct audio_cal_data cal_data;
  147. };
  148. struct audio_cal_alloc {
  149. struct audio_cal_header hdr;
  150. struct audio_cal_type_alloc cal_type;
  151. };
  152. /* AUDIO_DEALLOCATE_CALIBRATION */
  153. struct audio_cal_type_dealloc {
  154. struct audio_cal_type_header cal_hdr;
  155. struct audio_cal_data cal_data;
  156. };
  157. struct audio_cal_dealloc {
  158. struct audio_cal_header hdr;
  159. struct audio_cal_type_dealloc cal_type;
  160. };
  161. /* AUDIO_PREPARE_CALIBRATION */
  162. struct audio_cal_type_prepare {
  163. struct audio_cal_type_header cal_hdr;
  164. struct audio_cal_data cal_data;
  165. };
  166. struct audio_cal_prepare {
  167. struct audio_cal_header hdr;
  168. struct audio_cal_type_prepare cal_type;
  169. };
  170. /* AUDIO_POST_CALIBRATION */
  171. struct audio_cal_type_post {
  172. struct audio_cal_type_header cal_hdr;
  173. struct audio_cal_data cal_data;
  174. };
  175. struct audio_cal_post {
  176. struct audio_cal_header hdr;
  177. struct audio_cal_type_post cal_type;
  178. };
  179. /*AUDIO_CORE_META_INFO */
  180. struct audio_cal_info_metainfo {
  181. __u32 nKey;
  182. };
  183. /* Cal info types */
  184. enum {
  185. RX_DEVICE,
  186. TX_DEVICE,
  187. MAX_PATH_TYPE
  188. };
  189. struct audio_cal_info_adm_top {
  190. __s32 topology;
  191. __s32 acdb_id;
  192. /* RX_DEVICE or TX_DEVICE */
  193. __s32 path;
  194. __s32 app_type;
  195. __s32 sample_rate;
  196. };
  197. struct audio_cal_info_audproc {
  198. __s32 acdb_id;
  199. /* RX_DEVICE or TX_DEVICE */
  200. __s32 path;
  201. __s32 app_type;
  202. __s32 sample_rate;
  203. };
  204. struct audio_cal_info_audvol {
  205. __s32 acdb_id;
  206. /* RX_DEVICE or TX_DEVICE */
  207. __s32 path;
  208. __s32 app_type;
  209. __s32 vol_index;
  210. };
  211. struct audio_cal_info_afe {
  212. __s32 acdb_id;
  213. /* RX_DEVICE or TX_DEVICE */
  214. __s32 path;
  215. __s32 sample_rate;
  216. };
  217. struct audio_cal_info_afe_top {
  218. __s32 topology;
  219. __s32 acdb_id;
  220. /* RX_DEVICE or TX_DEVICE */
  221. __s32 path;
  222. __s32 sample_rate;
  223. };
  224. struct audio_cal_info_asm_top {
  225. __s32 topology;
  226. __s32 app_type;
  227. };
  228. struct audio_cal_info_audstrm {
  229. __s32 app_type;
  230. };
  231. struct audio_cal_info_aanc {
  232. __s32 acdb_id;
  233. };
  234. #define MAX_HW_DELAY_ENTRIES 25
  235. struct audio_cal_hw_delay_entry {
  236. __u32 sample_rate;
  237. __u32 delay_usec;
  238. };
  239. struct audio_cal_hw_delay_data {
  240. __u32 num_entries;
  241. struct audio_cal_hw_delay_entry entry[MAX_HW_DELAY_ENTRIES];
  242. };
  243. struct audio_cal_info_hw_delay {
  244. __s32 acdb_id;
  245. /* RX_DEVICE or TX_DEVICE */
  246. __s32 path;
  247. __s32 property_type;
  248. struct audio_cal_hw_delay_data data;
  249. };
  250. enum msm_spkr_prot_states {
  251. MSM_SPKR_PROT_CALIBRATED,
  252. MSM_SPKR_PROT_CALIBRATION_IN_PROGRESS,
  253. MSM_SPKR_PROT_DISABLED,
  254. MSM_SPKR_PROT_NOT_CALIBRATED,
  255. MSM_SPKR_PROT_PRE_CALIBRATED,
  256. MSM_SPKR_PROT_IN_FTM_MODE,
  257. MSM_SPKR_PROT_IN_V_VALI_MODE
  258. };
  259. #define MSM_SPKR_PROT_IN_FTM_MODE MSM_SPKR_PROT_IN_FTM_MODE
  260. #define MSM_SPKR_PROT_IN_V_VALI_MODE MSM_SPKR_PROT_IN_V_VALI_MODE
  261. enum msm_spkr_count {
  262. SP_V2_SPKR_1,
  263. SP_V2_SPKR_2,
  264. SP_V2_NUM_MAX_SPKRS
  265. };
  266. struct audio_cal_info_spk_prot_cfg {
  267. __s32 r0[SP_V2_NUM_MAX_SPKRS];
  268. __s32 t0[SP_V2_NUM_MAX_SPKRS];
  269. __u32 quick_calib_flag;
  270. __u32 mode;
  271. /*
  272. * 0 - Start spk prot
  273. * 1 - Start calib
  274. * 2 - Disable spk prot
  275. */
  276. #ifdef MSM_SPKR_PROT_SPV3
  277. __u32 sp_version;
  278. __s32 limiter_th[SP_V2_NUM_MAX_SPKRS];
  279. #endif
  280. };
  281. struct audio_cal_info_sp_th_vi_ftm_cfg {
  282. /*
  283. * mode should be first param, add new params later to this.
  284. * we use this mode(first 4 bytes) to differentiate
  285. * whether it is TH_VI FTM or v-validation.
  286. */
  287. __u32 mode;
  288. /*
  289. * 0 - normal running mode
  290. * 1 - Calibration
  291. * 2 - FTM mode
  292. */
  293. __u32 wait_time[SP_V2_NUM_MAX_SPKRS];
  294. __u32 ftm_time[SP_V2_NUM_MAX_SPKRS];
  295. };
  296. struct audio_cal_info_sp_th_vi_v_vali_cfg {
  297. /*
  298. * mode should be first param, add new params later to this.
  299. * we use this mode(first 4 bytes) to differentiate
  300. * whether it is TH_VI FTM or v-validation.
  301. */
  302. __u32 mode;
  303. /*
  304. * 0 - normal running mode
  305. * 1 - Calibration
  306. * 2 - FTM mode
  307. * 3 - V-Validation mode
  308. */
  309. __u32 wait_time[SP_V2_NUM_MAX_SPKRS];
  310. __u32 vali_time[SP_V2_NUM_MAX_SPKRS];
  311. };
  312. struct audio_cal_info_sp_ex_vi_ftm_cfg {
  313. __u32 wait_time[SP_V2_NUM_MAX_SPKRS];
  314. __u32 ftm_time[SP_V2_NUM_MAX_SPKRS];
  315. __u32 mode;
  316. /*
  317. * 0 - normal running mode
  318. * 2 - FTM mode
  319. */
  320. };
  321. struct audio_cal_info_sp_ex_vi_param {
  322. __s32 freq_q20[SP_V2_NUM_MAX_SPKRS];
  323. __s32 resis_q24[SP_V2_NUM_MAX_SPKRS];
  324. __s32 qmct_q24[SP_V2_NUM_MAX_SPKRS];
  325. __s32 status[SP_V2_NUM_MAX_SPKRS];
  326. };
  327. struct audio_cal_info_sp_v4_ex_vi_param {
  328. __s32 ftm_re_q24[SP_V2_NUM_MAX_SPKRS];
  329. __s32 ftm_Bl_q24[SP_V2_NUM_MAX_SPKRS];
  330. __s32 ftm_Rms_q24[SP_V2_NUM_MAX_SPKRS];
  331. __s32 ftm_Kms_q24[SP_V2_NUM_MAX_SPKRS];
  332. __s32 ftm_freq_q20[SP_V2_NUM_MAX_SPKRS];
  333. __s32 ftm_Qms_q24[SP_V2_NUM_MAX_SPKRS];
  334. __u32 status[SP_V2_NUM_MAX_SPKRS];
  335. };
  336. struct audio_cal_info_sp_th_vi_param {
  337. /*
  338. * mode should be first param, add new params later to this.
  339. * we use this mode(first 4 bytes) to differentiate
  340. * whether it is TH_VI FTM or v-validation.
  341. */
  342. __u32 mode;
  343. __s32 r_dc_q24[SP_V2_NUM_MAX_SPKRS];
  344. __s32 temp_q22[SP_V2_NUM_MAX_SPKRS];
  345. __s32 status[SP_V2_NUM_MAX_SPKRS];
  346. };
  347. struct audio_cal_info_sp_th_vi_v_vali_param {
  348. /*
  349. * mode should be first param, add new params later to this.
  350. * we use this mode(first 4 bytes) to differentiate
  351. * whether it is TH_VI FTM or v-validation.
  352. */
  353. __u32 mode;
  354. __u32 vrms_q24[SP_V2_NUM_MAX_SPKRS];
  355. __s32 status[SP_V2_NUM_MAX_SPKRS];
  356. };
  357. struct audio_cal_info_msm_spk_prot_status {
  358. __s32 r0[SP_V2_NUM_MAX_SPKRS];
  359. __s32 status;
  360. };
  361. struct audio_cal_info_sidetone {
  362. __u16 enable;
  363. __u16 gain;
  364. __s32 tx_acdb_id;
  365. __s32 rx_acdb_id;
  366. __s32 mid;
  367. __s32 pid;
  368. };
  369. #define MAX_SIDETONE_IIR_DATA_SIZE 224
  370. #define MAX_NO_IIR_FILTER_STAGE 10
  371. struct audio_cal_info_sidetone_iir {
  372. __u16 iir_enable;
  373. __u16 num_biquad_stages;
  374. __u16 pregain;
  375. __s32 tx_acdb_id;
  376. __s32 rx_acdb_id;
  377. __s32 mid;
  378. __s32 pid;
  379. __u8 iir_config[MAX_SIDETONE_IIR_DATA_SIZE];
  380. };
  381. struct audio_cal_info_lsm_top {
  382. __s32 topology;
  383. __s32 acdb_id;
  384. __s32 app_type;
  385. };
  386. struct audio_cal_info_lsm {
  387. __s32 acdb_id;
  388. /* RX_DEVICE or TX_DEVICE */
  389. __s32 path;
  390. __s32 app_type;
  391. };
  392. #define VSS_NUM_CHANNELS_MAX 32
  393. struct audio_cal_info_voc_top {
  394. __s32 topology;
  395. __s32 acdb_id;
  396. #ifdef TOPOLOGY_SPECIFIC_CHANNEL_INFO
  397. __u32 num_channels;
  398. __u8 channel_mapping[VSS_NUM_CHANNELS_MAX];
  399. #endif
  400. };
  401. struct audio_cal_info_vocproc {
  402. __s32 tx_acdb_id;
  403. __s32 rx_acdb_id;
  404. __s32 tx_sample_rate;
  405. __s32 rx_sample_rate;
  406. };
  407. enum {
  408. DEFAULT_FEATURE_SET,
  409. VOL_BOOST_FEATURE_SET,
  410. };
  411. struct audio_cal_info_vocvol {
  412. __s32 tx_acdb_id;
  413. __s32 rx_acdb_id;
  414. /* DEFAULT_ or VOL_BOOST_FEATURE_SET */
  415. __s32 feature_set;
  416. };
  417. struct audio_cal_info_vocdev_cfg {
  418. __s32 tx_acdb_id;
  419. __s32 rx_acdb_id;
  420. };
  421. #define MAX_VOICE_COLUMNS 20
  422. union audio_cal_col_na {
  423. __u8 val8;
  424. __u16 val16;
  425. __u32 val32;
  426. __u64 val64;
  427. } __packed;
  428. struct audio_cal_col {
  429. __u32 id;
  430. __u32 type;
  431. union audio_cal_col_na na_value;
  432. } __packed;
  433. struct audio_cal_col_data {
  434. __u32 num_columns;
  435. struct audio_cal_col column[MAX_VOICE_COLUMNS];
  436. } __packed;
  437. struct audio_cal_info_voc_col {
  438. __s32 table_id;
  439. __s32 tx_acdb_id;
  440. __s32 rx_acdb_id;
  441. struct audio_cal_col_data data;
  442. };
  443. /* AUDIO_SET_CALIBRATION & */
  444. struct audio_cal_type_basic {
  445. struct audio_cal_type_header cal_hdr;
  446. struct audio_cal_data cal_data;
  447. };
  448. struct audio_cal_basic {
  449. struct audio_cal_header hdr;
  450. struct audio_cal_type_basic cal_type;
  451. };
  452. struct audio_cal_type_adm_top {
  453. struct audio_cal_type_header cal_hdr;
  454. struct audio_cal_data cal_data;
  455. struct audio_cal_info_adm_top cal_info;
  456. };
  457. struct audio_cal_adm_top {
  458. struct audio_cal_header hdr;
  459. struct audio_cal_type_adm_top cal_type;
  460. };
  461. struct audio_cal_type_metainfo {
  462. struct audio_cal_type_header cal_hdr;
  463. struct audio_cal_data cal_data;
  464. struct audio_cal_info_metainfo cal_info;
  465. };
  466. struct audio_core_metainfo {
  467. struct audio_cal_header hdr;
  468. struct audio_cal_type_metainfo cal_type;
  469. };
  470. struct audio_cal_type_audproc {
  471. struct audio_cal_type_header cal_hdr;
  472. struct audio_cal_data cal_data;
  473. struct audio_cal_info_audproc cal_info;
  474. };
  475. struct audio_cal_audproc {
  476. struct audio_cal_header hdr;
  477. struct audio_cal_type_audproc cal_type;
  478. };
  479. struct audio_cal_type_audvol {
  480. struct audio_cal_type_header cal_hdr;
  481. struct audio_cal_data cal_data;
  482. struct audio_cal_info_audvol cal_info;
  483. };
  484. struct audio_cal_audvol {
  485. struct audio_cal_header hdr;
  486. struct audio_cal_type_audvol cal_type;
  487. };
  488. struct audio_cal_type_asm_top {
  489. struct audio_cal_type_header cal_hdr;
  490. struct audio_cal_data cal_data;
  491. struct audio_cal_info_asm_top cal_info;
  492. };
  493. struct audio_cal_asm_top {
  494. struct audio_cal_header hdr;
  495. struct audio_cal_type_asm_top cal_type;
  496. };
  497. struct audio_cal_type_audstrm {
  498. struct audio_cal_type_header cal_hdr;
  499. struct audio_cal_data cal_data;
  500. struct audio_cal_info_audstrm cal_info;
  501. };
  502. struct audio_cal_audstrm {
  503. struct audio_cal_header hdr;
  504. struct audio_cal_type_audstrm cal_type;
  505. };
  506. struct audio_cal_type_afe {
  507. struct audio_cal_type_header cal_hdr;
  508. struct audio_cal_data cal_data;
  509. struct audio_cal_info_afe cal_info;
  510. };
  511. struct audio_cal_afe {
  512. struct audio_cal_header hdr;
  513. struct audio_cal_type_afe cal_type;
  514. };
  515. struct audio_cal_type_afe_top {
  516. struct audio_cal_type_header cal_hdr;
  517. struct audio_cal_data cal_data;
  518. struct audio_cal_info_afe_top cal_info;
  519. };
  520. struct audio_cal_afe_top {
  521. struct audio_cal_header hdr;
  522. struct audio_cal_type_afe_top cal_type;
  523. };
  524. struct audio_cal_type_aanc {
  525. struct audio_cal_type_header cal_hdr;
  526. struct audio_cal_data cal_data;
  527. struct audio_cal_info_aanc cal_info;
  528. };
  529. struct audio_cal_aanc {
  530. struct audio_cal_header hdr;
  531. struct audio_cal_type_aanc cal_type;
  532. };
  533. struct audio_cal_type_fb_spk_prot_cfg {
  534. struct audio_cal_type_header cal_hdr;
  535. struct audio_cal_data cal_data;
  536. struct audio_cal_info_spk_prot_cfg cal_info;
  537. };
  538. struct audio_cal_fb_spk_prot_cfg {
  539. struct audio_cal_header hdr;
  540. struct audio_cal_type_fb_spk_prot_cfg cal_type;
  541. };
  542. struct audio_cal_type_sp_th_vi_ftm_cfg {
  543. struct audio_cal_type_header cal_hdr;
  544. struct audio_cal_data cal_data;
  545. struct audio_cal_info_sp_th_vi_ftm_cfg cal_info;
  546. };
  547. struct audio_cal_sp_th_vi_ftm_cfg {
  548. struct audio_cal_header hdr;
  549. struct audio_cal_type_sp_th_vi_ftm_cfg cal_type;
  550. };
  551. struct audio_cal_type_sp_th_vi_v_vali_cfg {
  552. struct audio_cal_type_header cal_hdr;
  553. struct audio_cal_data cal_data;
  554. struct audio_cal_info_sp_th_vi_v_vali_cfg cal_info;
  555. };
  556. struct audio_cal_sp_th_vi_v_vali_cfg {
  557. struct audio_cal_header hdr;
  558. struct audio_cal_type_sp_th_vi_v_vali_cfg cal_type;
  559. };
  560. struct audio_cal_type_sp_ex_vi_ftm_cfg {
  561. struct audio_cal_type_header cal_hdr;
  562. struct audio_cal_data cal_data;
  563. struct audio_cal_info_sp_ex_vi_ftm_cfg cal_info;
  564. };
  565. struct audio_cal_sp_ex_vi_ftm_cfg {
  566. struct audio_cal_header hdr;
  567. struct audio_cal_type_sp_ex_vi_ftm_cfg cal_type;
  568. };
  569. struct audio_cal_type_hw_delay {
  570. struct audio_cal_type_header cal_hdr;
  571. struct audio_cal_data cal_data;
  572. struct audio_cal_info_hw_delay cal_info;
  573. };
  574. struct audio_cal_hw_delay {
  575. struct audio_cal_header hdr;
  576. struct audio_cal_type_hw_delay cal_type;
  577. };
  578. struct audio_cal_type_sidetone {
  579. struct audio_cal_type_header cal_hdr;
  580. struct audio_cal_data cal_data;
  581. struct audio_cal_info_sidetone cal_info;
  582. };
  583. struct audio_cal_sidetone {
  584. struct audio_cal_header hdr;
  585. struct audio_cal_type_sidetone cal_type;
  586. };
  587. struct audio_cal_type_sidetone_iir {
  588. struct audio_cal_type_header cal_hdr;
  589. struct audio_cal_data cal_data;
  590. struct audio_cal_info_sidetone_iir cal_info;
  591. };
  592. struct audio_cal_sidetone_iir {
  593. struct audio_cal_header hdr;
  594. struct audio_cal_type_sidetone_iir cal_type;
  595. };
  596. struct audio_cal_type_lsm_top {
  597. struct audio_cal_type_header cal_hdr;
  598. struct audio_cal_data cal_data;
  599. struct audio_cal_info_lsm_top cal_info;
  600. };
  601. struct audio_cal_lsm_top {
  602. struct audio_cal_header hdr;
  603. struct audio_cal_type_lsm_top cal_type;
  604. };
  605. struct audio_cal_type_lsm {
  606. struct audio_cal_type_header cal_hdr;
  607. struct audio_cal_data cal_data;
  608. struct audio_cal_info_lsm cal_info;
  609. };
  610. struct audio_cal_lsm {
  611. struct audio_cal_header hdr;
  612. struct audio_cal_type_lsm cal_type;
  613. };
  614. struct audio_cal_type_voc_top {
  615. struct audio_cal_type_header cal_hdr;
  616. struct audio_cal_data cal_data;
  617. struct audio_cal_info_voc_top cal_info;
  618. };
  619. struct audio_cal_voc_top {
  620. struct audio_cal_header hdr;
  621. struct audio_cal_type_voc_top cal_type;
  622. };
  623. struct audio_cal_type_vocproc {
  624. struct audio_cal_type_header cal_hdr;
  625. struct audio_cal_data cal_data;
  626. struct audio_cal_info_vocproc cal_info;
  627. };
  628. struct audio_cal_vocproc {
  629. struct audio_cal_header hdr;
  630. struct audio_cal_type_vocproc cal_type;
  631. };
  632. struct audio_cal_type_vocvol {
  633. struct audio_cal_type_header cal_hdr;
  634. struct audio_cal_data cal_data;
  635. struct audio_cal_info_vocvol cal_info;
  636. };
  637. struct audio_cal_vocvol {
  638. struct audio_cal_header hdr;
  639. struct audio_cal_type_vocvol cal_type;
  640. };
  641. struct audio_cal_type_vocdev_cfg {
  642. struct audio_cal_type_header cal_hdr;
  643. struct audio_cal_data cal_data;
  644. struct audio_cal_info_vocdev_cfg cal_info;
  645. };
  646. struct audio_cal_vocdev_cfg {
  647. struct audio_cal_header hdr;
  648. struct audio_cal_type_vocdev_cfg cal_type;
  649. };
  650. struct audio_cal_type_voc_col {
  651. struct audio_cal_type_header cal_hdr;
  652. struct audio_cal_data cal_data;
  653. struct audio_cal_info_voc_col cal_info;
  654. };
  655. struct audio_cal_voc_col {
  656. struct audio_cal_header hdr;
  657. struct audio_cal_type_voc_col cal_type;
  658. };
  659. /* AUDIO_GET_CALIBRATION */
  660. struct audio_cal_type_fb_spk_prot_status {
  661. struct audio_cal_type_header cal_hdr;
  662. struct audio_cal_data cal_data;
  663. struct audio_cal_info_msm_spk_prot_status cal_info;
  664. };
  665. struct audio_cal_fb_spk_prot_status {
  666. struct audio_cal_header hdr;
  667. struct audio_cal_type_fb_spk_prot_status cal_type;
  668. };
  669. struct audio_cal_type_sp_th_vi_param {
  670. struct audio_cal_type_header cal_hdr;
  671. struct audio_cal_data cal_data;
  672. struct audio_cal_info_sp_th_vi_param cal_info;
  673. };
  674. struct audio_cal_sp_th_vi_param {
  675. struct audio_cal_header hdr;
  676. struct audio_cal_type_sp_th_vi_param cal_type;
  677. };
  678. struct audio_cal_type_sp_th_vi_v_vali_param {
  679. struct audio_cal_type_header cal_hdr;
  680. struct audio_cal_data cal_data;
  681. struct audio_cal_info_sp_th_vi_v_vali_param cal_info;
  682. };
  683. struct audio_cal_sp_th_vi_v_vali_param {
  684. struct audio_cal_header hdr;
  685. struct audio_cal_type_sp_th_vi_v_vali_param cal_type;
  686. };
  687. struct audio_cal_type_sp_ex_vi_param {
  688. struct audio_cal_type_header cal_hdr;
  689. struct audio_cal_data cal_data;
  690. struct audio_cal_info_sp_ex_vi_param cal_info;
  691. };
  692. struct audio_cal_sp_ex_vi_param {
  693. struct audio_cal_header hdr;
  694. struct audio_cal_type_sp_ex_vi_param cal_type;
  695. };
  696. struct audio_cal_type_sp_v4_ex_vi_param {
  697. struct audio_cal_type_header cal_hdr;
  698. struct audio_cal_data cal_data;
  699. struct audio_cal_info_sp_v4_ex_vi_param cal_info;
  700. };
  701. struct audio_cal_sp_v4_ex_vi_param {
  702. struct audio_cal_header hdr;
  703. struct audio_cal_type_sp_v4_ex_vi_param cal_type;
  704. };
  705. #endif /* _UAPI_MSM_AUDIO_CALIBRATION_H */