summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake/sound.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-09-15 22:30:09 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-09-15 22:30:09 +0000
commitb5989b75d7a21e2eb2cdfadc2199489e286f25eb (patch)
tree9dff726e973c7a3cd3be1eb0dd24bf9f59a5f7e5 /perl-install/harddrake/sound.pm
parent49cdb4136da1c9ddff4bc4a71ddf43ebf9ad1042 (diff)
downloaddrakx-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar
drakx-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.gz
drakx-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.bz2
drakx-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.xz
drakx-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.zip
fix #5488: do not overwrite current driver if it's a viable driver for
the current sound card
Diffstat (limited to 'perl-install/harddrake/sound.pm')
-rw-r--r--perl-install/harddrake/sound.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 0996d9001..acef35303 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -294,8 +294,11 @@ The current driver for your \"%s\" sound card is \"%s\" ", $device->{description
sub configure_sound_slots() {
my $altered = 0;
each_index {
- $altered ||= modules::get_alias("sound-slot-$::i") ne $_->{driver};
- modules::add_alias("sound-slot-$::i", $_->{driver});
+ my $default_driver = modules::get_alias("sound-slot-$::i");
+ if (!member($default_driver, @{get_alternative($_->{driver})}, $_->{driver})) {
+ $altered ||= $default_driver ;
+ modules::add_alias("sound-slot-$::i", $_->{driver});
+ }
} detect_devices::getSoundDevices();
modules::write_conf() if $altered && $::isStandalone;
}