From 6ae0c0a3c011cf67ac6865da5911dec692028b5d Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 30 Apr 2024 14:01:46 +0300 Subject: [PATCH] ucm2: Intel/sof-hda-dsp: Use the HdmiDevice macro for 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/Intel/sof-hda-dsp/sof-hda-dsp.conf | 31 ++++--------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf index 00e40d6..84596bc 100644 --- a/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf +++ b/ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf @@ -1,4 +1,4 @@ -Syntax 6 +Syntax 7 Include.card-init.File "/lib/card-init.conf" @@ -128,32 +128,9 @@ If.Capture { Include.hdmi-pcm.File "/common/pcm/hdmi.conf" -If.Hdmi3-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[3](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi3.HdmiPCM { Device 3 Index 0 } -} - -If.Hdmi4-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[4](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi4.HdmiPCM { Device 4 Index 1 } -} - -If.Hdmi5-iec61937 { - Condition { - Type RegexMatch - Regex "((^|,)[5](,|$))" - String "${var:Iec61937Pcms1}" - } - True.Macro.hdmi5.HdmiPCM { Device 5 Index 2 } -} +Macro.0.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 3 Idx 0 } +Macro.1.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 4 Idx 1 } +Macro.2.HdmiDevice { Iec61937Devices "${var:Iec61937Pcms1}" Dev 5 Idx 2 } If.HdmiIec61937 { Condition { -- 2.47.3