Accepting request 852062 from home:tiwai:branches:multimedia:libs

- Backport upstream fixes for HD-audio and soundwire HDMI:
  0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch
  0002-codecs-hda-hdmi.conf-add-DisplayPort-to-the-device-d.patch
  0003-sof-soundwire-use-the-codecs-hda-hdmi.conf-macro.patch
- Revert the workaround for the missing HD-audio init

OBS-URL: https://build.opensuse.org/request/show/852062
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-ucm-conf?expand=0&rev=23
This commit is contained in:
Takashi Iwai 2020-12-01 09:50:51 +00:00 committed by Git OBS Bridge
parent 042f442362
commit c5d1ca88f3
5 changed files with 282 additions and 4 deletions

View File

@ -0,0 +1,121 @@
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

View File

@ -0,0 +1,27 @@
From f8c2428ccc42488c5e96801cce9f7e28080ecb71 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 2 Nov 2020 18:15:14 +0100
Subject: [PATCH 2/2] codecs/hda/hdmi.conf - add DisplayPort to the device
description (Comment)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/codecs/hda/hdmi.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ucm2/codecs/hda/hdmi.conf b/ucm2/codecs/hda/hdmi.conf
index 32a77f4bf085..c7b7ba42dd28 100644
--- a/ucm2/codecs/hda/hdmi.conf
+++ b/ucm2/codecs/hda/hdmi.conf
@@ -5,7 +5,7 @@ If.hdmi {
}
True {
SectionDevice."HDMI${var:HdmiNum}" {
- Comment "HDMI${var:HdmiNum} Output"
+ Comment "HDMI / DisplayPort ${var:HdmiNum} Output"
EnableSequence [
cset "name='IEC958 Playback Switch',index=${var:HdmiCtlIndex} on"
--
2.16.4

View File

@ -0,0 +1,119 @@
From 334b12e9a796cddf70779b68418ee7ad52ba1d14 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 16 Nov 2020 11:48:05 +0100
Subject: [PATCH 3/3] sof-soundwire: use the codecs/hda/hdmi.conf macro
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/sof-soundwire/Hdmi.conf | 83 ++++++++++--------------------------
1 file changed, 22 insertions(+), 61 deletions(-)
diff --git a/ucm2/sof-soundwire/Hdmi.conf b/ucm2/sof-soundwire/Hdmi.conf
index d0ba7907e3a3..d5ee9c6b4c49 100644
--- a/ucm2/sof-soundwire/Hdmi.conf
+++ b/ucm2/sof-soundwire/Hdmi.conf
@@ -1,79 +1,40 @@
-# Use case Configuration for sof-soundwire card
+# Use case Configuration for sof-soundwire
If.hdmi1 {
- Condition {
- Type ControlExists
- Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
- }
+ Condition { Type String Empty "" }
True {
- SectionDevice."HDMI1" {
- Comment "HDMI1/DP1 Output"
-
- EnableSequence [
- cset "name='IEC958 Playback Switch' on"
- ]
-
- DisableSequence [
- cset "name='IEC958 Playback Switch' off"
- ]
-
- Value {
- PlaybackPriority 500
- PlaybackPCM "hw:${CardId},5"
- JackControl "HDMI/DP,pcm=5 Jack"
- }
+ Define {
+ HdmiNum 1
+ HdmiPCM 5
+ HdmiCtlIndex 0
+ HdmiPrio 500
}
+ Include.hdmi1.File "/codecs/hda/hdmi.conf"
}
}
If.hdmi2 {
- Condition {
- Type ControlExists
- Control "iface=CARD,name='HDMI/DP,pcm=6 Jack'"
- }
+ Condition { Type String Empty "" }
True {
- SectionDevice."HDMI2" {
- Comment "HDMI2/DP2 Output"
-
- EnableSequence [
- cset "name='IEC958 Playback Switch',index=1 on"
- ]
-
- DisableSequence [
- cset "name='IEC958 Playback Switch',index=1 off"
- ]
-
- Value {
- PlaybackPriority 600
- PlaybackPCM "hw:${CardId},6"
- JackControl "HDMI/DP,pcm=6 Jack"
- }
+ Define {
+ HdmiNum 2
+ HdmiPCM 6
+ HdmiCtlIndex 1
+ HdmiPrio 600
}
+ Include.hdmi2.File "/codecs/hda/hdmi.conf"
}
}
If.hdmi3 {
- Condition {
- Type ControlExists
- Control "iface=CARD,name='HDMI/DP,pcm=7 Jack'"
- }
+ Condition { Type String Empty "" }
True {
- SectionDevice."HDMI3" {
- Comment "HDMI3/DP3 Output"
-
- EnableSequence [
- cset "name='IEC958 Playback Switch',index=2 on"
- ]
-
- DisableSequence [
- cset "name='IEC958 Playback Switch',index=2 off"
- ]
-
- Value {
- PlaybackPriority 700
- PlaybackPCM "hw:${CardId},7"
- JackControl "HDMI/DP,pcm=7 Jack"
- }
+ Define {
+ HdmiNum 3
+ HdmiPCM 7
+ HdmiCtlIndex 2
+ HdmiPrio 700
}
+ Include.hdmi3.File "/codecs/hda/hdmi.conf"
}
}
--
2.26.2

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Dec 1 09:40:25 CET 2020 - tiwai@suse.de
- Backport upstream fixes for HD-audio and soundwire HDMI:
0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch
0002-codecs-hda-hdmi.conf-add-DisplayPort-to-the-device-d.patch
0003-sof-soundwire-use-the-codecs-hda-hdmi.conf-macro.patch
- Revert the workaround for the missing HD-audio init
-------------------------------------------------------------------
Wed Oct 21 12:53:36 CEST 2020 - tiwai@suse.de

View File

@ -23,6 +23,9 @@ Summary: ALSA UCM Profiles
License: BSD-3-Clause
URL: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-ucm-conf-%{version}.tar.bz2
Patch1: 0001-fix-the-ucm2-codecs-hda-hdmi.conf-use.patch
Patch2: 0002-codecs-hda-hdmi.conf-add-DisplayPort-to-the-device-d.patch
Patch3: 0003-sof-soundwire-use-the-codecs-hda-hdmi.conf-macro.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -31,10 +34,9 @@ This package contains the profiles files for ALSA UCM (Use Case Manager).
%prep
%setup -q
#
# workaround for a regression on openQA (muted as default)
#
mv ucm2/HDA-Intel/HDA-Intel.conf ucm2/HDA-Intel/HDA-Intel-broken.conf
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build