fixes for UCM sof-soundwire boot configuration

Resolves: rhbz#2125568

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
This commit is contained in:
Jaroslav Kysela 2023-02-20 16:00:31 +01:00
parent fb178a070d
commit 4d4ec78e98
2 changed files with 84 additions and 1 deletions

View File

@ -9,7 +9,7 @@
Summary: The Advanced Linux Sound Architecture (ALSA) library
Name: alsa-lib
Version: %{version_alsa_lib}
Release: 2%{?prever_dot}%{?dist}
Release: 3%{?prever_dot}%{?dist}
License: LGPLv2+
URL: http://www.alsa-project.org/
@ -167,6 +167,9 @@ rm %{buildroot}/%{_includedir}/asoundlib.h
%{_datadir}/alsa/topology
%changelog
* Mon Feb 20 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.8-3
- fixes for UCM sof-soundwire boot configuration
* Thu Jan 5 2023 Jaroslav Kysela <perex@perex.cz> - 1.2.8-2
- update to alsa-lib 1.2.8 and alsa-ucm-conf 1.2.8

View File

@ -1570,3 +1570,83 @@ index da9acd0..2a27b89 100644
--
2.39.0
From cfb595c9d94db05f35c86530385e6280fa60ec70 Mon Sep 17 00:00:00 2001
From: Andy Chi <andy.chi@canonical.com>
Date: Wed, 28 Dec 2022 17:36:37 +0800
Subject: [PATCH 1/2] ucm2: sof-soundwire: Update Mic LED settings
It would be better to make this settings as default in
the driver. See PR.
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/261
Signed-off-by: Andy Chi <andy.chi@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/sof-soundwire/sof-soundwire.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
index bdc48ff..c6c9115 100644
--- a/ucm2/sof-soundwire/sof-soundwire.conf
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
@@ -70,5 +70,6 @@ If.mic_init_rt715 {
}
True.BootSequence [
cset "name='PGA5.0 5 Master Capture Switch' 1"
+ sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch"
]
}
--
2.39.0
From 3ebf342dbe3c1e3e6e668cfbdc314b0be550cdb5 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 20 Feb 2023 15:36:53 +0100
Subject: [PATCH] sof-soundwire: Initialize PGA switch controls in the
BootSequence
A bug in the driver / firmware may cause that the paths are
active for the first boot, but if the sound card state is saved
and restored later (e.g. next boot), the paths may be deactivated.
BugLink: https://github.com/thesofproject/linux/issues/4196
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/sof-soundwire/sof-soundwire.conf | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
index c6c9115..786ba63 100644
--- a/ucm2/sof-soundwire/sof-soundwire.conf
+++ b/ucm2/sof-soundwire/sof-soundwire.conf
@@ -69,7 +69,26 @@ If.mic_init_rt715 {
Haystack "${var:MicCodec1}"
}
True.BootSequence [
- cset "name='PGA5.0 5 Master Capture Switch' 1"
sysw "-/class/sound/ctl-led/mic/card${CardNumber}/detach:PGA5.0 5 Master Capture Switch"
]
}
+
+If.pga_init_pga2 {
+ Condition {
+ Type ControlExists
+ Control "name='PGA2.0 2 Master Capture Switch'"
+ }
+ True.BootSequence [
+ cset "name='PGA2.0 2 Master Capture Switch' 1"
+ ]
+}
+
+If.pga_init_pga5 {
+ Condition {
+ Type ControlExists
+ Control "name='PGA5.0 5 Master Capture Switch'"
+ }
+ True.BootSequence [
+ cset "name='PGA5.0 5 Master Capture Switch' 1"
+ ]
+}
--
2.39.0