1divert(-1)
2
3dnl ESAI related macros
4
5dnl ESAI_CLOCK(clock, freq, codec_master, polarity)
6dnl polarity is optional
7define(`ESAI_CLOCK',
8	$1		STR($3)
9	$1_freq		STR($2))
10	`ifelse($4, `inverted', `$1_invert	"true"',`')')
11
12dnl ESAI_TDM(slots, width, tx_mask, rx_mask)
13define(`ESAI_TDM',
14`	tdm_slots	'STR($1)
15`	tdm_slot_width	'STR($2)
16`	tx_slots	'STR($3)
17`	rx_slots	'STR($4)
18)
19
20dnl ESAI_CONFIG(format, mclk, bclk, fsync, tdm, esai_config_data)
21define(`ESAI_CONFIG',
22`	format		"'$1`"'
23`	'$2
24`	'$3
25`	'$4
26`	'$5
27`}'
28$6
29)
30
31dnl ESAI_CONFIG_DATA(type, idx, mclk_id)
32dnl mclk_id is optional
33define(`ESAI_CONFIG_DATA',
34`SectionVendorTuples."'N_DAI_CONFIG($1$2)`_tuples" {'
35`	tokens "sof_esai_tokens"'
36`	tuples."short" {'
37`		SOF_TKN_IMX_ESAI_MCLK_ID'	ifelse($3, `', "0", STR($3))
38`	}'
39`}'
40`SectionData."'N_DAI_CONFIG($1$2)`_data" {'
41`	tuples "'N_DAI_CONFIG($1$2)`_tuples"'
42`}'
43)
44
45divert(0)dnl
46