From 596b88c3e0ceef8472fd221fd20390638407a465 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 26 Jan 2009 12:54:44 +0000 Subject: (set_PA_autospan, write_config) disable auto spawning when diasbling PA (#47258) --- perl-install/harddrake/sound.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'perl-install/harddrake/sound.pm') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index f40ef1e03..00a778db0 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -241,6 +241,21 @@ sub set_pulseaudio_routing { } +my $pa_client_conffile = '/etc/pulse/client.conf'; + +sub set_PA_autospan { + my ($val) = @_; + $val = 'autospawn = ' . bool2yesno($val) . "\n"; + my $done; + substInFile { + if (/^autospawn\s*=/) { + $_ = $val; + $done = 1; + } + } $pa_client_conffile; + append_to_file($pa_client_conffile, $val) if !$done; +} + my $pulse_config_file = "$::prefix/etc/pulse/daemon.conf"; @@ -328,6 +343,7 @@ sub switch { my $write_config = sub { set_pulseaudio($is_pulseaudio_enabled); set_pulseaudio_routing($is_pulseaudio_enabled && $is_pulseaudio_routing_enabled); + set_PA_autospan($is_pulseaudio_enabled); set_5_1_in_pulseaudio($is_5_1_in_pulseaudio_enabled); set_user_switching($is_user_switching); if ($is_pulseaudio_routing_enabled) { -- cgit v1.2.1