[alsa-devel] snd_device_name_hint problems

David Henningsson launchpad.web at epost.diwic.se
Fri Sep 11 11:45:47 CEST 2009


Hello,

First; I'm not completely sure how much of this is your issue, and how
much is my distribution's fault (Ubuntu). If you believe my problems is
due to bugs in the distribution, please say so.

I'm working with a small recording application and I want to enumerate
possible recording sources/devices, just to put in a combobox. In my
computer I have two soundcards, one on the motherboard and one PCI
soundcard (ESI Juli@). I also have Pulseaudio installed, so the devices
I want to show up are those three - and possibly alternatives under
these, such as analog/digital inputs.

According to Lennart's guide to sound API's, snd_device_name_hint is the
way to go, as both snd_card_xxx and snd_config_xxx are deprecated.
(Speak up if you don't agree.)

So assuming I do about the same as "arecord -L" does, I get the
following output (descriptions omitted) :

front:CARD=Juli,DEV=0
surround40:CARD=Juli,DEV=0
surround41:CARD=Juli,DEV=0
surround50:CARD=Juli,DEV=0
surround51:CARD=Juli,DEV=0
surround71:CARD=Juli,DEV=0
iec958:CARD=Juli,DEV=0
null
front:CARD=CK804,DEV=0
surround40:CARD=CK804,DEV=0
surround41:CARD=CK804,DEV=0
surround50:CARD=CK804,DEV=0
surround51:CARD=CK804,DEV=0
surround71:CARD=CK804,DEV=0

I have two problems with this: first thing is that the "pulse" device is
not listed. I think that could be solved either by setting
"defaults.namehint.showall" to on, or by setting the name hint of the
pulse device to be included in the "basic" devices. Would you recommend
doing either one of those, and if so, which one?

Second problem is that I don't have surround input on either of my
soundcards, so most of the device options above do not make any sense.
Even if I try, I have a hard time recording from them (arecord fails to
record it with various errors, such as "Sample format non available").
If I instead use "plughw:CARD=name", recording works.

To sum it up, the output I would like to have, is at least these three:

plughw:CARD=Juli
plughw:CARD=CK804
pulse

How do I/we get there?

// David



More information about the Alsa-devel mailing list