diff options
Diffstat (limited to 'perl-install/harddrake/sound.pm')
-rw-r--r-- | perl-install/harddrake/sound.pm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 953c76336..365bc42fe 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -21,6 +21,7 @@ use run_program; use modules; use list_modules; use detect_devices; +use log; my $has_nvaudio = -x '/lib/modules/' . c::kernel_version() . '/'; @@ -139,15 +140,9 @@ sub get_alternative { $alsa2oss{$driver} || $oss2alsa{$driver}; } -sub explain { - require standalone; - standalone::explanations(@_) unless $::isInstall; -} - - sub do_switch { my ($old_driver, $new_driver) = @_; - explain("removing old $old_driver\n"); + log::explanations("removing old $old_driver\n"); rooted("service sound stop") unless $blacklisted; rooted("service alsa stop") if $old_driver =~ /^snd-/ && !$blacklisted; unload($old_driver); # run_program("/sbin/modprobe -r $driver"); # just in case ... @@ -159,7 +154,7 @@ sub do_switch { rooted("/sbin/chkconfig --add alsa"); load($new_driver); # service alsa is buggy } else { run_program::run("/sbin/chkconfig --del alsa") } - explain("loading new $new_driver\n"); + log::explanations("loading new $new_driver\n"); rooted("/sbin/chkconfig --add sound"); # just in case ... rooted("service sound start") unless $blacklisted; } @@ -213,7 +208,7 @@ To use alsa, one can either use: ])) { return if $new_driver eq $driver; - explain("switching audio driver from '$driver' to '$new_driver'\n"); + log::explanations("switching audio driver from '$driver' to '$new_driver'\n"); $in->ask_warn(N("Warning"), N("The old \"%s\" driver is blacklisted.\n It has been reported to oopses the kernel on unloading.\n The new \"%s\" driver'll only be used on next bootstrap.", $driver, $new_driver)) if $blacklisted; |