mirror of https://github.com/thesofproject/sof.git
topology1: Undefine after in DAI & PIPELINE macros
In order to ease comprehension and avoid side-effect of constants being defined after calling a macro, this change undefined the locally define constants for pipelines and dai macros. Signed-off-by: Lionel Koenig <lionelk@google.com>
This commit is contained in:
parent
954614b5fb
commit
c687815185
|
@ -273,6 +273,20 @@ define(`DAI_ADD',
|
|||
`define(`DYNAMIC_PIPE', $15)'
|
||||
`include($1)'
|
||||
`DEBUG_DAI($3, $4)'
|
||||
`undefine(`PIPELINE_ID')'
|
||||
`undefine(`DAI_TYPE')'
|
||||
`undefine(`DAI_INDEX')'
|
||||
`undefine(`DAI_BE')'
|
||||
`undefine(`DAI_BUF')'
|
||||
`undefine(`DAI_PERIODS')'
|
||||
`undefine(`DAI_FORMAT')'
|
||||
`undefine(`SCHEDULE_PERIOD')'
|
||||
`undefine(`SCHEDULE_PRIORITY')'
|
||||
`undefine(`SCHEDULE_CORE')'
|
||||
`undefine(`SCHEDULE_TIME_DOMAIN')'
|
||||
`undefine(`DAI_CHANNELS')'
|
||||
`undefine(`DAI_RATE')'
|
||||
`undefine(`DYNAMIC_PIPE')'
|
||||
)
|
||||
|
||||
# DAI_ADD_SCHED can be used for adding a DAI with sched_comp
|
||||
|
@ -284,5 +298,6 @@ define(`DAI_ADD_SCHED',
|
|||
`undefine(`SCHED_COMP')'
|
||||
`define(`SCHED_COMP', $13)'
|
||||
`DAI_ADD($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)'
|
||||
`undefine(`SCHED_COMP')'
|
||||
)
|
||||
divert(0)dnl
|
||||
|
|
|
@ -86,6 +86,20 @@ define(`PIPELINE_PCM_ADD',
|
|||
`ifdef(`DAI_PERIODS', `', `define(`DAI_PERIODS', DAI_DEFAULT_PERIODS)')'
|
||||
`include($1)'
|
||||
`DEBUG_PCM_ADD($1, $3)'
|
||||
`undefine(`PCM_ID')'
|
||||
`undefine(`PIPELINE_ID')'
|
||||
`undefine(`PIPELINE_CHANNELS')'
|
||||
`undefine(`PIPELINE_FORMAT')'
|
||||
`undefine(`SCHEDULE_PERIOD')'
|
||||
`undefine(`SCHEDULE_PRIORITY')'
|
||||
`undefine(`SCHEDULE_CORE')'
|
||||
`undefine(`PCM_MIN_RATE')'
|
||||
`undefine(`PCM_MAX_RATE')'
|
||||
`undefine(`PIPELINE_RATE')'
|
||||
`undefine(`SCHEDULE_TIME_DOMAIN')'
|
||||
`undefine(`DAI_FORMAT')'
|
||||
`undefine(`SCHED_COMP')'
|
||||
`undefine(`DYNAMIC_PIPE')'
|
||||
,`fatal_error(`Invalid parameters ($#) to PIPELINE_PCM_ADD')')'
|
||||
)
|
||||
|
||||
|
@ -128,6 +142,21 @@ define(`PIPELINE_PCM_DAI_ADD',
|
|||
`define(`PCM_MAX_RATE', $14)'
|
||||
`define(`PIPELINE_RATE', $15)'
|
||||
`include($1)'
|
||||
`undefine(`PCM_ID')'
|
||||
`undefine(`PIPELINE_ID')'
|
||||
`undefine(`PIPELINE_CHANNELS')'
|
||||
`undefine(`PIPELINE_FORMAT')'
|
||||
`undefine(`SCHEDULE_PERIOD')'
|
||||
`undefine(`SCHEDULE_PRIORITY')'
|
||||
`undefine(`SCHEDULE_CORE')'
|
||||
`undefine(`SCHEDULE_TIME_DOMAIN')'
|
||||
`undefine(`DAI_TYPE')'
|
||||
`undefine(`DAI_INDEX')'
|
||||
`undefine(`DAI_FORMAT')'
|
||||
`undefine(`DAI_PERIODS')'
|
||||
`undefine(`PCM_MIN_RATE')'
|
||||
`undefine(`PCM_MAX_RATE')'
|
||||
`undefine(`PIPELINE_RATE')'
|
||||
,`fatal_error(`Invalid parameters ($#) to PIPELINE_PCM_DAI_ADD')')'
|
||||
)
|
||||
|
||||
|
@ -162,6 +191,17 @@ define(`PIPELINE_ADD',
|
|||
`define(`PIPELINE_RATE', $12)'
|
||||
`define(`DYNAMIC_PIPE', $13)'
|
||||
`include($1)'
|
||||
`undefine(`PIPELINE_ID')'
|
||||
`undefine(`PIPELINE_CHANNELS')'
|
||||
`undefine(`PIPELINE_FORMAT')'
|
||||
`undefine(`SCHEDULE_PERIOD')'
|
||||
`undefine(`SCHEDULE_PRIORITY')'
|
||||
`undefine(`SCHEDULE_CORE')'
|
||||
`undefine(`SCHEDULE_TIME_DOMAIN')'
|
||||
`undefine(`PCM_MIN_RATE')'
|
||||
`undefine(`PCM_MAX_RATE')'
|
||||
`undefine(`PIPELINE_RATE')'
|
||||
`undefine(`DYNAMIC_PIPE')'
|
||||
,`fatal_error(`Invalid parameters ($#) to PIPELINE_ADD')')'
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue