-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alsa-ucm-conf: add patches to lookup config using kernel driver name
To support 'sound driver built in' configs we'd need to lookup the UseCase using the kernel driver name rather than module name. Extend search paths accordingly. Signed-off-by: Dmitry Baryshkov <[email protected]> (cherry picked from commit 2adcb49) [DB: moved to dynamic-layers] Signed-off-by: Dmitry Baryshkov <[email protected]>
- Loading branch information
Showing
6 changed files
with
136 additions
and
71 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
...ipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 2957017f9ca01b0e1e127c04ba47e0147bff7e47 Mon Sep 17 00:00:00 2001 | ||
From: Dmitry Baryshkov <[email protected]> | ||
Date: Fri, 5 Feb 2021 20:45:40 +0300 | ||
Subject: [PATCH] ucm2/conf.d: add symlinks for Qualcomm cards | ||
|
||
Add ucm2/conf.d symlinks for all defined Qualcomm sound cards. | ||
|
||
Signed-off-by: Dmitry Baryshkov <[email protected]> | ||
--- | ||
ucm2/conf.d/msm-snd-apq8096/msm-snd-apq8096.conf | 1 + | ||
ucm2/conf.d/DB410c/DB410c.conf | 1 + | ||
ucm2/conf.d/sdm845/sdm845.conf | 1 + | ||
ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 1 + | ||
4 files changed, 4 insertions(+) | ||
create mode 120000 ucm2/conf.d/msm-snd-apq8096/msm-snd-apq8096.conf | ||
create mode 120000 ucm2/conf.d/DB410c/DB410c.conf | ||
create mode 120000 ucm2/conf.d/sdm845/sdm845.conf | ||
create mode 120000 ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | ||
|
||
diff --git a/ucm2/conf.d/msm-snd-apq8096/msm-snd-apq8096.conf b/ucm2/conf.d/msm-snd-apq8096/msm-snd-apq8096.conf | ||
new file mode 120000 | ||
index 000000000000..b8ceeabaa70d | ||
--- /dev/null | ||
+++ b/ucm2/conf.d/msm-snd-apq8096/msm-snd-apq8096.conf | ||
@@ -0,0 +1 @@ | ||
+../../Qualcomm/apq8096/apq8096.conf | ||
\ No newline at end of file | ||
diff --git a/ucm2/conf.d/DB410c/DB410c.conf b/ucm2/conf.d/DB410c/DB410c.conf | ||
new file mode 120000 | ||
index 000000000000..551122e14c16 | ||
--- /dev/null | ||
+++ b/ucm2/conf.d/DB410c/DB410c.conf | ||
@@ -0,0 +1 @@ | ||
+../../Qualcomm/apq8016-sbc/apq8016-sbc.conf | ||
\ No newline at end of file | ||
diff --git a/ucm2/conf.d/sdm845/sdm845.conf b/ucm2/conf.d/sdm845/sdm845.conf | ||
new file mode 120000 | ||
index 000000000000..fad79da8dd8e | ||
--- /dev/null | ||
+++ b/ucm2/conf.d/sdm845/sdm845.conf | ||
@@ -0,0 +1 @@ | ||
+../../Qualcomm/sdm845/sdm845.conf | ||
\ No newline at end of file | ||
diff --git a/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf b/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | ||
new file mode 120000 | ||
index 000000000000..9f551b74ebf2 | ||
--- /dev/null | ||
+++ b/ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | ||
@@ -0,0 +1 @@ | ||
+../../Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | ||
\ No newline at end of file | ||
-- | ||
2.30.0 | ||
|
28 changes: 0 additions & 28 deletions
28
...imedia/alsa/alsa-ucm-conf/0003-ucm.conf-support-KernelModule-CardLongName.conf-path.patch
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...ultimedia/alsa/alsa-ucm-conf/0004-module-add-new-symlink-for-Qualcomm-sdm845-driver.patch
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
...r/recipes-multimedia/alsa/alsa-ucm-conf/0007-ucm2-module-add-snd_soc_sm8250-symlink.patch
This file was deleted.
Oops, something went wrong.
80 changes: 80 additions & 0 deletions
80
...ayer/recipes-multimedia/alsa/alsa-ucm-conf/7f982eb1aaf0f91f3a14689f0a0bf48e4de629bb.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
From 7f982eb1aaf0f91f3a14689f0a0bf48e4de629bb Mon Sep 17 00:00:00 2001 | ||
From: Jaroslav Kysela <[email protected]> | ||
Date: Wed, 3 Feb 2021 17:13:01 +0100 | ||
Subject: [PATCH] ucm2: Separate the configuration lookups (hw based) from the | ||
configuration tree | ||
|
||
Introduce ucm2/conf.d/ tree with symlinks to the real hardware configurations. | ||
In this way, we do not rely to create the configuration paths based on | ||
simple driver / device identification, but we can store the configurations | ||
more logically to make the maintenance (code reuse, multiple changes) | ||
more easy. | ||
|
||
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/70 | ||
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/76 | ||
BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/78 | ||
Signed-off-by: Jaroslav Kysela <[email protected]> | ||
--- | ||
ucm2/ucm.conf | 40 +++++++++++++++++++++++++++++++++++----- | ||
1 file changed, 35 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/ucm2/ucm.conf b/ucm2/ucm.conf | ||
index 9e78df1..6d9b624 100644 | ||
--- a/ucm2/ucm.conf | ||
+++ b/ucm2/ucm.conf | ||
@@ -14,8 +14,9 @@ | ||
Syntax 3 | ||
|
||
Define.V1 "" # non-empty string to enable ucm v1 paths | ||
-Define.V2Module yes # empty string to disable | ||
-Define.V2Name yes # empty string to disable | ||
+Define.V2ConfD yes # empty string to disable | ||
+Define.V2Module "" # non-empty string to enable module name lookups (obsolete) | ||
+Define.V2Name "" # non-empty string to enable driver & card name lookups (obsolete) | ||
|
||
If.driver { | ||
Condition { | ||
@@ -40,11 +41,40 @@ If.driver { | ||
# | ||
# The probed path when hw-card is found: | ||
# | ||
- # ucm2/${KernelModule}/${KernelModule}.conf | ||
- # ucm2/${CardDriver}/${CardLongName}.conf | ||
- # ucm2/${CardDriver}/${CardDriver}.conf | ||
+ # ucm2/conf.d/[${CardDriver}|${KernelDriver}]/${CardLongName}.conf | ||
+ # ucm2/conf.d/[${CardDriver}|${KernelDriver}]/[${CardDriver}|${KernelDriver}].conf | ||
+ # ucm2/${KernelModule}/${KernelModule}.conf (obsolete) | ||
+ # ucm2/${CardDriver}/${CardLongName}.conf (obsolete) | ||
+ # ucm2/${CardDriver}/${CardDriver}.conf (obsolete) | ||
# | ||
|
||
+ If.V2ConfD { | ||
+ Condition { | ||
+ Type String | ||
+ Empty "${var:V2ConfD}" | ||
+ } | ||
+ False { | ||
+ Define.Driver "${CardDriver}" | ||
+ If.nodrv { | ||
+ Condition { | ||
+ Type String | ||
+ Empty "${var:Driver}" | ||
+ } | ||
+ True.Define { | ||
+ KernelDriverPath "class/sound/card${CardNumber}/device/driver" | ||
+ Driver "${sys:$KernelDriverPath}" | ||
+ } | ||
+ } | ||
+ UseCasePath.driver1 { | ||
+ Directory "conf.d/${var:Driver}" | ||
+ File "${CardLongName}.conf" | ||
+ } | ||
+ UseCasePath.driver { | ||
+ Directory "conf.d/${var:Driver}" | ||
+ File "${var:Driver}.conf" | ||
+ } | ||
+ } | ||
+ } | ||
If.V2Module { | ||
Condition { | ||
Type String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters