about summary refs log tree commit diff
path: root/modules/services/audio
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-19 11:55:52 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-08-19 11:55:52 +0000
commitc55f496c5284808109aa2904cea941d85f449fc0 (patch)
tree00497751d974f12c3cf8138a443a0f61880dba8e /modules/services/audio
parente87a298c33dbd232073d8cb8b8f10d7015335d5d (diff)
downloadnixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar.gz
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar.bz2
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar.lz
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar.xz
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.tar.zst
nixlib-c55f496c5284808109aa2904cea941d85f449fc0.zip
* The ALSA job shouldn't be started until udevtrigger has finished.
  Otherwise the sound card drivers may not have been loaded yet, and
  restoring the mixer settings will fail.  Also, since the ALSA job
  itself will fail, it won't save the mixer settings on shutdown.

svn path=/nixos/trunk/; revision=23245
Diffstat (limited to 'modules/services/audio')
-rw-r--r--modules/services/audio/alsa.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix
index 81dd0ede208b..9181a86b3778 100644
--- a/modules/services/audio/alsa.nix
+++ b/modules/services/audio/alsa.nix
@@ -53,14 +53,13 @@ in
       };
 
     jobs.alsa =
-      { startOn = "started udev";
+      { startOn = "stopped udevtrigger";
 
         preStart =
           ''
             mkdir -m 0755 -p $(dirname ${soundState})
 
             # Load some additional modules.
-	    
 	    ${optionalString config.sound.enableOSSEmulation
 	      ''
                 for mod in snd_pcm_oss; do
@@ -70,7 +69,7 @@ in
 	    }
 
             # Restore the sound state.
-            ${alsaUtils}/sbin/alsactl -f ${soundState} restore
+            ${alsaUtils}/sbin/alsactl -f ${soundState} restore || true
           '';
 
         postStop =