]> git.alsa-project.org Git - alsa-ucm-conf.git/commit
ucm2: common: pcm: hdmi: Add new macro to conditionally
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 30 Apr 2024 10:58:29 +0000 (13:58 +0300)
committerJaroslav Kysela <perex@perex.cz>
Fri, 2 Aug 2024 14:32:32 +0000 (16:32 +0200)
commit92aa6fda6b5c16bf17f370b3a46f5b4914e53090
treed4c9b021559956ca752646525d5e1549f511a5ad
parent16c71662eb7258e782212a5b26b178bbbdcd1ce8
ucm2: common: pcm: hdmi: Add new macro to conditionally

The new HdmiDevice macro can be used to create the hdmi PCM device for a
hardware PCM whose ID can be found in the Iec61937Devices comma separated
device ID list.
It is the caller's responsibility to pass correct device id of an HDMI PCM
as Dev.

The new macro needs Syntax 7 support.

Example for a use by sof-hda-dsp where the HDMI devices are 3, 4 and 5

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 {
Type RegexMatch
Regex "((^|,)[345](,|$))"
String "${var:Iec61937Pcms1}"
}
True.Macro.save_hdmi_cfg.HdmiPCMSave { Name "42-sof-hdmi" }
}

The Iec61937Pcms1 contains a match string of "5,4,3"

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/common/pcm/hdmi.conf