On 02.09.2012 20:17, Zbigniew Jędrzejewski-Szmek wrote:
> In general it is not possible to predict when the sound cards will
> appear in the system.  Maybe they are connected over USB and the user
> will plug them in one hour after start. So synchronizing to fixed
> point in the boot sequence is guaranteed to fail in the general case.
> Proper way is to make the restoration based on proper udev events.

In accordance with

~ $ find /sys -name snd_hdsp
/sys/bus/pci/drivers/snd_hdsp
/sys/module/snd/holders/snd_hdsp
/sys/module/snd_hwdep/holders/snd_hdsp
/sys/module/snd_page_alloc/holders/snd_hdsp
/sys/module/snd_pcm/holders/snd_hdsp
/sys/module/snd_rawmidi/holders/snd_hdsp
/sys/module/snd_hdsp

(and digging in the paths with udevadm info) I have tried these two rules:

ACTION=="add", KERNEL=="snd_hdsp", SUBSYSTEM="drivers" RUN+="/usr/sbin/alsactl 
restore"
ACTION=="add", KERNEL=="snd_hdsp", SUBSYSTEM="module" RUN+="/usr/sbin/alsactl 
restore"

But they didn't help. It seems "add" is triggered earlier rather a card is 
initialized. Can not understand which other events can be used here.


_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to