Hi,

Andy Green wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:

| But I think is related to the capture/playback device. The only big
| change seems the registration
| of the controls. The amixer dump gives us the answer I think.

Hm it seems the difference may be that before, that ALSA stuff used to
truncate the control name to 30 chars?

When I install FSO unstable on my SD card and then try alsactl restore
from the default /etc/asound.state that is installed, I see:

r...@om-gta02:~# alsactl restore
alsactl: set_control:989: warning: name mismatch (Playback Mixer Voice
Capture Sw/Playback Mixer Voice Capture Switch) for control #68
alsactl: set_control:991: warning: index mismatch (0/0) for control #68
alsactl: set_control:993: failed to obtain info for control #68 (No
buffer space available)

And it's true when I look in that asound.state at #68 I see

\0x09control.68 {
\0x09\0x09comment.access 'read write'
\0x09\0x09comment.type BOOLEAN
\0x09\0x09comment.count 1
\0x09\0x09iface MIXER
\0x09\0x09name 'Playback Mixer Voice Capture Sw'
\0x09\0x09value false
\0x09}

However if I do an alsactl store, and look at #68 from the new
asound.state, I see

\0x09control.68 {
\0x09\0x09comment.access 'read write'
\0x09\0x09comment.type BOOLEAN
\0x09\0x09comment.count 1
\0x09\0x09iface MIXER
\0x09\0x09name 'Playback Mixer Voice Capture Switch'
\0x09\0x09value false
\0x09}

Just as it says, the name has evidently "changed" or at least is not
truncated any more.

If this is the issue then it just randomly affects ALSA controls with
"long names".

I dread to think about the hassle of making a new "dimension" of alsa
states based not only on device and hardware revision, but by kernel
revision.

So I will take a look at seeing if we can either change the names to be
truncated by definition or truncate them for compatability.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmF0xcACgkQOjLpvpq7dMq5SgCfScGSeUiG1MAEFd29j7KwkLLl
6CoAn3P3+OIQglR+7wj3j6ROnQf3pSB9
=rJ4j
-----END PGP SIGNATURE-----

Try this.

Michael
This is a ugly openmokoo revert for name changing in alsa.conf.
Please revert in feuture version

Pointed-out-by: Andy Green <[email protected]>
Signed-off-by: Michael Trimarchi <[email protected]>

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index f9e95a7..e1057d0 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -332,6 +332,14 @@ 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 versio.
+			   Remenber to revert XXX
+			 */
+			name_len = (name_len > 32) ? 32 : name_len;
+
 			path->long_name[name_len - 1] = '\0';
 
 			path->kcontrol = snd_soc_cnew(&w->kcontrols[i], w,

Reply via email to