[alsa-devel] Could we get the card name in /sys/clas/sound/card0/name?
Jaroslav Kysela
perex at perex.cz
Tue Jan 20 10:03:03 CET 2009
On Tue, 20 Jan 2009, Lennart Poettering wrote:
> Heya!
>
> Hmm, it would be nifty if we could get the alsa card name (i.e. the
> one shown in [] in /proc/pcm/cards) as an attribute file in
> /sys/class/sound/cardX/name. Even more useful would be if this
> property would be writable so that the cards may be renamed during
> runtime.
>
> This could be very useful to establish stable card names via udev
> rules, similar to what is already done to network interface names
> ("eth0", ...).
>
> Would such a change be acceptable?
It's already implemented in our recent repositories (the change will be
in 2.6.29):
Author: Jaroslav Kysela <perex at perex.cz>
Date: Tue Nov 11 16:51:02 2008 +0100
ALSA: add /sys/class/sound/card#/id (r/w) and card#/number (r/o) files
For udev, we need a way to rename soundcard names. The soundcard numbers
(indexes) are hardwired but we have a text identification which can be
changed at run-time. The ALSA user space tools already allow using of
this text identification.
Signed-off-by: Jaroslav Kysela <perex at perex.cz>
Signed-off-by: Takashi Iwai <tiwai at suse.de>
-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
More information about the Alsa-devel
mailing list