diff mbox series

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

Message ID 20241017122027.1207373-2-mstrozek@opensource.cirrus.com (mailing list archive)
State New, archived
Headers show
Series [alsa-ucm-conf,v5,1/2] sof-soundwire: Change map control names to make them unique and user friendly | expand

Commit Message

Maciej Strozek Oct. 17, 2024, 12:20 p.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>
---
v5: no changes
v4: no changes
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

Comments

Jaroslav Kysela Oct. 18, 2024, 8:41 a.m. UTC | #1
On 17. 10. 24 14:20, Maciej Strozek wrote:
> 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>

Applied. Thanks.
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 ddca67a..dc11840 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'"
 	]