better ALSA card name
Matthias Kretz
kretz at kde.org
Wed Jan 10 10:48:08 PST 2007
On Wednesday 10 January 2007 16:37, Danny Kukawka wrote:
> IMO we should try to get the alsa developer to change the USB alsa audio
> driver to export a more descriptive device_id to sysfs. I ask our developer
> at SUSE if this is possible.
Reading the spec I would expect to get the name of the card from alsa.card_id
and the name of the device from alsa.device_id. The latter does what I
expect, the former returns the textual device name (alias for hw:<card
number>). That's the string in square brackets in /proc/asound/cards. And
that's also what the /proc/asound/card%d/id file is supposed to return.
So if I were to ask anything of the ALSA developers it would be to add another
file to easily get the card name... (because it's not easy to extract out
of /proc/asound/cards)
> Btw. I added a other version of the patch which avoid add a new function to
> util.c (hal_util_grep_file_next_line) which works for me.
This doesn't work (with my old version of hal_util_grep_file, at least): My
USB headset is now identified as "HDA Intel".
my /proc/asound/cards looks like this:
0 [Intel ]: HDA-Intel - HDA Intel
HDA Intel at 0xde400000 irq 82
1 [default ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-0000:00:1d.0-2, full
speed
Looking at the card name of card 1 you can see that g_strstrip should be used
after truncating instead of only removing leading whitespace.
--
________________________________________________________
Matthias Kretz (Germany) <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070110/2fd5c436/attachment.pgp
More information about the hal
mailing list