Skip to content

Commit

Permalink
alsa-ucm-conf: add patches for RB5 board
Browse files Browse the repository at this point in the history
Add several patches enabling ALSA UCM on Qualcomm RB5 board.

Signed-off-by: Dmitry Baryshkov <[email protected]>
(cherry picked from commit 0262ae0)
(cherry picked from commit 333a865)
[DB: move to dynamic-layers/backports-layer, updated to use conf.d]
Signed-off-by: Dmitry Baryshkov <[email protected]>
  • Loading branch information
lumag committed Feb 16, 2021
1 parent dd818ef commit 1041808
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From 5384a0ec52d2d8fd0bbcdab222b47d0887a058e4 Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <[email protected]>
Date: Fri, 20 Nov 2020 12:12:48 +0000
Subject: [PATCH 1/2] ucm2: codecs: lpass: add codec sequences for wsa and va
macro

Add enable/disable codec sequence for Qualcomm Low Power Audio
Subsystem (LPASS) Codec WSA and VA Macros.

Signed-off-by: Srinivas Kandagatla <[email protected]>
---
ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf | 3 +++
ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf | 3 +++
ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf | 8 ++++++++
ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf | 8 ++++++++
4 files changed, 22 insertions(+)
create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
create mode 100644 ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
create mode 100644 ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf

diff --git a/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
new file mode 100644
index 0000000..ec3f45a
--- /dev/null
+++ b/ucm2/codecs/lpass/va-macro/DMIC0DisableSeq.conf
@@ -0,0 +1,5 @@
+DisableSequence [
+ cset "name='VA DMIC MUX0' ZERO"
+ cset "name='VA_DEC0 Volume' 0"
+ cset "name='VA_AIF1_CAP Mixer DEC0' 0"
+]
diff --git a/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
new file mode 100644
index 0000000..bd6e8f5
--- /dev/null
+++ b/ucm2/codecs/lpass/va-macro/DMIC0EnableSeq.conf
@@ -0,0 +1,5 @@
+EnableSequence [
+ cset "name='VA DMIC MUX0' DMIC0"
+ cset "name='VA_AIF1_CAP Mixer DEC0' 1"
+ cset "name='VA_DEC0 Volume' 100"
+]
diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
new file mode 100644
index 0000000..1f27d4c
--- /dev/null
+++ b/ucm2/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf
@@ -0,0 +1,10 @@
+DisableSequence [
+ cset "name='WSA_RX0 Digital Volume' 0"
+ cset "name='WSA_RX1 Digital Volume' 0"
+ cset "name='WSA_COMP1 Switch' 0"
+ cset "name='WSA_COMP2 Switch' 0"
+ cset "name='WSA_RX0 INP0' ZERO"
+ cset "name='WSA_RX1 INP0' ZERO"
+ cset "name='WSA RX0 MUX' ZERO"
+ cset "name='WSA RX1 MUX' ZERO"
+]
diff --git a/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
new file mode 100644
index 0000000..618bab4
--- /dev/null
+++ b/ucm2/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf
@@ -0,0 +1,10 @@
+EnableSequence [
+ cset "name='WSA RX0 MUX' AIF1_PB"
+ cset "name='WSA RX1 MUX' AIF1_PB"
+ cset "name='WSA_RX0 INP0' RX0"
+ cset "name='WSA_RX1 INP0' RX1"
+ cset "name='WSA_COMP1 Switch' 1"
+ cset "name='WSA_COMP2 Switch' 1"
+ cset "name='WSA_RX0 Digital Volume' 68"
+ cset "name='WSA_RX1 Digital Volume' 68"
+]
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
From 382366c1f615613e088982a6c30fc90b3226ae8b Mon Sep 17 00:00:00 2001
From: Srinivas Kandagatla <[email protected]>
Date: Fri, 20 Nov 2020 12:14:31 +0000
Subject: [PATCH 2/2] ucm2: add support to for Qualcomm RB5 Platform

The Qualcomm RB5 Robotics Platform contains HDMI,
2x WSA Smart-Speakers audio outputs along with One
Onboard DMIC audio input.

Signed-off-by: Srinivas Kandagatla <[email protected]>
---
ucm2/Qualcomm/sm8250/HDMI.conf | 26 ++++++++++++
ucm2/Qualcomm/sm8250/HiFi.conf | 46 ++++++++++++++++++++++
.../Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 11 ++++++
ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf | 1 +
4 files changed, 84 insertions(+)
create mode 100644 ucm2/Qualcomm/sm8250/HDMI.conf
create mode 100644 ucm2/Qualcomm/sm8250/HiFi.conf
create mode 100644 ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
create mode 120000 ucm2/conf.d/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf

diff --git a/ucm2/Qualcomm/sm8250/HDMI.conf b/ucm2/Qualcomm/sm8250/HDMI.conf
new file mode 100644
index 0000000..a9594fd
--- /dev/null
+++ b/ucm2/Qualcomm/sm8250/HDMI.conf
@@ -0,0 +1,26 @@
+# Use case configuration for RB5 board.
+# Author: Srinivas Kandagatla <[email protected]>
+
+SectionVerb {
+ EnableSequence [
+ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 1"
+ ]
+
+ DisableSequence [
+ cset "name='TERT_MI2S_RX Audio Mixer MultiMedia1' 0"
+ ]
+
+ Value {
+ TQ "HiFi"
+ }
+}
+
+SectionDevice."HDMI" {
+ #Name "HDMI"
+ Comment "HDMI Digital Stereo Output"
+
+ Value {
+ PlaybackPCM "hw:${CardId}"
+ PlaybackPriority 200
+ }
+}
diff --git a/ucm2/Qualcomm/sm8250/HiFi.conf b/ucm2/Qualcomm/sm8250/HiFi.conf
new file mode 100644
index 0000000..a310402
--- /dev/null
+++ b/ucm2/Qualcomm/sm8250/HiFi.conf
@@ -0,0 +1,46 @@
+# Use case configuration for Qualcomm RB5.
+# Author: Srinivas Kandagatla <[email protected]>
+
+SectionVerb {
+
+ EnableSequence [
+ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
+ cset "name='MultiMedia3 Mixer VA_CODEC_DMA_TX_0' 1"
+ ]
+
+ Include.wsae.File "/codecs/wsa881x/DefaultEnableSeq.conf"
+
+ DisableSequence [
+ cset "name='WSA_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
+ cset "name='MultiMedia3 Mixer VA_CODEC_DMA_TX_0' 0"
+ ]
+
+ Value {
+ TQ "HiFi"
+ }
+}
+
+SectionDevice."Speaker" {
+ Comment "Speaker playback"
+
+ Include.lpasswsae.File "/codecs/lpass/wsa-macro/SpeakerEnableSeq.conf"
+ Include.wsae.File "/codecs/wsa881x/SpeakerEnableSeq.conf"
+ Include.wsad.File "/codecs/wsa881x/SpeakerDisableSeq.conf"
+ Include.lpasswsad.File "/codecs/lpass/wsa-macro/SpeakerDisableSeq.conf"
+
+ Value {
+ PlaybackPriority 100
+ PlaybackPCM "hw:${CardId},1"
+ }
+}
+
+SectionDevice."Mic" {
+ Comment "Mic"
+ Include.lpassvad.File "/codecs/lpass/va-macro/DMIC0EnableSeq.conf"
+ Include.lpassvad.File "/codecs/lpass/va-macro/DMIC0DisableSeq.conf"
+
+ Value {
+ CapturePriority 100
+ CapturePCM "hw:${CardId},2"
+ }
+}
diff --git a/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf b/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
new file mode 100644
index 0000000..2fbca31
--- /dev/null
+++ b/ucm2/Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf
@@ -0,0 +1,11 @@
+Syntax 3
+
+SectionUseCase."HiFi" {
+ File "/Qualcomm/sm8250/HiFi.conf"
+ Comment "HiFi quality Music."
+}
+
+SectionUseCase."HDMI" {
+ File "/Qualcomm/sm8250/HDMI.conf"
+ Comment "HDMI output."
+}
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,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 \
file://0001-ucm2-codecs-lpass-add-codec-sequences-for-wsa-and-va.patch \
file://0002-ucm2-add-support-to-for-Qualcomm-RB5-Platform.patch \
"

0 comments on commit 1041808

Please sign in to comment.