aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch86
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch44
-rw-r--r--dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend6
3 files changed, 136 insertions, 0 deletions
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch
new file mode 100644
index 0000000..b16a241
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch
@@ -0,0 +1,86 @@
+From 4cfceb1e257a91cf5c1d29f28d1305607bbf58eb Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+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.
+
+This commit keeps the older lookup paths active, but they will be
+turned off in the next release.
+
+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 <perex@perex.cz>
+---
+ ucm2/ucm.conf | 40 +++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 35 insertions(+), 5 deletions(-)
+
+diff --git a/ucm2/ucm.conf b/ucm2/ucm.conf
+index 9e78df118f83..8577c300e46b 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 yes # non-empty string to enable module name lookups (obsolete)
++Define.V2Name yes # 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.confd1 {
++ Directory "conf.d/${var:Driver}"
++ File "${CardLongName}.conf"
++ }
++ UseCasePath.confd2 {
++ Directory "conf.d/${var:Driver}"
++ File "${var:Driver}.conf"
++ }
++ }
++ }
+ If.V2Module {
+ Condition {
+ Type String
+--
+2.30.0
+
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch
new file mode 100644
index 0000000..d2083b0
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch
@@ -0,0 +1,44 @@
+From 2957017f9ca01b0e1e127c04ba47e0147bff7e47 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+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 <dmitry.baryshkov@linaro.org>
+---
+ ucm2/conf.d/DB820c/DB820c.conf | 1 +
+ ucm2/conf.d/DB410c/DB410c.conf | 1 +
+ ucm2/conf.d/sdm845/DB845c.conf | 1 +
+ 3 files changed, 3 insertions(+)
+ create mode 120000 ucm2/conf.d/DB820c/DB820c.conf
+ create mode 120000 ucm2/conf.d/DB410c/DB410c.conf
+ create mode 120000 ucm2/conf.d/sdm845/DB845c.conf
+
+diff --git a/ucm2/conf.d/DB820c/DB820c.conf b/ucm2/conf.d/DB820c/DB820c.conf
+new file mode 120000
+index 000000000000..b8ceeabaa70d
+--- /dev/null
++++ b/ucm2/conf.d/DB820c/DB820c.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/DB845c.conf b/ucm2/conf.d/sdm845/DB845c.conf
+new file mode 120000
+index 000000000000..fad79da8dd8e
+--- /dev/null
++++ b/ucm2/conf.d/sdm845/DB845c.conf
+@@ -0,0 +1 @@
++../../Qualcomm/sdm845/sdm845.conf
+\ No newline at end of file
+--
+2.30.0
+
diff --git a/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend
new file mode 100644
index 0000000..09c321a
--- /dev/null
+++ b/dynamic-layers/backports-layer/recipes-multimedia/alsa/alsa-ucm-conf_1.2.4.bbappend
@@ -0,0 +1,6 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI_append_qcom = "\
+ file://0001-ucm2-Separate-the-configuration-lookups-hw-based-fro.patch \
+ file://0001-ucm2-conf.d-add-symlinks-for-Qualcomm-cards.patch \
+"