diff options
author | Nelson Castillo <arhuaco@freaks-unidos.net> | 2009-02-02 15:31:48 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-02-02 15:31:48 +0000 |
commit | df618323ccdd6a0af08ec7caffaa49576e69ec91 (patch) | |
tree | fe0bae4e7ce45f0a0d211f72d85d9158398bf8f5 /sound/soc | |
parent | b72d8b4c5b7173a1d38017a30213e687967e5355 (diff) |
Make ALSA name truncation verbose
Make previous Michael's patch verbose about truncating
mixer names. Sample message:
sound/soc/soc-dapm.c:349 mixer name 'Playback Mixer Voice Capture Switch' truncated
to 31 characters.
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/soc-dapm.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 6df9aa5a083..81528a789dd 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -333,12 +333,22 @@ static int dapm_new_mixer(struct snd_soc_codec *codec, snprintf(path->long_name, name_len, "%s %s", w->name, w->kcontrols[i].name); - /* this is a ugly openmoko revert for name - changing in alsa configuration file. This is mergeable - with the future linux version. Remember to revert XXX - We need it for compatability with previous state files. + /* + * This is an ugly Openmoko revert for name + * changes in alsa configuration. This is mergeable + * with the future Linux version. + * We force the truncation again for now because we + * can't cope with mass breakage on alsa state files + * that are spread all over the different distros. + * FIXME: Remember to revert this change. */ - name_len = (name_len > 32) ? 32 : name_len; + + if (name_len > 32) { + printk(KERN_WARNING __FILE__ ":%d mixer name " + "'%s' truncated to 31 characters.\n", + __LINE__, path->long_name); + name_len = 32; + } path->long_name[name_len - 1] = '\0'; |