Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Mark Brown <broonie@sirena.org.uk>
Cc: alsa-devel@alsa-project.org, Oliver Ford <ipaqlinux@oliford.co.uk>
Subject: Re: Problem setting mixer switch with amixer/alsactl.
Date: Thu, 23 Oct 2008 19:45:20 +0200	[thread overview]
Message-ID: <87mygvmci7.fsf@free.fr> (raw)
In-Reply-To: <20081023140116.GB17901@sirena.org.uk> (Mark Brown's message of "Thu\, 23 Oct 2008 15\:01\:17 +0100")

Mark Brown <broonie@sirena.org.uk> writes:

> On Thu, Oct 23, 2008 at 02:56:42PM +0100, Oliver Ford wrote:
>
>> The offending mixer switch has the truncated text name 'Speaker Mixer 
>> PCM Playback Swit' under amixer but it obviously is supposed to be 
>> 'Switch' on  the end. I don't know if that might somehow cause problems?
>
> This is normal - shouldn't be an issue except in UI terms, ALSA limits
> the length of names.

Mark, I don't think that's true.
I had that problem several monthes ago (remember my patch about alsa controls
length ?).

Do you remember that patch, which went into asoc-v2 ? :

--
Robert


>From a1b99c3bcef6bf4773e9b43335fe1f91424674c6 Mon Sep 17 00:00:00 2001
From: Robert Jarzmik <rjarzmik@free.fr>
Date: Sun, 16 Mar 2008 22:48:17 +0100
Subject: [PATCH] Correct dapm controls length.

Dapm control names should follow alsa standard, which
defines controls name's length to 44 and not 32.

Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/soc-dapm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 4b03e3f..a61024c 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -281,7 +281,7 @@ static int dapm_new_mixer(struct snd_soc_card *soc_card,
 	struct snd_soc_dapm_widget *w)
 {
 	int i, ret = 0;
-	char name[32];
+	char name[44];
 	struct snd_soc_dapm_path *path;
 
 	/* add kcontrol */
@@ -295,7 +295,7 @@ static int dapm_new_mixer(struct snd_soc_card *soc_card,
 				continue;
 
 			/* add dapm control with long name */
-			snprintf(name, 32, "%s %s", w->name, w->kcontrols[i].name);
+			snprintf(name, 44, "%s %s", w->name, w->kcontrols[i].name);
 			path->long_name = kstrdup (name, GFP_KERNEL);
 			if (path->long_name == NULL)
 				return -ENOMEM;
-- 
1.5.6.5

  reply	other threads:[~2008-10-23 17:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-22 18:47 Problem setting mixer switch with amixer/alsactl Oliver Ford
2008-10-22 20:57 ` Mark Brown
2008-10-22 22:56   ` Oliver Ford
2008-10-23 14:00     ` Mark Brown
2008-10-23 14:07       ` Oliver Ford
2008-10-23 22:55         ` Oliver Ford
2008-10-27 20:44           ` Mark Brown
     [not found]         ` <4900F6D2.6030305@oliford.co.uk>
2008-10-23 23:54           ` Mark Brown
2008-10-24 17:26           ` Mark Brown
2008-10-23 13:27 ` Mark Brown
2008-10-23 13:56   ` Oliver Ford
2008-10-23 14:01     ` Mark Brown
2008-10-23 17:45       ` Robert Jarzmik [this message]
2008-10-24 17:25         ` Mark Brown
2008-10-24 19:09           ` Robert Jarzmik
2008-10-24 20:32             ` Mark Brown
2008-10-28 13:10             ` Mark Brown
2008-10-28 15:34               ` Mark Brown
2008-10-28 15:41                 ` Takashi Iwai
2008-10-28 15:48                   ` Mark Brown
2008-10-28 15:54                     ` Takashi Iwai
2008-10-28 21:51                 ` Oliver Ford
2008-10-29 14:53                   ` Mark Brown
2008-10-29 16:04                   ` Mark Brown
2008-10-30 11:40                     ` Mark Brown
2008-10-30 17:47                       ` Oliver Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mygvmci7.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@sirena.org.uk \
    --cc=ipaqlinux@oliford.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox