Merge ~mschiu77/ubuntu/+source/alsa-ucm-conf:ubuntu/noble-devel into ubuntu/+source/alsa-ucm-conf:ubuntu/devel

Proposed by Chris Chiu
Status: Needs review
Proposed branch: ~mschiu77/ubuntu/+source/alsa-ucm-conf:ubuntu/noble-devel
Merge into: ubuntu/+source/alsa-ucm-conf:ubuntu/devel
Diff against target: 2430 lines (+2266/-1) (has conflicts)
22 files modified
debian/changelog (+130/-0)
debian/control (+6/-1)
debian/patches/0001-acppdmmach-add-support-for-ACP-7.0.patch (+37/-0)
debian/patches/0001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch (+46/-0)
debian/patches/0001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch (+28/-0)
debian/patches/0001-sof-soundwire-Change-map-control-names-to-make-them-.patch (+93/-0)
debian/patches/0001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch (+415/-0)
debian/patches/0001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch (+23/-0)
debian/patches/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch (+78/-0)
debian/patches/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch (+254/-0)
debian/patches/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch (+34/-0)
debian/patches/0001-ucm2-soundwire-add-rt713-SDCA-device.patch (+159/-0)
debian/patches/0002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch (+62/-0)
debian/patches/0002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch (+53/-0)
debian/patches/0002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch (+95/-0)
debian/patches/0002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch (+30/-0)
debian/patches/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch (+243/-0)
debian/patches/0003-sof-soundwire-Add-basic-support-for-cs42l43.patch (+128/-0)
debian/patches/0003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch (+36/-0)
debian/patches/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch (+253/-0)
debian/patches/0004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch (+44/-0)
debian/patches/series (+19/-0)
Conflict in debian/changelog
Conflict in debian/control
Reviewer Review Type Date Requested Status
Simon Quigley (community) git-only, not packaging Needs Resubmitting
git-ubuntu import Pending
Review via email: mp+476661@code.launchpad.net

Commit message

Added patch to fix missing digital speaker on Dell Tarako (LP: #2088403)

To post a comment you must log in.
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Hi, could you please rebase this onto a Noble branch?

review: Needs Resubmitting (git-only, not packaging)

Unmerged commits

2503c3c... by Chris Chiu

1.2.10-1ubuntu5.3 (patches unapplied)

Imported using git-ubuntu import.

a72feeb... by Chris Chiu

1.2.10-1ubuntu5.2 (patches unapplied)

Imported using git-ubuntu import.

34ff806... by Chris Chiu

1.2.10-1ubuntu5.1 (patches unapplied)

Imported using git-ubuntu import.

5d58b19... by Julian Andres Klode

1.2.10-1ubuntu5 (patches unapplied)

Imported using git-ubuntu import.

d450035... by Steve Langasek

1.2.10-1ubuntu4 (patches unapplied)

Imported using git-ubuntu import.

b9ff197... by ethan.hsieh

changelog for 1.2.10-1ubuntu3

b1b9d7c... by ethan.hsieh

  * Dropped changes:
    - d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch
      - replace it with patches accepted by upstream
  * Added changes:
    - d/p/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch
    - d/p/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch
    - d/p/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch
    - d/p/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch
    - d/p/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch
      - add supports for MediaTek mt8390-evk, mt8395-evk, and mt8370-evk.
      - fix a file type issue on the mt8370-evk config
      - add mt8395 HDMI RX support
        (LP: #2051199)

7988b7d... by Zhaoxuan Zhai

1.2.10-1ubuntu2 (patches unapplied)

Imported using git-ubuntu import.

db64b2e... by Christian Ehrhardt

changelog: 1.2.10-1ubuntu1 merge and LP: #2042902 fix

Signed-off-by: Christian Ehrhardt <email address hidden>

5239251... by Christian Ehrhardt

added headers and background info to d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch

Signed-off-by: Christian Ehrhardt <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 1c4a2c0..9e3d9e3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,4 @@
1<<<<<<< debian/changelog
1alsa-ucm-conf (1.2.12-1) unstable; urgency=medium2alsa-ucm-conf (1.2.12-1) unstable; urgency=medium
23
3 * New upstream release.4 * New upstream release.
@@ -19,6 +20,109 @@ alsa-ucm-conf (1.2.11-1) unstable; urgency=medium
19 * Update copyright years.20 * Update copyright years.
2021
21 -- Jordi Mallach <jordi@debian.org> Fri, 01 Mar 2024 11:28:05 +010022 -- Jordi Mallach <jordi@debian.org> Fri, 01 Mar 2024 11:28:05 +0100
23=======
24alsa-ucm-conf (1.2.10-1ubuntu5.3) noble; urgency=medium
25
26 * Added patch to fix missing digital speaker on Dell Tarako (LP: #2088403)
27 - d/p/0001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch
28
29 -- Chris Chiu <chris.chiu@canonical.com> Fri, 15 Nov 2024 17:02:01 +0800
30
31alsa-ucm-conf (1.2.10-1ubuntu5.2) noble; urgency=medium
32
33 * Added changes:
34 - d/p/0001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch
35 - d/p/0002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch
36 - d/p/0003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch
37 - d/p/0004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch
38 - d/p/0001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch
39 - d/p/0002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch
40 - d/p/0001-sof-soundwire-Change-map-control-names-to-make-them-.patch
41 - d/p/0002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch
42 - Fix the regression on rt13xx which use only one file for speakers
43 - Add missing configuration for CS41L43+CS35L56
44 - Fix control names for speakers/mic on CS42L43+CS35L56
45 (LP: #2069760)
46 - d/p/0001-acppdmmach-add-support-for-ACP-7.0.patch
47 - Backport the support of AMD micmute LED of acppdmmach.
48 (LP: #2085067)
49
50 -- Chris Chiu <chris.chiu@canonical.com> Tue, 12 Nov 2024 10:26:07 +0800
51
52alsa-ucm-conf (1.2.10-1ubuntu5.1) noble; urgency=medium
53
54 * Added changes:
55 - d/p/0001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch
56 - d/p/0002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch
57 - d/p/0003-sof-soundwire-Add-basic-support-for-cs42l43.patch
58 - Soundwire support for CS42L43 and CS35L56 on Intel MTL
59 (LP: #2069760)
60
61 -- Chris Chiu <chris.chiu@canonical.com> Tue, 02 Jul 2024 22:32:17 +0800
62
63alsa-ucm-conf (1.2.10-1ubuntu5) noble; urgency=medium
64
65 * Actual rebuild against libasound2t64; the dependency is hardcoded.
66
67 -- Julian Andres Klode <juliank@ubuntu.com> Fri, 22 Mar 2024 17:09:13 +0100
68
69alsa-ucm-conf (1.2.10-1ubuntu4) noble; urgency=medium
70
71 * No-change rebuild against libasound2t64
72
73 -- Steve Langasek <steve.langasek@ubuntu.com> Tue, 12 Mar 2024 06:28:57 +0000
74
75alsa-ucm-conf (1.2.10-1ubuntu3) noble; urgency=medium
76
77 * Dropped changes:
78 - d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch
79 - replace it with patches accepted by upstream
80 * Added changes:
81 - d/p/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch
82 - d/p/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch
83 - d/p/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch
84 - d/p/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch
85 - d/p/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch
86 - add supports for MediaTek mt8390-evk, mt8395-evk, and mt8370-evk.
87 - fix a file type issue on the mt8370-evk config
88 - add mt8395 HDMI RX support
89 (LP: #2051199)
90
91 -- Ethan Hsieh <ethan.hsieh@canonical.com> Thu, 25 Jan 2024 13:29:18 +0800
92
93alsa-ucm-conf (1.2.10-1ubuntu2) noble; urgency=medium
94
95 * d/p/0001-Add-initial-support-for-MediaTek-Genio-boards.patch
96 - fix typo to make the patch work on mtk8390-evk (lp: #2049327)
97
98 -- Zhaoxuan Zhai <zhai.zhaoxuan@canonical.com> Tue, 16 Jan 2024 11:23:07 +0100
99
100alsa-ucm-conf (1.2.10-1ubuntu1) noble; urgency=medium
101
102 * Merge with Debian unstable. Remaining changes:
103 - d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch
104 - add initial support for MediaTek mt8390-evk and mt8395-evk
105 (LP: 2000228)
106 * Dropped changes [all in upstream 1.2.10]:
107 - d/p/0001-ucm2-Qualcomm-sc8280xp-fix-device-numbers.patch
108 - ucm2: Qualcomm: sc8280xp: fix device numbers
109 (LP: 2036731)
110 - d/p/0001-acp63-add-initial-support-for-AMD-Pink-Sardine-ACP63.patch
111 d/p/0002-acp63.conf-use-symbolic-link.patch
112 d/p/0003-acp62-add-initial-support-for-AMD-ACP-v6.2-RPL.patch
113 - Backport patches to add support AMD ACP RPL and Pink Sardine.
114 (LP: 2025353)
115 * Added changes
116 - added headers and background info to
117 d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch
118
119 [Artur Pak]
120 * d/p/0001-ucm2-soundwire-add-rt713-SDCA-device.patch:
121 - Backport patch to add rt713 SDCA device
122 (LP: #2042902)
123
124 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 24 Nov 2023 09:12:05 +0100
125>>>>>>> debian/changelog
22126
23alsa-ucm-conf (1.2.10-1) unstable; urgency=medium127alsa-ucm-conf (1.2.10-1) unstable; urgency=medium
24128
@@ -26,6 +130,32 @@ alsa-ucm-conf (1.2.10-1) unstable; urgency=medium
26130
27 -- Jordi Mallach <jordi@debian.org> Wed, 13 Sep 2023 01:12:05 +0200131 -- Jordi Mallach <jordi@debian.org> Wed, 13 Sep 2023 01:12:05 +0200
28132
133alsa-ucm-conf (1.2.9-1ubuntu3) mantic; urgency=medium
134
135 * d/p/0001-ucm2-Qualcomm-sc8280xp-fix-device-numbers.patch
136 - ucm2: Qualcomm: sc8280xp: fix device numbers
137 (LP: #2036731)
138
139 -- Juerg Haefliger <juerg.haefliger@canonical.com> Wed, 20 Sep 2023 13:37:38 +0200
140
141alsa-ucm-conf (1.2.9-1ubuntu2) mantic; urgency=medium
142
143 * d/p/0001-Add-initial-support-for-MediaTek-mt8390-evk-and-mt83.patch
144 - add initial support for MediaTek mt8390-evk and mt8395-evk
145 (LP: #2000228)
146
147 -- Ethan Hsieh <ethan.hsieh@canonical.com> Mon, 18 Sep 2023 16:13:56 +0800
148
149alsa-ucm-conf (1.2.9-1ubuntu1) mantic; urgency=medium
150
151 * d/p/0001-acp63-add-initial-support-for-AMD-Pink-Sardine-ACP63.patch
152 d/p/0002-acp63.conf-use-symbolic-link.patch
153 d/p/0003-acp62-add-initial-support-for-AMD-ACP-v6.2-RPL.patch
154 - Backport patches to add support AMD ACP RPL and Pink Sardine.
155 (LP: #2025353)
156
157 -- Juerg Haefliger <juerg.haefliger@canonical.com> Thu, 06 Jul 2023 15:29:27 +0200
158
29alsa-ucm-conf (1.2.9-1) unstable; urgency=medium159alsa-ucm-conf (1.2.9-1) unstable; urgency=medium
30160
31 * New upstream release.161 * New upstream release.
diff --git a/debian/control b/debian/control
index 6e789bd..570ed57 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,8 @@
1Source: alsa-ucm-conf1Source: alsa-ucm-conf
2Section: libs2Section: libs
3Priority: optional3Priority: optional
4Maintainer: Debian ALSA Maintainers <pkg-alsa-devel@lists.alioth.debian.org>4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5XSBC-Original-Maintainer: Debian ALSA Maintainers <pkg-alsa-devel@lists.alioth.debian.org>
5Uploaders: Jordi Mallach <jordi@debian.org>,6Uploaders: Jordi Mallach <jordi@debian.org>,
6 Elimar Riesebieter <riesebie@lxtec.de>,7 Elimar Riesebieter <riesebie@lxtec.de>,
7 Luke Yelavich <themuso@ubuntu.com>8 Luke Yelavich <themuso@ubuntu.com>
@@ -15,7 +16,11 @@ Rules-Requires-Root: no
15Package: alsa-ucm-conf16Package: alsa-ucm-conf
16Architecture: all17Architecture: all
17Multi-Arch: foreign18Multi-Arch: foreign
19<<<<<<< debian/control
18Depends: ${misc:Depends}, libasound2t6420Depends: ${misc:Depends}, libasound2t64
21=======
22Depends: ${misc:Depends}, libasound2t64 (>= 1.2.7)
23>>>>>>> debian/control
19Description: ALSA Use Case Manager configuration files24Description: ALSA Use Case Manager configuration files
20 This package contains ALSA Use Case Manager configuration of audio25 This package contains ALSA Use Case Manager configuration of audio
21 input/output names and routing for specific audio hardware. They can be26 input/output names and routing for specific audio hardware. They can be
diff --git a/debian/patches/0001-acppdmmach-add-support-for-ACP-7.0.patch b/debian/patches/0001-acppdmmach-add-support-for-ACP-7.0.patch
22new file mode 10064427new file mode 100644
index 0000000..049497f
--- /dev/null
+++ b/debian/patches/0001-acppdmmach-add-support-for-ACP-7.0.patch
@@ -0,0 +1,37 @@
1From b2358f24a93d5a07b5bf7c35f0d76676dc85869c Mon Sep 17 00:00:00 2001
2From: Mario Limonciello <mario.limonciello@amd.com>
3Date: Thu, 17 Oct 2024 11:44:20 -0500
4Subject: [PATCH] acppdmmach: add support for ACP 7.0
5
6Starting with ACP 7.0 there is a generic 'acppdmmach' driver that
7will be utilized.
8
9Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/452
10Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
11Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/b2358f24a93d5a07b5bf7c35f0d76676dc85869c
13Bug-Ubuntu: https://bugs.launchpad.net/bugs/2085067
14Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
15---
16 ucm2/HDA/HDA.conf | 2 +-
17 ucm2/conf.d/acp-pdm-mach/acp-pdm-mach.conf | 1 +
18 2 files changed, 2 insertions(+), 1 deletion(-)
19 create mode 120000 ucm2/conf.d/acp-pdm-mach/acp-pdm-mach.conf
20
21--- a/ucm2/HDA/HDA.conf
22+++ b/ucm2/HDA/HDA.conf
23@@ -3,7 +3,7 @@
24 Define.Use "" # a non-empty string to use UCM configuration for HDA devices
25 Define.Done "" # a non-empty string to skip the end error
26
27-Define.AcpCardId "$${find-card:field=name,return=id,regex='^acp(|6[23x])$'}"
28+Define.AcpCardId "$${find-card:field=name,return=id,regex='^acp(|6[23x]|-pdm-mach)$'}"
29 Define.DeviceMic "Mic"
30
31 If.dualcodec {
32--- /dev/null
33+++ b/ucm2/conf.d/acp-pdm-mach/acp-pdm-mach.conf
34@@ -0,0 +1,3 @@
35+Syntax 3
36+
37+Include.linked.File "/common/linked.conf"
diff --git a/debian/patches/0001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch b/debian/patches/0001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch
0new file mode 10064438new file mode 100644
index 0000000..bbbbe4c
--- /dev/null
+++ b/debian/patches/0001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch
@@ -0,0 +1,46 @@
1From: Charles Keepax <ckeepax@opensource.cirrus.com>
2Date: Tue, 23 Apr 2024 16:43:05 +0100
3Subject: [PATCH] sof-soundwire: Add basic support for cs42l43's speaker
4
5Previous support was added for the mics and headset on cs42l43, expand
6this support with additional configuration for the speaker output.
7
8Link: https://lore.kernel.org/alsa-devel/20240423154305.2782347-1-ckeepax@opensource.cirrus.com/
9Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/035d9206cffdf7942352d2daf3c34dde491c01dc.patch
12Bug-Ubuntu: https://bugs.launchpad.net/bugs/2088403
13Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
14---
15 ucm2/sof-soundwire/cs42l43-spk.conf | 25 +++++++++++++++++++++++++
16 1 file changed, 25 insertions(+)
17 create mode 100644 ucm2/sof-soundwire/cs42l43-spk.conf
18
19--- /dev/null
20+++ b/ucm2/sof-soundwire/cs42l43-spk.conf
21@@ -0,0 +1,25 @@
22+# Use case Configuration for sof-soundwire card
23+
24+SectionDevice."Speaker" {
25+ Comment "Speaker"
26+
27+ ConflictingDevice [
28+ "Headphones"
29+ ]
30+
31+ EnableSequence [
32+ cset "name='cs42l43 Speaker L Input 1' 'DP5RX1'"
33+ cset "name='cs42l43 Speaker R Input 1' 'DP5RX2'"
34+ ]
35+
36+ DisableSequence [
37+ cset "name='cs42l43 Speaker L Input 1' 'None'"
38+ cset "name='cs42l43 Speaker R Input 1' 'None'"
39+ ]
40+
41+ Value {
42+ PlaybackPriority 100
43+ PlaybackPCM "hw:${CardId},0"
44+ PlaybackMixerElem "cs42l43 Speaker Digital"
45+ }
46+}
diff --git a/debian/patches/0001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch b/debian/patches/0001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch
0new file mode 10064447new file mode 100644
index 0000000..ebfe89a
--- /dev/null
+++ b/debian/patches/0001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch
@@ -0,0 +1,28 @@
1From: Charles Keepax <ckeepax@opensource.cirrus.com>
2Date: Mon, 8 Jul 2024 12:59:18 +0100
3Subject: sof-soundwire: Add missing match for cs42l43 speakers
4
5The cs42l43 reports as cs42l43-spk in the speaker case, the regex in
6sof-soundwire needs updated to recognise that.
7
8Fixes: 035d9206cffd ("sof-soundwire: Add basic support for cs42l43's speaker")
9Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/d8aea84bebaae416c530a2d448f5e3758809c09f
12Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
13Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
14---
15 ucm2/sof-soundwire/sof-soundwire.conf | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18--- a/ucm2/sof-soundwire/sof-soundwire.conf
19+++ b/ucm2/sof-soundwire/sof-soundwire.conf
20@@ -19,7 +19,7 @@
21
22 DefineRegex {
23 SpeakerCodec {
24- Regex " spk:([a-z0-9]+(-sdca)?)"
25+ Regex " spk:([a-z0-9]+((-sdca)|(-spk))?)"
26 String "${CardComponents}"
27 }
28 SpeakerChannels {
diff --git a/debian/patches/0001-sof-soundwire-Change-map-control-names-to-make-them-.patch b/debian/patches/0001-sof-soundwire-Change-map-control-names-to-make-them-.patch
0new file mode 10064429new file mode 100644
index 0000000..7b89176
--- /dev/null
+++ b/debian/patches/0001-sof-soundwire-Change-map-control-names-to-make-them-.patch
@@ -0,0 +1,93 @@
1From: Maciej Strozek <mstrozek@opensource.cirrus.com>
2Date: Thu, 17 Oct 2024 13:20:26 +0100
3Subject: sof-soundwire: Change map control names to make them unique and user
4 friendly
5
6Both 'Speaker Digital' and 'cs42l43 PDM2' names were found in other alsa
7controls, confusing the MixerElems paths. Make them unique to avoid errors for
8hardware mutes. Also add 'Capture' string into microphone controls to make
9them work properly.
10
11Link: https://lore.kernel.org/alsa-devel/20241017122027.1207373-1-mstrozek@opensource.cirrus.com/
12Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
13Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/9864d624b27e3779d958138561e48f59287a124a
15Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
16Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
17---
18 ucm2/codecs/cs42l43/init.conf | 10 ++++++++--
19 ucm2/sof-soundwire/cs35l56-bridge.conf | 6 +++---
20 ucm2/sof-soundwire/cs42l43-dmic.conf | 2 +-
21 ucm2/sof-soundwire/cs42l43.conf | 3 ++-
22 4 files changed, 14 insertions(+), 7 deletions(-)
23
24--- a/ucm2/codecs/cs42l43/init.conf
25+++ b/ucm2/codecs/cs42l43/init.conf
26@@ -2,13 +2,19 @@
27
28 LibraryConfig.remap.Config {
29 ctl.default.map {
30- "name='cs42l43 PDM2 Switch'" {
31+ "name='cs42l43 Microphone Capture Switch'" {
32 "name='cs42l43 Decimator 3 Switch'".vindex.0 0
33 "name='cs42l43 Decimator 4 Switch'".vindex.1 0
34 }
35- "name='cs42l43 PDM2 Volume'" {
36+ "name='cs42l43 Microphone Capture Volume'" {
37 "name='cs42l43 Decimator 3 Volume'".vindex.0 0
38 "name='cs42l43 Decimator 4 Volume'".vindex.1 0
39 }
40+ "name='cs42l43 Headset Microphone Capture Switch'" {
41+ "name='cs42l43 Decimator 1 Switch'".vindex.0 0
42+ }
43+ "name='cs42l43 Headset Microphone Capture Volume'" {
44+ "name='cs42l43 Decimator 1 Volume'".vindex.0 0
45+ }
46 }
47 }
48--- a/ucm2/sof-soundwire/cs35l56-bridge.conf
49+++ b/ucm2/sof-soundwire/cs35l56-bridge.conf
50@@ -2,11 +2,11 @@
51
52 LibraryConfig.remap.Config {
53 ctl.default.map {
54- "name='Speaker Digital Switch'" {
55+ "name='Speaker Playback Switch'" {
56 "name='AMPL Speaker Switch'".vindex.0 0
57 "name='AMPR Speaker Switch'".vindex.1 0
58 }
59- "name='Speaker Digital Volume'" {
60+ "name='Speaker Playback Volume'" {
61 "name='AMPL Speaker Volume'".vindex.0 0
62 "name='AMPR Speaker Volume'".vindex.1 0
63 }
64@@ -56,6 +56,6 @@
65 PlaybackPriority 100
66 PlaybackPCM "hw:${CardId},0"
67 PlaybackMixer "default:${CardId}"
68- PlaybackMixerElem "Speaker Digital"
69+ PlaybackMixerElem "Speaker"
70 }
71 }
72--- a/ucm2/sof-soundwire/cs42l43-dmic.conf
73+++ b/ucm2/sof-soundwire/cs42l43-dmic.conf
74@@ -21,6 +21,6 @@
75 CapturePriority 100
76 CapturePCM "hw:${CardId},4"
77 CaptureMixer "default:${CardId}"
78- CaptureMixerElem "cs42l43 PDM2"
79+ CaptureMixerElem "cs42l43 Microphone"
80 }
81 }
82--- a/ucm2/sof-soundwire/cs42l43.conf
83+++ b/ucm2/sof-soundwire/cs42l43.conf
84@@ -40,7 +40,8 @@
85 Value {
86 CapturePriority 200
87 CapturePCM "hw:${CardId},4"
88- CaptureMixerElem "cs42l43 Decimator 1"
89+ CaptureMixer "default:${CardId}"
90+ CaptureMixerElem "cs42l43 Headset Microphone"
91 JackControl "Headset Mic Jack"
92 }
93 }
diff --git a/debian/patches/0001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch b/debian/patches/0001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch
0new file mode 10064494new file mode 100644
index 0000000..f37f067
--- /dev/null
+++ b/debian/patches/0001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch
@@ -0,0 +1,415 @@
1From: Jaroslav Kysela <perex@perex.cz>
2Date: Wed, 6 Dec 2023 15:53:38 +0100
3Subject: [PATCH 1/3] sof-soundwire: Use one file for speaker codec
4 initialization
5
6Use macros to minimize configuration blocks.
7
8Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/c0a4df6037860b4e1dffb497e5a28258a351a0f8
10Bug: https://github.com/alsa-project/alsa-ucm-conf/pull/370
11Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
12Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
13---
14 ucm2/sof-soundwire/HiFi.conf | 2 +-
15 ucm2/sof-soundwire/rt1308-1.conf | 22 --------------
16 ucm2/sof-soundwire/rt1308-2.conf | 29 ------------------
17 ucm2/sof-soundwire/rt1308.conf | 46 ++++++++++++++++++++++++++++
18 ucm2/sof-soundwire/rt1316-1.conf | 41 -------------------------
19 ucm2/sof-soundwire/rt1316-2.conf | 51 -------------------------------
20 ucm2/sof-soundwire/rt1316.conf | 65 ++++++++++++++++++++++++++++++++++++++++
21 ucm2/sof-soundwire/rt1318-1.conf | 20 -------------
22 ucm2/sof-soundwire/rt1318-2.conf | 25 ----------------
23 ucm2/sof-soundwire/rt1318.conf | 44 +++++++++++++++++++++++++++
24 10 files changed, 156 insertions(+), 189 deletions(-)
25 delete mode 100644 ucm2/sof-soundwire/rt1308-1.conf
26 delete mode 100644 ucm2/sof-soundwire/rt1308-2.conf
27 create mode 100644 ucm2/sof-soundwire/rt1308.conf
28 delete mode 100644 ucm2/sof-soundwire/rt1316-1.conf
29 delete mode 100644 ucm2/sof-soundwire/rt1316-2.conf
30 create mode 100644 ucm2/sof-soundwire/rt1316.conf
31 delete mode 100644 ucm2/sof-soundwire/rt1318-1.conf
32 delete mode 100644 ucm2/sof-soundwire/rt1318-2.conf
33 create mode 100644 ucm2/sof-soundwire/rt1318.conf
34
35--- a/ucm2/sof-soundwire/HiFi.conf
36+++ b/ucm2/sof-soundwire/HiFi.conf
37@@ -13,7 +13,7 @@
38 Type String
39 Empty "${var:SpeakerCodec1}"
40 }
41- False.Include.spkdev.File "/sof-soundwire/${var:SpeakerCodec1}-${var:SpeakerAmps1}.conf"
42+ False.Include.spkdev.File "/sof-soundwire/${var:SpeakerCodec1}.conf"
43 }
44
45 If.micdev {
46--- a/ucm2/sof-soundwire/rt1308-1.conf
47+++ /dev/null
48@@ -1,22 +0,0 @@
49-# Use case Configuration for sof-soundwire card
50-
51-SectionDevice."Speaker" {
52- Comment "Speaker"
53-
54- EnableSequence [
55- cset "name='rt1308-1 DAC L Switch' 1"
56- cset "name='rt1308-1 DAC R Switch' 1"
57- cset "name='Speaker Switch' on"
58- ]
59-
60- DisableSequence [
61- cset "name='rt1308-1 DAC L Switch' 0"
62- cset "name='rt1308-1 DAC R Switch' 0"
63- cset "name='Speaker Switch' off"
64- ]
65-
66- Value {
67- PlaybackPriority 100
68- PlaybackPCM "hw:${CardId},2"
69- }
70-}
71--- a/ucm2/sof-soundwire/rt1308-2.conf
72+++ /dev/null
73@@ -1,29 +0,0 @@
74-# Use case Configuration for sof-soundwire card
75-
76-SectionDevice."Speaker" {
77- Comment "Speaker"
78-
79- EnableSequence [
80- cset "name='rt1308-1 RX Channel Select' LL"
81- cset "name='rt1308-2 RX Channel Select' RR"
82-
83- cset "name='rt1308-1 DAC L Switch' 1"
84- cset "name='rt1308-1 DAC R Switch' 1"
85- cset "name='rt1308-2 DAC L Switch' 1"
86- cset "name='rt1308-2 DAC R Switch' 1"
87- cset "name='Speaker Switch' on"
88- ]
89-
90- DisableSequence [
91- cset "name='rt1308-1 DAC L Switch' 0"
92- cset "name='rt1308-1 DAC R Switch' 0"
93- cset "name='rt1308-2 DAC L Switch' 0"
94- cset "name='rt1308-2 DAC R Switch' 0"
95- cset "name='Speaker Switch' off"
96- ]
97-
98- Value {
99- PlaybackPriority 100
100- PlaybackPCM "hw:${CardId},2"
101- }
102-}
103--- /dev/null
104+++ b/ucm2/sof-soundwire/rt1308.conf
105@@ -0,0 +1,46 @@
106+# Use case Configuration for sof-soundwire card
107+
108+#
109+# Arguments:
110+# ForAmps - regex filter for var:SpeakerAmps
111+# Amp - amplifier number (1,2 etc.)
112+# Sel - channel selection (LR LL RL RR)
113+#
114+DefineMacro.rt1308spk.If.0 {
115+ Condition {
116+ Type RegexMatch
117+ Regex "${var:__ForAmps}"
118+ String "${var:SpeakerAmps}"
119+ }
120+ True {
121+ EnableSequence [
122+ cset "name='rt1308-${var:__Amp} RX Channel Select' ${var:__Sel}"
123+ cset "name='rt1308-${var:__Amp} DAC L Switch' 1"
124+ cset "name='rt1308-${var:__Amp} DAC R Switch' 1"
125+ ]
126+ DisableSequence [
127+ cset "name='rt1308-${var:__Amp} DAC L Switch' 0"
128+ cset "name='rt1308-${var:__Amp} DAC R Switch' 0"
129+ ]
130+ }
131+}
132+
133+SectionDevice."Speaker" {
134+ Comment "Speaker"
135+
136+ Macro.num1.rt1308spk { ForAmps "[12]" Amp 1 Sel LL }
137+ Macro.num2.rt1308spk { ForAmps "2" Amp 2 Sel RR }
138+
139+ EnableSequence [
140+ cset "name='Speaker Switch' on"
141+ ]
142+
143+ DisableSequence [
144+ cset "name='Speaker Switch' off"
145+ ]
146+
147+ Value {
148+ PlaybackPriority 100
149+ PlaybackPCM "hw:${CardId},2"
150+ }
151+}
152--- a/ucm2/sof-soundwire/rt1316-1.conf
153+++ /dev/null
154@@ -1,41 +0,0 @@
155-# Use case Configuration for sof-soundwire card
156-
157-SectionDevice."Speaker" {
158- Comment "Speaker"
159-
160- If.lrswitch {
161- Condition {
162- Type ControlExists
163- Control "name='rt1316-1 DAC L Switch'"
164- }
165- True {
166- EnableSequence [
167- cset "name='rt1316-1 DAC L Switch' 1"
168- cset "name='rt1316-1 DAC R Switch' 1"
169- cset "name='Speaker Switch' on"
170- ]
171-
172- DisableSequence [
173- cset "name='rt1316-1 DAC L Switch' 0"
174- cset "name='rt1316-1 DAC R Switch' 0"
175- cset "name='Speaker Switch' off"
176- ]
177- }
178- False {
179- EnableSequence [
180- cset "name='rt1316-1 DAC Switch' 1"
181- cset "name='Speaker Switch' on"
182- ]
183-
184- DisableSequence [
185- cset "name='rt1316-1 DAC Switch' 0"
186- cset "name='Speaker Switch' off"
187- ]
188- }
189- }
190-
191- Value {
192- PlaybackPriority 100
193- PlaybackPCM "hw:${CardId},2"
194- }
195-}
196--- a/ucm2/sof-soundwire/rt1316-2.conf
197+++ /dev/null
198@@ -1,51 +0,0 @@
199-# Use case Configuration for sof-soundwire card
200-
201-SectionDevice."Speaker" {
202- Comment "Speaker"
203-
204- If.lrswitch {
205- Condition {
206- Type ControlExists
207- Control "name='rt1316-1 DAC L Switch'"
208- }
209- True {
210- EnableSequence [
211- cset "name='rt1316-1 RX Channel Select' L,L"
212- cset "name='rt1316-2 RX Channel Select' R,R"
213- cset "name='rt1316-1 DAC L Switch' 1"
214- cset "name='rt1316-1 DAC R Switch' 1"
215- cset "name='rt1316-2 DAC L Switch' 1"
216- cset "name='rt1316-2 DAC R Switch' 1"
217- cset "name='Speaker Switch' on"
218- ]
219-
220- DisableSequence [
221- cset "name='rt1316-1 DAC L Switch' 0"
222- cset "name='rt1316-1 DAC R Switch' 0"
223- cset "name='rt1316-2 DAC L Switch' 0"
224- cset "name='rt1316-2 DAC R Switch' 0"
225- cset "name='Speaker Switch' off"
226- ]
227- }
228- False {
229- EnableSequence [
230- cset "name='rt1316-1 RX Channel Select' L,L"
231- cset "name='rt1316-2 RX Channel Select' R,R"
232- cset "name='rt1316-1 DAC Switch' 1"
233- cset "name='rt1316-2 DAC Switch' 1"
234- cset "name='Speaker Switch' on"
235- ]
236-
237- DisableSequence [
238- cset "name='rt1316-1 DAC Switch' 0"
239- cset "name='rt1316-2 DAC Switch' 0"
240- cset "name='Speaker Switch' off"
241- ]
242- }
243- }
244-
245- Value {
246- PlaybackPriority 100
247- PlaybackPCM "hw:${CardId},2"
248- }
249-}
250--- /dev/null
251+++ b/ucm2/sof-soundwire/rt1316.conf
252@@ -0,0 +1,65 @@
253+# Use case Configuration for sof-soundwire card
254+
255+#
256+# Arguments:
257+# ForAmps - regex filter for var:SpeakerAmps
258+# Amp - amplifier number (1,2 etc.)
259+# Sel - channel selection (L,R L,L L,R L,L+R R,L R,R R,L+R L+R,L L+R,R L+R,L+R)
260+#
261+DefineMacro.rt1316spk.If.0 {
262+ Condition {
263+ Type RegexMatch
264+ Regex "${var:__ForAmps}"
265+ String "${var:SpeakerAmps}"
266+ }
267+ True {
268+ EnableSequence [
269+ cset "name='rt1316-${var:__Amp} RX Channel Select' ${var:__Sel}"
270+ ]
271+ If.lrswitch {
272+ Condition {
273+ Type ControlExists
274+ Control "name='rt1316-${var:__Amp} DAC L Switch'"
275+ }
276+ True {
277+ EnableSequence [
278+ cset "name='rt1316-${var:__Amp} DAC L Switch' 1"
279+ cset "name='rt1316-${var:__Amp} DAC R Switch' 1"
280+ ]
281+ DisableSequence [
282+ cset "name='rt1316-${var:__Amp} DAC L Switch' 0"
283+ cset "name='rt1316-${var:__Amp} DAC R Switch' 0"
284+ ]
285+ }
286+ False {
287+ EnableSequence [
288+ cset "name='rt1316-${var:__Amp} DAC Switch' 1"
289+ ]
290+
291+ DisableSequence [
292+ cset "name='rt1316-${var:__Amp} DAC Switch' 0"
293+ ]
294+ }
295+ }
296+ }
297+}
298+
299+SectionDevice."Speaker" {
300+ Comment "Speaker"
301+
302+ Macro.num1.rt1316spk { ForAmps "[12]" Amp 1 Sel "L,L" }
303+ Macro.num2.rt1316spk { ForAmps "2" Amp 2 Sel "R,R" }
304+
305+ EnableSequence [
306+ cset "name='Speaker Switch' on"
307+ ]
308+
309+ DisableSequence [
310+ cset "name='Speaker Switch' off"
311+ ]
312+
313+ Value {
314+ PlaybackPriority 100
315+ PlaybackPCM "hw:${CardId},2"
316+ }
317+}
318--- a/ucm2/sof-soundwire/rt1318-1.conf
319+++ /dev/null
320@@ -1,20 +0,0 @@
321-# Use case Configuration for sof-soundwire card
322-
323-SectionDevice."Speaker" {
324- Comment "Speaker"
325-
326- EnableSequence [
327- cset "name='rt1318-1 DAC Switch' 1"
328- cset "name='Speaker Switch' on"
329- ]
330-
331- DisableSequence [
332- cset "name='rt1318-1 DAC Switch' 0"
333- cset "name='Speaker Switch' off"
334- ]
335-
336- Value {
337- PlaybackPriority 100
338- PlaybackPCM "hw:${CardId},2"
339- }
340-}
341--- a/ucm2/sof-soundwire/rt1318-2.conf
342+++ /dev/null
343@@ -1,25 +0,0 @@
344-# Use case Configuration for sof-soundwire card
345-
346-SectionDevice."Speaker" {
347- Comment "Speaker"
348-
349- EnableSequence [
350- cset "name='rt1318-1 RX Channel Select' L,L"
351- cset "name='rt1318-2 RX Channel Select' R,R"
352-
353- cset "name='rt1318-1 DAC Switch' 1"
354- cset "name='rt1318-2 DAC Switch' 1"
355- cset "name='Speaker Switch' on"
356- ]
357-
358- DisableSequence [
359- cset "name='rt1318-1 DAC Switch' 0"
360- cset "name='rt1318-2 DAC Switch' 0"
361- cset "name='Speaker Switch' off"
362- ]
363-
364- Value {
365- PlaybackPriority 100
366- PlaybackPCM "hw:${CardId},2"
367- }
368-}
369--- /dev/null
370+++ b/ucm2/sof-soundwire/rt1318.conf
371@@ -0,0 +1,44 @@
372+# Use case Configuration for sof-soundwire card
373+
374+#
375+# Arguments:
376+# ForAmps - regex filter for var:SpeakerAmps
377+# Amp - amplifier number (1,2 etc.)
378+# Sel - channel selection (L,R L,L L,R L,L+R R,L R,R R,L+R L+R,L L+R,R L+R,L+R)
379+#
380+DefineMacro.rt1318spk.If.0 {
381+ Condition {
382+ Type RegexMatch
383+ Regex "${var:__RegEx}"
384+ String "${var:SpeakerAmps}"
385+ }
386+ True {
387+ EnableSequence [
388+ cset "name='rt1308-${var:__Amp} RX Channel Select' ${var:__Sel}"
389+ cset "name='rt1308-${var:__Amp} DAC Switch' 1"
390+ ]
391+ DisableSequence [
392+ cset "name='rt1308-${var:__Amp} DAC Switch' 0"
393+ ]
394+ }
395+}
396+
397+SectionDevice."Speaker" {
398+ Comment "Speaker"
399+
400+ Macro.num1.rt1318spk { ForAmps "[12]" Amp 1 Sel "L,L" }
401+ Macro.num2.rt1318spk { ForAmps "2" Amp 2 Sel "R,R" }
402+
403+ EnableSequence [
404+ cset "name='Speaker Switch' on"
405+ ]
406+
407+ DisableSequence [
408+ cset "name='Speaker Switch' off"
409+ ]
410+
411+ Value {
412+ PlaybackPriority 100
413+ PlaybackPCM "hw:${CardId},2"
414+ }
415+}
diff --git a/debian/patches/0001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch b/debian/patches/0001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch
0new file mode 100644416new file mode 100644
index 0000000..1c60872
--- /dev/null
+++ b/debian/patches/0001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch
@@ -0,0 +1,23 @@
1From: Jaroslav Kysela <perex@perex.cz>
2Date: Mon, 11 Mar 2024 11:06:15 +0100
3Subject: sof-soundwire: fix rt1318 config typo in rt1318spk macro
4
5Signed-off-by: Jaroslav Kysela <perex@perex.cz>
6Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/7e22b7c214d346bd156131f3e6c6a5900bbf116d
7Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
8Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
9---
10 ucm2/sof-soundwire/rt1318.conf | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13--- a/ucm2/sof-soundwire/rt1318.conf
14+++ b/ucm2/sof-soundwire/rt1318.conf
15@@ -9,7 +9,7 @@
16 DefineMacro.rt1318spk.If.0 {
17 Condition {
18 Type RegexMatch
19- Regex "${var:__RegEx}"
20+ Regex "${var:__ForAmps}"
21 String "${var:SpeakerAmps}"
22 }
23 True {
diff --git a/debian/patches/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch b/debian/patches/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch
0new file mode 10064424new file mode 100644
index 0000000..1ec9814
--- /dev/null
+++ b/debian/patches/0001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch
@@ -0,0 +1,78 @@
1From 1ab2d020d71a570f691fafbd341782fabb6569d1 Mon Sep 17 00:00:00 2001
2From: Zoran Zhan <zoran.zhan@mediatek.com>
3Date: Mon, 22 Jan 2024 17:52:05 +0800
4Subject: [PATCH] ucm: MediaTek: mt8395-evk: Add HDMIRX config
5
6Add HDMI RX config and modify the priority value
7of the capture devices.
8
9Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/389
10Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
11Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/1ab2d020d71a570f691fafbd341782fabb6569d1
13Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2051199
14---
15 ucm2/MediaTek/mt8395-evk/HiFi.conf | 15 ++++++++++++---
16 ucm2/MediaTek/mt8395-evk/mt8395-evk.conf | 1 +
17 2 files changed, 13 insertions(+), 3 deletions(-)
18
19diff --git a/ucm2/MediaTek/mt8395-evk/HiFi.conf b/ucm2/MediaTek/mt8395-evk/HiFi.conf
20index 81e4423..5c25cfb 100644
21--- a/ucm2/MediaTek/mt8395-evk/HiFi.conf
22+++ b/ucm2/MediaTek/mt8395-evk/HiFi.conf
23@@ -34,6 +34,15 @@ SectionDevice."HDMI2" {
24 ]
25 }
26
27+SectionDevice."HDMI3" {
28+ Comment "HDMI RX"
29+
30+ Value {
31+ CapturePriority 200
32+ CapturePCM "hw:${CardId},7"
33+ }
34+}
35+
36 SectionDevice."Speaker" {
37 Comment "Lineout speaker"
38
39@@ -90,7 +99,7 @@ SectionDevice."Headset" {
40 ]
41
42 Value {
43- CapturePriority 400
44+ CapturePriority 500
45 CaptureChannels 3
46 CapturePCM "hw:${CardId},15"
47 }
48@@ -117,7 +126,7 @@ SectionDevice."Mic1" {
49 ]
50
51 Value {
52- CapturePriority 300
53+ CapturePriority 400
54 CaptureChannels 3
55 CapturePCM "hw:${CardId},15"
56 }
57@@ -127,7 +136,7 @@ SectionDevice."Mic2" {
58 Comment "Digital microphone"
59
60 Value {
61- CapturePriority 200
62+ CapturePriority 300
63 CaptureChannels 2
64 CapturePCM "hw:${CardId},14"
65 }
66diff --git a/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf b/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
67index 1957b69..b739ec0 100644
68--- a/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
69+++ b/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
70@@ -18,6 +18,7 @@ BootSequence [
71 cset "name='PGA_3_Mux' AIN3"
72 cset "name='HDMI_OUT_MUX' Connect"
73 cset "name='DPTX_OUT_MUX' Disconnect"
74+ cset "name='MULTI_IN1_MUX' HDMI_RX_I2S"
75 cset "name='Lineout Volume' 10"
76 cset "name='Headset Volume' 2"
77 cset "name='PGA1 Volume' 4"
78--
diff --git a/debian/patches/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch b/debian/patches/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch
0new file mode 10064479new file mode 100644
index 0000000..2245480
--- /dev/null
+++ b/debian/patches/0001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch
@@ -0,0 +1,254 @@
1From c5366bdff656092241225d2ad663c3e41b146f8b Mon Sep 17 00:00:00 2001
2From: Zoran Zhan <zoran.zhan@mediatek.com>
3Date: Thu, 1 Jun 2023 15:37:14 +0800
4Subject: [PATCH 1/3] ucm2: MediaTek: mt8390-evk: Add alsa-ucm support
5
6Add alsa-ucm support for the MediaTek mt8390-evk platform.
7
8Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/321
9Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/c5366bdff656092241225d2ad663c3e41b146f8b
12Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2051199
13---
14 ucm2/MediaTek/mt8390-evk/HiFi.conf | 165 +++++++++++++++++++++++
15 ucm2/MediaTek/mt8390-evk/mt8390-evk.conf | 45 +++++++
16 ucm2/conf.d/mt8390-evk/mt8390-evk.conf | 1 +
17 3 files changed, 211 insertions(+)
18 create mode 100644 ucm2/MediaTek/mt8390-evk/HiFi.conf
19 create mode 100644 ucm2/MediaTek/mt8390-evk/mt8390-evk.conf
20 create mode 120000 ucm2/conf.d/mt8390-evk/mt8390-evk.conf
21
22diff --git a/ucm2/MediaTek/mt8390-evk/HiFi.conf b/ucm2/MediaTek/mt8390-evk/HiFi.conf
23new file mode 100644
24index 0000000..42a4582
25--- /dev/null
26+++ b/ucm2/MediaTek/mt8390-evk/HiFi.conf
27@@ -0,0 +1,165 @@
28+SectionDevice."HDMI1" {
29+ Comment "HDMI output"
30+
31+ Value {
32+ PlaybackPriority 300
33+ PlaybackPCM "hw:${CardId},5"
34+ JackControl "HDMI Jack"
35+ }
36+
37+ EnableSequence [
38+ cset "name='HDMI_OUT_MUX' 1"
39+ ]
40+
41+ DisableSequence [
42+ cset "name='HDMI_OUT_MUX' 0"
43+ ]
44+}
45+
46+SectionDevice."HDMI2" {
47+ Comment "DP output"
48+
49+ Value {
50+ PlaybackPriority 300
51+ PlaybackPCM "hw:${CardId},5"
52+ JackControl "DP Jack"
53+ }
54+
55+ EnableSequence [
56+ cset "name='DPTX_OUT_MUX' 1"
57+ ]
58+
59+ DisableSequence [
60+ cset "name='DPTX_OUT_MUX' 0"
61+ ]
62+}
63+
64+SectionDevice."Speaker" {
65+ Comment "Lineout speaker"
66+
67+ ConflictingDevice [
68+ "Headphones"
69+ ]
70+
71+ EnableSequence [
72+ cset "name='LOL Mux' Playback_L_DAC"
73+ ]
74+
75+ DisableSequence [
76+ cset "name='LOL Mux' Open"
77+ ]
78+
79+ Value {
80+ PlaybackPriority 400
81+ PlaybackChannels 2
82+ PlaybackPCM "hw:${CardId},0"
83+ }
84+}
85+
86+SectionDevice."Headphones" {
87+ Comment "Earphone speaker"
88+
89+ ConflictingDevice [
90+ "Speaker"
91+ ]
92+
93+ EnableSequence [
94+ cset "name='HP Mux' Audio Playback"
95+ ]
96+
97+ DisableSequence [
98+ cset "name='HP Mux' Open"
99+ ]
100+
101+ Value {
102+ PlaybackPriority 500
103+ PlaybackChannels 2
104+ PlaybackPCM "hw:${CardId},0"
105+ }
106+}
107+
108+SectionDevice."Headset" {
109+ Comment "Earphone microphone"
110+
111+ ConflictingDevice [
112+ "Mic1"
113+ ]
114+
115+ EnableSequence [
116+ cset "name='PGA_L_Mux' AIN1"
117+ ]
118+
119+ Value {
120+ CapturePriority 500
121+ CaptureChannels 1
122+ CapturePCM "hw:${CardId},10"
123+ }
124+}
125+
126+SectionDevice."Mic1" {
127+ Comment "Analog microphone"
128+
129+ ConflictingDevice [
130+ "Headset"
131+ ]
132+
133+ EnableSequence [
134+ cset "name='PGA_L_Mux' AIN0"
135+ ]
136+
137+ Value {
138+ CapturePriority 400
139+ CaptureChannels 1
140+ CapturePCM "hw:${CardId},10"
141+ }
142+}
143+
144+SectionDevice."Mic2" {
145+ Comment "Digital microphone"
146+
147+ Value {
148+ CapturePriority 300
149+ CaptureChannels 2
150+ CapturePCM "hw:${CardId},14"
151+ }
152+}
153+
154+SectionDevice."Line1" {
155+ Comment "PCM input"
156+
157+ Value {
158+ CapturePriority 200
159+ CaptureChannels 2
160+ CapturePCM "hw:${CardId},8"
161+ }
162+}
163+
164+SectionDevice."Line2" {
165+ Comment "PCM output"
166+
167+ Value {
168+ PlaybackPriority 200
169+ PlaybackChannels 2
170+ PlaybackPCM "hw:${CardId},2"
171+ }
172+}
173+
174+SectionDevice."Line3" {
175+ Comment "I2S input"
176+
177+ Value {
178+ CapturePriority 100
179+ CaptureChannels 2
180+ CapturePCM "hw:${CardId},11"
181+ }
182+}
183+
184+SectionDevice."Line4" {
185+ Comment "I2S output"
186+
187+ Value {
188+ PlaybackPriority 100
189+ PlaybackChannels 8
190+ PlaybackPCM "hw:${CardId},6"
191+ }
192+}
193\ No newline at end of file
194diff --git a/ucm2/MediaTek/mt8390-evk/mt8390-evk.conf b/ucm2/MediaTek/mt8390-evk/mt8390-evk.conf
195new file mode 100644
196index 0000000..e2d56e2
197--- /dev/null
198+++ b/ucm2/MediaTek/mt8390-evk/mt8390-evk.conf
199@@ -0,0 +1,45 @@
200+Syntax 4
201+
202+SectionUseCase."HiFi" {
203+ File "/MediaTek/mt8390-evk/HiFi.conf"
204+ Comment "Play high quality music"
205+}
206+
207+BootSequence [
208+ cset "name='HP Mux' Audio Playback"
209+ cset "name='LOL Mux' Open"
210+ cset "name='MISO0_MUX' UL1_CH1"
211+ cset "name='MISO1_MUX' UL1_CH1"
212+ cset "name='ADC_L_Mux' Left Preamplifier"
213+ cset "name='PGA_L_Mux' AIN1"
214+ cset "name='HDMI_OUT_MUX' Connect"
215+ cset "name='DPTX_OUT_MUX' Disconnect"
216+ cset "name='ETDM_OUT1_Clock_Source' a1sys_a2sys"
217+ cset "name='ETDM_OUT2_Clock_Source' a1sys_a2sys"
218+ cset "name='ETDM_OUT3_Clock_Source' a1sys_a2sys"
219+ cset "name='ETDM_IN1_Clock_Source' a1sys_a2sys"
220+ cset "name='ETDM_IN2_Clock_Source' a1sys_a2sys"
221+ cset "name='Lineout Volume' 10"
222+ cset "name='Headset Volume' 2"
223+ cset "name='PGA1 Volume' 4"
224+ cset "name='O000 I000 Switch' on"
225+ cset "name='O001 I001 Switch' on"
226+ cset "name='O002 I004 Switch' on"
227+ cset "name='O003 I006 Switch' on"
228+ cset "name='O034 I168 Switch' on"
229+ cset "name='O035 I169 Switch' on"
230+ cset "name='O036 I012 Switch' on"
231+ cset "name='O037 I013 Switch' on"
232+ cset "name='O040 I002 Switch' on"
233+ cset "name='O041 I003 Switch' on"
234+ cset "name='O048 I022 Switch' on"
235+ cset "name='O049 I023 Switch' on"
236+ cset "name='O050 I024 Switch' on"
237+ cset "name='O051 I025 Switch' on"
238+ cset "name='O052 I026 Switch' on"
239+ cset "name='O053 I027 Switch' on"
240+ cset "name='O054 I028 Switch' on"
241+ cset "name='O055 I029 Switch' on"
242+ cset "name='O176 I070 Switch' on"
243+ cset "name='O177 I071 Switch' on"
244+]
245\ No newline at end of file
246diff --git a/ucm2/conf.d/mt8390-evk/mt8390-evk.conf b/ucm2/conf.d/mt8390-evk/mt8390-evk.conf
247new file mode 120000
248index 0000000..5b5c2b9
249--- /dev/null
250+++ b/ucm2/conf.d/mt8390-evk/mt8390-evk.conf
251@@ -0,0 +1 @@
252+../../MediaTek/mt8390-evk/mt8390-evk.conf
253\ No newline at end of file
254--
diff --git a/debian/patches/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch b/debian/patches/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch
0new file mode 100644255new file mode 100644
index 0000000..f78a404
--- /dev/null
+++ b/debian/patches/0001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch
@@ -0,0 +1,34 @@
1From d864e945ce4171fcaf6249bebec4f683fef0f5cf Mon Sep 17 00:00:00 2001
2From: Zoran Zhan <zoran.zhan@mediatek.com>
3Date: Mon, 22 Jan 2024 11:49:08 +0800
4Subject: [PATCH] ucm2: conf.d: mt8370-evk: Fix the type of mt8370-evk.conf
5
6Fix the type of mt8370-evk.conf at /ucm2/conf.d, to let the
7symbolic link can correctly point to the conf.
8
9Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/386
10Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
11Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/d864e945ce4171fcaf6249bebec4f683fef0f5cf
13Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2051199
14---
15 ucm2/conf.d/mt8370-evk/mt8370-evk.conf | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17 mode change 100644 => 120000 ucm2/conf.d/mt8370-evk/mt8370-evk.conf
18
19diff --git a/ucm2/conf.d/mt8370-evk/mt8370-evk.conf b/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
20deleted file mode 100644
21index 6edb08f..0000000
22--- a/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
23+++ /dev/null
24@@ -1 +0,0 @@
25-../../MediaTek/mt8370-evk/mt8370-evk.conf
26diff --git a/ucm2/conf.d/mt8370-evk/mt8370-evk.conf b/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
27new file mode 120000
28index 0000000..fed8ef1
29--- /dev/null
30+++ b/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
31@@ -0,0 +1 @@
32+../../MediaTek/mt8370-evk/mt8370-evk.conf
33\ No newline at end of file
34--
diff --git a/debian/patches/0001-ucm2-soundwire-add-rt713-SDCA-device.patch b/debian/patches/0001-ucm2-soundwire-add-rt713-SDCA-device.patch
0new file mode 10064435new file mode 100644
index 0000000..b4f1387
--- /dev/null
+++ b/debian/patches/0001-ucm2-soundwire-add-rt713-SDCA-device.patch
@@ -0,0 +1,159 @@
1From b422a8e08cb3845053ece1fc832294adca21a684 Mon Sep 17 00:00:00 2001
2From: Shuming Fan <shumingf@realtek.com>
3Date: Thu, 12 Oct 2023 10:07:36 +0800
4Subject: [PATCH] ucm2: soundwire: add rt713 SDCA device
5
6Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/363
7Signed-off-by: Shuming Fan <shumingf@realtek.com>
8Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9
10Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/b422a8e08cb3845053ece1fc832294adca21a684
11Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2042902
12Applied-Upstream: v1.2.11
13Last-Update: 2023-11-24
14
15---
16 ucm2/codecs/rt713-dmic/init.conf | 6 ++++
17 ucm2/codecs/rt713-sdca/init.conf | 8 ++++++
18 ucm2/sof-soundwire/rt713-dmic.conf | 21 ++++++++++++++
19 ucm2/sof-soundwire/rt713-sdca.conf | 40 +++++++++++++++++++++++++++
20 ucm2/sof-soundwire/sof-soundwire.conf | 6 ++--
21 5 files changed, 78 insertions(+), 3 deletions(-)
22 create mode 100644 ucm2/codecs/rt713-dmic/init.conf
23 create mode 100644 ucm2/codecs/rt713-sdca/init.conf
24 create mode 100644 ucm2/sof-soundwire/rt713-dmic.conf
25 create mode 100644 ucm2/sof-soundwire/rt713-sdca.conf
26
27diff --git a/ucm2/codecs/rt713-dmic/init.conf b/ucm2/codecs/rt713-dmic/init.conf
28new file mode 100644
29index 0000000..6547a36
30--- /dev/null
31+++ b/ucm2/codecs/rt713-dmic/init.conf
32@@ -0,0 +1,6 @@
33+# RT713-dmic specific volume control settings
34+
35+BootSequence [
36+ cset "name='rt713-dmic ADC 25 Mux' 'DMIC1'"
37+ cset "name='rt713-dmic FU1E Capture Switch' 1"
38+]
39diff --git a/ucm2/codecs/rt713-sdca/init.conf b/ucm2/codecs/rt713-sdca/init.conf
40new file mode 100644
41index 0000000..df6a7aa
42--- /dev/null
43+++ b/ucm2/codecs/rt713-sdca/init.conf
44@@ -0,0 +1,8 @@
45+# RT713-sdca specific volume control settings
46+
47+BootSequence [
48+ cset "name='rt713 FU05 Playback Volume' 87"
49+ cset "name='rt713 ADC 23 Mux' 'MIC2'"
50+ cset "name='rt713 FU0F Capture Volume' 57"
51+ cset "name='rt713 FU0F Capture Switch' 1"
52+]
53diff --git a/ucm2/sof-soundwire/rt713-dmic.conf b/ucm2/sof-soundwire/rt713-dmic.conf
54new file mode 100644
55index 0000000..dc5fe0e
56--- /dev/null
57+++ b/ucm2/sof-soundwire/rt713-dmic.conf
58@@ -0,0 +1,21 @@
59+# Use case Configuration for sof-soundwire card
60+
61+SectionDevice."Mic" {
62+ Comment "SoundWire microphones"
63+
64+ EnableSequence [
65+ cset "name='rt713-dmic FU1E Capture Switch' 1"
66+ ]
67+
68+ DisableSequence [
69+ cset "name='rt713-dmic FU1E Capture Switch' 0"
70+ ]
71+
72+ Value {
73+ CapturePriority 100
74+ CapturePCM "hw:${CardId},4"
75+ CaptureSwitch "rt713-dmic FU1E Capture Switch"
76+ CaptureVolume "rt713-dmic FU1E Capture Volume"
77+ CaptureMixerElem "rt713-dmic FU1E"
78+ }
79+}
80diff --git a/ucm2/sof-soundwire/rt713-sdca.conf b/ucm2/sof-soundwire/rt713-sdca.conf
81new file mode 100644
82index 0000000..f1cee7c
83--- /dev/null
84+++ b/ucm2/sof-soundwire/rt713-sdca.conf
85@@ -0,0 +1,40 @@
86+# Use case Configuration for sof-soundwire card
87+
88+SectionDevice."Headphones" {
89+ Comment "Headphones"
90+
91+ EnableSequence [
92+ cset "name='Headphone Switch' on"
93+ ]
94+
95+ DisableSequence [
96+ cset "name='Headphone Switch' off"
97+ ]
98+
99+ Value {
100+ PlaybackPriority 200
101+ PlaybackPCM "hw:${CardId}"
102+ JackControl "Headphone Jack"
103+ }
104+}
105+
106+SectionDevice."Headset" {
107+ Comment "Headset Microphone"
108+
109+ EnableSequence [
110+ cset "name='rt713 FU0F Capture Switch' 1"
111+ ]
112+
113+ DisableSequence [
114+ cset "name='rt713 FU0F Capture Switch' 0"
115+ ]
116+
117+ Value {
118+ CapturePriority 200
119+ CapturePCM "hw:${CardId},1"
120+ JackControl "Headset Mic Jack"
121+ CaptureSwitch "rt713 FU0F Capture Switch"
122+ CaptureVolume "rt713 FU0F Capture Volume"
123+ CaptureMixerElem "rt713 FU0F"
124+ }
125+}
126diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf
127index 3368d65..18b1bf8 100644
128--- a/ucm2/sof-soundwire/sof-soundwire.conf
129+++ b/ucm2/sof-soundwire/sof-soundwire.conf
130@@ -35,7 +35,7 @@ DefineRegex {
131 String "${CardComponents}"
132 }
133 MicCodec {
134- Regex " mic:([a-z0-9]+(-sdca)?)"
135+ Regex " mic:([a-z0-9]+(-dmic)?+(-sdca)?)"
136 String "${CardComponents}"
137 }
138 Mics {
139@@ -47,7 +47,7 @@ DefineRegex {
140 If.hs_init {
141 Condition {
142 Type RegexMatch
143- Regex "(rt5682|rt700|rt711(-sdca)?)"
144+ Regex "(rt5682|rt700|rt711|rt713(-sdca)?)"
145 String "${var:HeadsetCodec1}"
146 }
147 True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
148@@ -56,7 +56,7 @@ If.hs_init {
149 If.mic_init {
150 Condition {
151 Type RegexMatch
152- Regex "(rt715(-sdca)?)"
153+ Regex "(rt713-dmic|rt715(-sdca)?)"
154 String "${var:MicCodec1}"
155 }
156 True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"
157--
1582.34.1
159
diff --git a/debian/patches/0002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch b/debian/patches/0002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch
0new file mode 100644160new file mode 100644
index 0000000..2ffb1bd
--- /dev/null
+++ b/debian/patches/0002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch
@@ -0,0 +1,62 @@
1From: Charles Keepax <ckeepax@opensource.cirrus.com>
2Date: Wed, 6 Dec 2023 16:46:12 +0000
3Subject: [PATCH 2/3] sof-soundwire: Add basic support for basic cs35l56
4 configurations
5
6cs35l56 is a boosted speaker amp, add UCM support for configurations
7with up to 8 amps.
8
9Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/8e39917518b62cce44d098bd6fe5d2c1b41f92bd
12Bug: https://github.com/alsa-project/alsa-ucm-conf/pull/370
13Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
14Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
15---
16 ucm2/sof-soundwire/cs35l56.conf | 40 ++++++++++++++++++++++++++++++++++++++++
17 1 file changed, 40 insertions(+)
18 create mode 100644 ucm2/sof-soundwire/cs35l56.conf
19
20--- /dev/null
21+++ b/ucm2/sof-soundwire/cs35l56.conf
22@@ -0,0 +1,40 @@
23+# Use case Configuration for sof-soundwire card
24+
25+#
26+# Arguments:
27+# ForAmps - regex filter for var:SpeakerAmps
28+# Amp - amplifier number 1-8
29+#
30+DefineMacro.cs42l43spk.If.0 {
31+ Condition {
32+ Type RegexMatch
33+ Regex "${var:__ForAmps}"
34+ String "${var:SpeakerAmps}"
35+ }
36+ True {
37+ EnableSequence [
38+ cset "name='AMP${var:__Amp} Speaker Switch' 1"
39+ ]
40+ DisableSequence [
41+ cset "name='AMP${var:__Amp} Speaker Switch' 0"
42+ ]
43+ }
44+}
45+
46+SectionDevice."Speaker" {
47+ Comment "Speaker"
48+
49+ Macro.num1.cs42l43spk { ForAmps "[1-8]" Amp 1 }
50+ Macro.num2.cs42l43spk { ForAmps "[2-8]" Amp 2 }
51+ Macro.num3.cs42l43spk { ForAmps "[3-8]" Amp 3 }
52+ Macro.num4.cs42l43spk { ForAmps "[4-8]" Amp 4 }
53+ Macro.num5.cs42l43spk { ForAmps "[5-8]" Amp 5 }
54+ Macro.num6.cs42l43spk { ForAmps "[6-8]" Amp 6 }
55+ Macro.num7.cs42l43spk { ForAmps "[78]" Amp 7 }
56+ Macro.num8.cs42l43spk { ForAmps "8" Amp 8 }
57+
58+ Value {
59+ PlaybackPriority 100
60+ PlaybackPCM "hw:${CardId},2"
61+ }
62+}
diff --git a/debian/patches/0002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch b/debian/patches/0002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch
0new file mode 10064463new file mode 100644
index 0000000..7a51a10
--- /dev/null
+++ b/debian/patches/0002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch
@@ -0,0 +1,53 @@
1From: Maciej Strozek <mstrozek@opensource.cirrus.com>
2Date: Thu, 17 Oct 2024 13:20:27 +0100
3Subject: sof-soundwire: Add sequence for controlling Mic Mute LED
4
5Also ensure the unused microphone is disabled so that currently used mic
6can fully control the LED.
7
8Link: https://lore.kernel.org/alsa-devel/20241017122027.1207373-2-mstrozek@opensource.cirrus.com/
9Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/e4277a204cd61f8f68f616df0d8c42e5bdeb1475
12Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
13Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
14---
15 ucm2/codecs/cs42l43/init.conf | 7 +++++++
16 ucm2/sof-soundwire/cs42l43-dmic.conf | 2 ++
17 ucm2/sof-soundwire/cs42l43.conf | 1 +
18 3 files changed, 10 insertions(+)
19
20--- a/ucm2/codecs/cs42l43/init.conf
21+++ b/ucm2/codecs/cs42l43/init.conf
22@@ -18,3 +18,10 @@
23 }
24 }
25 }
26+
27+FixedBootSequence [
28+ exec "-/sbin/modprobe snd_ctl_led"
29+ sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 1 Switch"
30+ sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 3 Switch"
31+ sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 4 Switch"
32+]
33--- a/ucm2/sof-soundwire/cs42l43-dmic.conf
34+++ b/ucm2/sof-soundwire/cs42l43-dmic.conf
35@@ -13,6 +13,8 @@
36 ]
37
38 DisableSequence [
39+ cset "name='cs42l43 Decimator 3 Switch' 0"
40+ cset "name='cs42l43 Decimator 4 Switch' 0"
41 cset "name='cs42l43 DP1TX1 Input' 'None'"
42 cset "name='cs42l43 DP1TX2 Input' 'None'"
43 ]
44--- a/ucm2/sof-soundwire/cs42l43.conf
45+++ b/ucm2/sof-soundwire/cs42l43.conf
46@@ -33,6 +33,7 @@
47 ]
48
49 DisableSequence [
50+ cset "name='cs42l43 Decimator 1 Switch' 0"
51 cset "name='cs42l43 DP1TX1 Input' 'None'"
52 cset "name='cs42l43 DP1TX2 Input' 'None'"
53 ]
diff --git a/debian/patches/0002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch b/debian/patches/0002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch
0new file mode 10064454new file mode 100644
index 0000000..50076b0
--- /dev/null
+++ b/debian/patches/0002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch
@@ -0,0 +1,95 @@
1From: Charles Keepax <ckeepax@opensource.cirrus.com>
2Date: Mon, 8 Jul 2024 12:59:19 +0100
3Subject: sof-soundwire: Add support for cs42l43/cs35l56 bridge configuration
4
5The cs42l43 has both a SPI master and an I2S interface, in some
6configurations 2 cs35l56 amplifiers are connected to these to provide
7bass speakers whilst the cs42l43's internal speaker drivers are used for
8the tweeters. Add UCM configuration for this type of system.
9
10Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
11Signed-off-by: Jaroslav Kysela <perex@perex.cz>
12Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/e4277a204cd61f8f68f616df0d8c42e5bdeb1475
13Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
14Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
15---
16 ucm2/sof-soundwire/cs35l56-bridge.conf | 61 ++++++++++++++++++++++++++++++++++
17 ucm2/sof-soundwire/sof-soundwire.conf | 2 +-
18 2 files changed, 62 insertions(+), 1 deletion(-)
19 create mode 100644 ucm2/sof-soundwire/cs35l56-bridge.conf
20
21--- /dev/null
22+++ b/ucm2/sof-soundwire/cs35l56-bridge.conf
23@@ -0,0 +1,61 @@
24+# Use case Configuration for sof-soundwire card
25+
26+LibraryConfig.remap.Config {
27+ ctl.default.map {
28+ "name='Speaker Digital Switch'" {
29+ "name='AMPL Speaker Switch'".vindex.0 0
30+ "name='AMPR Speaker Switch'".vindex.1 0
31+ }
32+ "name='Speaker Digital Volume'" {
33+ "name='AMPL Speaker Volume'".vindex.0 0
34+ "name='AMPR Speaker Volume'".vindex.1 0
35+ }
36+ }
37+}
38+
39+SectionDevice."Speaker" {
40+ Comment "Speaker"
41+
42+ ConflictingDevice [
43+ "Headphones"
44+ ]
45+
46+ EnableSequence [
47+ cset "name='cs42l43 Speaker L Input 1' 'ASPRX1'"
48+ cset "name='cs42l43 Speaker R Input 1' 'ASPRX2'"
49+ cset "name='cs42l43 ASPTX1 Input' 'DP5RX1'"
50+ cset "name='cs42l43 ASPTX2 Input' 'DP5RX2'"
51+
52+ cset "name='AMPL ASP1 TX1 Source' 'DSP1TX1'"
53+ cset "name='AMPL ASP1 TX2 Source' 'None'"
54+ cset "name='AMPL ASP1 TX3 Source' 'None'"
55+ cset "name='AMPL ASP1 TX4 Source' 'None'"
56+
57+ cset "name='AMPR ASP1 TX1 Source' 'None'"
58+ cset "name='AMPR ASP1 TX2 Source' 'DSP1TX1'"
59+ cset "name='AMPR ASP1 TX3 Source' 'None'"
60+ cset "name='AMPR ASP1 TX4 Source' 'None'"
61+
62+ cset "name='cs42l43 Speaker Digital Switch' 1"
63+ cset "name='cs42l43 Speaker Digital Volume' 128"
64+ ]
65+
66+ DisableSequence [
67+ cset "name='cs42l43 Speaker Digital Switch' 0"
68+
69+ cset "name='AMPL ASP1 TX2 Source' 'None'"
70+ cset "name='AMPR ASP1 TX1 Source' 'None'"
71+
72+ cset "name='cs42l43 ASPTX1 Input' 'None'"
73+ cset "name='cs42l43 ASPTX2 Input' 'None'"
74+ cset "name='cs42l43 Speaker L Input 1' 'None'"
75+ cset "name='cs42l43 Speaker R Input 1' 'None'"
76+ ]
77+
78+ Value {
79+ PlaybackPriority 100
80+ PlaybackPCM "hw:${CardId},0"
81+ PlaybackMixer "default:${CardId}"
82+ PlaybackMixerElem "Speaker Digital"
83+ }
84+}
85--- a/ucm2/sof-soundwire/sof-soundwire.conf
86+++ b/ucm2/sof-soundwire/sof-soundwire.conf
87@@ -19,7 +19,7 @@
88
89 DefineRegex {
90 SpeakerCodec {
91- Regex " spk:([a-z0-9]+((-sdca)|(-spk))?)"
92+ Regex " spk:([a-z0-9]+((-sdca)|(-spk)|(-bridge))?)"
93 String "${CardComponents}"
94 }
95 SpeakerChannels {
diff --git a/debian/patches/0002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch b/debian/patches/0002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch
0new file mode 10064496new file mode 100644
index 0000000..36f50d0
--- /dev/null
+++ b/debian/patches/0002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch
@@ -0,0 +1,30 @@
1From: Jaroslav Kysela <perex@perex.cz>
2Date: Mon, 11 Mar 2024 12:06:44 +0100
3Subject: sof-soundwire: fix rt1318 config copy-n-paste error in rt1318spk
4 macro
5
6Signed-off-by: Jaroslav Kysela <perex@perex.cz>
7Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/4e0fcc79b7d517a957e12f02ecae5f3c69fa94dc
8Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
9Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
10---
11 ucm2/sof-soundwire/rt1318.conf | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
13
14--- a/ucm2/sof-soundwire/rt1318.conf
15+++ b/ucm2/sof-soundwire/rt1318.conf
16@@ -14,11 +14,11 @@
17 }
18 True {
19 EnableSequence [
20- cset "name='rt1308-${var:__Amp} RX Channel Select' ${var:__Sel}"
21- cset "name='rt1308-${var:__Amp} DAC Switch' 1"
22+ cset "name='rt1318-${var:__Amp} RX Channel Select' ${var:__Sel}"
23+ cset "name='rt1318-${var:__Amp} DAC Switch' 1"
24 ]
25 DisableSequence [
26- cset "name='rt1308-${var:__Amp} DAC Switch' 0"
27+ cset "name='rt1318-${var:__Amp} DAC Switch' 0"
28 ]
29 }
30 }
diff --git a/debian/patches/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch b/debian/patches/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch
0new file mode 10064431new file mode 100644
index 0000000..6df8bfe
--- /dev/null
+++ b/debian/patches/0002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch
@@ -0,0 +1,243 @@
1From 5e75929e8a487498e24db27023be0b57bac222b0 Mon Sep 17 00:00:00 2001
2From: Zoran Zhan <zoran.zhan@mediatek.com>
3Date: Thu, 1 Jun 2023 15:48:33 +0800
4Subject: [PATCH 2/3] ucm2: MediaTek: mt8395-evk: Add alsa-ucm support
5
6Add alsa-ucm support for the MediaTek mt8395-evk platform.
7
8Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/322
9Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/5e75929e8a487498e24db27023be0b57bac222b0
12Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2051199
13---
14 ucm2/MediaTek/mt8395-evk/HiFi.conf | 154 +++++++++++++++++++++++
15 ucm2/MediaTek/mt8395-evk/mt8395-evk.conf | 46 +++++++
16 ucm2/conf.d/mt8395-evk/mt8395-evk.conf | 1 +
17 3 files changed, 201 insertions(+)
18 create mode 100644 ucm2/MediaTek/mt8395-evk/HiFi.conf
19 create mode 100644 ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
20 create mode 120000 ucm2/conf.d/mt8395-evk/mt8395-evk.conf
21
22diff --git a/ucm2/MediaTek/mt8395-evk/HiFi.conf b/ucm2/MediaTek/mt8395-evk/HiFi.conf
23new file mode 100644
24index 0000000..81e4423
25--- /dev/null
26+++ b/ucm2/MediaTek/mt8395-evk/HiFi.conf
27@@ -0,0 +1,154 @@
28+SectionDevice."HDMI1" {
29+ Comment "HDMI output"
30+
31+ Value {
32+ PlaybackPriority 200
33+ PlaybackPCM "hw:${CardId},5"
34+ JackControl "HDMI Jack"
35+ }
36+
37+ EnableSequence [
38+ cset "name='HDMI_OUT_MUX' 1"
39+ ]
40+
41+ DisableSequence [
42+ cset "name='HDMI_OUT_MUX' 0"
43+ ]
44+}
45+
46+SectionDevice."HDMI2" {
47+ Comment "DP output"
48+
49+ Value {
50+ PlaybackPriority 200
51+ PlaybackPCM "hw:${CardId},5"
52+ JackControl "DP Jack"
53+ }
54+
55+ EnableSequence [
56+ cset "name='DPTX_OUT_MUX' 1"
57+ ]
58+
59+ DisableSequence [
60+ cset "name='DPTX_OUT_MUX' 0"
61+ ]
62+}
63+
64+SectionDevice."Speaker" {
65+ Comment "Lineout speaker"
66+
67+ ConflictingDevice [
68+ "Headphones"
69+ ]
70+
71+ EnableSequence [
72+ cset "name='LOL Mux' Playback_L_DAC"
73+ ]
74+
75+ DisableSequence [
76+ cset "name='LOL Mux' Open"
77+ ]
78+
79+ Value {
80+ PlaybackPriority 300
81+ PlaybackChannels 2
82+ PlaybackPCM "hw:${CardId},0"
83+ }
84+}
85+
86+SectionDevice."Headphones" {
87+ Comment "Earphone speaker"
88+
89+ ConflictingDevice [
90+ "Speaker"
91+ ]
92+
93+ EnableSequence [
94+ cset "name='HP Mux' Audio Playback"
95+ ]
96+
97+ DisableSequence [
98+ cset "name='HP Mux' Open"
99+ ]
100+
101+ Value {
102+ PlaybackPriority 400
103+ PlaybackChannels 2
104+ PlaybackPCM "hw:${CardId},0"
105+ }
106+}
107+
108+SectionDevice."Headset" {
109+ Comment "Earphone microphone"
110+
111+ ConflictingDevice [
112+ "Mic1"
113+ ]
114+
115+ EnableSequence [
116+ cset "name='PGA_L_Mux' AIN1"
117+ ]
118+
119+ Value {
120+ CapturePriority 400
121+ CaptureChannels 3
122+ CapturePCM "hw:${CardId},15"
123+ }
124+}
125+
126+SectionDevice."Mic1" {
127+ Comment "Analog microphone"
128+
129+ ConflictingDevice [
130+ "Headset"
131+ ]
132+
133+ EnableSequence [
134+ cset "name='PGA_L_Mux' AIN0"
135+ cset "name='O039 I169 Switch' on"
136+ cset "name='O182 I170 Switch' on"
137+ cset "name='MISO1_MUX' UL1_CH2"
138+ ]
139+
140+ DisableSequence [
141+ cset "name='O039 I169 Switch' off"
142+ cset "name='O182 I170 Switch' off"
143+ cset "name='MISO1_MUX' UL1_CH1"
144+ ]
145+
146+ Value {
147+ CapturePriority 300
148+ CaptureChannels 3
149+ CapturePCM "hw:${CardId},15"
150+ }
151+}
152+
153+SectionDevice."Mic2" {
154+ Comment "Digital microphone"
155+
156+ Value {
157+ CapturePriority 200
158+ CaptureChannels 2
159+ CapturePCM "hw:${CardId},14"
160+ }
161+}
162+
163+SectionDevice."Line1" {
164+ Comment "PCM input"
165+
166+ Value {
167+ CapturePriority 100
168+ CaptureChannels 2
169+ CapturePCM "hw:${CardId},8"
170+ }
171+}
172+
173+SectionDevice."Line2" {
174+ Comment "PCM output"
175+
176+ Value {
177+ PlaybackPriority 100
178+ PlaybackChannels 2
179+ PlaybackPCM "hw:${CardId},2"
180+ }
181+}
182\ No newline at end of file
183diff --git a/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf b/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
184new file mode 100644
185index 0000000..1957b69
186--- /dev/null
187+++ b/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
188@@ -0,0 +1,46 @@
189+Syntax 4
190+
191+SectionUseCase."HiFi" {
192+ File "/MediaTek/mt8395-evk/HiFi.conf"
193+ Comment "Play high quality music"
194+}
195+
196+BootSequence [
197+ cset "name='HP Mux' Audio Playback"
198+ cset "name='LOL Mux' Open"
199+ cset "name='MISO0_MUX' UL1_CH1"
200+ cset "name='MISO1_MUX' UL1_CH1"
201+ cset "name='ADC_L_Mux' Left Preamplifier"
202+ cset "name='ADC_R_Mux' Right Preamplifier"
203+ cset "name='ADC_3_Mux' Preamplifier"
204+ cset "name='PGA_L_Mux' AIN1"
205+ cset "name='PGA_R_Mux' AIN2"
206+ cset "name='PGA_3_Mux' AIN3"
207+ cset "name='HDMI_OUT_MUX' Connect"
208+ cset "name='DPTX_OUT_MUX' Disconnect"
209+ cset "name='Lineout Volume' 10"
210+ cset "name='Headset Volume' 2"
211+ cset "name='PGA1 Volume' 4"
212+ cset "name='PGA2 Volume' 4"
213+ cset "name='PGA3 Volume' 4"
214+ cset "name='O000 I000 Switch' on"
215+ cset "name='O001 I001 Switch' on"
216+ cset "name='O002 I004 Switch' on"
217+ cset "name='O003 I005 Switch' on"
218+ cset "name='O004 I006 Switch' on"
219+ cset "name='O005 I007 Switch' on"
220+ cset "name='O006 I008 Switch' on"
221+ cset "name='O007 I009 Switch' on"
222+ cset "name='O008 I010 Switch' on"
223+ cset "name='O009 I011 Switch' on"
224+ cset "name='O034 I168 Switch' on"
225+ cset "name='O035 I169 Switch' on"
226+ cset "name='O038 I168 Switch' on"
227+ cset "name='O039 I169 Switch' on"
228+ cset "name='O040 I002 Switch' on"
229+ cset "name='O041 I003 Switch' on"
230+ cset "name='O176 I070 Switch' on"
231+ cset "name='O177 I071 Switch' on"
232+ cset "name='O182 I170 Switch' on"
233+ cset "name='O183 I171 Switch' on"
234+]
235diff --git a/ucm2/conf.d/mt8395-evk/mt8395-evk.conf b/ucm2/conf.d/mt8395-evk/mt8395-evk.conf
236new file mode 120000
237index 0000000..30557e3
238--- /dev/null
239+++ b/ucm2/conf.d/mt8395-evk/mt8395-evk.conf
240@@ -0,0 +1 @@
241+../../MediaTek/mt8395-evk/mt8395-evk.conf
242\ No newline at end of file
243--
diff --git a/debian/patches/0003-sof-soundwire-Add-basic-support-for-cs42l43.patch b/debian/patches/0003-sof-soundwire-Add-basic-support-for-cs42l43.patch
0new file mode 100644244new file mode 100644
index 0000000..1f47bac
--- /dev/null
+++ b/debian/patches/0003-sof-soundwire-Add-basic-support-for-cs42l43.patch
@@ -0,0 +1,128 @@
1From: Charles Keepax <ckeepax@opensource.cirrus.com>
2Date: Wed, 17 Jan 2024 14:21:25 +0000
3Subject: [PATCH 3/3] sof-soundwire: Add basic support for cs42l43
4
5cs42l43 is a codec device, add basic support for it. Including a dual
6channel DMIC input, stereo headphones, and a mono headset microphone.
7
8Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
9Signed-off-by: Jaroslav Kysela <perex@perex.cz>
10Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/e87dde51d68950537f92af955ad0633437cc419a
11Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
12Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
13---
14 ucm2/codecs/cs42l43/init.conf | 14 +++++++++++
15 ucm2/sof-soundwire/cs42l43-dmic.conf | 26 ++++++++++++++++++++
16 ucm2/sof-soundwire/cs42l43.conf | 46 +++++++++++++++++++++++++++++++++++
17 ucm2/sof-soundwire/sof-soundwire.conf | 2 +-
18 4 files changed, 87 insertions(+), 1 deletion(-)
19 create mode 100644 ucm2/codecs/cs42l43/init.conf
20 create mode 100644 ucm2/sof-soundwire/cs42l43-dmic.conf
21 create mode 100644 ucm2/sof-soundwire/cs42l43.conf
22
23--- /dev/null
24+++ b/ucm2/codecs/cs42l43/init.conf
25@@ -0,0 +1,14 @@
26+# cs42l43 specific control settings
27+
28+LibraryConfig.remap.Config {
29+ ctl.default.map {
30+ "name='cs42l43 PDM2 Switch'" {
31+ "name='cs42l43 Decimator 3 Switch'".vindex.0 0
32+ "name='cs42l43 Decimator 4 Switch'".vindex.1 0
33+ }
34+ "name='cs42l43 PDM2 Volume'" {
35+ "name='cs42l43 Decimator 3 Volume'".vindex.0 0
36+ "name='cs42l43 Decimator 4 Volume'".vindex.1 0
37+ }
38+ }
39+}
40--- /dev/null
41+++ b/ucm2/sof-soundwire/cs42l43-dmic.conf
42@@ -0,0 +1,26 @@
43+# Use case Configuration for sof-soundwire card
44+
45+SectionDevice."Mic" {
46+ Comment "Microphones"
47+
48+ ConflictingDevice [
49+ "Headset"
50+ ]
51+
52+ EnableSequence [
53+ cset "name='cs42l43 DP1TX1 Input' 'Decimator 3'"
54+ cset "name='cs42l43 DP1TX2 Input' 'Decimator 4'"
55+ ]
56+
57+ DisableSequence [
58+ cset "name='cs42l43 DP1TX1 Input' 'None'"
59+ cset "name='cs42l43 DP1TX2 Input' 'None'"
60+ ]
61+
62+ Value {
63+ CapturePriority 100
64+ CapturePCM "hw:${CardId},4"
65+ CaptureMixer "default:${CardId}"
66+ CaptureMixerElem "cs42l43 PDM2"
67+ }
68+}
69--- /dev/null
70+++ b/ucm2/sof-soundwire/cs42l43.conf
71@@ -0,0 +1,46 @@
72+# Use case Configuration for sof-soundwire card
73+
74+SectionDevice."Headphones" {
75+ Comment "Headphones"
76+
77+ EnableSequence [
78+ cset "name='cs42l43 Headphone L Input 1' 'DP5RX1'"
79+ cset "name='cs42l43 Headphone R Input 1' 'DP5RX2'"
80+ ]
81+
82+ DisableSequence [
83+ cset "name='cs42l43 Headphone L Input 1' 'None'"
84+ cset "name='cs42l43 Headphone R Input 1' 'None'"
85+ ]
86+
87+ Value {
88+ PlaybackPriority 200
89+ PlaybackPCM "hw:${CardId},0"
90+ PlaybackVolume "cs42l43 Headphone Digital Volume"
91+ JackControl "Headphone Jack"
92+ }
93+}
94+
95+SectionDevice."Headset" {
96+ Comment "Headset Microphone"
97+
98+ EnableSequence [
99+ cset "name='cs42l43 ADC1 Input' 'IN1'"
100+ cset "name='cs42l43 Decimator 1 Mode' 'ADC'"
101+
102+ cset "name='cs42l43 DP1TX1 Input' 'Decimator 1'"
103+ cset "name='cs42l43 DP1TX2 Input' 'Decimator 1'"
104+ ]
105+
106+ DisableSequence [
107+ cset "name='cs42l43 DP1TX1 Input' 'None'"
108+ cset "name='cs42l43 DP1TX2 Input' 'None'"
109+ ]
110+
111+ Value {
112+ CapturePriority 200
113+ CapturePCM "hw:${CardId},4"
114+ CaptureMixerElem "cs42l43 Decimator 1"
115+ JackControl "Headset Mic Jack"
116+ }
117+}
118--- a/ucm2/sof-soundwire/sof-soundwire.conf
119+++ b/ucm2/sof-soundwire/sof-soundwire.conf
120@@ -47,7 +47,7 @@
121 If.hs_init {
122 Condition {
123 Type RegexMatch
124- Regex "(rt5682|rt700|rt711|rt713(-sdca)?)"
125+ Regex "(cs42l43|rt5682|rt700|rt711|rt713(-sdca)?)"
126 String "${var:HeadsetCodec1}"
127 }
128 True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
diff --git a/debian/patches/0003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch b/debian/patches/0003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch
0new file mode 100644129new file mode 100644
index 0000000..54840df
--- /dev/null
+++ b/debian/patches/0003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch
@@ -0,0 +1,36 @@
1From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2Date: Mon, 11 Mar 2024 11:02:00 +0200
3Subject: sof-soundwire: rt1308: Fix single amp configuration
4
5If the device have single rt1308 amp then the codec's Channel Select should
6be set to "LR" and not to "LL". "LL" is only valid if we have 2 amps, in
7that case one is the Left and the other is the Right channel.
8
9This fixes for example Dell Latitude 9520 which only played on the Left
10speaker, Right is silent.
11
12Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/402
13Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
14Suggested-by: Jaroslav Kysela <perex@perex.cz>
15Signed-off-by: Jaroslav Kysela <perex@perex.cz>
16Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/9e29f9e27f4e27dce40d8d6803031bb4f7be3c48
17Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
18Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
19---
20 ucm2/sof-soundwire/rt1308.conf | 5 +++--
21 1 file changed, 3 insertions(+), 2 deletions(-)
22
23--- a/ucm2/sof-soundwire/rt1308.conf
24+++ b/ucm2/sof-soundwire/rt1308.conf
25@@ -28,8 +28,9 @@
26 SectionDevice."Speaker" {
27 Comment "Speaker"
28
29- Macro.num1.rt1308spk { ForAmps "[12]" Amp 1 Sel LL }
30- Macro.num2.rt1308spk { ForAmps "2" Amp 2 Sel RR }
31+ Macro.num1.rt1308spk { ForAmps "1" Amp 1 Sel LR }
32+ Macro.num2.rt1308spk { ForAmps "2" Amp 1 Sel LL }
33+ Macro.num3.rt1308spk { ForAmps "2" Amp 2 Sel RR }
34
35 EnableSequence [
36 cset "name='Speaker Switch' on"
diff --git a/debian/patches/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch b/debian/patches/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch
0new file mode 10064437new file mode 100644
index 0000000..89126cb
--- /dev/null
+++ b/debian/patches/0003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch
@@ -0,0 +1,253 @@
1From a0856afae4e8e071e7626958667cde049ec81e97 Mon Sep 17 00:00:00 2001
2From: Zoran Zhan <zoran.zhan@mediatek.com>
3Date: Wed, 10 Jan 2024 20:16:17 +0800
4Subject: [PATCH 3/3] ucm2: MediaTek: mt8370-evk: Add alsa-ucm support
5
6Add alsa-ucm support for the MediaTek mt8370-evk platform.
7
8Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/380
9Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
10Signed-off-by: Jaroslav Kysela <perex@perex.cz>
11Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commit/a0856afae4e8e071e7626958667cde049ec81e97
12Bug: https://bugs.launchpad.net/ubuntu/+source/alsa-ucm-conf/+bug/2051199
13---
14 ucm2/MediaTek/mt8370-evk/HiFi.conf | 165 +++++++++++++++++++++++
15 ucm2/MediaTek/mt8370-evk/mt8370-evk.conf | 45 +++++++
16 ucm2/conf.d/mt8370-evk/mt8370-evk.conf | 1 +
17 3 files changed, 211 insertions(+)
18 create mode 100644 ucm2/MediaTek/mt8370-evk/HiFi.conf
19 create mode 100644 ucm2/MediaTek/mt8370-evk/mt8370-evk.conf
20 create mode 100644 ucm2/conf.d/mt8370-evk/mt8370-evk.conf
21
22diff --git a/ucm2/MediaTek/mt8370-evk/HiFi.conf b/ucm2/MediaTek/mt8370-evk/HiFi.conf
23new file mode 100644
24index 0000000..42a4582
25--- /dev/null
26+++ b/ucm2/MediaTek/mt8370-evk/HiFi.conf
27@@ -0,0 +1,165 @@
28+SectionDevice."HDMI1" {
29+ Comment "HDMI output"
30+
31+ Value {
32+ PlaybackPriority 300
33+ PlaybackPCM "hw:${CardId},5"
34+ JackControl "HDMI Jack"
35+ }
36+
37+ EnableSequence [
38+ cset "name='HDMI_OUT_MUX' 1"
39+ ]
40+
41+ DisableSequence [
42+ cset "name='HDMI_OUT_MUX' 0"
43+ ]
44+}
45+
46+SectionDevice."HDMI2" {
47+ Comment "DP output"
48+
49+ Value {
50+ PlaybackPriority 300
51+ PlaybackPCM "hw:${CardId},5"
52+ JackControl "DP Jack"
53+ }
54+
55+ EnableSequence [
56+ cset "name='DPTX_OUT_MUX' 1"
57+ ]
58+
59+ DisableSequence [
60+ cset "name='DPTX_OUT_MUX' 0"
61+ ]
62+}
63+
64+SectionDevice."Speaker" {
65+ Comment "Lineout speaker"
66+
67+ ConflictingDevice [
68+ "Headphones"
69+ ]
70+
71+ EnableSequence [
72+ cset "name='LOL Mux' Playback_L_DAC"
73+ ]
74+
75+ DisableSequence [
76+ cset "name='LOL Mux' Open"
77+ ]
78+
79+ Value {
80+ PlaybackPriority 400
81+ PlaybackChannels 2
82+ PlaybackPCM "hw:${CardId},0"
83+ }
84+}
85+
86+SectionDevice."Headphones" {
87+ Comment "Earphone speaker"
88+
89+ ConflictingDevice [
90+ "Speaker"
91+ ]
92+
93+ EnableSequence [
94+ cset "name='HP Mux' Audio Playback"
95+ ]
96+
97+ DisableSequence [
98+ cset "name='HP Mux' Open"
99+ ]
100+
101+ Value {
102+ PlaybackPriority 500
103+ PlaybackChannels 2
104+ PlaybackPCM "hw:${CardId},0"
105+ }
106+}
107+
108+SectionDevice."Headset" {
109+ Comment "Earphone microphone"
110+
111+ ConflictingDevice [
112+ "Mic1"
113+ ]
114+
115+ EnableSequence [
116+ cset "name='PGA_L_Mux' AIN1"
117+ ]
118+
119+ Value {
120+ CapturePriority 500
121+ CaptureChannels 1
122+ CapturePCM "hw:${CardId},10"
123+ }
124+}
125+
126+SectionDevice."Mic1" {
127+ Comment "Analog microphone"
128+
129+ ConflictingDevice [
130+ "Headset"
131+ ]
132+
133+ EnableSequence [
134+ cset "name='PGA_L_Mux' AIN0"
135+ ]
136+
137+ Value {
138+ CapturePriority 400
139+ CaptureChannels 1
140+ CapturePCM "hw:${CardId},10"
141+ }
142+}
143+
144+SectionDevice."Mic2" {
145+ Comment "Digital microphone"
146+
147+ Value {
148+ CapturePriority 300
149+ CaptureChannels 2
150+ CapturePCM "hw:${CardId},14"
151+ }
152+}
153+
154+SectionDevice."Line1" {
155+ Comment "PCM input"
156+
157+ Value {
158+ CapturePriority 200
159+ CaptureChannels 2
160+ CapturePCM "hw:${CardId},8"
161+ }
162+}
163+
164+SectionDevice."Line2" {
165+ Comment "PCM output"
166+
167+ Value {
168+ PlaybackPriority 200
169+ PlaybackChannels 2
170+ PlaybackPCM "hw:${CardId},2"
171+ }
172+}
173+
174+SectionDevice."Line3" {
175+ Comment "I2S input"
176+
177+ Value {
178+ CapturePriority 100
179+ CaptureChannels 2
180+ CapturePCM "hw:${CardId},11"
181+ }
182+}
183+
184+SectionDevice."Line4" {
185+ Comment "I2S output"
186+
187+ Value {
188+ PlaybackPriority 100
189+ PlaybackChannels 8
190+ PlaybackPCM "hw:${CardId},6"
191+ }
192+}
193\ No newline at end of file
194diff --git a/ucm2/MediaTek/mt8370-evk/mt8370-evk.conf b/ucm2/MediaTek/mt8370-evk/mt8370-evk.conf
195new file mode 100644
196index 0000000..2d07c46
197--- /dev/null
198+++ b/ucm2/MediaTek/mt8370-evk/mt8370-evk.conf
199@@ -0,0 +1,45 @@
200+Syntax 4
201+
202+SectionUseCase."HiFi" {
203+ File "/MediaTek/mt8370-evk/HiFi.conf"
204+ Comment "Play high quality music"
205+}
206+
207+BootSequence [
208+ cset "name='HP Mux' Audio Playback"
209+ cset "name='LOL Mux' Open"
210+ cset "name='MISO0_MUX' UL1_CH1"
211+ cset "name='MISO1_MUX' UL1_CH1"
212+ cset "name='ADC_L_Mux' Left Preamplifier"
213+ cset "name='PGA_L_Mux' AIN1"
214+ cset "name='HDMI_OUT_MUX' Connect"
215+ cset "name='DPTX_OUT_MUX' Disconnect"
216+ cset "name='ETDM_OUT1_Clock_Source' a1sys_a2sys"
217+ cset "name='ETDM_OUT2_Clock_Source' a1sys_a2sys"
218+ cset "name='ETDM_OUT3_Clock_Source' a1sys_a2sys"
219+ cset "name='ETDM_IN1_Clock_Source' a1sys_a2sys"
220+ cset "name='ETDM_IN2_Clock_Source' a1sys_a2sys"
221+ cset "name='Lineout Volume' 10"
222+ cset "name='Headset Volume' 2"
223+ cset "name='PGA1 Volume' 4"
224+ cset "name='O000 I000 Switch' on"
225+ cset "name='O001 I001 Switch' on"
226+ cset "name='O002 I004 Switch' on"
227+ cset "name='O003 I006 Switch' on"
228+ cset "name='O034 I168 Switch' on"
229+ cset "name='O035 I169 Switch' on"
230+ cset "name='O036 I012 Switch' on"
231+ cset "name='O037 I013 Switch' on"
232+ cset "name='O040 I002 Switch' on"
233+ cset "name='O041 I003 Switch' on"
234+ cset "name='O048 I022 Switch' on"
235+ cset "name='O049 I023 Switch' on"
236+ cset "name='O050 I024 Switch' on"
237+ cset "name='O051 I025 Switch' on"
238+ cset "name='O052 I026 Switch' on"
239+ cset "name='O053 I027 Switch' on"
240+ cset "name='O054 I028 Switch' on"
241+ cset "name='O055 I029 Switch' on"
242+ cset "name='O176 I070 Switch' on"
243+ cset "name='O177 I071 Switch' on"
244+]
245\ No newline at end of file
246diff --git a/ucm2/conf.d/mt8370-evk/mt8370-evk.conf b/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
247new file mode 100644
248index 0000000..6edb08f
249--- /dev/null
250+++ b/ucm2/conf.d/mt8370-evk/mt8370-evk.conf
251@@ -0,0 +1 @@
252+../../MediaTek/mt8370-evk/mt8370-evk.conf
253--
diff --git a/debian/patches/0004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch b/debian/patches/0004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch
0new file mode 100644254new file mode 100644
index 0000000..1a1344b
--- /dev/null
+++ b/debian/patches/0004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch
@@ -0,0 +1,44 @@
1From: Jaroslav Kysela <perex@perex.cz>
2Date: Mon, 11 Mar 2024 13:09:08 +0100
3Subject: sof-soundwire: rt1316/rt1318 - fix channel selection for one amp
4
5Like in commit 9e29f9e27f4e27dce40d8d6803031bb4f7be3c48, use L-R
6channel selection when single amp is present.
7
8Signed-off-by: Jaroslav Kysela <perex@perex.cz>
9Origin: upstream, https://github.com/alsa-project/alsa-ucm-conf/commits/73981e94bb69da1be5b1e4a69ff99df28bcfb320
10Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069760
11Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
12---
13 ucm2/sof-soundwire/rt1316.conf | 5 +++--
14 ucm2/sof-soundwire/rt1318.conf | 5 +++--
15 2 files changed, 6 insertions(+), 4 deletions(-)
16
17--- a/ucm2/sof-soundwire/rt1316.conf
18+++ b/ucm2/sof-soundwire/rt1316.conf
19@@ -47,8 +47,9 @@
20 SectionDevice."Speaker" {
21 Comment "Speaker"
22
23- Macro.num1.rt1316spk { ForAmps "[12]" Amp 1 Sel "L,L" }
24- Macro.num2.rt1316spk { ForAmps "2" Amp 2 Sel "R,R" }
25+ Macro.num1.rt1316spk { ForAmps "1" Amp 1 Sel "L,R" }
26+ Macro.num2.rt1316spk { ForAmps "2" Amp 1 Sel "L,L" }
27+ Macro.num3.rt1316spk { ForAmps "2" Amp 2 Sel "R,R" }
28
29 EnableSequence [
30 cset "name='Speaker Switch' on"
31--- a/ucm2/sof-soundwire/rt1318.conf
32+++ b/ucm2/sof-soundwire/rt1318.conf
33@@ -26,8 +26,9 @@
34 SectionDevice."Speaker" {
35 Comment "Speaker"
36
37- Macro.num1.rt1318spk { ForAmps "[12]" Amp 1 Sel "L,L" }
38- Macro.num2.rt1318spk { ForAmps "2" Amp 2 Sel "R,R" }
39+ Macro.num1.rt1318spk { ForAmps "1" Amp 1 Sel "L,R" }
40+ Macro.num2.rt1318spk { ForAmps "2" Amp 1 Sel "L,L" }
41+ Macro.num3.rt1318spk { ForAmps "2" Amp 2 Sel "R,R" }
42
43 EnableSequence [
44 cset "name='Speaker Switch' on"
diff --git a/debian/patches/series b/debian/patches/series
index 0583a96..0c93914 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,22 @@
10001-ucm2-add-PinePhone-configuration.patch10001-ucm2-add-PinePhone-configuration.patch
20002-ucm2-add-PineTab-configuration.patch20002-ucm2-add-PineTab-configuration.patch
30003-ucm2-add-improved-Librem-5-profiles.patch30003-ucm2-add-improved-Librem-5-profiles.patch
40001-ucm2-soundwire-add-rt713-SDCA-device.patch
50001-ucm2-MediaTek-mt8390-evk-Add-alsa-ucm-support.patch
60002-ucm2-MediaTek-mt8395-evk-Add-alsa-ucm-support.patch
70003-ucm2-MediaTek-mt8370-evk-Add-alsa-ucm-support.patch
80001-ucm2-conf.d-mt8370-evk-Fix-the-type-of-mt8370-evk.co.patch
90001-ucm-MediaTek-mt8395-evk-Add-HDMIRX-config.patch
100001-sof-soundwire-Use-one-file-for-speaker-codec-initial.patch
110002-sof-soundwire-Add-basic-support-for-basic-cs35l56-co.patch
120003-sof-soundwire-Add-basic-support-for-cs42l43.patch
130001-sof-soundwire-fix-rt1318-config-typo-in-rt1318spk-ma.patch
140002-sof-soundwire-fix-rt1318-config-copy-n-paste-error-i.patch
150003-sof-soundwire-rt1308-Fix-single-amp-configuration.patch
160004-sof-soundwire-rt1316-rt1318-fix-channel-selection-fo.patch
170001-sof-soundwire-Add-missing-match-for-cs42l43-speakers.patch
180002-sof-soundwire-Add-support-for-cs42l43-cs35l56-bridge.patch
190001-sof-soundwire-Change-map-control-names-to-make-them-.patch
200002-sof-soundwire-Add-sequence-for-controlling-Mic-Mute-.patch
210001-acppdmmach-add-support-for-ACP-7.0.patch
220001-sof-soundwire-Add-basic-support-for-cs42l43-s-speake.patch

Subscribers

People subscribed via source and target branches