Skip to contentSkip to conversation

sof-soundwire: cs42l43: Drop headset mic from mic mute LED

PATCH New Maciej Strozek 1 participant 2 messages Mar 28, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 sof-soundwire: cs42l43: Drop headset mic from mic mute LED

As per conversation in [1], let headsets be dropped from LED bindings.

[1]: https://github.com/alsa-project/alsa-ucm-conf/pull/512

---
v2: Added DisableSequences back

---
 ucm2/codecs/cs42l43/init.conf | 6 ------
 1 file changed, 6 deletions(-)
ucm2/codecs/cs42l43/init.conf +0 -6
index 0e987c21..c0fa863c 100644
@@ -10,9 +10,3 @@ LibraryConfig.remap.Config {
 		}
 	}
 }
-
-BootSequence [
-	cset "name='cs42l43 Decimator 1 Switch' 0"
-]
-
-Macro [{ SetLED { LED="mic" Action="attach" CtlId="cs42l43 Decimator 1 Switch" } }]

--
2.39.5

#1 lore raw

PATCH v2 2/2 sof-soundwire: cs42l43: Control hardware volume to avoid clipping

Hardware volume control in cs42l43 can go up to +31.5dB which can cause audio degradation. For best results, keep the hardware volume set to 0dB and let software volume control the output.

---
v2: No changes

---
 ucm2/sof-soundwire/cs42l43-spk.conf | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
ucm2/sof-soundwire/cs42l43-spk.conf +12 -1
index 693c450b..b2b32e57 100644
@@ -1,5 +1,14 @@
 # Use case Configuration for sof-soundwire card
 
+LibraryConfig.remap.Config {
+	ctl.default.map {
+		"name='cs42l43 Speaker Playback Switch'" {
+			"name='cs42l43 Speaker Digital Switch'".vindex.0 0
+			"name='cs42l43 Speaker Digital Switch'".vindex.1 1
+		}
+	}
+}
+
 SectionDevice."Speaker" {
 	Comment "Speaker"
 
@@ -8,6 +17,7 @@ SectionDevice."Speaker" {
 	]
 
 	EnableSequence [
+		cset "name='cs42l43 Speaker Digital Volume' 128"
 		cset "name='cs42l43 Speaker L Input 1' 'DP6RX1'"
 		cset "name='cs42l43 Speaker R Input 1' 'DP6RX2'"
 	]
@@ -20,6 +30,7 @@ SectionDevice."Speaker" {
 	Value {
 		PlaybackPriority 100
 		PlaybackPCM "hw:${CardId},2"
-		PlaybackMixerElem "cs42l43 Speaker Digital"
+		PlaybackMixer "default:${CardId}"
+		PlaybackMixerElem "cs42l43 Speaker"
 	}
 }

--
2.39.5