From 5b85bc9a48586804b22ff86e34f36e0b202d0c6e Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Fri, 14 Aug 2009 11:40:29 +0000 Subject: draksound: Correctly enable/disable glitchfree on both hal and udev detection modules. --- perl-install/harddrake/sound.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 202ad923e..b165ac677 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -250,14 +250,11 @@ sub is_pulseaudio_glitchfree_enabled() { sub set_pulseaudio_glitchfree { my ($val) = @_; - my $string = "load-module module-hal-detect tsched=0\n"; substInFile { - if (/^load-module\s*module-hal-detect/) { - if ($val) { - s/\s*tsched=0//; - } else { - $_ = $string; - } + if ($val) { + s/^(load-module\s+module-(udev|hal)-detect)\s+tsched=0/$1/; + } else { + s/^(load-module\s+module-(udev|hal)-detect).*/$1 tsched=0/; } } $pa_defaultsconfig_file; } -- cgit v1.2.1