diff mbox series

[alsa-ucm-conf,v3,2/2] sof-soundwire: Add sequence for controlling Mic Mute LED

Message ID 20241011105710.1998823-2-mstrozek@opensource.cirrus.com
State Superseded
Headers show
Series None | expand

Commit Message

Maciej Strozek Oct. 11, 2024, 10:57 a.m. UTC
Also ensure the unused microphone is disabled so that currently used mic
can fully control the LED.

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
v3: Add Headset Microphone, ensure unused mic is disabled
v2: no changes
---
 ucm2/codecs/cs42l43/init.conf        | 7 +++++++
 ucm2/sof-soundwire/cs42l43-dmic.conf | 2 ++
 ucm2/sof-soundwire/cs42l43.conf      | 1 +
 3 files changed, 10 insertions(+)

--
2.39.5
diff mbox series

Patch

diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf
index b2796e2..c2f52ad 100644
--- a/ucm2/codecs/cs42l43/init.conf
+++ b/ucm2/codecs/cs42l43/init.conf
@@ -18,3 +18,10 @@  LibraryConfig.remap.Config {
 		}
 	}
 }
+
+FixedBootSequence [
+        exec "-/sbin/modprobe snd_ctl_led"
+        sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 1 Switch"
+        sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 3 Switch"
+        sysw "-/class/sound/ctl-led/mic/card${CardNumber}/attach:cs42l43 Decimator 4 Switch"
+]
diff --git a/ucm2/sof-soundwire/cs42l43-dmic.conf b/ucm2/sof-soundwire/cs42l43-dmic.conf
index b68a70d..70ce40f 100644
--- a/ucm2/sof-soundwire/cs42l43-dmic.conf
+++ b/ucm2/sof-soundwire/cs42l43-dmic.conf
@@ -13,6 +13,8 @@  SectionDevice."Mic" {
 	]

 	DisableSequence [
+		cset "name='cs42l43 Decimator 3 Switch' 0"
+		cset "name='cs42l43 Decimator 4 Switch' 0"
 		cset "name='cs42l43 DP1TX1 Input' 'None'"
 		cset "name='cs42l43 DP1TX2 Input' 'None'"
 	]
diff --git a/ucm2/sof-soundwire/cs42l43.conf b/ucm2/sof-soundwire/cs42l43.conf
index 7e74fb8..af3fd03 100644
--- a/ucm2/sof-soundwire/cs42l43.conf
+++ b/ucm2/sof-soundwire/cs42l43.conf
@@ -33,6 +33,7 @@  SectionDevice."Headset" {
 	]

 	DisableSequence [
+		cset "name='cs42l43 Decimator 1 Switch' 0"
 		cset "name='cs42l43 DP1TX1 Input' 'None'"
 		cset "name='cs42l43 DP1TX2 Input' 'None'"
 	]