* 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.

svn path=/nixos/trunk/; revision=27960
This commit is contained in:
Eelco Dolstra 2011-07-26 13:00:43 +00:00
parent 7bdaedb465
commit 8bf3c2c1bf

View File

@ -19,7 +19,7 @@ with pkgs.lib;
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 @@ with pkgs.lib;
{ 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 @@ with pkgs.lib;
}
];
# Ensure that the ALSA Pulse plugin appears in ALSA's search path.
environment.pathsToLink = [ "lib/alsa-lib" ];
};
}