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
This commit is contained in:
Sander van der Burg 2010-03-03 14:01:13 +00:00
parent 3d87a133a0
commit 787b5cd7b9

View File

@ -26,6 +26,13 @@ in
''; '';
merge = mergeEnableOption; 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}) mkdir -m 0755 -p $(dirname ${soundState})
# Load some additional modules. # Load some additional modules.
for mod in snd_pcm_oss; do
${config.system.sbin.modprobe}/sbin/modprobe $mod || true ${optionalString config.sound.enableOSSEmulation
done ''
for mod in snd_pcm_oss; do
${config.system.sbin.modprobe}/sbin/modprobe $mod || true
done
''
}
# Restore the sound state. # Restore the sound state.
${alsaUtils}/sbin/alsactl -f ${soundState} restore ${alsaUtils}/sbin/alsactl -f ${soundState} restore