Skip to content

Commit 52e8490

Browse files
ranj063lgirdwood
authored andcommitted
topology1: fix errors due to newline in list generator
The recent changes to the string parser in alsa-lib cause the topology builds to break for some topologies. Avoid adding a newline for the bytes data for the MUXDEMUX config by introducing a new macro for creating lists without new lines between items. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> (cherry picked from commit 3e1c160)
1 parent 3fdeeac commit 52e8490

8 files changed

Lines changed: 11 additions & 7 deletions

tools/topology/topology1/development/sof-apl-nocodec-demux-eq-2ch4ch.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ define(matrix1, `ROUTE_MATRIX(1,
4141
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)')')
4242

4343
dnl name, num_streams, route_matrix list
44-
MUXDEMUX_CONFIG(demux_priv_1, 1, LIST(` ', `matrix1'))
44+
MUXDEMUX_CONFIG(demux_priv_1, 1, LIST_NONEWLINE(`', `matrix1'))
4545

4646
#
4747
# Define the pipelines

tools/topology/topology1/development/sof-apl-nocodec-demux-eq-4ch4ch.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ define(matrix1, `ROUTE_MATRIX(1,
4141
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,0)')')
4242

4343
dnl name, num_streams, route_matrix list
44-
MUXDEMUX_CONFIG(demux_priv_1, 1, LIST(` ', `matrix1'))
44+
MUXDEMUX_CONFIG(demux_priv_1, 1, LIST_NONEWLINE(`', `matrix1'))
4545

4646
#
4747
# Define the pipelines

tools/topology/topology1/development/sof-tgl-nocodec-ci.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ define(matrix2, `ROUTE_MATRIX(7,
5656
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,1)')')
5757

5858
dnl name, num_streams, route_matrix list
59-
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST(` ', `matrix1,', `matrix2'))
59+
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST_NONEWLINE(`', `matrix1,', `matrix2'))
6060

6161
#
6262
# Define the pipelines

tools/topology/topology1/m4/utils.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ dnl The first argument specifies the number of tabs to be added for formatting
1919
define(`LIST_LOOP', `argn(j,$@)
2020
$1ifelse(i,`2', `', `define(`i', decr(i))define(`j', incr(j))$0($@)')')
2121

22+
define(`LIST_LOOP_NONEWLINE', `argn(j,$@)$1ifelse(i,`2', `', `define(`i', decr(i))define(`j', incr(j))$0($@)')')
23+
2224
define(`LIST', `pushdef(`i', $#)pushdef(`j', `2')LIST_LOOP($@)popdef(i)popdef(j)')
2325

26+
define(`LIST_NONEWLINE', `pushdef(`i', $#)pushdef(`j', `2')LIST_LOOP_NONEWLINE($@)popdef(i)popdef(j)')
27+
2428
dnl Sums a list of variable arguments. Use as last argument in macro.
2529
define(`SUM_LOOP', `eval(argn(j,$@)
2630
ifelse(i,`1', `', `define(`i', decr(i)) define(`j', incr(j)) + $0($@)'))')

tools/topology/topology1/sof-apl-demux-pcm512x.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ define(matrix2, `ROUTE_MATRIX(5,
4949
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,1)')')
5050

5151
dnl name, num_streams, route_matrix list
52-
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST(` ', `matrix1,', `matrix2'))
52+
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST_NONEWLINE(`', `matrix1,', `matrix2'))
5353

5454
#
5555
# Define the pipelines

tools/topology/topology1/sof-cml-demux-rt5682.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ define(matrix2, `ROUTE_MATRIX(5,
4949
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,1)')')
5050

5151
dnl name, num_streams, route_matrix list
52-
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST(` ', `matrix1,', `matrix2'))
52+
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST_NONEWLINE(`', `matrix1,', `matrix2'))
5353

5454
#
5555
# Define the pipelines

tools/topology/topology1/sof-icl-rt711-rt1308-rt715-hdmi.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ define(matrix2, `ROUTE_MATRIX(4,
9292
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,1)')')
9393

9494
dnl name, num_streams, route_matrix list
95-
MUXDEMUX_CONFIG(demux_priv_3, 2, LIST(` ', `matrix1,', `matrix2'))
95+
MUXDEMUX_CONFIG(demux_priv_3, 2, LIST_NONEWLINE(`', `matrix1,', `matrix2'))
9696
')
9797
')
9898

tools/topology/topology1/sof-tgl-max98357a-rt5682.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ define(matrix2, `ROUTE_MATRIX(9,
5252
`BITS_TO_BYTE(0, 0, 0 ,0 ,0 ,0 ,0 ,1)')')
5353

5454
dnl name, num_streams, route_matrix list
55-
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST(` ', `matrix1,', `matrix2'))
55+
MUXDEMUX_CONFIG(demux_priv_1, 2, LIST_NONEWLINE(`', `matrix1,', `matrix2'))
5656

5757
#
5858
# Define the pipelines

0 commit comments

Comments
 (0)