[PATCH] Correct dapm controls length.

Robert Jarzmik rjarzmik at free.fr
Sun Mar 16 22:48:17 CET 2008


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

Signed-off-by: Robert Jarzmik <rjarzmik at free.fr>
Signed-off-by: Mark Brown <broonie at 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


More information about the Alsa-devel mailing list