All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique
@ 2024-09-30 13:41 Maciej Strozek
  2024-09-30 13:41 ` [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Maciej Strozek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maciej Strozek @ 2024-09-30 13:41 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, patches, Maciej Strozek

Both 'Speaker Digital' and 'cs42l43 PDM2' names were found as substrings in
other alsa controls, confusing the MixerElems paths. Make them unique to avoid
errors for hardware mutes. Also add 'Capture' string into microphone controls
to make them work properly.

Fixes: e87dde51d689 ("sof-soundwire: Add basic support for cs42l43")
Fixes: e4277a204cd6 ("sof-soundwire: Add support for cs42l43/cs35l56 bridge configuration")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
 ucm2/codecs/cs42l43/init.conf          | 4 ++--
 ucm2/sof-soundwire/cs35l56-bridge.conf | 6 +++---
 ucm2/sof-soundwire/cs42l43-dmic.conf   | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf
index 10a6e1f..cf61833 100644
--- a/ucm2/codecs/cs42l43/init.conf
+++ b/ucm2/codecs/cs42l43/init.conf
@@ -2,11 +2,11 @@

 LibraryConfig.remap.Config {
 	ctl.default.map {
-		"name='cs42l43 PDM2 Switch'" {
+		"name='cs42l43 Microphone Capture Switch'" {
 			"name='cs42l43 Decimator 3 Switch'".vindex.0 0
 			"name='cs42l43 Decimator 4 Switch'".vindex.1 0
 		}
-		"name='cs42l43 PDM2 Volume'" {
+		"name='cs42l43 Microphone Capture Volume'" {
 			"name='cs42l43 Decimator 3 Volume'".vindex.0 0
 			"name='cs42l43 Decimator 4 Volume'".vindex.1 0
 		}
diff --git a/ucm2/sof-soundwire/cs35l56-bridge.conf b/ucm2/sof-soundwire/cs35l56-bridge.conf
index 5435b11..7c36655 100644
--- a/ucm2/sof-soundwire/cs35l56-bridge.conf
+++ b/ucm2/sof-soundwire/cs35l56-bridge.conf
@@ -2,11 +2,11 @@

 LibraryConfig.remap.Config {
 	ctl.default.map {
-		"name='Speaker Digital Switch'" {
+		"name='Speaker Combined Switch'" {
 			"name='AMPL Speaker Switch'".vindex.0 0
 			"name='AMPR Speaker Switch'".vindex.1 0
 		}
-		"name='Speaker Digital Volume'" {
+		"name='Speaker Combined Volume'" {
 			"name='AMPL Speaker Volume'".vindex.0 0
 			"name='AMPR Speaker Volume'".vindex.1 0
 		}
@@ -56,6 +56,6 @@ SectionDevice."Speaker" {
 		PlaybackPriority 100
 		PlaybackPCM "hw:${CardId},0"
 		PlaybackMixer "default:${CardId}"
-		PlaybackMixerElem "Speaker Digital"
+		PlaybackMixerElem "Speaker Combined"
 	}
 }
diff --git a/ucm2/sof-soundwire/cs42l43-dmic.conf b/ucm2/sof-soundwire/cs42l43-dmic.conf
index d5f895d..b68a70d 100644
--- a/ucm2/sof-soundwire/cs42l43-dmic.conf
+++ b/ucm2/sof-soundwire/cs42l43-dmic.conf
@@ -21,6 +21,6 @@ SectionDevice."Mic" {
 		CapturePriority 100
 		CapturePCM "hw:${CardId},4"
 		CaptureMixer "default:${CardId}"
-		CaptureMixerElem "cs42l43 PDM2"
+		CaptureMixerElem "cs42l43 Microphone"
 	}
 }
--
2.39.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED
  2024-09-30 13:41 [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Maciej Strozek
@ 2024-09-30 13:41 ` Maciej Strozek
  2024-10-01 10:21   ` Charles Keepax
  2024-10-01 10:21 ` [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Charles Keepax
  2024-10-01 10:38 ` Jaroslav Kysela
  2 siblings, 1 reply; 6+ messages in thread
From: Maciej Strozek @ 2024-09-30 13:41 UTC (permalink / raw)
  To: perex; +Cc: alsa-devel, patches, Maciej Strozek

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
---
 ucm2/codecs/cs42l43/init.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf
index cf61833..fad41dd 100644
--- a/ucm2/codecs/cs42l43/init.conf
+++ b/ucm2/codecs/cs42l43/init.conf
@@ -12,3 +12,9 @@ LibraryConfig.remap.Config {
 		}
 	}
 }
+
+FixedBootSequence [
+        exec "-/sbin/modprobe snd_ctl_led"
+        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"
+]
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique
  2024-09-30 13:41 [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Maciej Strozek
  2024-09-30 13:41 ` [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Maciej Strozek
@ 2024-10-01 10:21 ` Charles Keepax
  2024-10-01 10:38 ` Jaroslav Kysela
  2 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2024-10-01 10:21 UTC (permalink / raw)
  To: Maciej Strozek; +Cc: perex, alsa-devel, patches

On Mon, Sep 30, 2024 at 02:41:17PM +0100, Maciej Strozek wrote:
> Both 'Speaker Digital' and 'cs42l43 PDM2' names were found as substrings in
> other alsa controls, confusing the MixerElems paths. Make them unique to avoid
> errors for hardware mutes. Also add 'Capture' string into microphone controls
> to make them work properly.
> 
> Fixes: e87dde51d689 ("sof-soundwire: Add basic support for cs42l43")
> Fixes: e4277a204cd6 ("sof-soundwire: Add support for cs42l43/cs35l56 bridge configuration")
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED
  2024-09-30 13:41 ` [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Maciej Strozek
@ 2024-10-01 10:21   ` Charles Keepax
  0 siblings, 0 replies; 6+ messages in thread
From: Charles Keepax @ 2024-10-01 10:21 UTC (permalink / raw)
  To: Maciej Strozek; +Cc: perex, alsa-devel, patches

On Mon, Sep 30, 2024 at 02:41:18PM +0100, Maciej Strozek wrote:
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> ---

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique
  2024-09-30 13:41 [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Maciej Strozek
  2024-09-30 13:41 ` [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Maciej Strozek
  2024-10-01 10:21 ` [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Charles Keepax
@ 2024-10-01 10:38 ` Jaroslav Kysela
  2024-10-01 10:51   ` Maciej Strozek
  2 siblings, 1 reply; 6+ messages in thread
From: Jaroslav Kysela @ 2024-10-01 10:38 UTC (permalink / raw)
  To: Maciej Strozek; +Cc: alsa-devel, patches

On 30. 09. 24 15:41, Maciej Strozek wrote:
> Both 'Speaker Digital' and 'cs42l43 PDM2' names were found as substrings in
> other alsa controls, confusing the MixerElems paths. Make them unique to avoid
> errors for hardware mutes. Also add 'Capture' string into microphone controls
> to make them work properly.
> 
> Fixes: e87dde51d689 ("sof-soundwire: Add basic support for cs42l43")
> Fixes: e4277a204cd6 ("sof-soundwire: Add support for cs42l43/cs35l56 bridge configuration")
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> ---
>   ucm2/codecs/cs42l43/init.conf          | 4 ++--
>   ucm2/sof-soundwire/cs35l56-bridge.conf | 6 +++---
>   ucm2/sof-soundwire/cs42l43-dmic.conf   | 2 +-
>   3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/ucm2/codecs/cs42l43/init.conf b/ucm2/codecs/cs42l43/init.conf
> index 10a6e1f..cf61833 100644
> --- a/ucm2/codecs/cs42l43/init.conf
> +++ b/ucm2/codecs/cs42l43/init.conf
> @@ -2,11 +2,11 @@
> 
>   LibraryConfig.remap.Config {
>   	ctl.default.map {
> -		"name='cs42l43 PDM2 Switch'" {
> +		"name='cs42l43 Microphone Capture Switch'" {

This looks like a good cleanup.

>   LibraryConfig.remap.Config {
>   	ctl.default.map {
> -		"name='Speaker Digital Switch'" {
> +		"name='Speaker Combined Switch'" {

Combined? This string is for users not for developers. Please, find a better 
name describing the purpose of the control from the the user view. The old 
name is fine IMHO.

				Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique
  2024-10-01 10:38 ` Jaroslav Kysela
@ 2024-10-01 10:51   ` Maciej Strozek
  0 siblings, 0 replies; 6+ messages in thread
From: Maciej Strozek @ 2024-10-01 10:51 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel, patches

W dniu wto, 01.10.2024 o godzinie 12∶38 +0200, użytkownik Jaroslav
Kysela napisał:
> 
> >   LibraryConfig.remap.Config {
> >         ctl.default.map {
> > -               "name='Speaker Digital Switch'" {
> > +               "name='Speaker Combined Switch'" {
> 
> Combined? This string is for users not for developers. Please, find a
> better 
> name describing the purpose of the control from the the user view.
> The old 
> name is fine IMHO.
> 
Unfortunately it can't be "Speaker Digital", what do you think of
"Speaker Stereo", or maybe "Speaker Control"? "Speaker Master"?
-- 
Regards,
Maciej

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-01 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 13:41 [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Maciej Strozek
2024-09-30 13:41 ` [PATCH alsa-ucm-conf 2/2] sof-soundwire: Add sequence for controlling Mic Mute LED Maciej Strozek
2024-10-01 10:21   ` Charles Keepax
2024-10-01 10:21 ` [PATCH alsa-ucm-conf 1/2] sof-soundwire: Change mapped control names to make them unique Charles Keepax
2024-10-01 10:38 ` Jaroslav Kysela
2024-10-01 10:51   ` Maciej Strozek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.