2007-03-01 01:36:00 +01:00
|
|
|
{kernel, module_init_tools, alsaUtils}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
soundState = "/var/state/asound.state";
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
name = "alsa";
|
|
|
|
|
|
|
|
job = "
|
|
|
|
start on hardware-scan
|
|
|
|
stop on shutdown
|
|
|
|
|
2007-03-01 01:50:17 +01:00
|
|
|
start script
|
2007-03-01 01:36:00 +01:00
|
|
|
|
|
|
|
# Load some additional modules.
|
|
|
|
export MODULE_DIR=${kernel}/lib/modules/
|
|
|
|
for mod in snd_pcm_oss; do
|
|
|
|
${module_init_tools}/sbin/modprobe $mod || true
|
|
|
|
done
|
|
|
|
|
|
|
|
# Restore the sound state.
|
|
|
|
${alsaUtils}/sbin/alsactl -f ${soundState} restore
|
|
|
|
|
|
|
|
end script
|
|
|
|
|
2007-03-01 01:50:17 +01:00
|
|
|
respawn sleep 1000000 # !!! hack
|
|
|
|
|
2007-03-01 01:36:00 +01:00
|
|
|
stop script
|
|
|
|
|
|
|
|
# Save the sound state.
|
|
|
|
${alsaUtils}/sbin/alsactl -f ${soundState} store
|
|
|
|
|
|
|
|
end script
|
|
|
|
|
|
|
|
";
|
|
|
|
|
|
|
|
}
|