[PATCH alsa-ucm-conf 1/2] sof-soundwire: cs42l43: Drop headset mic from mic mute LED

As per conversation in [1], let headsets be dropped from LED bindings. Also remove turning off the mics on device disable since they are now not needed.
[1]: https://github.com/alsa-project/alsa-ucm-conf/pull/512
Signed-off-by: Maciej Strozek mstrozek@opensource.cirrus.com --- ucm2/codecs/cs42l43/init.conf | 6 ------ ucm2/sof-soundwire/cs42l43-dmic.conf | 2 -- ucm2/sof-soundwire/cs42l43.conf | 1 - 3 files changed, 9 deletions(-)
diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf index 0e987c21..c0fa863c 100644 --- a/ucm2/codecs/cs42l43/init.conf +++ b/ucm2/codecs/cs42l43/init.conf @@ -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" } }] diff --git a/ucm2/sof-soundwire/cs42l43-dmic.conf b/ucm2/sof-soundwire/cs42l43-dmic.conf index 70ce40ff..b68a70d1 100644 --- a/ucm2/sof-soundwire/cs42l43-dmic.conf +++ b/ucm2/sof-soundwire/cs42l43-dmic.conf @@ -13,8 +13,6 @@ 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 4b4e1187..51832126 100644 --- a/ucm2/sof-soundwire/cs42l43.conf +++ b/ucm2/sof-soundwire/cs42l43.conf @@ -33,7 +33,6 @@ SectionDevice."Headset" { ]
DisableSequence [ - cset "name='cs42l43 Decimator 1 Switch' 0" cset "name='cs42l43 DP2TX1 Input' 'None'" cset "name='cs42l43 DP2TX2 Input' 'None'" ] -- 2.39.5

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.
Signed-off-by: Maciej Strozek mstrozek@opensource.cirrus.com --- ucm2/sof-soundwire/cs42l43-spk.conf | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/ucm2/sof-soundwire/cs42l43-spk.conf b/ucm2/sof-soundwire/cs42l43-spk.conf index 693c450b..b2b32e57 100644 --- a/ucm2/sof-soundwire/cs42l43-spk.conf +++ b/ucm2/sof-soundwire/cs42l43-spk.conf @@ -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

On 28. 03. 25 9:36, Maciej Strozek wrote:
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.
It's something which I dislike (software volume control). If there's a hardware limit, it should be added to the driver. Eventually, alsa-lib plugins may be extended to do this cropping using a configuration. Also, it may be a bug in pulseaudio/pipewire. The +0dB volumes should be handed with a care.
Jaroslav

W dniu pią, 28.03.2025 o godzinie 11∶41 +0100, użytkownik Jaroslav Kysela napisał:
On 28. 03. 25 9:36, Maciej Strozek wrote:
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.
It's something which I dislike (software volume control). If there's a hardware limit, it should be added to the driver. Eventually, alsa- lib plugins may be extended to do this cropping using a configuration. Also, it may be a bug in pulseaudio/pipewire. The +0dB volumes should be handed with a care.
I agree this is not very elegant to leave it to soft volume, but until things are resolved elsewhere this is the best way to get best audio for most users?
Jaroslav

On 28. 03. 25 11:58, Maciej Strozek wrote:
W dniu pią, 28.03.2025 o godzinie 11∶41 +0100, użytkownik Jaroslav Kysela napisał:
On 28. 03. 25 9:36, Maciej Strozek wrote:
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.
It's something which I dislike (software volume control). If there's a hardware limit, it should be added to the driver. Eventually, alsa- lib plugins may be extended to do this cropping using a configuration. Also, it may be a bug in pulseaudio/pipewire. The +0dB volumes should be handed with a care.
I agree this is not very elegant to leave it to soft volume, but until things are resolved elsewhere this is the best way to get best audio for most users?
I don't see the pipewire upstream report. Please, make an report against pipewire to move discussion there and add the Link: tag to the comment.
If you like to disable something just because the UCM application does not support a feature or misbehaves right now, use a new application variable like @SplitPCM - see [1]. A nice name may be '@OutMix>0dB' or so.
Jaroslav
[1] https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/common/pcm/sp...

W dniu pon, 31.03.2025 o godzinie 15∶43 +0200, użytkownik Jaroslav Kysela napisał:
I don't see the pipewire upstream report. Please, make an report against pipewire to move discussion there and add the Link: tag to the comment.
If you like to disable something just because the UCM application does not support a feature or misbehaves right now, use a new application variable like @SplitPCM - see [1]. A nice name may be '@OutMix>0dB' or so.
Jaroslav
Thanks! Will have a look at those variables and submit something to github soon. Also will include the pipewire issue link which is [1] for reference.
[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4622

On 28. 03. 25 9:36, Maciej Strozek wrote:
As per conversation in [1], let headsets be dropped from LED bindings. Also remove turning off the mics on device disable since they are now not needed.
Actually, it's preferred to turn off the unused paths. I would keep the sequences.
Jaroslav
participants (2)
-
Jaroslav Kysela
-
Maciej Strozek