]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: Intel/sof-hda-dsp: Use the HdmiDevice macro for
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 30 Apr 2024 11:01:46 +0000 (14:01 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 2 Aug 2024 14:32:38 +0000 (16:32 +0200)
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 <peter.ujfalusi@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Intel/sof-hda-dsp/sof-hda-dsp.conf

index 00e40d690aee8ec152de2e9677b0588eecb4c370..84596bcd52430d161cf265a78bfa5948acc61ad3 100644 (file)
@@ -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 {