Paul Webster wrote: 
> Anything in dmesg when you switch them on the first time?

The output of dmesg appears to be the same the first time as it is on
all subsequent times.  I've been investigating with udevadm ('sudo
udevadm monitor'), and more by luck than judgement I think I've hit on a
solution in my case.

I believe that after the device is 'added' it then has to be 'bound' to
a driver, and it appears that this takes longer on first insertion than
on subsequent insertions.  We're talking small differences here (0.0024s
versus 0.0011s), but maybe that is significant.

So, guessing that it would be safer to wait for the binding to finish, I
changed the rule from:

Code:
--------------------
    SUBSYSTEM=="usb", ACTION=="add", ATTRS{idVendor}=="xxxx", 
ATTR{idProduct}=="yyyy", RUN+="/home/tc/DAC.sh"
--------------------


to:

Code:
--------------------
    SUBSYSTEM=="usb", *ACTION=="bind"*, ATTRS{idVendor}=="xxxx", 
ATTR{idProduct}=="yyyy", RUN+="/home/tc/DAC.sh"
--------------------


So far, so good, in my case at least.  Squeezelite now seems to start up
reliably the first time the DAC is inserted.  Who knows if I've
interpreted the reason correctly though.....


------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=113661

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to