[alsa-devel] Strange bug in .asoundrc ??

Clemens Ladisch cladisch at fastmail.net
Mon Nov 19 16:43:48 CET 2007

Dominique Larchey-Wendling wrote:
>  > It appears this behaviour is by design.
> Ok so this is not a bug but a feature ;-)
> However, it is not specified in the doc that alsa-lib makes a semantic 
> distinction between the types of objects

If a somewhat complete documentation existed, it would certainly mention

> in the alisp language.

The configuration language is not alisp.

> What is strange is that the same function is called in alsa-lib to
> expand hw:0 whether it is prefixed with "ctl" or "pcm" :
> snd_config_search_definition(root, "ctl", name, &ctl_conf);
> and
> snd_config_search_definition(root, "pcm", name, &pcm_conf);

This function is called with a string like "tata" and returns the string
"hw:0" (it would return the compound node {type hw card 0} when it would
be called with "hw:0").

In the PCM code, it is the following recursive call of
snd_pcm_open_noupdate() that causes the extra lookup to happen.

> but my question was more why is it designed this way ?

Well, "designed" may be too strong a word; it implies that somebody
actually thought about it.  :-)

I'd guess that this functionality was never needed for any device type
except PCM because there aren't any plugins that could be used in place
of "hw".


More information about the Alsa-devel mailing list