From: "Jan 'RedBully' Seiffert" <redbully@cc.fh-luh.de>
To: Clemens Ladisch <cladisch@fastmail.net>
Cc: linux-hotplug-devel@lists.sourceforge.net,
alsa-devel@lists.sourceforge.net, Greg KH <gregkh@gentoo.org>
Subject: Re: [Alsa-devel] [UDEV] Persitent ordering of ALSA-devices
Date: Mon, 04 Dec 2006 16:47:34 +0000 [thread overview]
Message-ID: <45745126.9060401@cc.fh-luh.de> (raw)
In-Reply-To: <1165231299.10319.278726991@webmail.messagingengine.com>
Clemens Ladisch wrote:
> Jan 'RedBully' Seiffert wrote:
>> After Gentoo switched to udev-coldplug, my two soundcards get randomly
>> reordered on reboot. Now I need to write a udev rule to give them a
>> persistent ordering, but failed to do so until now, partly because i
>> don't know on what key ALSA orders devices so they become card0 and 1,
>> hw0 and hw1, partly because this feature of udev is so new.
>
> ALSA's card ordering mechanism predates udev and isn't compatible with
> it.
>
*sigh* ;(
> The ALSA framework has its own internal card list (that is shown in
> /proc/asound/cards). Drivers can be instructed to take a specific card
> number with the 'index' option, and this is the only official way of
> reordering cards.
>
I want to thank you and Marco for the clarification. After reading
Marcos mail, i slabbed my forehead like: "Ahh, yes, the index option".
Only saw it once on an old SuSE in the conf-files on the PC of my brother.
I now solved the problem for me with:
options snd-ice1712 index=0
options snd-via82xx index=1
in /etc/modules.d/alsa (which then migrates to the automatic generated
/etc/modprobe.conf, on gentoo).
Now, after several reboots, it seems to work, also with udev-coldplug
(which is tricky, because it happens so early, even before module autoload).
> It is, in theory, possible to rename the device files, but you have to
> be aware that
> 1) all devices files of one card must be renamed consistently, i.e,
> the card number in the controlC*/hwdepC*D*/rawmidiC*D*/pcmC*D*p/
> pcmC*D*c files (the number after the "C") must be the same for all
> device files belonging to each card; and
> 2) enumerating cards will no longer work correctly (the card number
> returned by ALSA will still be the number specified with the index
> parameter), i.e., card names/descriptions will be wrong when a
> program tries to show them.
>
>
Renaming the device files in a consistent manner shouldn't be the
problem. Sure, the udev-rules would get a little bit longer, but still
possible (or call out to a program which gives the right name back).
But why should i do it, if it does not influence ALSA (the expected
way), only confuses it? And the main target, getting a persistent 'hw0'
etc. and 'default' isn't achieved by it. (especially since my ice1712
needs a lot of magic added (sample rate converter, buffer, dmix), thats
why i want it to be the 'default' device)
I only see one problem for this in the future:
I was able to distinguish the cards by module. But what happens, if
someone has the same card several times (same module)?
Rely on PCI bus ordering? A new PCI quirk for your mainboard to handle a
transparent bridge and then? Multithreaded probing anyone?
(You can strongly object to a feature like this, but it is desirable
from a users POV, like starting [xkg]dm as early as possible, to bring
the user a login screen, while cups and foo and bar still starting in
the background).
Please keep in mind, that Linux is predestinated for such use ;) Drivers
which can handle several instances of the same card (and if not, you can
fix it), ALSA as a fine API, good latency with mostly every card,
continued improvements to the core kernel, directly available to the
user (thanks to stable-API-nonsense.txt *everything* can be
fixed/improved, even if it means a transition for everyone), to raise
(IPC) performance and lower latency in every subsystem (pushed forward
by people with other kind of problems, like > 1k processors (go SGI,
go;), not only "the sound freaks") and RT for the extra fun to build a
cheap recording machine for example.
But i think i don't tell anyone news on this, and i extravagate...
> Regards,
> Clemens
>
With best wishes and thanks to all who helped,
Jan
PS: Sorry for any shortcomings in my english, don't had the time to
proof read it 20 times.
--
Coffeecup empty - Userpanic!
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2006-12-04 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7nhSg-2Ow-9@gated-at.bofh.it>
[not found] ` <7nk3R-84O-35@gated-at.bofh.it>
[not found] ` <7nnbg-77Q-11@gated-at.bofh.it>
[not found] ` <7no7s-PV-23@gated-at.bofh.it>
[not found] ` <4570C14B.6090107@cc.fh-luh.de>
[not found] ` <20061202080348.GB9422@kroah.com>
2006-12-02 18:34 ` [UDEV] Persitent ordering of ALSA-devices (was: [gentoo-dev] Jan 'RedBully' Seiffert
2006-12-02 18:48 ` Marco d'Itri
2006-12-02 18:54 ` Darren Salt
2006-12-04 11:21 ` [Alsa-devel] [UDEV] Persitent ordering of ALSA-devices Clemens Ladisch
2006-12-04 16:47 ` Jan 'RedBully' Seiffert [this message]
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=45745126.9060401@cc.fh-luh.de \
--to=redbully@cc.fh-luh.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=cladisch@fastmail.net \
--cc=gregkh@gentoo.org \
--cc=linux-hotplug-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).