Skip to contentSkip to conversation

ucm2: da7213: Add ADC switch in HeadphoneMic2 sequences

PATCH In review Le Qi 2 participants 2 messages Mar 27 – Mar 30

lore
Share & tools
lore

Le Qi

author
#0 lore raw

PATCH 1/1 ucm2: da7213: Add ADC switch in HeadphoneMic2 sequences

Enable and disable the ADC switch in HeadphoneMic2EnableSeq.conf and HeadphoneMic2DisableSeq.conf to ensure headset microphone audio works properly on Talos EVK with DA7213 codec.

Without this change, the headset mic path remains muted and capture does not function.

---
 ...ADC-switch-in-HeadphoneMic2-sequence.patch | 47 +++++++++++++++++++
 .../alsa/alsa-ucm-conf_1.2.15.3.bb            |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-da7213-Add-ADC-switch-in-HeadphoneMic2-sequence.patch
meta/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-da7213-Add-ADC-switch-in-HeadphoneMic2-sequence.patch new file +47 -0
new file mode 100644
index 000000000000..4ff933cc0c07
@@ -0,0 +1,47 @@
+From 8a9581426459e1b423ef87d5ae0fe0a9e21eeaad Mon Sep 17 00:00:00 2001
+From: Le Qi <[email protected]>
+Date: Wed, 7 Jan 2026 11:20:54 +0800
+Subject: [PATCH] ucm2: da7213: Add ADC switch in HeadphoneMic2 sequences
+
+Enable and disable the ADC switch in HeadphoneMic2EnableSeq.conf and
+HeadphoneMic2DisableSeq.conf to ensure headset microphone audio works
+properly on Talos EVK with DA7213 codec.
+
+Without this change, the headset mic path remains muted and capture
+does not function.
+
+Signed-off-by: Le Qi <[email protected]>
+Signed-off-by: Jaroslav Kysela <[email protected]>
+Upstream-Status: Backport [https://github.com/alsa-project/alsa-ucm-conf/commit/8a9581426459e1b423ef87d5ae0fe0a9e21eeaad]
+---
+ ucm2/codecs/da7213/HeadphoneMic2DisableSeq.conf | 1 +
+ ucm2/codecs/da7213/HeadphoneMic2EnableSeq.conf  | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/ucm2/codecs/da7213/HeadphoneMic2DisableSeq.conf b/ucm2/codecs/da7213/HeadphoneMic2DisableSeq.conf
+index a42f5f12be93..a9693af90acc 100644
+--- a/ucm2/codecs/da7213/HeadphoneMic2DisableSeq.conf
++++ b/ucm2/codecs/da7213/HeadphoneMic2DisableSeq.conf
+@@ -3,6 +3,7 @@ DisableSequence [
+ 	cset "name='Mixin Left Mic 2 Switch' off"
+ 	cset "name='Mixin Right Mic 2 Switch' off"
+ 	cset "name='Mixin PGA Switch' off"
++	cset "name='ADC Switch' off"
+ 	cset "name='Headphone Switch' off"
+ 	cset "name='Mixout Left DAC Left Switch' off"
+ 	cset "name='Mixout Right DAC Right Switch' off"
+diff --git a/ucm2/codecs/da7213/HeadphoneMic2EnableSeq.conf b/ucm2/codecs/da7213/HeadphoneMic2EnableSeq.conf
+index d3a69e0a550c..42bd9e2ba1fd 100644
+--- a/ucm2/codecs/da7213/HeadphoneMic2EnableSeq.conf
++++ b/ucm2/codecs/da7213/HeadphoneMic2EnableSeq.conf
+@@ -5,6 +5,7 @@ EnableSequence [
+ 	cset "name='Mixin Left Mic 2 Switch' on"
+ 	cset "name='Mixin Right Mic 2 Switch' on"
+ 	cset "name='Mixin PGA Switch' on"
++	cset "name='ADC Switch' on"
+ 	cset "name='DAI Left Source MUX' ADC Left"
+ 	cset "name='DAI Right Source MUX' ADC Right"
+ 	cset "name='Headphone Volume' 85"
+-- 
+2.34.1
+
meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.15.3.bb +1 -0
index a2f7bb3c893b..dbb22b6708dd 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4"
 
 SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2"
 SRC_URI += "file://0001-Qualcomm-qcs615-Remove-JackControl-from-TALOS-EVK-Hi.patch"
+SRC_URI += "file://0001-ucm2-da7213-Add-ADC-switch-in-HeadphoneMic2-sequence.patch"
 SRC_URI += "file://0001-ucm2-Qualcomm-sa8775p-Remove-Fixed-channel-setting-f.patch"
 SRC_URI += "file://0002-ucm2-Qualcomm-qcs8300-Remove-Fixed-channel-setting-f.patch"
 SRC_URI[sha256sum] = "9f79e813c08fc86cfa46dd75c4fcda1a4a51b482db2607e1fcfaafb92f588a31"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 11 lines · On Fri Mar 27, 2026 at 9:47 AM CET, Le Qi via lists.openembedded.org wrote:

Enable and disable the ADC switch in HeadphoneMic2EnableSeq.conf and HeadphoneMic2DisableSeq.conf to ensure headset microphone audio works properly on Talos EVK with DA7213 codec.

Without this change, the headset mic path remains muted and capture does not function.

---

Hi,

I note this will break meta-qcom, but I suspect you are already aware of this as you added the patch there.

ERROR: alsa-ucm-conf-1.2.15.3-r0 do_patch: Applying patch '/srv/pokybuild/yocto-worker/meta-qcom/build/meta-qcom/recipes-multimedia/alsa/alsa-ucm-conf/0001-ucm2-da7213-Add-ADC-switch-in-HeadphoneMic2-sequence.patch' on target directory '/srv/pokybuild/yocto-worker/meta-qcom/build/build/tmp/work/all-poky-linux/alsa-ucm-conf/1.2.15.3/sources/alsa-ucm-conf-1.2.15.3'
https://autobuilder.yoctoproject.org/valkyrie/#/builders/113/builds/489

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com