[alsa-devel] open sound device from asound.conf

Raymond Yau superquad.vortex2 at gmail.com
Fri Jul 23 13:30:59 CEST 2010

2010/7/23 Sebastian H. <vand2 at gmx.de>

> >>> I want open sound device from /etc/asound.conf with API
> >>> snd_pcm_open() but unsuccessfull. As name i'm used:
> >>
> >> Did you try to open "default", "output" or "dsp0" since these are the
> >> names of your pcm defines?
> >
> > thanks for reply...
> > Yes it works..(device is open) but i don't want open device with "hard
> coded"
> > name because this name can be changed..I want to use iterations
> I'm just a user but I guess you would have to parse the pcm subsection
> of the Alsa configuration tree with the snd_config_* functions.
> http://www.alsa-project.org/alsa-doc/alsa-lib/group___config.html
> Sebastian
Use namehint , but your asoundrc must have correct syntax since the parser
is unable to know any spelling mistake



# show all name hints also for definitions without hint {} section
defaults.namehint.showall off <---- on
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off <---- on

More information about the Alsa-devel mailing list