summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2004-06-15 16:50:22 +0000
committerMystery Man <unknown@mandriva.org>2004-06-15 16:50:22 +0000
commit8ea9beca90c410e12593fedfb6e741dbdf8795d0 (patch)
tree544a377d0ea57462110009fbbbfd14473390e2a1 /perl-install/harddrake
parentb5dc638815c772056e07cd013f5b1674900456d5 (diff)
downloaddrakx-topic/mandrakesoft.tar
drakx-topic/mandrakesoft.tar.gz
drakx-topic/mandrakesoft.tar.bz2
drakx-topic/mandrakesoft.tar.xz
drakx-topic/mandrakesoft.zip
This commit was manufactured by cvs2svn to create branch 'mandrakesoft'.topic/mandrakesoft
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/TODO169
-rwxr-xr-xperl-install/harddrake/check_snd.pl20
-rw-r--r--perl-install/harddrake/data.pm378
-rw-r--r--perl-install/harddrake/sound.pm317
-rw-r--r--perl-install/harddrake/v4l.pm338
5 files changed, 0 insertions, 1222 deletions
diff --git a/perl-install/harddrake/TODO b/perl-install/harddrake/TODO
deleted file mode 100644
index b09b8ee5e..000000000
--- a/perl-install/harddrake/TODO
+++ /dev/null
@@ -1,169 +0,0 @@
--*- outline -*-
-
-* drakxtools
-** drakxtools* need XF-{75,100}fonts that requires XFree86
-
-* Harddrake TODO:
-** ui
-*** more usb mice infos
-*** enable the user to force a module (isa, isapnp, ...)
-*** print "(not loaded)" if module isn't loaded
-*** add bus_position to make unique id in ui (check it does not confuse hw service)
-*** cdrom (must be done by diskdrake):
-**** ide-scsi / ide-cd switch (humm, the future (aka 2.6.x kernel) is ide-cd only)
-*** use fbgtk+2 when booting on fbcon for smoother GUI => interactive::fbgtk
-*** help:
-**** print fields in black and their description in blue as for information fields
-*** check there's at least one config option before showing the "condigure module" button
-*** s/module/driver/ ?
-** fixes
-*** configure at boot-time (hw hooks shared by both harddrake & drakx ?):
- all /etc/modules aliases
-**** usb-interfaces (or rewrite usb service in perl for speed)
-**** switch nvidia/nv in /etc/X11/XF86Config
- if [[ -e /lib/modules/`uname -r`/kernel/drivers/video/NVdriver ]]; then
- perl -pi -e 's!Driver "nv.*"!Driver "nvidia"!g;s!#HARDDRAKE (Load.*glx)!\1!g' /etc/X11/XF86Config-4
- else
- perl -pi -e 's!Driver "nv.*"!Driver "nv"!g;s!(Load.*glx)!#HARDDRAKE \1!g' /etc/X11/XF86Config-4
- fi
-*** non needed stuff to run X must be posponed after X11 startup
-**** eg: scanner/audio/printer/floppy/cdrom/tape/tv/webcam/joystick/ ...
-** packaging : separate version for harddrake & drakxtool
-** configurators
-*** new cd burner: offer to install cdrecord and one of its gui frontends
-*** new dvd driver : offer to install xine||mplayer
-*** draksound :
-**** add a dialog so that the user choose its wavetable.
-**** list all availables drivers, defaulting to first alternative, prepending old one with '*'
-**** add 'ALSA/OSS': tag to modules list
-** detect engine:
-*** detect isapnp devices
-*** set more field for fscking 0x0000:0x0000 usb controllers
-
-** move all drakx tools into just a small one-liner that uses real <tool>.pm
- so that harddrake and mcc reduces their memory usage pattern and
- be faster (the next fast step will be to use perl6/parrot)
-
- drawback : this would level down quite a lot the global mcc/harddrake robustness
-
-** check there're enough parameters in module config
-** for to send a message for unknown hardware to install@mandrakesoft.com
-
- Subject: [UNKNOW HARDWARE] or a new other ml
- -> do you konw how to configure it under linux ?
- -> description
-
-
-* ####################################################################
-* ####################################################################
-
-* / no hope / useless :
-** enable a string to be passed as detector; in that case, do ourself the =~
-** alter detect_devices in order to only probe one time
-** detect *ALL* mouses if more than one (mousedrake?)
-
-** deeper data structure in Mandrake 9.2 ?
-
- "Mass storage" => (Floppy,
- Disk,
- Cdrom,
- Tape)
-
- "Network" => (Ethernetcard,
- Modem,
- Isdn)
- "Multimedia" => (Videocard,
- Tvcard,
- Soundcard,
- Webcam)
- "System" => (Bridge,
- Cpu,
- Memory)
-
-
- "Publishing" => (Printer,
- Scanner)
-
- "Pointing" => (Mouse,
- Joystick)
-
- "Buses" => (Ideinterface,
- Scsiinterface,
- Usbinterface,
- );
-
- "Unknown/Others",
-
-* ####################################################################
-
-* Suggestions
-** various
-Subject: Re: [Cooker] Optional ALSA Support for SB Live!
-From: Fabrice FACORAT <f.faber@netcourrier.com>
-To: cooker@linux-mandrake.com
-In-Reply-To: <m2ofhvtpaq.fsf@vador.mandrakesoft.com>
-References: <20020311051222.47DC087CA5@yavin.mandrax.org>
- <m2ofhvtpaq.fsf@vador.mandrakesoft.com>
-Date: 11 Mar 2002 11:12:31 +0100
-Message-Id: <1015841551.3895.31.camel@bastard.localdomain>
-
-Le lun 11/03/2002 à 10:41, Thierry Vignaud a écrit :
-
-> > In Mandrake 8.1 rerunning Harddrake post-setup would switch over
-> > to ALSA (which supports MIDI synth), however in 8.2 the only way to
-> > get ALSA support is to manually edit the modules.conf file. This
-> > would be disasterous for someone who isn't familar with
-> > modules.conf, but had been instructed on the mandrake-expert/newbie
-> > lists (as many had been) to simply rerun Harddrake on the sound card
-> > to get ALSA (and hence MIDI synth support).
->
-> give me the result of lspcidrake -f -v so that i switch your card
-> from oss to alsa.
-
-no please.
-just one month ago you switch SBLive from Alsa to OSS ( cause drakX
-set it as OSS and harddrake as Alsa ).
-There were also a discussion concerning the fact that Alsa doesn't
-support emu-tools and so all available options.
-Last but not least, several peoples report pbs with Alsa ( is sound is
-too high you have disturbances ). So someone is going to ask you for
-OSS as it want to use some features os SBLive, etc ...
-
-To my mind the best way for this ( but too late for 8.2 ) will be to
-have a tool called soundrake. Thanks to this tools, you choose at the
-beginning if you want to use OSS or alsa and then try to correctly
-configure your sound card. This tool should be able to work in
-embended mo in harddrake or harddrake2 ( infos concerning this so long
-awaiting harddrake 2 ? ).
-
-In order to make this tool be a perfect tool, it should be able to
-advice user concerning the advantage and the disadvantage of each
-driver ( indeed alsa sometimes is better than OSS as it support full
-duplex and wave mixing on more sound cards ).
-It's also disturbing is harddrake set alsa by default and XrakX set
-OSS by default as sometimes by lanching harddrake ( just to see what
-happen ) you lose ( or seems to lose ) your sound card ( mute mixer )
-
-For example :
-+ launch harddrake
-+ use autodetection : yes/no
-+ if auto detects enable, it detects a SBLive.
-+ explanations text concerning the fact that :
- if I use OSS I will be able to use sounds effects, live drive and
-others things ( AC-3 passthrough ) thanks to the emu10k1-tools packages
-( available on CD sets and installable via Software Manager )
- if I use Alsa, I won't be able to use emu10k1-tools but at the
-contrary I will be able to use midi software as alsa module support midi
-+ ask user which one he wants to use : OSS / Alsa ?
-+ set the sound card drivers and modules.conf according to user wishes
-+ <mode= dream> if I select OSS, installed emu10k1-tools and provide a
-GUI to configure them </mode = dream>
-+ <mode= dream> if I select Alsa unmute at least PCM and Vol or display
-a warning saying that by default Alsa mute everything ( configure alsa
-service so that it save mixer settings )
-+ test the sound ( mandrake sound theme )
-+ do you hear something ?
-+ yes -> your sound card have been properly set.
-+ if no -> try the others drivers set or send lspcidrake -v to
-somebody@somewhere.org to check for support for your sound card
-+ Do you ahave another sound card ?
diff --git a/perl-install/harddrake/check_snd.pl b/perl-install/harddrake/check_snd.pl
deleted file mode 100755
index dfa007b80..000000000
--- a/perl-install/harddrake/check_snd.pl
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use lib qw(/usr/lib/libDrakX);
-
-use common;
-use harddrake::sound;
-use list_modules;
-
-
-my @listed_modules = @{$list_modules::l{multimedia}{sound}};
-my @drivers = (keys %harddrake::sound::oss2alsa, keys %harddrake::sound::alsa2oss);
-my @alternatives = uniq map { @{$_} } values %harddrake::sound::oss2alsa, values %harddrake::sound::alsa2oss;
-
-# check harddrake::sound's data structures're coherent
-print "unknown alternative drivers : [", join(', ', difference2(\@alternatives, \@drivers)), "]\n";
-
-# check that list_modules and harddrake::sound are synced
-print "non real sound modules (submodules, tv, usb, ...) : [", join(', ', difference2(\@drivers, \@listed_modules)), "]\n";
-print "forgotten sound modules : [", join(', ', difference2(\@listed_modules, \@drivers)), "]\n";
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
deleted file mode 100644
index f65ace3ff..000000000
--- a/perl-install/harddrake/data.pm
+++ /dev/null
@@ -1,378 +0,0 @@
-package harddrake::data;
-
-use strict;
-use detect_devices;
-use common;
-
-our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(version tree);
-our ($version, $sbindir, $bindir) = ("10", "/usr/sbin", "/usr/bin");
-
-my @devices = detect_devices::probeall();
-
-# Update me each time you handle one more devices class (aka configurator)
-sub unknown() {
- grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|SCSI)|tape/
- && !member($_->{driver}, qw(cpia_usb cyber2000fb forcedeth ibmcam megaraid mod_quickcam nvnet ohci1394 ov511 ov518_decomp scanner ultracam usbvideo usbvision))
- && $_->{driver} !~ /^ISDN|Mouse:USB|Removable:zip|class\|Mouse|sata|www.linmodems.org/
- && $_->{type} ne 'network'
- && $_->{description} !~ /Alcatel|ADSL Modem/
- } @devices;
-}
-
-my @alrd_dected;
-sub f {
- my @devs = grep { !member(pciusb_id($_), @alrd_dected) } @_;
- push @alrd_dected, map { pciusb_id($_) } @devs;
- @devs;
-}
-
-
-# tree format ("CLASS_ID", "type", "type_icon", configurator, detect_sub)
-# NEVER, NEVER alter CLASS_ID or you'll see harddrake2 service detect changes
-# in hw configuration ... :-(
-
-# FIXME: add translated items
-
-sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ }
-
-sub set_removable_configurator {
- my ($class, $device) = @_;
- return "/usr/sbin/drakupdate_fstab --no-flag --add =$device->{device}" if is_removable($class);
-}
-
-sub set_removable_remover {
- my ($class, $device) = @_;
- return "/usr/sbin/drakupdate_fstab --no-flag --del $device->{device}" if is_removable($class);
-}
-
-
-# Format is (HW class ID, l18n class name, icon, config tool , is_to_be_detected_on_boot)
-our @tree =
- (
- {
- class => "FLOPPY",
- string => N("Floppy"),
- icon => "floppy.png",
- configurator => "",
- detector => \&detect_devices::floppies,
- checked_on_boot => 1,
- automatic => 1,
- },
-
- {
- class => "ZIP",
- string => N("Zip"),
- icon => "floppy.png",
- configurator => "",
- detector => \&detect_devices::zips,
- checked_on_boot => 1,
- automatic => 1,
- },
-
- {
- class => "HARDDISK",
- string => N("Disk"),
- icon => "harddisk.png",
- configurator => "$sbindir/diskdrake",
- detector => sub { f(detect_devices::hds()) },
- checked_on_boot => 1,
- },
-
- {
- class => "CDROM",
- string => N("CDROM"),
- icon => "cd.png",
- configurator => "",
- detector => sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms },
- checked_on_boot => 1,
- automatic => 1,
- },
-
- {
- class => "BURNER",
- string => N("CD/DVD burners"),
- icon => "cd.png",
- configurator => "",
- detector => \&detect_devices::burners,
- checked_on_boot => 1,
- automatic => 1,
- },
-
- {
- class => "DVDROM",
- string => N("DVD-ROM"),
- icon => "cd.png",
- configurator => "",
- detector => sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms() },
- checked_on_boot => 1,
- automatic => 1,
- },
-
- {
- class => "TAPE",
- string => N("Tape"),
- icon => "tape.png",
- configurator => "",
- detector => \&detect_devices::tapes,
- checked_on_boot => 0,
- },
-
- {
- class => "VIDEO",
- string => N("Videocard"),
- icon => "video.png",
- configurator => "$sbindir/XFdrake",
- configurator_auto => "$sbindir/XFdrake",
- detector => sub { f(grep { $_->{driver} =~ /^(Card|Server):/ || $_->{media_type} =~ /DISPLAY_VGA/ } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "TV",
- string => N("Tvcard"),
- icon => "tv.png",
- configurator => "/usr/bin/XawTV",
- detector => sub { f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO/ && $_->{bus} eq 'PCI' || $_->{driver} eq 'usbvision' } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "MULTIMEDIA_OTHER",
- string => N("Other MultiMedia devices"),
- icon => "multimedia.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /MULTIMEDIA_OTHER/ } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "AUDIO",
- string => N("Soundcard"),
- icon => "sound.png",
- configurator => "$sbindir/draksound",
- detector => sub { f(grep { $_->{media_type} =~ /MULTIMEDIA_AUDIO/ } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "WEBCAM",
- string => N("Webcam"),
- icon => "webcam.png",
- configurator => "",
- detector => sub {
- f(grep {
- $_->{media_type} =~ /MULTIMEDIA_VIDEO/ && $_->{bus} ne 'PCI'
- || member($_->{driver}, qw(cpia_usb cyber2000fb ibmcam mod_quickcam ov511 ov518_decomp pwc ultracam usbvideo))
- } @devices)
- },
- checked_on_boot => 0,
- },
-
- {
- class => "CPU",
- string => N("Processors"),
- icon => "cpu.png",
- configurator => "",
- detector => sub { detect_devices::getCPUs() },
- checked_on_boot => 0,
- },
-
- {
- class => "ISDN",
- string => N("ISDN adapters"),
- icon => "modem.png",
- configurator => "$sbindir/drakconnect",
- detector => sub { require network::isdn; my $isdn = network::isdn::detect_backend(); if_(@$isdn, f(@$isdn)) },
- checked_on_boot => 0,
- },
-
- {
- class => "ETHERNET",
- string => N("Ethernetcard"),
- icon => "hw_network.png",
- configurator => "$sbindir/drakconnect",
- detector => sub {
- #- generic NIC detection for USB seems broken (class, subclass,
- #- protocol reported are not accurate) so we match network adapters against
- #- known drivers :-(
- require list_modules;
- my @net_modules = list_modules::category2modules('network/gigabit|main|pcmcia|usb|wireless');
- f(grep { member($_->{driver}, @net_modules) } @devices);
- },
- checked_on_boot => 1,
- },
-
- {
- class => "MODEM",
- string => N("Modem"),
- icon => "modem.png",
- configurator => "$sbindir/drakconnect",
- detector => sub { detect_devices::getModem() },
- checked_on_boot => 0,
- },
-
- {
- class => "ADSL",
- string => N("ADSL adapters"),
- icon => "modem.png",
- configurator => "$sbindir/drakconnect",
- detector => sub {
- require network::adsl;
- my $a = network::adsl::adsl_detect();
- $a ? f(grep { $_ } values %$a) : ();
- },
- checked_on_boot => 0,
- },
-
- {
- class => "AGP",
- string => N("AGP controllers"),
- icon => "memory.png",
- configurator => "",
- detector => sub { f(modules::probe_category('various/agpgart')) },
- checked_on_boot => 0,
- },
-
- {
- class => "BRIDGE",
- string => N("Bridges and system controllers"),
- icon => "memory.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /BRIDGE|MEMORY_RAM/ } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "PRINTER",
- string => N("Printer"),
- icon => "hw_printer.png",
- configurator => "$sbindir/printerdrake",
- detector => sub { require printer::detect; printer::detect::local_detect() },
- checked_on_boot => 0,
- },
-
- {
- class => "MOUSE",
- string => N("Mouse"),
- icon => "hw_mouse.png",
- configurator => "$sbindir/mousedrake",
- detector => sub {
- require mouse;
- require modules;
- modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
- &mouse::detect();
- },
- checked_on_boot => 1,
- },
-
- {
- class => "JOYSTICK",
- string => N("Joystick"),
- icon => "joystick.png",
- configurator => "",
- detector => sub {},
- checked_on_boot => 0,
- },
-
-
- {
- class => "ATA_STORAGE",
- string => N("(E)IDE/ATA controllers"),
- icon => "ide_hd.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /STORAGE_(IDE|OTHER)/ || $_->{driver} eq '3w-xxxx' } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "SATA_STORAGE",
- string => N("SATA controllers"),
- icon => "ide_hd.png",
- configurator => "",
- detector => sub { f(grep { $_->{driver} =~ /^sata/ } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "FIREWIRE_CONTROLLER",
- string => N("Firewire controllers"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{driver} =~ /ohci1394/ } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "SCSI_CONTROLLER",
- string => N("SCSI controllers"),
- icon => "scsi.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /STORAGE_SCSI/ || $_->{driver} eq 'megaraid' } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "USB_CONTROLLER",
- string => N("USB controllers"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} eq 'SERIAL_USB' } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "USB_HUB",
- string => N("USB ports"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /Hub/ } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "SMB_CONTROLLER",
- string => N("SMBus controllers"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /SERIAL_SMBUS/ } @devices) },
- checked_on_boot => 0,
- },
-
- {
- class => "SCANNER",
- string => N("Scanner"),
- icon => "scanner.png",
- configurator => "$sbindir/scannerdrake",
- detector => sub {
- require scanner; f(scanner::detect()) },
- checked_on_boot => 0,
- },
-
- {
- class => "UNKNOWN",
- string => N("Unknown/Others"),
- icon => "unknown.png",
- configurator => "",
- detector => sub { f(unknown()) },
- checked_on_boot => 0,
- },
-
- );
-
-sub pciusb_id {
- my ($dev) = @_;
- join(':', map { $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description));
-}
-
-
-sub custom_id {
- my ($device, $str) = @_;
- return if !ref($device);
- defined($device->{device}) ? $device->{device} :
- (defined($device->{processor}) ?
- N("cpu # ") . $device->{processor} . ": " . $device->{'model name'} :
- (defined($device->{description}) ? $device->{description} : $str));
-}
-
-1;
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
deleted file mode 100644
index 9796e7e7f..000000000
--- a/perl-install/harddrake/sound.pm
+++ /dev/null
@@ -1,317 +0,0 @@
-package harddrake::sound;
-# lists filled with Danny Tholen help, enhanced by Thierry Vignaud
-#
-# No ALSA for OSS's
-# o isa cards: msnd_pinnacle, pas2,
-# o pci cards: ad1889, sam9407
-# No OSS for ALSA's
-# o pci cards: snd-als4000, snd-es968, snd-hdsp
-# o isa cards: snd-azt2320, snd-cs4231, snd-cs4236,
-# snd-dt0197h, snd-korg1212, snd-rme32
-
-# TODO:
-# o ensure sound isn't user (either dsp/midi/sequencer/mixer)
-# o fix sound/alsa services
-
-use strict;
-use common;
-use interactive;
-use run_program;
-use modules;
-use list_modules;
-use detect_devices;
-use log;
-
-my $has_nvaudio = -x '/lib/modules/' . c::kernel_version() . '/';
-
-our %alsa2oss =
- (
- "snd-ad1816a" => [ "ad1816" ], # isa
- "snd-ad1848" => [ "ad1848", "pss" ], # isa
- "snd-ali5451" => [ "trident" ],
- "snd-als100" => [ "sb" ], # isa
- "snd-als4000" => [ "unknown" ],
- "snd-au8810" => [ "unknown" ],
- "snd-au8820" => [ "unknown" ],
- "snd-au8830" => [ "unknown" ],
- "snd-azt2320" => [ "unknown" ], # isa
- "snd-azt3328" => [ "unknown" ], # isa
- "snd-bt87x" => [ "btaudio" ],
- "snd-cmi8330" => [ "sb" ], # isa
- "snd-cmipci" => [ "cmpci" ],
- "snd-cs4231" => [ "unknown" ], # isa
- "snd-cs4232" => [ "cs4232" ], # isa
- "snd-cs4236" => [ "ad1848" ], # isa
- "snd-cs4281" => [ "cs4281" ],
- "snd-cs46xx" => [ "cs46xx" ],
- "snd-dt0197h" => [ "unknown" ], # isa
- "snd-emu10k1" => [ "audigy", "emu10k1" ],
- "snd-ens1370" => [ "es1370" ],
- "snd-ens1371" => [ "es1371" ],
- "snd-es1688" => [ "sb" ], # isa
- "snd-es18xx" => [ "sb" ], # isa
- "snd-es1938" => [ "esssolo1" ],
- "snd-es1968" => [ "maestro" ], # isa
- "snd-es968" => [ "sb" ],
- "snd-fm801" => [ "forte" ],
- "snd-gusclassic" => [ "gus" ], # isa
- "snd-gusextreme" => [ "gus" ], # isa
- "snd-gusmax" => [ "gus" ], # isa
- "snd-hdsp" => [ "unknown" ],
- "snd-ice1712" => [ "unknown" ], # isa
- "snd-ice1724" => [ "unknown" ], # isa
- "snd-intel8x0" => [ "ali5455", "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" => [ "rme96xx" ], # pci
- "snd-rme9652" => [ "rme96xx" ], # pci
- "snd-sb16" => ["sscape", "sb"],
- "snd-sb8" => [ "sb" ],
- "snd-sbawe" => [ "awe_wave" ],
- "snd-sgalaxy" => [ "sgalaxy" ], # isa
- "snd-sonicvibes" => [ "sonicvibes" ],
- "snd-trident" => [ "trident" ],
- "snd-usb-audio" => [ "audio" ], # usb
- "snd-via82xx" => [ "via82cxxx_audio" ],
- "snd-wavefront" => [ "wavefront" ], # isa
- "snd-ymfpci" => [ "ymfpci" ]
- );
-
-
-our %oss2alsa =
- (
- "ad1816" => [ "snd-ad1816a" ],
- "ad1848" => [ "snd-ad1848", "snd-cs4236" ],
- "ad1889" => [ "unknown" ],
- "ali5455" => [ "snd-intel8x0" ],
- "audigy" => [ "snd-emu10k1" ],
- "audio" => [ "snd-usb-audio" ], # usb
- "awe_wave" => [ "snd-sbawe" ],
- "btaudio" => [ "snd-bt87x" ],
- "cmpci" => [ "snd-cmipci" ],
- "cs4232" => [ "snd-cs4232" ],
- "cs4281" => [ "snd-cs4281" ],
- "cs46xx" => [ "snd-cs46xx" ],
- "emu10k1" => [ "snd-emu10k1" ],
- "es1370" => [ "snd-ens1370" ],
- "es1371" => [ "snd-ens1371" ],
- "esssolo1" => [ "snd-es1938" ],
- "forte" => [ "snd-fm801" ],
- "gus" => ["snd-interwave", "snd-gusclassic", "snd-gusmax", "snd-gusextreme"],
- "i810_audio" => [ "snd-intel8x0" ],
- "ice1712" => [ "snd-ice1712" ],
- "mad16" => [ "snd-opti93x" ],
- "maestro" => [ "snd-es1968" ],
- "maestro3" => [ "snd-maestro3" ],
- "mpu401" => [ "snd-mpu401" ],
- "msnd_pinnacle" => [ "unknown" ],
- "nm256_audio" => [ "snd-nm256" ],
- "nvaudio" => [ "snd-intel8x0" ],
- "opl3" => [ "snd-opl3sa2" ],
- "opl3sa" => [ "snd-opl3sa2" ],
- "opl3sa2" => [ "snd-opl3sa2" ],
- "pas2" => [ "unknown" ],
- "pss" => [ "snd-ad1848" ],
- "rme96xx" => [ "snd-rme96", "snd-rme9652" ],
- "sam9407" => [ "unknown" ],
- "sb" => [ "snd-als100", "snd-cmi8330", "snd-es1688", "snd-es18xx", "snd-es968", "snd-sb8", "snd-sb16" ],
- "sgalaxy" => [ "snd-sgalaxy" ],
- "sonicvibes" => [ "snd-sonicvibes" ],
- "sscape" => [ "snd-sb16" ],
- "trident" => [ "snd-ali5451", "snd-trident" ],
- "via82cxxx_audio" => [ "snd-via82xx" ],
- "wavefront" => [ "snd-wavefront" ],
- "ymfpci" => [ "snd-ymfpci" ]
- );
-
-my @blacklist = qw(cs46xx cs4281);
-my $blacklisted = 0;
-
-sub rooted { run_program::rooted($::prefix, @_) }
-
-sub unload { modules::unload(@_) if $::isStandalone || $blacklisted }
-
-sub load { modules::load(@_) if $::isStandalone || $blacklisted }
-
-sub get_alternative {
- my ($driver) = @_;
- $alsa2oss{$driver} || $oss2alsa{$driver};
-}
-
-sub do_switch {
- my ($in, $old_driver, $new_driver, $index) = @_;
- return if $old_driver eq $new_driver;
- my $_wait = $in->wait_message(N("Please wait"), N("Please Wait... Applying the configuration"));
- log::explanations("removing old $old_driver\n");
- if ($::isStandalone) {
- 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 ...
- }
- modules::remove_module($old_driver); # completed by the next add_alias()
- modules::add_alias("sound-slot-$index", $new_driver);
- modules::write_conf();
- if ($new_driver =~ /^snd-/) { # new driver is an alsa one
- $in->do_pkgs->ensure_is_installed('alsa-utils', '/usr/sbin/alsactl');
- rooted("service alsa start") if $::isStandalone && !$blacklisted;
- rooted("/sbin/chkconfig --add alsa") if $::isStandalone;
- load($new_driver) if $::isStandalone; # service alsa is buggy
- } else { rooted("/sbin/chkconfig --del alsa") }
- log::explanations("loading new $new_driver\n");
- rooted("/sbin/chkconfig --add sound"); # just in case ...
- rooted("service sound start") if $::isStandalone && !$blacklisted;
-}
-
-sub switch {
- my ($in, $device) = @_;
- my $driver = $device->{current_driver} || $device->{driver};
-
- foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ }
- my @alternative = @{get_alternative($driver)};
- unless ($driver eq $device->{driver} || member($device->{driver}, @alternative)) {
- push @alternative, @{get_alternative($device->{driver})}, $device->{driver}
- }
- if (@alternative) {
- my $new_driver = $driver;
- push @alternative, $driver;
- my %des = modules::category2modules_and_description('multimedia/sound');
-
- if ($new_driver eq 'unknown') {
- $in->ask_from(N("No alternative driver"),
- N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
- $device->{description}, $driver),
- [
- &get_any_driver_entry($in, $driver, $device),
- ]
- );
- } elsif ($in->ask_from_({ title => N("Sound configuration"),
- messages =>
- N("Here you can select an alternative driver (either OSS or ALSA) for your sound card (%s).",
- $device->{description}) .
- N("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
- interactive_help => sub {
- N("OSS (Open Sound System) was the first sound API. It's an OS independent sound API (it's available on most UNIX(tm) 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
-supports quite a large range of ISA, USB and PCI cards.\n
-It also provides a much higher API than OSS.\n
-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.
-");
- },
- },
- [
- {
- label => N("Driver:"), val => \$new_driver, list => \@alternative, default => $new_driver, sort =>1,
- help => join("\n\n", map { qq("$_": ) . $des{$_} } @alternative),
- allow_empty_list => 1,
- },
- {
- val => N("Trouble shooting"), disabled => sub {},
- clicked => sub { &trouble($in) }
- },
- &get_any_driver_entry($in, $driver, $device),
- ]))
- {
- return if $new_driver eq $device->{current_driver};
- log::explanations("switching audio driver from '" . $device->{current_driver} . "' to '$new_driver'\n");
- $in->ask_warn(N("Warning"), N("The old \"%s\" driver is blacklisted.\n
-It has been reported to oops the kernel on unloading.\n
-The new \"%s\" driver'll only be used on next bootstrap.", $device->{current_driver}, $new_driver)) if $blacklisted;
- do_switch($in, $device->{current_driver}, $new_driver, $device->{sound_slot_index});
- $device->{current_driver} = $new_driver;
- }
- } elsif ($driver =~ /^Bad:/) {
- $driver =~ s/^Bad://;
- $in->ask_warn(N("No open source driver"),
- N("There's no free driver for your sound card (%s), but there's a proprietary driver at \"%s\".",
- $device->{description}, $driver));
- } elsif ($driver eq "unknown") {
- $in->ask_from(N("No known driver"),
- N("There's no known driver for your sound card (%s)",
- $device->{description}),
- [ &get_any_driver_entry($in, $driver, $device) ]);
- } else {
- $in->ask_warn(N("Unknown driver"),
- N("Error: The \"%s\" driver for your sound card is unlisted",
- $driver));
- }
- end:
-}
-
-sub config {
- switch(@_);
-}
-
-
-sub trouble {
- my ($in) = @_;
- $in->ask_warn(N("Sound trouble shooting"),
- formatAlaTeX(N("The classic bug sound tester is to run the following commands:
-
-
-- \"lspcidrake -v | fgrep AUDIO\" will tell you which driver your card uses
-by default
-
-- \"grep sound-slot /etc/modules.conf\" will tell you what driver it
-currently uses
-
-- \"/sbin/lsmod\" will enable you to check if its module (driver) is
-loaded or not
-
-- \"/sbin/chkconfig --list sound\" and \"/sbin/chkconfig --list alsa\" will
-tell you if sound and alsa services're configured to be run on
-initlevel 3
-
-- \"aumix -q\" will tell you if the sound volume is muted or not
-
-- \"/sbin/fuser -v /dev/dsp\" will tell which program uses the sound card.
-")));
-}
-
-sub get_any_driver_entry {
- my ($in, $driver, $device) = @_;
- return () if $::isInstall;
- +{
- val => N("Let me pick any driver"), disabled => sub {},
- clicked => sub {
- my $old_driver = $driver;
- if ($in->ask_from(N("Choosing an arbitrary driver"),
- formatAlaTeX(N("If you really think that you know which driver is the right one for your card
-you can pick one in the above list.
-
-The current driver for your \"%s\" sound card is \"%s\" ", $device->{description}, $driver)),
- [
- { label => N("Driver:"), val => \$driver, list => [ category2modules("multimedia/sound") ], type => 'combo', default => $driver, sort =>1, separator => '|' },
- ]
- )) {
- do_switch($in, $old_driver, $driver, $device->{sound_slot_index});
- goto end;
- }
- }
- }
-}
-
-
-sub configure_sound_slots() {
- my $altered = 0;
- each_index {
- 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;
-}
-
-
-1;
diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm
deleted file mode 100644
index 9d4feaa14..000000000
--- a/perl-install/harddrake/v4l.pm
+++ /dev/null
@@ -1,338 +0,0 @@
-package harddrake::v4l;
-
-use strict;
-
-use common;
-use interactive;
-use detect_devices;
-use lang;
-use log;
-use modules;
-
-# please update me on bttv update :
-
-my $default = N("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, FM1236 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 => "MT20xx 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)",
- 40 => "HITACHI V7-J180AT",
- 41 => "Philips|PAL_MK (FI1216 MK)",
- 42 => "Philips|1236D ATSC/NTSC daul in",
- 43 => "Philips|NTSC MK3 (FM1236MK3 or FM1236/F)",
- 44 => "Philips|4 in 1 (ATI TV Wonder Pro/Conexant)",
- 45 => "Microtune|4049 FM5",
-
- );
-
-# Tweaked from Cardlist
-my $cards_lst = {
- 'bttv' => {
- $default => -1,
- N("Unknown|Generic") => 0,
- "M|Miro|PCTV" => 1,
- "H|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|Guillemot|MAXI TV Video PCI2 LR26" => 27,
- "G|Genius/Kye|Video Wonder Pro II (848 or 878)" => 8,
- "I|IMS/IXmicro|TurboTV" => 9,
- "H|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,
- N("Unknown|CPH05X (bt878) [many vendors]") => 24,
- N("Unknown|CPH06X (bt878) [many vendors]") => 24,
- "T|Terratec|Terra TV+ Version 1.0 (Bt848)" => 25,
- "Vobis|TV-Boostar" => 25,
- "T|Terratec|TV-Boostar" => 25,
- "H|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,
- "Formac|iProTV I (bt848)" => 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,
- "E|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,
- "H|Hauppauge|WinTV PVR" => 80,
- "G|GV-BCTV5/PCI" => 81,
- "O|Osprey|100/150 (878)" => 82,
- "O|Osprey|100/150 (848)" => 83,
- "O|Osprey|101 (848)" => 84,
- "O|Osprey|101/151" => 85,
- "O|Osprey|101/151 w/ svid" => 86,
- "O|Osprey|200/201/250/251" => 87,
- "O|Osprey|200/250" => 88,
- "O|Osprey|210/220" => 89,
- "O|Osprey|500" => 90,
- "O|Osprey|540" => 91,
- "O|Osprey|2000" => 92,
- "I|IDS|Eagle" => 93,
- "P|Pinnacle|PCTV Sat" => 94,
- "Formac|ProTV II (bt878)" => 95,
- "M|MachTV" => 96,
- "E|Euresys|Picolo" => 97,
- "P|ProVideo|PV150" => 98,
- "A|AD-TVK503" => 99,
- "H|Hercules|Smart TV Stereo" => 100,
- "P|Pace|TV & Radio Card" => 101,
- "I|IVC-200" => 102,
- "G|Grand X-Guard / Trust 814PCI" => 103,
- "N|Nebula Electronics|DigiTV" => 104,
- "P|ProVideo|PV143" => 105,
- "P|PHYTEC|VD-009-X1 MiniDIN (bt878)" => 106,
- "P|PHYTEC|VD-009-X1 Combi (bt878)" => 107,
- "P|PHYTEC|VD-009 MiniDIN (bt878)" => 108,
- "P|PHYTEC|VD-009 Combi (bt878)" => 109,
- "I|IVC-100" => 110,
- "I|IVC-120G" => 111,
- "P|pcHDTV HD-2000 TV" => 112,
- "T|Twinhan DST + clones" => 113,
- "L|Leadtek|Winfast VC100" => 114,
- "T|Teppro|TEV-560/InterVision IV-560" => 115,
- "S|SIMUS|GVC1100" => 116,
- "N|NGS|NGSTV+" => 117,
- "L|LMLBT4" => 118,
- "T|Tekram|M205 PRO" => 119,
- "C|Conceptronic|CONTVFMi" => 120,
-
- },
- 'saa7134' => {
- N("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,
- "Kworld/KuroutoShikou SAA7130-TVPCI" => 10,
- "Terratec|Cinergy 600 TV" => 11,
- "Medion|7134" => 12,
- "ELSA|EX-VISION 300TV" => 13,
- "ELSA|EX-VISION 500TV" => 14,
- "ASUS|TV-FM 7134" => 15,
- "AOPEN|VA1000 POWER" => 16,
- "10MOONS PCI TV CAPTURE CARD" => 17,
- "BMK|MPEX No Tuner" => 18,
- "Compro VideoMate TV" => 19,
- "Matrox|CronosPlus" => 20,
- "Medion|2819" => 21,
- "BMK|MPEX Tuner" => 22,
- "Medion|2819 / AverMedia M156" => 23,
- "AVerMedia|M156" => 23,
- "BMK|MPEX Tuner alternative" => 24,
- "ASUS|TV-FM 7133" => 25,
- "Pinnacle|PCTV Stereo (saa7134)" => 26,
- "Manli|MuchTV M-TV002" => 27,
- "Manli|MuchTV M-TV001" => 28,
- "Nagase Sangyo TransGear 3000TV" => 29,
- "Elitegroup|ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM)" => 30,
- "Elitegroup|ECS TVP3XP FM1236 Tuner Card (NTSC,FM)" => 31,
- "AVACS|SmartTV" => 32,
- "AVerMedia|DVD EZMaker" => 33,
- }
-};
-
-my %pll_lst =
- (
- -1 => N("Default"),
- 0 => "don't use pll",
- 1 => "28 Mhz Crystal (X)",
- 2 => "35 Mhz Crystal"
- );
-
-sub config {
- my ($in, $driver) = @_;
-
- my $min_gbuffers = 2;
- my $max_gbuffers = 32;
-
- my %conf = (gbuffers => 4, card => $default, tuner => -1, radio => 0, pll => -1);
-
- my %cards_list = %{$cards_lst->{$driver}};
- my %rvs_cards_list = reverse %cards_list;
-
- # get the existing options (if there are any)
- my $current = modules::get_options($driver);
-
- foreach (split(/\s+/,$current)) {
- $conf{$1} = $2 if /^(gbuffers|tuner|radio|pll)=(.+)/;
- $conf{$1} = $rvs_cards_list{$2} if /^(card)=(.+)/;
- }
-
- #Sanity checks on defaults
- $conf{gbuffers} = max($min_gbuffers, $conf{gbuffers});
- $conf{gbuffers} = min($max_gbuffers, $conf{gbuffers});
- $conf{card} = $default if !defined $cards_list{$conf{card}};
- $conf{tuner} = -1 if !defined $tuners_lst{$conf{tuner}};
- $conf{pll} = -1 if !defined $pll_lst{$conf{tuner}};
- $conf{radio} = 0 if $conf{radio} !~ /(0|1)/;
-
-
- if ($in->ask_from("BTTV configuration", N("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 => N("Card model:"), val => \$conf{card}, list => [ keys %cards_list ], type => 'combo', default => -1, sort =>1, separator => '|' },
- { label => N("Tuner type:"), val => \$conf{tuner}, list => [keys %tuners_lst], format => sub { $tuners_lst{$_[0]} }, sort => 1, separator => '|' },
- { label => N("Number of capture buffers:"), val => \$conf{gbuffers}, min => $min_gbuffers, max => $max_gbuffers, sort => 1, default => 0, type => 'range', advanced => 1, help => N("number of capture buffers for mmap'ed capture") },
- if_($driver eq 'bttv',
- { label => N("PLL setting:"), val => \$conf{pll}, list => [keys %pll_lst], format => sub { $pll_lst{$_[0]} }, sort => 1, default => 0, advanced =>1 },
- { label => N("Radio support:"), val => \$conf{radio}, type => "bool", text => N("enable radio support") }),
- ]
- ))
- {
- $conf{card} = $cards_list{$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(qq([harddrake::v4l] set "$options" options for $driver));
-# log::explanations("modified file /etc/modules.conf ($options)") if $::isStandalone;
- modules::set_options($driver, $options);
- }
- return 1;
- }
- return 0;
-}
-
-
-
-1;