File 0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch of Package alsa-ucm-conf

From 33be660e4b1e75c19d5332556c3d2636dd3344bf Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 2 Nov 2020 16:44:51 +0100
Subject: [PATCH 1/2] fix the ucm2/codecs/hda/hdmi.conf use

The mentioned commit (dcef48f13d) removed the index for the IEC958 on/off
control which made the HDMI 2+ outputs silent.

Fixes: dcef48f13d ("HDA-Intel: add support for AMD acp microphone devices")
BugLink: https://github.com/alsa-project/alsa-lib/issues/95
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
 ucm2/HDA-Intel/Hdmi.conf   | 8 +++++++-
 ucm2/codecs/hda/hdmi.conf  | 4 ++--
 ucm2/sof-hda-dsp/Hdmi.conf | 3 +++
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ucm2/HDA-Intel/Hdmi.conf b/ucm2/HDA-Intel/Hdmi.conf
index c8b6e77a0299..c533e4933540 100644
--- a/ucm2/HDA-Intel/Hdmi.conf
+++ b/ucm2/HDA-Intel/Hdmi.conf
@@ -6,6 +6,7 @@ If.hdmi1 {
 		Define {
 			HdmiNum 1
 			HdmiPCM 3
+			HdmiCtlIndex 0
 			HdmiPrio 1100
 		}
 		Include.hdmi1.File "/codecs/hda/hdmi.conf"
@@ -18,6 +19,7 @@ If.hdmi2 {
 		Define {
 			HdmiNum 2
 			HdmiPCM 7
+			HdmiCtlIndex 1
 			HdmiPrio 1200
 		}
 		Include.hdmi2.File "/codecs/hda/hdmi.conf"
@@ -30,6 +32,7 @@ If.hdmi3 {
 		Define {
 			HdmiNum 3
 			HdmiPCM 8
+			HdmiCtlIndex 2
 			HdmiPrio 1300
 		}
 		Include.hdmi3.File "/codecs/hda/hdmi.conf"
@@ -42,6 +45,7 @@ If.hdmi4 {
 		Define {
 			HdmiNum 4
 			HdmiPCM 9
+			HdmiCtlIndex 3
 			HdmiPrio 1400
 		}
 		Include.hdmi4.File "/codecs/hda/hdmi.conf"
@@ -54,6 +58,7 @@ If.hdmi5 {
 		Define {
 			HdmiNum 5
 			HdmiPCM 10
+			HdmiCtlIndex 4
 			HdmiPrio 1500
 		}
 		Include.hdmi5.File "/codecs/hda/hdmi.conf"
@@ -66,8 +71,9 @@ If.hdmi6 {
 		Define {
 			HdmiNum 6
 			HdmiPCM 11
+			HdmiCtlIndex 5
 			HdmiPrio 1600
 		}
-		Include.hdmi5.File "/codecs/hda/hdmi.conf"
+		Include.hdmi6.File "/codecs/hda/hdmi.conf"
 	}
 }
diff --git a/ucm2/codecs/hda/hdmi.conf b/ucm2/codecs/hda/hdmi.conf
index ba80fefc214e..32a77f4bf085 100644
--- a/ucm2/codecs/hda/hdmi.conf
+++ b/ucm2/codecs/hda/hdmi.conf
@@ -8,11 +8,11 @@ If.hdmi {
 			Comment "HDMI${var:HdmiNum} Output"
 
 			EnableSequence [
-				cset "name='IEC958 Playback Switch' on"
+				cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} on"
 			]
 
 			DisableSequence [
-				cset "name='IEC958 Playback Switch' off"
+				cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} off"
 			]
 
 			Value {
diff --git a/ucm2/sof-hda-dsp/Hdmi.conf b/ucm2/sof-hda-dsp/Hdmi.conf
index 7b777d1b1d22..172656797518 100644
--- a/ucm2/sof-hda-dsp/Hdmi.conf
+++ b/ucm2/sof-hda-dsp/Hdmi.conf
@@ -6,6 +6,7 @@ If.hdmi1 {
 		Define {
 			HdmiNum 1
 			HdmiPCM 3
+			HdmiCtlIndex 0
 			HdmiPrio 500
 		}
 		Include.hdmi1.File "/codecs/hda/hdmi.conf"
@@ -18,6 +19,7 @@ If.hdmi2 {
 		Define {
 			HdmiNum 2
 			HdmiPCM 4
+			HdmiCtlIndex 1
 			HdmiPrio 600
 		}
 		Include.hdmi2.File "/codecs/hda/hdmi.conf"
@@ -30,6 +32,7 @@ If.hdmi3 {
 		Define {
 			HdmiNum 3
 			HdmiPCM 5
+			HdmiCtlIndex 2
 			HdmiPrio 700
 		}
 		Include.hdmi3.File "/codecs/hda/hdmi.conf"
-- 
2.16.4
openSUSE Build Service is sponsored by