topology: add param check to DAI_CONFIG()

Abort build if not all mandatory arguments are passed to the
macro.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2019-03-27 18:00:39 +02:00 committed by Liam Girdwood
parent 322fe24e95
commit 90fbcd54f3
1 changed files with 6 additions and 2 deletions

View File

@ -125,9 +125,8 @@ define(`D_DAI', `SectionDAI."'N_DAI`" {'
dnl DAI Config)
define(`N_DAI_CONFIG', `DAICONFIG.'$1)
dnl DAI_CONFIG(type, idx, link_id, name, ssp_config/dmic_config)
define(`DAI_CONFIG',
define(`DO_DAI_CONFIG',
`SectionHWConfig."'$1$2`" {'
`'
` id "'$3`"'
@ -164,6 +163,11 @@ define(`DAI_CONFIG',
`DEBUG_DAI_CONFIG($1, $3)'
)
dnl DAI_CONFIG(type, idx, link_id, name, ssp_config/dmic_config)
define(`DAI_CONFIG',
`ifelse(`$#', `5', `DO_DAI_CONFIG($1, $2, $3, $4, $5)', `$#', `4', `DO_DAI_CONFIG($1, $2, $3, $4)', `fatal_error(`Invalid parameters ($#) to DAI_CONFIG')')'
)
dnl DAI_ADD(pipeline,
dnl pipe id, dai type, dai_index, dai_be,
dnl buffer, periods, format,