summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksound
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-20 10:01:42 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-20 10:01:42 +0000
commit8a61de9fa3682dd0c345cc154326229b50bbd7f7 (patch)
treeeef82e73ffed570fdc4c65f7dca7465bf3633c81 /perl-install/standalone/draksound
parent28fb25a0f245ee4cd5eb4f923fd7206fd8e76943 (diff)
downloaddrakx-8a61de9fa3682dd0c345cc154326229b50bbd7f7.tar
drakx-8a61de9fa3682dd0c345cc154326229b50bbd7f7.tar.gz
drakx-8a61de9fa3682dd0c345cc154326229b50bbd7f7.tar.bz2
drakx-8a61de9fa3682dd0c345cc154326229b50bbd7f7.tar.xz
drakx-8a61de9fa3682dd0c345cc154326229b50bbd7f7.zip
do not probe devices twice (and avoid to grep on detect_devices::probeall()), cosmetics
Diffstat (limited to 'perl-install/standalone/draksound')
-rwxr-xr-xperl-install/standalone/draksound9
1 files changed, 4 insertions, 5 deletions
diff --git a/perl-install/standalone/draksound b/perl-install/standalone/draksound
index 4a33c094c..9737c3d48 100755
--- a/perl-install/standalone/draksound
+++ b/perl-install/standalone/draksound
@@ -19,7 +19,7 @@
use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
-
+
use strict;
use interactive;
use common;
@@ -31,8 +31,7 @@ my $in = 'interactive'->vnew('su');
modules::mergein_conf();
-my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_AUDIO' } detect_devices::probeall();
-if (@devices) {
+if (my @devices = modules::probe_category('multimedia/sound')) {
# TODO: That need some work for multiples sound cards
map_index {
# allocate sound-slot in the same order as install2.pm
@@ -40,9 +39,9 @@ if (@devices) {
my $driver = modules::get_alias("sound-slot-$::i");
$driver = modules::get_alias($driver) if $driver =~ /sound-card/; # alsaconf ...
$_->{current_driver} = $driver if $driver;
- $_->{sound_slot_index} = $::i;
+ $_->{sound_slot_index} = $::i;
harddrake::sound::config($in, $_, $::i);
- } modules::probe_category('multimedia/sound');
+ } @devices;
} else {
$in->ask_warn(N("No Sound Card detected!"),
formatAlaTeX(N("No Sound Card has been detected on your machine. Please verify that a Linux-supported Sound Card is correctly plugged in.