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