summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-10-23 10:56:37 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-10-23 10:56:37 +0000
commit17068198874ddf8c49ee708311cf83dbe723fd2a (patch)
tree4ba73d724aedbcebbd5b5a3b82d477fc8e06aa14 /perl-install/harddrake
parent50a6bab3a4bbbe34dafa8376b101bd9678a1069b (diff)
downloaddrakx-backup-do-not-use-17068198874ddf8c49ee708311cf83dbe723fd2a.tar
drakx-backup-do-not-use-17068198874ddf8c49ee708311cf83dbe723fd2a.tar.gz
drakx-backup-do-not-use-17068198874ddf8c49ee708311cf83dbe723fd2a.tar.bz2
drakx-backup-do-not-use-17068198874ddf8c49ee708311cf83dbe723fd2a.tar.xz
drakx-backup-do-not-use-17068198874ddf8c49ee708311cf83dbe723fd2a.zip
reindent for lord pix
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/data.pm78
-rw-r--r--perl-install/harddrake/sound.pm254
-rw-r--r--perl-install/harddrake/ui.pm333
-rw-r--r--perl-install/harddrake/v4l.pm398
4 files changed, 533 insertions, 530 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index 3554184fb..e581c3bb9 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -21,52 +21,52 @@ sub unknown {
our @tree =
(
- ["FLOPPY","Floppy", "floppy.png", "",\&detect_devices::floppies, 0 ],
- ["HARDDISK","Disk", "harddisk.png", "$sbindir/diskdrake", \&detect_devices::hds, 1 ],
- ["CDROM","CDROM", "cd.png", "", sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms } , 0 ],
- ["BURNER","CD/DVD burners", "cd.png", "", \&detect_devices::burners, 0 ],
- ["DVDROM","DVD-ROM", "cd.png", "", sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms}, 0 ],
- ["TAPE","Tape", "tape.png", "", \&detect_devices::tapes, 0 ],
- ["VIDEO","Videocard", "video.png", "$sbindir/XFdrake", sub { grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ 'DISPLAY_VGA' } @devices }, 1 ],
- ["TV","Tvcard", "tv.png", "/usr/bin/XawTV", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} eq 'PCI' } @devices}, 0 ],
- ["MULTIMEDIA_OTHER","Other MultiMedia devices", "multimedia.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_OTHER' } @devices}, 0 ],
- ["AUDIO","Soundcard", "sound.png", "$sbindir/draksound", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_AUDIO' } @devices}, 0 ],
- ["WEBCAM","Webcam", "webcam.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} ne 'PCI'} @devices }, 0 ],
- ["CPU","Processors", "cpu.png", "", sub { detect_devices::getCPUs() }, 0 ],
- ["ETHERNET","Ethernetcard", "hw_network.png", "$sbindir/drakconnect", sub {
- #- generic NIC detection for USB seems broken (class, subclass,
- #- protocol report are not accurate) so I'll need to verify against
- #- known drivers :-(
- my @usbnet = qw/CDCEther catc kaweth pegasus usbnet/;
- # should be taken from detect_devices.pm or modules.pm. it's identical
-
- grep { $_->{media_type} =~ /^NETWORK/ || member($_->{driver}, @usbnet) || $_->{type} eq 'network' } @devices}, 1 ],
- ["MODEM","Modem", "modem.png", "", sub { detect_devices::getModem() } , 0 ],
- ["BRIDGE","Bridge(s)", "memory.png", "", sub { grep { $_->{media_type} =~ 'BRIDGE' } @devices}, 0 ],
- ["UNKNOWN","Unknown/Others", "unknown.png", "" , \&unknown, 0 ],
+ ["FLOPPY","Floppy", "floppy.png", "",\&detect_devices::floppies, 0 ],
+ ["HARDDISK","Disk", "harddisk.png", "$sbindir/diskdrake", \&detect_devices::hds, 1 ],
+ ["CDROM","CDROM", "cd.png", "", sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms } , 0 ],
+ ["BURNER","CD/DVD burners", "cd.png", "", \&detect_devices::burners, 0 ],
+ ["DVDROM","DVD-ROM", "cd.png", "", sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms}, 0 ],
+ ["TAPE","Tape", "tape.png", "", \&detect_devices::tapes, 0 ],
+ ["VIDEO","Videocard", "video.png", "$sbindir/XFdrake", sub { grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ 'DISPLAY_VGA' } @devices }, 1 ],
+ ["TV","Tvcard", "tv.png", "/usr/bin/XawTV", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} eq 'PCI' } @devices}, 0 ],
+ ["MULTIMEDIA_OTHER","Other MultiMedia devices", "multimedia.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_OTHER' } @devices}, 0 ],
+ ["AUDIO","Soundcard", "sound.png", "$sbindir/draksound", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_AUDIO' } @devices}, 0 ],
+ ["WEBCAM","Webcam", "webcam.png", "", sub { grep { $_->{media_type} =~ 'MULTIMEDIA_VIDEO' && $_->{bus} ne 'PCI'} @devices }, 0 ],
+ ["CPU","Processors", "cpu.png", "", sub { detect_devices::getCPUs() }, 0 ],
+ ["ETHERNET","Ethernetcard", "hw_network.png", "$sbindir/drakconnect", sub {
+ #- generic NIC detection for USB seems broken (class, subclass,
+ #- protocol report are not accurate) so I'll need to verify against
+ #- known drivers :-(
+ my @usbnet = qw/CDCEther catc kaweth pegasus usbnet/;
+ # should be taken from detect_devices.pm or modules.pm. it's identical
+
+ grep { $_->{media_type} =~ /^NETWORK/ || member($_->{driver}, @usbnet) || $_->{type} eq 'network' } @devices}, 1 ],
+ ["MODEM","Modem", "modem.png", "", sub { detect_devices::getModem() } , 0 ],
+ ["BRIDGE","Bridge(s)", "memory.png", "", sub { grep { $_->{media_type} =~ 'BRIDGE' } @devices}, 0 ],
+ ["UNKNOWN","Unknown/Others", "unknown.png", "" , \&unknown, 0 ],
- ["PRINTER","Printer", "hw_printer.png", "$sbindir/printerdrake", sub { require printerdrake; printerdrake::detect() } , 0 ],
- ["SCANNER","Scanner", "scanner.png", "$sbindir/scannerdrake", sub { require scanner; scanner::detect() }, 0 ],
- ["MOUSE","Mouse", "hw_mouse.png", "$sbindir/mousedrake", sub {
- require mouse;
- require modules;
- modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
- &mouse::detect() } , 1 ],
- ["JOYSTICK","Joystick", "joystick.png", "", sub {}, 0 ],
+ ["PRINTER","Printer", "hw_printer.png", "$sbindir/printerdrake", sub { require printerdrake; printerdrake::detect() } , 0 ],
+ ["SCANNER","Scanner", "scanner.png", "$sbindir/scannerdrake", sub { require scanner; scanner::detect() }, 0 ],
+ ["MOUSE","Mouse", "hw_mouse.png", "$sbindir/mousedrake", sub {
+ require mouse;
+ require modules;
+ modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
+ &mouse::detect() } , 1 ],
+ ["JOYSTICK","Joystick", "joystick.png", "", sub {}, 0 ],
- ["ATA_STORAGE","(E)IDE/ATA controllers", "ide_hd.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_(IDE|OTHER)' } @devices}, 0 ],
- ["SCSI_CONTROLLER","SCSI controllers", "scsi.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_SCSI' } @devices}, 0 ],
- ["USB_CONTROLLER","USB controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_USB' } @devices}, 0 ],
- ["SMB_CONTROLLER","SMBus controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_SMBUS' } @devices}, 0 ],
- );
+ ["ATA_STORAGE","(E)IDE/ATA controllers", "ide_hd.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_(IDE|OTHER)' } @devices}, 0 ],
+ ["SCSI_CONTROLLER","SCSI controllers", "scsi.png", "", sub { grep { $_->{media_type} =~ 'STORAGE_SCSI' } @devices}, 0 ],
+ ["USB_CONTROLLER","USB controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_USB' } @devices}, 0 ],
+ ["SMB_CONTROLLER","SMBus controllers", "usb.png", "", sub { grep { $_->{media_type} =~ 'SERIAL_SMBUS' } @devices}, 0 ],
+ );
sub custom_id {
my ($device, $str) = @_;
defined($device->{device}) ? $device->{device} :
- (defined($device->{processor}) ?
- "$device->{vendor_id} $device->{name} " . _("cpu number ") . $device->{processor} :
- (defined($device->{description}) ? $device->{description} : $str));
+ (defined($device->{processor}) ?
+ "$device->{vendor_id} $device->{name} " . _("cpu number ") . $device->{processor} :
+ (defined($device->{description}) ? $device->{description} : $str));
}
1;
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 325f5e07b..269581488 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -25,98 +25,98 @@ use standalone;
my %alsa2oss =
(
- "snd-ad1816a" => [ "ad1816" ], # isa
- "snd-ad1848" => [ "ad1848" ], # isa
- "snd-ali5451" => [ "unknown" ],
- "snd-als100" => [ "unknown" ], # isa
- "snd-als4000" => [ "unknown" ],
- "snd-azt2320" => [ "unknown" ], # isa
- "snd-cmi8330" => [ "unknown" ], # isa
- "snd-cmipci" => [ "cmpci" ],
- "snd-cs4231" => [ "unknown" ], # isa
- "snd-cs4232" => [ "cs4232" ], # isa
- "snd-cs4236" => [ "unknown" ], # isa
- "snd-cs4281" => [ "cs4281" ],
- "snd-cs46xx" => [ "cs46xx" ],
- "snd-dt0197h" => [ "unknown" ], # isa
- "snd-emu10k1" => [ "audigy", "emu10k1" ],
- "snd-ens1370" => [ "es1370" ],
- "snd-ens1371" => [ "es1371" ],
- "snd-es1688" => [ "unknown" ], # isa
- "snd-es18xx" => [ "unknown" ], # isa
- "snd-es1938" => [ "esssolo1" ],
- "snd-es1968" => [ "maestro" ], # isa
- "snd-es968" => [ "unknown" ],
- "snd-fm801" => [ "unknown"],
- "snd-gusclassic" => [ "gus" ], # isa
- "snd-gusextreme" => [ "gus" ], # isa
- "snd-gusmax" => [ "gus" ], # isa
- "snd-hdsp" => [ "unknown" ],
- "snd-ice1712" => [ "unknown" ], # isa
- "snd-intel8x0" => [ "i810_audio", "nvaudio" ],
- "snd-interwave" => [ "gus" ], # isa
- "snd-korg1212" => [ "unknown" ], # isa
- "snd-maestro3" => [ "maestro3" ],
- "snd-mpu401" => [ "mpu401" ],
- "snd-nm256" => [ "nm256_audio" ],
- "snd-opl3sa2" => [ "opl3", "opl3sa", "opl3sa2" ], # isa
- "snd-opti93x" => [ "mad16" ],
- "snd-rme32" => [ "unknown" ], # isa
- "snd-rme96" => [ "unknown" ], # isa
- "snd-rme9652g" => [ "rme96xx" ],
- "snd-sb16" => ["sscape", "sb"],
- "snd-sb8" => [ "sb" ],
- "snd-sbawe" => [ "awe_wave" ],
- "snd-sgalaxy" => [ "sgalaxy" ], # isa
- "snd-sonicvibes" => [ "sonicvibes" ],
- "snd-trident" => [ "trident" ],
- "snd-usb-audio" => [ "unknown" ], # usb
- "snd-via686" => [ "via82cxxx_audio" ],
- "snd-via8233" => [ "unknown" ],
- "snd-wavefront" => [ "wavefront" ], # isa
- "snd-ymfpci" => [ "ymfpci" ]
- );
+ "snd-ad1816a" => [ "ad1816" ], # isa
+ "snd-ad1848" => [ "ad1848" ], # isa
+ "snd-ali5451" => [ "unknown" ],
+ "snd-als100" => [ "unknown" ], # isa
+ "snd-als4000" => [ "unknown" ],
+ "snd-azt2320" => [ "unknown" ], # isa
+ "snd-cmi8330" => [ "unknown" ], # isa
+ "snd-cmipci" => [ "cmpci" ],
+ "snd-cs4231" => [ "unknown" ], # isa
+ "snd-cs4232" => [ "cs4232" ], # isa
+ "snd-cs4236" => [ "unknown" ], # isa
+ "snd-cs4281" => [ "cs4281" ],
+ "snd-cs46xx" => [ "cs46xx" ],
+ "snd-dt0197h" => [ "unknown" ], # isa
+ "snd-emu10k1" => [ "audigy", "emu10k1" ],
+ "snd-ens1370" => [ "es1370" ],
+ "snd-ens1371" => [ "es1371" ],
+ "snd-es1688" => [ "unknown" ], # isa
+ "snd-es18xx" => [ "unknown" ], # isa
+ "snd-es1938" => [ "esssolo1" ],
+ "snd-es1968" => [ "maestro" ], # isa
+ "snd-es968" => [ "unknown" ],
+ "snd-fm801" => [ "unknown"],
+ "snd-gusclassic" => [ "gus" ], # isa
+ "snd-gusextreme" => [ "gus" ], # isa
+ "snd-gusmax" => [ "gus" ], # isa
+ "snd-hdsp" => [ "unknown" ],
+ "snd-ice1712" => [ "unknown" ], # isa
+ "snd-intel8x0" => [ "i810_audio", "nvaudio" ],
+ "snd-interwave" => [ "gus" ], # isa
+ "snd-korg1212" => [ "unknown" ], # isa
+ "snd-maestro3" => [ "maestro3" ],
+ "snd-mpu401" => [ "mpu401" ],
+ "snd-nm256" => [ "nm256_audio" ],
+ "snd-opl3sa2" => [ "opl3", "opl3sa", "opl3sa2" ], # isa
+ "snd-opti93x" => [ "mad16" ],
+ "snd-rme32" => [ "unknown" ], # isa
+ "snd-rme96" => [ "unknown" ], # isa
+ "snd-rme9652g" => [ "rme96xx" ],
+ "snd-sb16" => ["sscape", "sb"],
+ "snd-sb8" => [ "sb" ],
+ "snd-sbawe" => [ "awe_wave" ],
+ "snd-sgalaxy" => [ "sgalaxy" ], # isa
+ "snd-sonicvibes" => [ "sonicvibes" ],
+ "snd-trident" => [ "trident" ],
+ "snd-usb-audio" => [ "unknown" ], # usb
+ "snd-via686" => [ "via82cxxx_audio" ],
+ "snd-via8233" => [ "unknown" ],
+ "snd-wavefront" => [ "wavefront" ], # isa
+ "snd-ymfpci" => [ "ymfpci" ]
+ );
my %oss2alsa =
(
- "ad1816" => [ "snd-ad1816a" ],
- "ad1848" => [ "snd-ad1848" ],
- "audigy" => [ "snd-emu10k1" ],
- "awe_wave" => [ "snd-sbawe" ],
- "btaudio" => [ "unknown" ],
- "cmpci" => [ "snd-cmipci" ],
- "cs4232" => [ "snd-cs4232" ],
- "cs4281" => [ "snd-cs4281" ],
- "cs46xx" => [ "snd-cs46xx" ],
- "emu10k1" => [ "snd-emu10k1" ],
- "es1370" => [ "snd-ens1370" ],
- "es1371" => [ "snd-ens1371" ],
- "esssolo1" => [ "snd-es1938" ],
- "gus" => ["snd-interwave", "snd-gusclassic", "snd-gusmax", "snd-gusextreme"],
- "i810_audio" => [ "snd-intel8x0"],
- "mad16" => [ "snd-opti93x" ],
- "maestro" => [ "snd-es1968" ],
- "maestro3" => [ "snd-maestro3" ],
- "mpu401" => [ "snd-mpu401" ],
- "msnd_pinnacle" => [ "unknown" ],
- "msnd_pinnacle" => [ "unknown" ],
- "nm256_audio" => [ "snd-nm256" ],
- "nvaudio" => [ "snd-intel8x0"],
- "opl3" => [ "snd-opl3sa2" ],
- "opl3sa" => [ "snd-opl3sa2" ],
- "opl3sa2" => [ "snd-opl3sa2" ],
- "pas2" => [ "unknown" ],
- "rme96xx" => [ "snd-rme9652.o.g" ],
- "sb" => ["snd-sb8", "snd-sb16"],
- "sgalaxy" => [ "snd-sgalaxy" ],
- "sonicvibes" => [ "snd-sonicvibes" ],
- "sscape" => [ "snd-sb16" ],
- "trident" => [ "snd-trident" ],
- "via82cxxx_audio" => [ "snd-via686" ],
- "wavefront" => [ "snd-wavefront" ],
- "ymfpci" => [ "snd-ymfpci" ]
- );
+ "ad1816" => [ "snd-ad1816a" ],
+ "ad1848" => [ "snd-ad1848" ],
+ "audigy" => [ "snd-emu10k1" ],
+ "awe_wave" => [ "snd-sbawe" ],
+ "btaudio" => [ "unknown" ],
+ "cmpci" => [ "snd-cmipci" ],
+ "cs4232" => [ "snd-cs4232" ],
+ "cs4281" => [ "snd-cs4281" ],
+ "cs46xx" => [ "snd-cs46xx" ],
+ "emu10k1" => [ "snd-emu10k1" ],
+ "es1370" => [ "snd-ens1370" ],
+ "es1371" => [ "snd-ens1371" ],
+ "esssolo1" => [ "snd-es1938" ],
+ "gus" => ["snd-interwave", "snd-gusclassic", "snd-gusmax", "snd-gusextreme"],
+ "i810_audio" => [ "snd-intel8x0"],
+ "mad16" => [ "snd-opti93x" ],
+ "maestro" => [ "snd-es1968" ],
+ "maestro3" => [ "snd-maestro3" ],
+ "mpu401" => [ "snd-mpu401" ],
+ "msnd_pinnacle" => [ "unknown" ],
+ "msnd_pinnacle" => [ "unknown" ],
+ "nm256_audio" => [ "snd-nm256" ],
+ "nvaudio" => [ "snd-intel8x0"],
+ "opl3" => [ "snd-opl3sa2" ],
+ "opl3sa" => [ "snd-opl3sa2" ],
+ "opl3sa2" => [ "snd-opl3sa2" ],
+ "pas2" => [ "unknown" ],
+ "rme96xx" => [ "snd-rme9652.o.g" ],
+ "sb" => ["snd-sb8", "snd-sb16"],
+ "sgalaxy" => [ "snd-sgalaxy" ],
+ "sonicvibes" => [ "snd-sonicvibes" ],
+ "sscape" => [ "snd-sb16" ],
+ "trident" => [ "snd-trident" ],
+ "via82cxxx_audio" => [ "snd-via686" ],
+ "wavefront" => [ "snd-wavefront" ],
+ "ymfpci" => [ "snd-ymfpci" ]
+ );
my @blacklist = (qw(cs46xx cs4281));
my $blacklisted = 0;
@@ -143,9 +143,9 @@ sub do_switch {
modules::add_alias("sound-slot-$::i", $new_driver);
modules::write_conf;
if ($new_driver =~ /^snd-/) {
- rooted("service alsa start") unless $blacklisted;
- rooted("/sbin/chkconfig --add alsa");
- load($new_driver); # service alsa is buggy
+ rooted("service alsa start") unless $blacklisted;
+ rooted("/sbin/chkconfig --add alsa");
+ load($new_driver); # service alsa is buggy
} else { run_program::run("/sbin/chkconfig --del alsa") }
standalone::explanations("loading new $new_driver\n");
rooted("/sbin/chkconfig --add sound"); # just in case ...
@@ -160,25 +160,25 @@ sub switch {
foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ }
my $alternative = get_alternative($driver);
if ($alternative) {
- my $new_driver = $alternative->[0];
- if ($new_driver eq 'unknown') {
- $in->ask_warn(_("No alternative driver"),
- _("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
- $device->{description}, $driver));
- } elsif ($in->ask_from(_("Sound configuration"),
- _("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).",
- $device->{description}) .
- _("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
- [
- { label => _("Driver:"), val => \$new_driver, list => $alternative, default => $new_driver, sort =>1, format => sub {
- my %des = modules::category2modules_and_description('multimedia/sound');
- "$_[0] (". $des{$_[0]} . ')'
- }, allow_empty_list => 1 },
- {
- val => _("Help"), disabled => sub { },
- clicked => sub {
- $in->ask_warn(_("Switching between ALSA and OSS help"),
- _("OSS (Open Sound System) was the first sound API. It's an OS independant sound API (it's available on most unices systems) but it's a very basic and limited API.
+ my $new_driver = $alternative->[0];
+ if ($new_driver eq 'unknown') {
+ $in->ask_warn(_("No alternative driver"),
+ _("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
+ $device->{description}, $driver));
+ } elsif ($in->ask_from(_("Sound configuration"),
+ _("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).",
+ $device->{description}) .
+ _("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
+ [
+ { label => _("Driver:"), val => \$new_driver, list => $alternative, default => $new_driver, sort =>1, format => sub {
+ my %des = modules::category2modules_and_description('multimedia/sound');
+ "$_[0] (". $des{$_[0]} . ')'
+ }, allow_empty_list => 1 },
+ {
+ val => _("Help"), disabled => sub { },
+ clicked => sub {
+ $in->ask_warn(_("Switching between ALSA and OSS help"),
+ _("OSS (Open Sound System) was the first sound API. It's an OS independant sound API (it's available on most unices systems) but it's a very basic and limited API.
What's more, OSS drivers all reinvent the wheel.
ALSA (Advanced Linux Sound Architecture) is a modularized architecture which
@@ -188,30 +188,30 @@ To use alsa, one can either use:
- the old compatibility OSS api
- the new ALSA api that provides many enhanced features but requires using the ALSA library.
"))
- }
- }
- ]))
- {
- return if ($new_driver eq $driver);
- standalone::explanations("switching audio driver from '$driver' to '$new_driver'\n");
- $in->ask_warn(_("Warning"), _("The old \"%s\" driver is blacklisted.\n
+ }
+ }
+ ]))
+ {
+ return if ($new_driver eq $driver);
+ standalone::explanations("switching audio driver from '$driver' to '$new_driver'\n");
+ $in->ask_warn(_("Warning"), _("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;
- my $wait = $in->wait_message(_("Please wait"),_("Please Wait... Applying the configuration"));
- do_switch($driver, $new_driver);
- undef $wait;
- }
+ my $wait = $in->wait_message(_("Please wait"),_("Please Wait... Applying the configuration"));
+ do_switch($driver, $new_driver);
+ undef $wait;
+ }
} elsif ($driver eq "unknown") {
- $in->ask_warn(_("No known driver"),
- _("There's no known driver for your sound card (%s)",
- $device->{description}));
+ $in->ask_warn(_("No known driver"),
+ _("There's no known driver for your sound card (%s)",
+ $device->{description}));
} else {
- $in->ask_warn(_("Unkown driver"),
- _("The \"%s\" driver for your sound card is unlisted\n
+ $in->ask_warn(_("Unkown driver"),
+ _("The \"%s\" driver for your sound card is unlisted\n
Please send the output of the \"lspcidrake -v\" command to
<install at mandrakesoft dot com>
with subject: unlisted sound driver \"%s\"")
- , $driver, $driver);
+ , $driver, $driver);
}
}
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm
index 7268542bb..b2ec58a9e 100644
--- a/perl-install/harddrake/ui.pm
+++ b/perl-install/harddrake/ui.pm
@@ -11,34 +11,34 @@ use interactive;
# { field => [ short_translation, full_description] }
my %fields =
(
- "alternative_drivers" => [ _("Alternative drivers"),
- _("the list of alternative drivers for this sound card")],
- "bus" =>
- [ _("Bus"),
- _("this is the physical bus on which the device is plugged (eg: PCI, USB, ...)")],
- "channel" => [_("Channel"), _("EIDE/SCSI channel")],
- "bus_id" =>
- [ _("Bus identification"),
- _("- PCI and USB devices: this list the vendor, device, subvendor and subdevice PCI/USB ids")],
- "bus_location" =>
- [ _("Location on the bus"),
- _("- pci devices: this gives the PCI slot, device and function of this card
+ "alternative_drivers" => [ _("Alternative drivers"),
+ _("the list of alternative drivers for this sound card")],
+ "bus" =>
+ [ _("Bus"),
+ _("this is the physical bus on which the device is plugged (eg: PCI, USB, ...)")],
+ "channel" => [_("Channel"), _("EIDE/SCSI channel")],
+ "bus_id" =>
+ [ _("Bus identification"),
+ _("- PCI and USB devices: this list the vendor, device, subvendor and subdevice PCI/USB ids")],
+ "bus_location" =>
+ [ _("Location on the bus"),
+ _("- pci devices: this gives the PCI slot, device and function of this card
- eide devices: the device is either a slave or a master device
- scsi devices: the scsi bus and the scsi device ids")],
- "description" => [ _("Description"), _("this field describe the device")],
- "device" => [ _("Old device file"),
- _("old static device name used in dev package")],
- "devfs_device" => [ _("New devfs device"),
- _("new dinamic device name generated by incore kernel devfs")],
- "driver" => [ _("Module"), _("the module of the GNU/Linux kernel that handle that device")],
- "media_type" => [ _("Media class"), _("class of hardware device")],
- "Model" => [_("Model"), _("hard disk model")],
- "nbuttons" => [ _("Number of buttons"), "the number of buttons the mouse have"],
- "name" => [ _("Name"), "the name of the cpu"],
- "processor" => [ _("Processor ID"), _("the number of the processor")],
- "Vendor" => [ _("Vendor"), _("the vendor name of the device")],
- "vendor_id" => [ _("Vendor"), _("the vendor name of the processor")]
- );
+ "description" => [ _("Description"), _("this field describe the device")],
+ "device" => [ _("Old device file"),
+ _("old static device name used in dev package")],
+ "devfs_device" => [ _("New devfs device"),
+ _("new dinamic device name generated by incore kernel devfs")],
+ "driver" => [ _("Module"), _("the module of the GNU/Linux kernel that handle that device")],
+ "media_type" => [ _("Media class"), _("class of hardware device")],
+ "Model" => [_("Model"), _("hard disk model")],
+ "nbuttons" => [ _("Number of buttons"), "the number of buttons the mouse have"],
+ "name" => [ _("Name"), "the name of the cpu"],
+ "processor" => [ _("Processor ID"), _("the number of the processor")],
+ "Vendor" => [ _("Vendor"), _("the vendor name of the device")],
+ "vendor_id" => [ _("Vendor"), _("the vendor name of the processor")]
+ );
our $license = 'Copyright (C) 1999-2002 MandrakeSoft by tvignaud@mandrakesoft.com
@@ -65,79 +65,83 @@ my $conffile = "/etc/sysconfig/harddrake2/ui.conf";
my ($modem_check_box, $printer_check_box);
-my @menu_items = ( { path => _("/_File"), type => '<Branch>' },
- { path => _("/_File")._("/_Quit"), accelerator => _("<control>Q"), callback => \&quit_global },
-# { path => _("/_Options")._("/Autodetect _printers"), type => '<CheckItem>',
-# callback => sub { $options{PRINTERS_DETECTION} ^= 1 } },
-# { path => _("/_Options")._("/Autodetect _modems"), type => '<CheckItem>',
-# callback => sub { $options{MODEMS_DETECTION} ^= 1 } },
-
- { path => _("/_Help"), type => '<Branch>' },
- { path => _("/_Help")._("/_Help..."), callback => sub {
- $in->ask_warn(_("Harddrake help"),
- _("Description of the fields:\n\n")
- . join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]")} keys %fields));
- }
- },
- { path => _("/_Help")._("/_Report Bug"),
- callback => sub { unless (fork) { exec("drakbug --report harddrake2 &") } } },
- { path => _("/_Help")._("/_About..."), callback => sub {
- $in->ask_warn(_("About Harddrake"),
- join ("", _("This is HardDrake, a Mandrake hardware configuration tool.\nVersion:"), " $harddrake::data::version\n",
- _("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n" ,
- formatAlaTeX($license)));
- }
- },
- );
+my @menu_items =
+ (
+ { path => _("/_File"), type => '<Branch>' },
+ { path => _("/_File")._("/_Quit"), accelerator => _("<control>Q"), callback => \&quit_global },
+# { path => _("/_Options")._("/Autodetect _printers"), type => '<CheckItem>',
+# callback => sub { $options{PRINTERS_DETECTION} ^= 1 } },
+# { path => _("/_Options")._("/Autodetect _modems"), type => '<CheckItem>',
+# callback => sub { $options{MODEMS_DETECTION} ^= 1 } },
+ { path => _("/_Help"), type => '<Branch>' },
+ {
+ path => _("/_Help")._("/_Help..."),
+ callback => sub {
+ $in->ask_warn(_("Harddrake help"),
+ _("Description of the fields:\n\n")
+ . join("\n\n", map { if_($fields{$_}[0], "$fields{$_}[0]: $fields{$_}[1]")} keys %fields));
+ }
+ },
+ { path => _("/_Help")._("/_Report Bug"),
+ callback => sub { unless (fork) { exec("drakbug --report harddrake2 &") } } },
+ { path => _("/_Help")._("/_About..."),
+ callback => sub {
+ $in->ask_warn(_("About Harddrake"),
+ join ("", _("This is HardDrake, a Mandrake hardware configuration tool.\nVersion:"), " $harddrake::data::version\n",
+ _("Author:"), " Thierry Vignaud <tvignaud\@mandrakesoft.com> \n\n" ,
+ formatAlaTeX($license)));
+ }
+ }
+ );
# fill the devices tree
sub detect {
my @class_tree;
foreach (@harddrake::data::tree) {
- my ($Ident, $title, $icon, $configurator, $detector) = @$_;
- next if (ref($detector) ne "CODE"); #skip class witouth detector
- next if $Ident =~ /(MODEM|PRINTER)/ && "@ARGV" =~ /test/;
- next if $Ident =~ /MODEM/ && !$options{MODEMS_DETECTION};
- next if $Ident =~ /PRINTER/ && !$options{PRINTERS_DETECTION};
-# print _("Probing %s class\n", $Ident);
-# standalone::explanations("Probing %s class\n", $Ident);
+ my ($Ident, $title, $icon, $configurator, $detector) = @$_;
+ next if (ref($detector) ne "CODE"); #skip class witouth detector
+ next if $Ident =~ /(MODEM|PRINTER)/ && "@ARGV" =~ /test/;
+ next if $Ident =~ /MODEM/ && !$options{MODEMS_DETECTION};
+ next if $Ident =~ /PRINTER/ && !$options{PRINTERS_DETECTION};
+# print _("Probing %s class\n", $Ident);
+# standalone::explanations("Probing %s class\n", $Ident);
- my @devices = &$detector;
- next if (!listlength(@devices)); # Skip empty class (no devices)
- my $devices_list;
- foreach (@devices) {
- $_->{custom_id} = harddrake::data::custom_id($_, $title);
- if (exists $_->{bus} && $_->{bus} eq "PCI") {
- my $i = $_;
- $_->{bus_id} = join ':', map { if_($i->{$_} ne "65535", sprintf("%lx", $i->{$_})) } qw(vendor id subvendor subid);
- $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(pci_bus pci_device pci_function);
- }
- # split description into manufacturer/description
- ($_->{Vendor}, $_->{description}) = split(/\|/,$_->{description}) if exists $_->{description};
-
- if (exists $_->{val}) { # Scanner ?
- my $val = $_->{val};
- ($_->{Vendor},$_->{description}) = split(/\|/, $val->{DESCRIPTION});
- }
- # EIDE detection incoherency:
- if (exists $_->{bus} && $_->{bus} eq 'ide') {
- $_->{channel} = _($_->{channel} ? "secondary" : "primary");
- delete $_->{info};
- } elsif ((exists $_->{id}) && ($_->{bus} ne 'PCI')) {
- # SCSI detection incoherency:
- my $i = $_;
- $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(bus id);
- }
- if ($Ident eq "AUDIO") {
- require harddrake::sound;
- my $alter = harddrake::sound::get_alternative($_->{driver});
- $_->{alternative_drivers} = join(':', @$alter) if $alter->[0] ne 'unknown';
- }
- foreach my $i (qw(vendor id subvendor subid pci_bus pci_device pci_function MOUSETYPE XMOUSETYPE unsafe val devfs_prefix wacom auxmouse)) { delete $_->{$i} }
- $_->{device} = '/dev/'.$_->{device} if exists $_->{device};
- push @$devices_list, $_;
- }
- push @class_tree, [ $devices_list, [ [$title], 5], $icon, [ 0, ($title =~ /Unknown/ ? 0 : 1) ], $title, $configurator ];
+ my @devices = &$detector;
+ next if (!listlength(@devices)); # Skip empty class (no devices)
+ my $devices_list;
+ foreach (@devices) {
+ $_->{custom_id} = harddrake::data::custom_id($_, $title);
+ if (exists $_->{bus} && $_->{bus} eq "PCI") {
+ my $i = $_;
+ $_->{bus_id} = join ':', map { if_($i->{$_} ne "65535", sprintf("%lx", $i->{$_})) } qw(vendor id subvendor subid);
+ $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(pci_bus pci_device pci_function);
+ }
+ # split description into manufacturer/description
+ ($_->{Vendor}, $_->{description}) = split(/\|/,$_->{description}) if exists $_->{description};
+
+ if (exists $_->{val}) { # Scanner ?
+ my $val = $_->{val};
+ ($_->{Vendor},$_->{description}) = split(/\|/, $val->{DESCRIPTION});
+ }
+ # EIDE detection incoherency:
+ if (exists $_->{bus} && $_->{bus} eq 'ide') {
+ $_->{channel} = _($_->{channel} ? "secondary" : "primary");
+ delete $_->{info};
+ } elsif ((exists $_->{id}) && ($_->{bus} ne 'PCI')) {
+ # SCSI detection incoherency:
+ my $i = $_;
+ $_->{bus_location} = join ':', map { sprintf("%lx", $i->{$_} ) } qw(bus id);
+ }
+ if ($Ident eq "AUDIO") {
+ require harddrake::sound;
+ my $alter = harddrake::sound::get_alternative($_->{driver});
+ $_->{alternative_drivers} = join(':', @$alter) if $alter->[0] ne 'unknown';
+ }
+ foreach my $i (qw(vendor id subvendor subid pci_bus pci_device pci_function MOUSETYPE XMOUSETYPE unsafe val devfs_prefix wacom auxmouse)) { delete $_->{$i} }
+ $_->{device} = '/dev/'.$_->{device} if exists $_->{device};
+ push @$devices_list, $_;
+ }
+ push @class_tree, [ $devices_list, [ [$title], 5], $icon, [ 0, ($title =~ /Unknown/ ? 0 : 1) ], $title, $configurator ];
}
@class_tree;
}
@@ -145,9 +149,9 @@ sub detect {
sub new {
my ($sig_id, $wait);
unless ($::isEmbedded) {
- $in = 'interactive'->vnew('su', 'default');
- $wait = $in->wait_message(_("Please wait"), _("Detection in progress"));
- my_gtk::flush;
+ $in = 'interactive'->vnew('su', 'default');
+ $wait = $in->wait_message(_("Please wait"), _("Detection in progress"));
+ my_gtk::flush;
}
%options = getVarsFromSh($conffile);
my @class_tree = &detect;
@@ -159,26 +163,25 @@ sub new {
$options{MODEMS_DETECTION} = 1 unless defined $options{MODEMS_DETECTION};
$options{PRINTERS_DETECTION} = 1 unless defined $options{PRINTERS_DETECTION};
- $w->{window}->add(
- my $main_vbox = gtkadd(gtkadd($::isEmbedded ? new Gtk::VBox(0, 0) :
- gtkadd(new Gtk::VBox(0, 0),
- my $menubar = ugtk::create_factory_menu($w->{rwindow}, @menu_items)),
- my $hpaned = new Gtk::HPaned),
- my $statusbar = new Gtk::Statusbar));
+ $w->{window}->add(my $main_vbox = gtkadd(gtkadd($::isEmbedded ? new Gtk::VBox(0, 0) :
+ gtkadd(new Gtk::VBox(0, 0),
+ my $menubar = ugtk::create_factory_menu($w->{rwindow}, @menu_items)),
+ my $hpaned = new Gtk::HPaned),
+ my $statusbar = new Gtk::Statusbar));
$main_vbox->set_child_packing($statusbar, 0, 0, 0, 'start');
if ($::isEmbedded) {
- $main_vbox->add(gtksignal_connect(my $but = new Gtk::Button(_("Quit")),
- 'clicked' => \&quit_global));
- $main_vbox->set_child_packing($but, 0, 0, 0, 'start');
+ $main_vbox->add(gtksignal_connect(my $but = new Gtk::Button(_("Quit")),
+ 'clicked' => \&quit_global));
+ $main_vbox->set_child_packing($but, 0, 0, 0, 'start');
} else { $main_vbox->set_child_packing($menubar, 0, 0, 0, 'start') }
$hpaned->pack1(gtkadd(new Gtk::Frame(_("Detected hardware")), createScrolledWindow(my $tree = new Gtk::CTree(1, 0))), 1, 1);
$hpaned->pack2(my $vbox = gtkadd(gtkadd(gtkadd(new Gtk::VBox,
- gtkadd(new Gtk::Frame(_("Information")),
- gtkadd(new Gtk::HBox,
- createScrolledWindow(my $text = new Gtk::Text)))),
- my $module_cfg_button = new Gtk::Button(_("Configure module"))),
- my $config_button = new Gtk::Button(_("Run config tool"))), 1, 1);
+ gtkadd(new Gtk::Frame(_("Information")),
+ gtkadd(new Gtk::HBox,
+ createScrolledWindow(my $text = new Gtk::Text)))),
+ my $module_cfg_button = new Gtk::Button(_("Configure module"))),
+ my $config_button = new Gtk::Button(_("Run config tool"))), 1, 1);
$vbox->set_child_packing($config_button, 0, 0, 0, 'start');
$vbox->set_child_packing($module_cfg_button, 0, 0, 0, 'start');
@@ -191,65 +194,65 @@ sub new {
my $curr = $tree->node_nth(0); #- default value
$tree->signal_connect( 'select_row', sub {
- my ( $ctree, $row, $column, $event ) = @_;
- my $node = $ctree->node_nth( $row );
- my ($name, undef) = $tree->node_get_pixtext($node,0);
- my $data = $tree->{data}{$name};
+ my ( $ctree, $row, $column, $event ) = @_;
+ my $node = $ctree->node_nth( $row );
+ my ($name, undef) = $tree->node_get_pixtext($node,0);
+ my $data = $tree->{data}{$name};
- if ($data) {
- $text->hide;
- $text->backward_delete($text->get_point);
- foreach my $i (sort keys %$data) {
- $text->insert("", $text->style->black, "", ($fields{$i}[0] ? $fields{$i}[0] : $i) . ": ");
- if ($i eq 'driver' && $data->{$i} eq 'unknown') {
- $text->insert("", $wcolor, "", "$data->{$i}\n\n");
- } else { $text->insert("", $color, "", "$data->{$i}\n\n") }
- }
- disconnect($module_cfg_button, 'module');
+ if ($data) {
+ $text->hide;
+ $text->backward_delete($text->get_point);
+ foreach my $i (sort keys %$data) {
+ $text->insert("", $text->style->black, "", ($fields{$i}[0] ? $fields{$i}[0] : $i) . ": ");
+ if ($i eq 'driver' && $data->{$i} eq 'unknown') {
+ $text->insert("", $wcolor, "", "$data->{$i}\n\n");
+ } else { $text->insert("", $color, "", "$data->{$i}\n\n") }
+ }
+ disconnect($module_cfg_button, 'module');
- # we've valid driver, let's offer to configure it
- if (exists $data->{driver} && $data->{driver} !~ /(unknown|.*\|.*)/ && $data->{driver} !~ /^Card:/) {
- $module_cfg_button->show;
- $IDs{module} = $module_cfg_button->signal_connect(clicked => sub {
- require modules::interactive;
- modules::interactive::config_window($in, $data);
- gtkset_mousecursor_normal();
- });
- }
- disconnect($config_button, 'tool');
- $text->show;
- my $configurator = $tree->{configurator}{$name};
+ # we've valid driver, let's offer to configure it
+ if (exists $data->{driver} && $data->{driver} !~ /(unknown|.*\|.*)/ && $data->{driver} !~ /^Card:/) {
+ $module_cfg_button->show;
+ $IDs{module} = $module_cfg_button->signal_connect(clicked => sub {
+ require modules::interactive;
+ modules::interactive::config_window($in, $data);
+ gtkset_mousecursor_normal();
+ });
+ }
+ disconnect($config_button, 'tool');
+ $text->show;
+ my $configurator = $tree->{configurator}{$name};
- return unless -x $configurator;
-
- # we've a configurator, let's add a button for it and show it
- $IDs{tool} = $config_button->signal_connect(clicked => sub {
- return if defined $pid;
- if ($pid = fork()) {
- $sig_id = $statusbar->push($statusbar->get_context_id("id"), _("Running \"%s\" ...", $configurator));
- } else { exec($configurator) or die "$configurator missing\n" }
- }) ;
- $config_button->show;
- } else {
- $text->backward_delete($text->get_point); # erase all previous text
- $config_button->hide;
- $module_cfg_button->hide;
- }
+ return unless -x $configurator;
+
+ # we've a configurator, let's add a button for it and show it
+ $IDs{tool} = $config_button->signal_connect(clicked => sub {
+ return if defined $pid;
+ if ($pid = fork()) {
+ $sig_id = $statusbar->push($statusbar->get_context_id("id"), _("Running \"%s\" ...", $configurator));
+ } else { exec($configurator) or die "$configurator missing\n" }
+ }) ;
+ $config_button->show;
+ } else {
+ $text->backward_delete($text->get_point); # erase all previous text
+ $config_button->hide;
+ $module_cfg_button->hide;
+ }
});
# Fill the graphic tree with a "tree branch" widget per device category
foreach (@class_tree) {
- my ($devices_list, $arg, $icon, $arg2, $title, $configurator ) = @$_;
- my $hw_class_tree = $tree->insert_node(undef, undef, @$arg, (gtkcreate_png($icon)) x 2, @$arg2);
- # Fill the graphic tree with a "tree leaf" widget per device
- foreach (@$devices_list) {
- my $custom_id = $_->{custom_id};
- delete $_->{custom_id};
- $custom_id .= ' ' while exists($tree->{data}{$custom_id});
- my $hw_item = $tree->insert_node($hw_class_tree, undef, [$custom_id ], 5, (undef) x 4, 1, 0);
- $tree->{data}{$custom_id} = $_;
- $tree->{configurator}{$custom_id} = $configurator;
- }
+ my ($devices_list, $arg, $icon, $arg2, $title, $configurator ) = @$_;
+ my $hw_class_tree = $tree->insert_node(undef, undef, @$arg, (gtkcreate_png($icon)) x 2, @$arg2);
+ # Fill the graphic tree with a "tree leaf" widget per device
+ foreach (@$devices_list) {
+ my $custom_id = $_->{custom_id};
+ delete $_->{custom_id};
+ $custom_id .= ' ' while exists($tree->{data}{$custom_id});
+ my $hw_item = $tree->insert_node($hw_class_tree, undef, [$custom_id ], 5, (undef) x 4, 1, 0);
+ $tree->{data}{$custom_id} = $_;
+ $tree->{configurator}{$custom_id} = $configurator;
+ }
}
$SIG{CHLD} = sub { undef $pid; $statusbar->pop($sig_id) };
@@ -275,9 +278,9 @@ sub quit_global {
sub disconnect {
my ($button, $id) = @_;
if ($IDs{$id}) {
- $button->signal_disconnect($IDs{$id});
- $button->hide;
- undef $IDs{$id};
+ $button->signal_disconnect($IDs{$id});
+ $button->hide;
+ undef $IDs{$id};
}
}
diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm
index fccce9a46..414d26a84 100644
--- a/perl-install/harddrake/v4l.pm
+++ b/perl-install/harddrake/v4l.pm
@@ -15,220 +15,220 @@ my $default = _("Auto-detect");
# TODO: split %tuners_lst in per driver perl source files that get transformed in Storable files
my %tuners_lst =
(
- -1 => $default,
- 0 => "Temic|PAL (4002 FH5)",
- 1 => "Philips|PAL_I (FI1246 and compatibles)",
- 2 => "Philips|NTSC (FI1236 and compatibles)",
- 3 => "Philips|(SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)",
- 4 => "NoTuner",
- 5 => "Philips|PAL_BG (FI1216 and compatibles)",
- 6 => "Temic|NTSC (4032 FY5)",
- 7 => "Temic|PAL_I (4062 FY5)",
- 8 => "Temic|NTSC (4036 FY5)",
- 9 => "Alps|HSBH1",
- 10 => "Alps|TSBE1",
- 11 => "Alps|TSBB5",
- 12 => "Alps|TSBE5",
- 13 => "Alps|TSBC5",
- 14 => "Temic|PAL_BG (4006FH5)",
- 15 => "Alps|TSCH6",
- 16 => "Temic|PAL_DK (4016 FY5)",
- 17 => "Philips|NTSC_M (MK2)",
- 18 => "Temic|PAL_I (4066 FY5)",
- 19 => "Temic|PAL* auto (4006 FN5)",
- 20 => "Temic|PAL_BG (4009 FR5) or PAL_I (4069 FR5)",
- 21 => "Temic|NTSC (4039 FR5)",
- 22 => "Temic|PAL/SECAM multi (4046 FM5)",
- 23 => "Philips|PAL_DK (FI1256 and compatibles)",
- 24 => "Philips|PAL/SECAM multi (FQ1216ME)",
- 25 => "LG|PAL_I+FM (TAPC-I001D)",
- 26 => "LG|PAL_I (TAPC-I701D)",
- 27 => "LG|NTSC+FM (TPI8NSR01F)",
- 28 => "LG|PAL_BG+FM (TPI8PSB01D)",
- 29 => "LG|PAL_BG (TPI8PSB11D)",
- 30 => "Temic|PAL* auto + FM (4009 FN5)",
- 31 => "SHARP|NTSC_JP (2U5JF5540)",
- 32 => "Samsung|PAL TCPM9091PD27",
- 33 => "MT2032|universal",
- 34 => "Temic|PAL_BG (4106 FH5)",
- 35 => "Temic|PAL_DK/SECAM_L (4012 FY5)",
- 36 => "Temic|NTSC (4136 FY5)",
- 37 => "LG|PAL (newer TAPC series)",
- 38 => "Philips|PAL/SECAM multi (FM1216ME)",
- 39 => "LG NTSC (newer TAPC series)"
- );
+ -1 => $default,
+ 0 => "Temic|PAL (4002 FH5)",
+ 1 => "Philips|PAL_I (FI1246 and compatibles)",
+ 2 => "Philips|NTSC (FI1236 and compatibles)",
+ 3 => "Philips|(SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF)",
+ 4 => "NoTuner",
+ 5 => "Philips|PAL_BG (FI1216 and compatibles)",
+ 6 => "Temic|NTSC (4032 FY5)",
+ 7 => "Temic|PAL_I (4062 FY5)",
+ 8 => "Temic|NTSC (4036 FY5)",
+ 9 => "Alps|HSBH1",
+ 10 => "Alps|TSBE1",
+ 11 => "Alps|TSBB5",
+ 12 => "Alps|TSBE5",
+ 13 => "Alps|TSBC5",
+ 14 => "Temic|PAL_BG (4006FH5)",
+ 15 => "Alps|TSCH6",
+ 16 => "Temic|PAL_DK (4016 FY5)",
+ 17 => "Philips|NTSC_M (MK2)",
+ 18 => "Temic|PAL_I (4066 FY5)",
+ 19 => "Temic|PAL* auto (4006 FN5)",
+ 20 => "Temic|PAL_BG (4009 FR5) or PAL_I (4069 FR5)",
+ 21 => "Temic|NTSC (4039 FR5)",
+ 22 => "Temic|PAL/SECAM multi (4046 FM5)",
+ 23 => "Philips|PAL_DK (FI1256 and compatibles)",
+ 24 => "Philips|PAL/SECAM multi (FQ1216ME)",
+ 25 => "LG|PAL_I+FM (TAPC-I001D)",
+ 26 => "LG|PAL_I (TAPC-I701D)",
+ 27 => "LG|NTSC+FM (TPI8NSR01F)",
+ 28 => "LG|PAL_BG+FM (TPI8PSB01D)",
+ 29 => "LG|PAL_BG (TPI8PSB11D)",
+ 30 => "Temic|PAL* auto + FM (4009 FN5)",
+ 31 => "SHARP|NTSC_JP (2U5JF5540)",
+ 32 => "Samsung|PAL TCPM9091PD27",
+ 33 => "MT2032|universal",
+ 34 => "Temic|PAL_BG (4106 FH5)",
+ 35 => "Temic|PAL_DK/SECAM_L (4012 FY5)",
+ 36 => "Temic|NTSC (4136 FY5)",
+ 37 => "LG|PAL (newer TAPC series)",
+ 38 => "Philips|PAL/SECAM multi (FM1216ME)",
+ 39 => "LG NTSC (newer TAPC series)"
+ );
# Tweaked from Cardlist
my $cards_lst = {
'bttv' => {
- _("Auto-detect") => -1,
- _("Unknown|Generic") => 0,
- "M|Miro|PCTV" => 1,
- "Hauppauge|bt848" => 2,
- "S|STB|Hauppauge 878" => 3,
- "I|Intel|Create and Share PCI (bttv type 4)" => 4,
- "I|Intel|Smart Video Recorder III (bttv type 4)" => 4,
- "D|Diamond|DTV2000" => 5,
- "A|AVerMedia|TVPhone" => 6,
- "M|MATRIX-Vision|MV-Delta" => 7,
- "L|Lifeview|FlyVideo II (Bt848) LR26" => 8,
- "G|Genius/Kye|Video Wonder Pro II (848 or 878)" => 8,
- "I|IMS/IXmicro|TurboTV" => 9,
- "Hauppauge|bt878" => 10,
- "M|Miro|PCTV pro" => 11,
- "A|ADS Technologies|Channel Surfer TV (bt848)" => 12,
- "A|AVerMedia|TVCapture 98" => 13,
- "A|Aimslab|Video Highway Xtreme (VHX)" => 14,
- "Z|Zoltrix|TV-Max" => 15,
- "P|Prolink|Pixelview PlayTV (bt878)" => 16,
- "L|Leadtek|WinView 601" => 17,
- "A|AVEC|Intercapture" => 18,
- "L|Lifeview|FlyKit LR38 Bt848 (capture only)" => 19,
- "L|Lifeview|FlyVideo II EZ" => 19,
- "C|CEI|Raffles Card" => 20,
- "L|Lifeview|FlyVideo 98" => 21,
- "L|Lucky Star|Image World ConferenceTV LR50" => 21,
- "A|Askey|CPH050" => 22,
- "P|Phoebe Micro|Tv Master + FM" => 22,
- "M|Modular|Technology MM205 PCTV (bt878)" => 23,
- "A|Askey|CPH06X (bt878)" => 24,
- "G|Guillemot|Maxi TV Video 3" => 24,
- "A|Askey|CPH05X (bt878)" => 24,
- _("Unknown|CPH05X (bt878) [many vendors]") => 24,
- _("Unknown|CPH06X (bt878) [many vendors]") => 24,
- "T|Terratec|Terra TV+ Version 1.0 (Bt848)" => 25,
- "Vobis|TV-Boostar" => 25,
- "T|Terratec|TV-Boostar" => 25,
- "Hauppauge|WinCam newer (bt878)" => 26,
- "L|Lifeview|FlyVideo 98" => 27,
- "G|Guillemot|MAXI TV Video PCI2 LR50" => 27,
- "T|Terratec|TerraTV+" => 28,
- "I|Imagenation|PXC200" => 29,
- "L|Lifeview|FlyVideo 98 LR50" => 30,
- "Formac|iProTV" => 31,
- "I|Intel|Create and Share PCI (bttv type 32)" => 32,
- "I|Intel|Smart Video Recorder III (bttv type 32)" => 32,
- "T|Terratec|TerraTValue" => 33,
- "L|Leadtek|WinFast TV 2000" => 34,
- "L|Leadtek|WinFast VC 100" => 35,
- "L|Lifeview|FlyVideo 98 LR50" => 35,
- "C|Chronos|Video Shuttle II" => 35,
- "L|Lifeview|FlyVideo 98FM LR50" => 36,
- "T|Typhoon|TView TV/FM Tuner" => 36,
- "P|Prolink|PixelView PlayTV pro" => 37,
- "P|Prolink|PixelView PlayTV Theater" => 37,
- "A|Askey|CPH06X TView99" => 38,
- "P|Pinnacle|PCTV Studio/Rave" => 39,
- "S|STB|STB2 TV PCI FM, P/N 6000704" => 40,
- "A|AVerMedia|TVPhone 98" => 41,
- "P|ProVideo|PV951" => 42,
- "L|Little|OnAir TV" => 43,
- "S|Sigma|TVII-FM" => 44,
- "M|MATRIX-Vision|MV-Delta 2" => 45,
- "Z|Zoltrix|Genie TV/FM" => 46,
- "T|Terratec|TV/Radio+" => 47,
- "A|Askey|CPH03x" => 48,
- "D|Dynalink|Magic TView" => 48,
- "I|IODATA|GV-BCTV3/PCI" => 49,
- "P|Prolink|PixelView PlayTV PAK" => 50,
- "L|Lenco|MXTV-9578 CP" => 50,
- "P|Prolink|PV-BT878P+4E" => 50,
- "L|Lenco|MXTV-9578CP (Bt878)" => 50,
- "Eagle|Wireless Capricorn2 (bt878A)" => 51,
- "P|Pinnacle|PCTV Studio Pro" => 52,
- "T|Typhoon|KNC1 TV Station RDS" => 53,
- "T|Typhoon|TV Tuner RDS (black package)" => 53,
- "T|Typhoon|TView RDS + FM Stereo" => 53,
- "L|Lifeview|FlyVideo 2000" => 54,
- "L|Lifeview|FlyVideo A2" => 54,
- "L|Lifetec|LT 9415 TV [LR90]" => 54,
- "A|Askey|CPH031" => 55,
- "L|Lenco|MXR-9571 (Bt848)" => 55,
- "Bestbuy|Easy TV" => 55,
- "L|Lifeview|FlyVideo 98FM LR50" => 56,
- "G|GrandTec|Grand Video Capture (Bt848)" => 57,
- "A|Askey|CPH060" => 58,
- "P|Phoebe Micro|TV Master Only (No FM)" => 58,
- "A|Askey|CPH03x TV Capturer" => 59,
- "M|Modular|Technology MM100 PCTV" => 60,
- "A|AG|Electronics GMV1" => 61,
- "A|Askey|CPH061" => 62,
- "Bestbuy|Easy TV (bt878)" => 62,
- "L|Lifetec|LT9306" => 62,
- "M|Medion|MD9306" => 62,
- "A|ATI|TV-Wonder" => 63,
- "A|ATI|TV-Wonder VE" => 64,
- "L|Lifeview|FlyVideo 2000S LR90" => 65,
- "T|Terratec|TValueRadio" => 66,
- "I|IODATA|GV-BCTV4/PCI" => 67,
- "3Dfx|VoodooTV FM (Euro)" => 68,
- "3Dfx|VoodooTV 200 (USA)" => 68,
- "A|Active|Imaging AIMMS" => 69,
- "P|Prolink|Pixelview PV-BT878P+ (Rev.4C)" => 70,
- "L|Lifeview|FlyVideo 98EZ (capture only) LR51" => 71,
-# "G|Genius/Kye|Video Wonder/Genius Internet Video Kit" => 71,
- "P|Prolink|Pixelview PV-BT878P+ (Rev.9B) (PlayTV Pro rev.9B FM+NICAM)" => 72,
- "T|Typhoon|TV Tuner Pal BG (blue package)" => 72,
- "S|Sensoray|311" => 73,
- "RemoteVision|MX (RV605)" => 74,
- "P|Powercolor|MTV878" => 75,
- "P|Powercolor|MTV878R" => 75,
- "P|Powercolor|MTV878F" => 75,
- "C|Canopus|WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)" => 76,
- "G|GrandTec|Multi Capture Card (Bt878)" => 77,
- "Jetway|TV/Capture JW-TV878-FBK" => 78,
- "Kworld|KW-TV878RF" => 78,
- "D|DSP Design|TCVIDEO" => 79,
- "Hauppauge|WinTV PVR" => 80
- },
- 'saa7134' => {
- _("Unknown|Generic") => 0,
- "Proteus|Pro [philips reference design]" => 1,
- "LifeView|FlyVIDEO3000" => 2,
- "LifeView|FlyVIDEO2000" => 3,
- "EMPRESS" => 4,
- "SKNet|Monster TV" => 5,
- "Tevion|MD 9717" => 6,
- "KNC|One TV-Station RDS" => 7,
- "Terratec|Cinergy 400 TV" => 8,
- "Medion|5044" => 9
- }
- };
+ _("Auto-detect") => -1,
+ _("Unknown|Generic") => 0,
+ "M|Miro|PCTV" => 1,
+ "Hauppauge|bt848" => 2,
+ "S|STB|Hauppauge 878" => 3,
+ "I|Intel|Create and Share PCI (bttv type 4)" => 4,
+ "I|Intel|Smart Video Recorder III (bttv type 4)" => 4,
+ "D|Diamond|DTV2000" => 5,
+ "A|AVerMedia|TVPhone" => 6,
+ "M|MATRIX-Vision|MV-Delta" => 7,
+ "L|Lifeview|FlyVideo II (Bt848) LR26" => 8,
+ "G|Genius/Kye|Video Wonder Pro II (848 or 878)" => 8,
+ "I|IMS/IXmicro|TurboTV" => 9,
+ "Hauppauge|bt878" => 10,
+ "M|Miro|PCTV pro" => 11,
+ "A|ADS Technologies|Channel Surfer TV (bt848)" => 12,
+ "A|AVerMedia|TVCapture 98" => 13,
+ "A|Aimslab|Video Highway Xtreme (VHX)" => 14,
+ "Z|Zoltrix|TV-Max" => 15,
+ "P|Prolink|Pixelview PlayTV (bt878)" => 16,
+ "L|Leadtek|WinView 601" => 17,
+ "A|AVEC|Intercapture" => 18,
+ "L|Lifeview|FlyKit LR38 Bt848 (capture only)" => 19,
+ "L|Lifeview|FlyVideo II EZ" => 19,
+ "C|CEI|Raffles Card" => 20,
+ "L|Lifeview|FlyVideo 98" => 21,
+ "L|Lucky Star|Image World ConferenceTV LR50" => 21,
+ "A|Askey|CPH050" => 22,
+ "P|Phoebe Micro|Tv Master + FM" => 22,
+ "M|Modular|Technology MM205 PCTV (bt878)" => 23,
+ "A|Askey|CPH06X (bt878)" => 24,
+ "G|Guillemot|Maxi TV Video 3" => 24,
+ "A|Askey|CPH05X (bt878)" => 24,
+ _("Unknown|CPH05X (bt878) [many vendors]") => 24,
+ _("Unknown|CPH06X (bt878) [many vendors]") => 24,
+ "T|Terratec|Terra TV+ Version 1.0 (Bt848)" => 25,
+ "Vobis|TV-Boostar" => 25,
+ "T|Terratec|TV-Boostar" => 25,
+ "Hauppauge|WinCam newer (bt878)" => 26,
+ "L|Lifeview|FlyVideo 98" => 27,
+ "G|Guillemot|MAXI TV Video PCI2 LR50" => 27,
+ "T|Terratec|TerraTV+" => 28,
+ "I|Imagenation|PXC200" => 29,
+ "L|Lifeview|FlyVideo 98 LR50" => 30,
+ "Formac|iProTV" => 31,
+ "I|Intel|Create and Share PCI (bttv type 32)" => 32,
+ "I|Intel|Smart Video Recorder III (bttv type 32)" => 32,
+ "T|Terratec|TerraTValue" => 33,
+ "L|Leadtek|WinFast TV 2000" => 34,
+ "L|Leadtek|WinFast VC 100" => 35,
+ "L|Lifeview|FlyVideo 98 LR50" => 35,
+ "C|Chronos|Video Shuttle II" => 35,
+ "L|Lifeview|FlyVideo 98FM LR50" => 36,
+ "T|Typhoon|TView TV/FM Tuner" => 36,
+ "P|Prolink|PixelView PlayTV pro" => 37,
+ "P|Prolink|PixelView PlayTV Theater" => 37,
+ "A|Askey|CPH06X TView99" => 38,
+ "P|Pinnacle|PCTV Studio/Rave" => 39,
+ "S|STB|STB2 TV PCI FM, P/N 6000704" => 40,
+ "A|AVerMedia|TVPhone 98" => 41,
+ "P|ProVideo|PV951" => 42,
+ "L|Little|OnAir TV" => 43,
+ "S|Sigma|TVII-FM" => 44,
+ "M|MATRIX-Vision|MV-Delta 2" => 45,
+ "Z|Zoltrix|Genie TV/FM" => 46,
+ "T|Terratec|TV/Radio+" => 47,
+ "A|Askey|CPH03x" => 48,
+ "D|Dynalink|Magic TView" => 48,
+ "I|IODATA|GV-BCTV3/PCI" => 49,
+ "P|Prolink|PixelView PlayTV PAK" => 50,
+ "L|Lenco|MXTV-9578 CP" => 50,
+ "P|Prolink|PV-BT878P+4E" => 50,
+ "L|Lenco|MXTV-9578CP (Bt878)" => 50,
+ "Eagle|Wireless Capricorn2 (bt878A)" => 51,
+ "P|Pinnacle|PCTV Studio Pro" => 52,
+ "T|Typhoon|KNC1 TV Station RDS" => 53,
+ "T|Typhoon|TV Tuner RDS (black package)" => 53,
+ "T|Typhoon|TView RDS + FM Stereo" => 53,
+ "L|Lifeview|FlyVideo 2000" => 54,
+ "L|Lifeview|FlyVideo A2" => 54,
+ "L|Lifetec|LT 9415 TV [LR90]" => 54,
+ "A|Askey|CPH031" => 55,
+ "L|Lenco|MXR-9571 (Bt848)" => 55,
+ "Bestbuy|Easy TV" => 55,
+ "L|Lifeview|FlyVideo 98FM LR50" => 56,
+ "G|GrandTec|Grand Video Capture (Bt848)" => 57,
+ "A|Askey|CPH060" => 58,
+ "P|Phoebe Micro|TV Master Only (No FM)" => 58,
+ "A|Askey|CPH03x TV Capturer" => 59,
+ "M|Modular|Technology MM100 PCTV" => 60,
+ "A|AG|Electronics GMV1" => 61,
+ "A|Askey|CPH061" => 62,
+ "Bestbuy|Easy TV (bt878)" => 62,
+ "L|Lifetec|LT9306" => 62,
+ "M|Medion|MD9306" => 62,
+ "A|ATI|TV-Wonder" => 63,
+ "A|ATI|TV-Wonder VE" => 64,
+ "L|Lifeview|FlyVideo 2000S LR90" => 65,
+ "T|Terratec|TValueRadio" => 66,
+ "I|IODATA|GV-BCTV4/PCI" => 67,
+ "3Dfx|VoodooTV FM (Euro)" => 68,
+ "3Dfx|VoodooTV 200 (USA)" => 68,
+ "A|Active|Imaging AIMMS" => 69,
+ "P|Prolink|Pixelview PV-BT878P+ (Rev.4C)" => 70,
+ "L|Lifeview|FlyVideo 98EZ (capture only) LR51" => 71,
+# "G|Genius/Kye|Video Wonder/Genius Internet Video Kit" => 71,
+ "P|Prolink|Pixelview PV-BT878P+ (Rev.9B) (PlayTV Pro rev.9B FM+NICAM)" => 72,
+ "T|Typhoon|TV Tuner Pal BG (blue package)" => 72,
+ "S|Sensoray|311" => 73,
+ "RemoteVision|MX (RV605)" => 74,
+ "P|Powercolor|MTV878" => 75,
+ "P|Powercolor|MTV878R" => 75,
+ "P|Powercolor|MTV878F" => 75,
+ "C|Canopus|WinDVR PCI (COMPAQ Presario 3524JP, 5112JP)" => 76,
+ "G|GrandTec|Multi Capture Card (Bt878)" => 77,
+ "Jetway|TV/Capture JW-TV878-FBK" => 78,
+ "Kworld|KW-TV878RF" => 78,
+ "D|DSP Design|TCVIDEO" => 79,
+ "Hauppauge|WinTV PVR" => 80
+ },
+ 'saa7134' => {
+ _("Unknown|Generic") => 0,
+ "Proteus|Pro [philips reference design]" => 1,
+ "LifeView|FlyVIDEO3000" => 2,
+ "LifeView|FlyVIDEO2000" => 3,
+ "EMPRESS" => 4,
+ "SKNet|Monster TV" => 5,
+ "Tevion|MD 9717" => 6,
+ "KNC|One TV-Station RDS" => 7,
+ "Terratec|Cinergy 400 TV" => 8,
+ "Medion|5044" => 9
+ }
+};
my %pll_lst =
(
- -1 => _("Default"),
- 0 => "don't use pll",
- 1 => "28 Mhz Crystal (X)",
- 2 =>"35 Mhz Crystal"
- );
+ -1 => _("Default"),
+ 0 => "don't use pll",
+ 1 => "28 Mhz Crystal (X)",
+ 2 =>"35 Mhz Crystal"
+ );
sub config {
my ($in, $driver) = @_;
my %conf = (gbuffers => 4, card => $default, tuner => -1, radio => 0, pll => -1);
if ($in->ask_from("BTTV configuration", _("For most modern TV cards, the bttv module of the GNU/Linux kernel just auto-detect the rights parameters.
If your card is misdetected, you can force the right tuner and card types here. Just select your tv card parameters if needed"),
- [
- { label => _("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|'},
- { label => _("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|'},
- { label => _("Number of capture buffers:"), val => \$conf{gbuffers}, min=>2, max=>32, sort => 1, default => 0, type=>'range', advanced =>1, help => _("number of capture buffers for mmap'ed capture")},
- if_($driver eq 'bttv',
- { label => _("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1},
- { label => _("Radio support:"), val => \$conf{radio}, type => "bool", text => _("enable radio support")}),
- ]
- ))
+ [
+ { label => _("Card model:"), val => \$conf{card}, list => [keys %{$cards_lst->{$driver}}], type => 'combo', default => -1, sort =>1, separator => '|'},
+ { label => _("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|'},
+ { label => _("Number of capture buffers:"), val => \$conf{gbuffers}, min=>2, max=>32, sort => 1, default => 0, type=>'range', advanced =>1, help => _("number of capture buffers for mmap'ed capture")},
+ if_($driver eq 'bttv',
+ { label => _("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1},
+ { label => _("Radio support:"), val => \$conf{radio}, type => "bool", text => _("enable radio support")}),
+ ]
+ ))
{
- $conf{card} = $cards_lst->{$driver}{$conf{card}};
+ $conf{card} = $cards_lst->{$driver}{$conf{card}};
- my $options =
- 'radio=' . ($conf{radio} ? 1 : 0) . ' '.
- join(' ', map { if_($conf{$_} ne -1, "$_=$conf{$_}") } qw(card pll tuner gbuffers));
- if ($options) {
- log::l("[harddrake::bttv] $options");
-# standalone::explanations("modified file /etc/modules.conf ($options)") if $::isStandalone;
- modules::set_options("bttv", $options);
- }
- }
+ my $options =
+ 'radio=' . ($conf{radio} ? 1 : 0) . ' '.
+ join(' ', map { if_($conf{$_} ne -1, "$_=$conf{$_}") } qw(card pll tuner gbuffers));
+ if ($options) {
+ log::l("[harddrake::bttv] $options");
+# standalone::explanations("modified file /etc/modules.conf ($options)") if $::isStandalone;
+ modules::set_options("bttv", $options);
+ }
+ }
}