On Sun, 2018-03-04 at 23:13 -0800, Ranjani Sridharan wrote:
This patch adds m4 wrapper for mixercontrol section in pipeline definition
Signed-off-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com
topology/m4/local.m4 | 55 +++++++++++++++++++++-- topology/sof/pipe-low-latency-capture.m4 | 36 ++++----------- topology/sof/pipe-low-latency-playback.m4 | 73 +++++++------------------------ topology/sof/pipe-pcm-media.m4 | 37 ++++------------ topology/sof/pipe-tone.m4 | 73 +++++++------------------------ topology/sof/pipe-volume-capture.m4 | 35 ++++----------- topology/sof/pipe-volume-playback.m4 | 70 +++++++---------------------- 7 files changed, 127 insertions(+), 252 deletions(-)
diff --git a/topology/m4/local.m4 b/topology/m4/local.m4 index a340ec3..4521314 100644 --- a/topology/m4/local.m4 +++ b/topology/m4/local.m4 @@ -7,9 +7,13 @@ define(`STR', `"'$1`"') define(`argn', `ifelse(`$1', 1, ``$2'', `argn(decr(`$1'), shift(shift($@)))')')
-define(`KCONTROLS', `pushdef(`i', $#) pushdef(`j', `1') KCONTROL_LOOP($@)') -define(`KCONTROL_LOOP', `argn(j,$@)
ifelse(i,`1', `', `define(`i', decr(i)) define(`j', incr(j)) $0($@)')')
+define(`KCONTROLS', `pushdef(`i', $#)pushdef(`j', `1')KCONTROL_LOOP($@)popdef(i)popdef(j)') +define(`KCONTROL_LOOP',`argn(j,$@)
ifelse(i,`1', `',`define(`i', decr(i))define(`j', incr(j))$0($@)')')
+define(`MIXERCONTROLS', `pushdef(`i', $#)pushdef(`j', `1')MIXERCONTROL_LOOP($@)popdef(i)popdef(j)') +define(`MIXERCONTROL_LOOP',`argn(j,$@)
I've reworked this part a little to allow some reuse, can you redo this part on top.
Thanks
Liam