[alsa-devel] alsa-lib functions reporting conflicting information with two sound cards

Lee Revell rlrevell at joe-job.com
Thu Apr 19 20:45:36 CEST 2007


On 4/19/07, Nicholas Smethurst <smethurst at gmail.com> wrote:
> Lee Revell wrote:
> > On 4/19/07, nick smethurst <nick.smethurst at gmail.com> wrote:
> >> I am rather confused that I am getting crossed information when
> >> calling snd_names_list
> >> and snd_pcm_info in order to gather information about pcm devices.
> >
> > I think ALSA's new device enumeration API can do this for you.  See
> > the implementation of aplay -l (or -L, don't remember which) in the
> > latest alsa-utils.
> Ok, thanks for the hint (no pun intended :) ).
>
> I see that the pcm_list() function has changed in aplay. The new hints
> API looks good.
>
> However, I note that snd_device_name_hint() does not return hw, plughw,
> plug, dmix, etc. Are these obtained elsewhere? I would like to build a
> complete list of all available devices in order to allow the user to
> select them from a dropdown list in a GUI.

Not sure, I don't have access to a machine with a modern ALSA now but
the new aplay list function definitely lists those.  I do know that
yours is exactly the problem it was designed to solve.

Lee


More information about the Alsa-devel mailing list