[alsa-devel] user defined plugin and namehint

Olivier Langlois olivier at trillion01.com
Sat Feb 15 08:55:17 CET 2014


On Fri, 2014-02-14 at 08:45 -0500, Olivier Langlois wrote:
> Hi,
> 
> I created a new plugin in asound.conf and I would like it to appear in
> the list presented with aplay -L as this is the list used by my media
> player (vlc) to offer the option to choose my playback device.
> 
> I have tried this:
> 
> pcm.rate96000Hz {
>         type hw
>         card 0
>         device 0
>         rate 96000
>         hint {
>                 show on
>                 description "96000Hz rate output"
>         }
> }
> 
I cannot make sense of everything that the function try_config() in
control/namehint.c is doing or what the hint compound undocumented
fields are supposed to mean but by changing my pcm definition to:

pcm.rate96000Hz {
        type hw
        card 0
        device 0
        rate 96000
        hint {
                show on
                device -1 # type hw are excluded. Adding this field
trick alsa-lib to add this PCM in the list of PCMs
                description "96000Hz rate output"
        }
}

Unfortunately, it did not resolve my problem. I have finally figured out
that by simply changing the default dmix sampling rate was what I
needed.

greetings,




More information about the Alsa-devel mailing list