[systemd-devel] alsa-restore.service seems to be too early

Colin Guthrie gmane at colin.guthr.ie
Mon Sep 3 10:59:49 PDT 2012


'Twas brillig, and Вечный Студент at 03/09/12 11:34 did gyre and gimble:
> 03.09.2012, 13:48, "Colin Guthrie" <gmane at colin.guthr.ie>:
>> Then you should probably try and debug this further - e.g. by rmmod'ing
>> the module and inserting it and trying to work out why it's not run. You
>> can always replace the rule with one that runs a script instead that
>> writes debugging info or similar.
>>
>> In theory the control device should appear last to udev (something which
>> we had to fight with a few years back with PulseAudio). When the control
>> device appears it should be all ready. The only complication that I can
>> think of is that there might be some kind of firmware loading issue that
>> means that the control device appears before the device can really be used.
>>
>> If you do replace it with a script, try introducing a sleep in it
> 
> Yes, thanks, sleeping does help (the card under question is the second one, i.e. with suffix '1'):
> 
> ~ $ cat /etc/udev/rules.d/99-zlocal.rules | grep alsa
> ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC1", KERNELS=="card1", RUN+="/usr/local/bin/realsa.sh"
> ~ $ cat /usr/local/bin/realsa.sh
> #!/bin/bash
> 
> sleep 1
> /usr/sbin/alsactl restore
> 
>> to
>> give the firmware time to load - this isn't a solution of course, but it
>> might help work out if it's a timing thing and that, in turn, might
>> highlight where the real solution lies.
> 
> Sorry, I don't see real solution yet :)

I would lean towards this being a kernel problem or some other rule in
place which invalidates the action (e.g. perhaps it's restored but a
latter call issues an "alsactl init 1").

I don't know enough about udev or kernel side of things to really say
where the problem lies, so it's probably one to quiz Lennart and Kay
about once they are back from the sprints/conferences.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list