Author: eelco
Date: Tue Jul 26 13:00:43 2011
New Revision: 27960
URL: https://svn.nixos.org/websvn/nix/?rev=27960&sc=1

Log:
* The implementation of the ALSA_PLUGIN_DIRS variable is buggy:
  because it uses strtok() to modify the environment variable in
  place, it only works correctly the first time it's called.
  Subsequent calls only see the first directory listed in the
  variable.  This causes applications such as Audacious to fail
  because the Pulse plugin is not in the first directory.  However, we
  don't actually need $ALSA_PLUGIN_DIRS, because /etc/asound.conf
  allows the full path to the Pulse plugin to be specified.

Modified:
   nixos/trunk/modules/config/pulseaudio.nix

Modified: nixos/trunk/modules/config/pulseaudio.nix
==============================================================================
--- nixos/trunk/modules/config/pulseaudio.nix   Tue Jul 26 02:14:19 2011        
(r27959)
+++ nixos/trunk/modules/config/pulseaudio.nix   Tue Jul 26 13:00:43 2011        
(r27960)
@@ -19,7 +19,7 @@
   config = mkIf config.hardware.pulseaudio.enable {
 
     environment.systemPackages =
-      [ pkgs.pulseaudio pkgs.alsaPlugins ];
+      [ pkgs.pulseaudio ];
 
     environment.etc =
       [ # Write an /etc/asound.conf that causes all ALSA applications to
@@ -28,10 +28,19 @@
         { target = "asound.conf";
           source = pkgs.writeText "asound.conf"
             ''
+              pcm_type.pulse {
+                lib 
${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_pcm_pulse.so
+              }
+            
               pcm.!default {
                 type pulse
                 hint.description "Default Audio Device (via PulseAudio)"
               }
+              
+              ctl_type.pulse {
+                lib 
${pkgs.alsaPlugins}/lib/alsa-lib/libasound_module_ctl_pulse.so
+              }
+            
               ctl.!default {
                 type pulse
               }
@@ -39,9 +48,6 @@
         }
       ];
 
-    # Ensure that the ALSA Pulse plugin appears in ALSA's search path.
-    environment.pathsToLink = [ "lib/alsa-lib" ];
-
   };
 
 }
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to