diff options
author | Sander van der Burg <s.vanderburg@tudelft.nl> | 2010-03-03 14:01:13 +0000 |
---|---|---|
committer | Sander van der Burg <s.vanderburg@tudelft.nl> | 2010-03-03 14:01:13 +0000 |
commit | 787b5cd7b973f0e1670b577d0aacf491d24a7760 (patch) | |
tree | 2813f603d7471ed7ca487ec71e1ae9989d69476e /modules/services/audio | |
parent | 3d87a133a092629426cbf67061917a9fb4936594 (diff) | |
download | nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar.gz nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar.bz2 nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar.lz nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar.xz nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.tar.zst nixlib-787b5cd7b973f0e1670b577d0aacf491d24a7760.zip |
Implemented enableOSSEmulation option, which can be used to disable OSS emulation. On my home PC OSS emulation gives me a lot of annoying problems
svn path=/nixos/trunk/; revision=20351
Diffstat (limited to 'modules/services/audio')
-rw-r--r-- | modules/services/audio/alsa.nix | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/modules/services/audio/alsa.nix b/modules/services/audio/alsa.nix index 78d6a0044181..81dd0ede208b 100644 --- a/modules/services/audio/alsa.nix +++ b/modules/services/audio/alsa.nix @@ -26,6 +26,13 @@ in ''; merge = mergeEnableOption; }; + + enableOSSEmulation = mkOption { + default = true; + description = '' + Whether to enable ALSA OSS emulation (with certain cards sound mixing may not work!). + ''; + }; }; @@ -53,9 +60,14 @@ in mkdir -m 0755 -p $(dirname ${soundState}) # Load some additional modules. - for mod in snd_pcm_oss; do - ${config.system.sbin.modprobe}/sbin/modprobe $mod || true - done + + ${optionalString config.sound.enableOSSEmulation + '' + for mod in snd_pcm_oss; do + ${config.system.sbin.modprobe}/sbin/modprobe $mod || true + done + '' + } # Restore the sound state. ${alsaUtils}/sbin/alsactl -f ${soundState} restore |