From: Kay Sievers <kay.sievers@vrfy.org>
To: Greg KH <greg@kroah.com>
Cc: Jaroslav Kysela <perex@suse.cz>,
LKML <linux-kernel@vger.kernel.org>, Takashi Iwai <tiwai@suse.de>
Subject: Re: sysfs & ALSA card
Date: Sat, 07 Oct 2006 14:55:30 +0200 [thread overview]
Message-ID: <1160225730.19302.1.camel@localhost> (raw)
In-Reply-To: <20061007074440.GA9304@kroah.com>
On Sat, 2006-10-07 at 00:44 -0700, Greg KH wrote:
> > On Fri, Oct 06, 2006 at 04:00:27PM +0200, Jaroslav Kysela wrote:
> > > I would like to discuss where is the right root for soundcards in
> > > the sysfs tree. I would like to put card specific variables like id there
> > > (see /proc/asound/card0/id).
> > > Also, I plan to create link from
> > > /sys/class/sound tree to the appropriate card to show relationship.
> > > Something like:
> > >
> > > /sys/<somewhere>/soundcard/0
> > >
> > > /sys/class/sound/controlC0/soundcard -> ../../../<somewhere>/soundcard/0
> > >
> > > Any comments and suggestions?
No, please no links if you have stuff that can be expressed in a tree,
which you perfectly can in this case. Just create a parent "card-device"
to hold the generic card attributes, and put the stuff like pcmC0* below
that device. Userspace is fine with that and will not break,
cause /sys/class/sound/* is still just a flat directory with all devices
in one directory, only the link targets will point to a hierarchy (note
that the link target of "pcmC1D0c" includes" Audigy2". )
> Here's what /sys/class/sound now looks like for me:
> $ tree /sys/class/sound/
> /sys/class/sound/
> |-- Audigy2 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2
> |-- admmidi1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/admmidi1
> |-- amidi1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/amidi1
> |-- controlC1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/controlC1
> |-- dmmidi1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/dmmidi1
> |-- hwC1D0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/hwC1D0
> |-- midi1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/midi1
> |-- midiC1D0 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/midiC1D0
> |-- midiC1D1 -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/midiC1D1
> |-- pcmC1D0c -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D0c
> |-- pcmC1D0p -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D0p
> |-- pcmC1D1c -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D1c
> |-- pcmC1D2c -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D2c
> |-- pcmC1D2p -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D2p
> |-- pcmC1D3p -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D3p
> |-- pcmC1D4c -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D4c
> |-- pcmC1D4p -> ../../devices/pci0000:00/0000:00:1e.0/0000:06:0d.0/Audigy2/pcmC1D4p
> `-- timer -> ../../devices/virtual/sound/timer
>
>
> Yeah, I picked the wrong name for the card, it should be "card1" instead
> of "Audigy2" here, but you get the idea.
That looks nice. Yeah, it should something that matches to the C1 in the
other names.
> Please also note that you will need the latest versions of udev to get
> this to work properly for your sysfs nodes.
This should be fine for all recent releases including SLE.
Thanks,
Kay
next prev parent reply other threads:[~2006-10-07 12:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 14:00 sysfs & ALSA card Jaroslav Kysela
2006-10-07 6:24 ` Greg KH
2006-10-07 7:44 ` Greg KH
2006-10-07 12:55 ` Kay Sievers [this message]
2006-10-07 19:12 ` Kay Sievers
2006-10-07 20:08 ` Greg KH
2006-10-09 6:24 ` Jaroslav Kysela
2006-10-11 22:52 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1160225730.19302.1.camel@localhost \
--to=kay.sievers@vrfy.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.