Skip to content

Commit

Permalink
ucm2: sof-soundwire: Use the HdmiDevice macro for hdmi device creation
Browse files Browse the repository at this point in the history
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: #413
Signed-off-by: Peter Ujfalusi <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
ujfalusi authored and perexg committed Aug 2, 2024
1 parent 6ae0c0a commit 9e24590
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions ucm2/sof-soundwire/sof-soundwire.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Syntax 6
Syntax 7

SectionUseCase."HiFi" {
File "/sof-soundwire/HiFi.conf"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 9e24590

Please sign in to comment.