From 9e245901aedee9efd5ede249dc8ba3efc747f7bf Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 30 Apr 2024 14:06:25 +0300 Subject: [PATCH] ucm2: sof-soundwire: Use the HdmiDevice macro for hdmi device creation The duplicated code for the hdmi device creation can be removed by using the HdmiDevice macro. The macro needs Syntax 7 to work (variable as parameter support), update the Syntax version of the file as well. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/413 Signed-off-by: Peter Ujfalusi Signed-off-by: Jaroslav Kysela --- ucm2/sof-soundwire/sof-soundwire.conf | 31 ++++----------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 2ede1cd..8642515 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -1,4 +1,4 @@ -Syntax 6 +Syntax 7 SectionUseCase."HiFi" { File "/sof-soundwire/HiFi.conf" @@ -164,32 +164,9 @@ If.mics-array { Include.hdmi-pcm.File "/common/pcm/hdmi.conf" -If.Hdmi5-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[5](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi5.HdmiPCM { Device 5 Index 0 } -} - -If.Hdmi6-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[6](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi6.HdmiPCM { Device 6 Index 1 } -} - -If.Hdmi7-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[7](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi7.HdmiPCM { Device 7 Index 2 } -} +Macro.0.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 5 Idx 0 } +Macro.1.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 6 Idx 1 } +Macro.2.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 7 Idx 2 } If.HdmiIec61937 { Condition { -- 2.47.1