summaryrefslogtreecommitdiffstats
path: root/perl-install/harddrake
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/harddrake')
-rw-r--r--perl-install/harddrake/TODO169
-rw-r--r--perl-install/harddrake/autoconf.pm99
-rwxr-xr-xperl-install/harddrake/check_snd.pl2
-rw-r--r--perl-install/harddrake/data.pm409
-rw-r--r--perl-install/harddrake/sound.pm474
-rw-r--r--perl-install/harddrake/v4l.pm316
6 files changed, 884 insertions, 585 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/autoconf.pm b/perl-install/harddrake/autoconf.pm
index 061d738af..002d562bb 100644
--- a/perl-install/harddrake/autoconf.pm
+++ b/perl-install/harddrake/autoconf.pm
@@ -1,19 +1,25 @@
package harddrake::autoconf;
use common;
-use any;
sub xconf {
- my ($modules_conf, $o) = @_;
+ my ($modules_conf, $o, $o_skip_fb_setup, $o_resolution_wanted) = @_;
log::l('automatic XFree configuration');
require Xconfig::default;
- $o->{raw_X} = Xconfig::default::configure(do_pkgs_standalone->new);
+ require do_pkgs;
+ my $do_pkgs = do_pkgs_standalone->new;
+ $o->{raw_X} = Xconfig::default::configure($do_pkgs);
+ my $old_x = { if_($o_resolution_wanted, resolution_wanted => $o_resolution_wanted) };
+
require Xconfig::main;
- require do_pkgs;
- Xconfig::main::configure_everything_auto_install($o->{raw_X}, do_pkgs_standalone->new, {}, { allowFB => 1 });
+ Xconfig::main::configure_everything_auto_install($o->{raw_X}, $do_pkgs, $old_x, { allowFB => listlength(cat_("/proc/fb")), skip_fb_setup => $o_skip_fb_setup });
+
+ #- always disable compositing desktop effects when configuring a new video card
+ require Xconfig::glx;
+ Xconfig::glx::write({});
modules::load_category($modules_conf, 'various/agpgart');
}
@@ -21,26 +27,91 @@ sub xconf {
sub network_conf {
my ($obj) = @_;
require network::network;
- network::network::easy_dhcp($obj->{modules_conf}, $obj->{netc}, $obj->{intf}) and $obj->{netcnx}{type} = 'lan';
+ network::network::easy_dhcp($obj->{net}, $obj->{modules_conf});
}
sub mouse_conf {
my ($modules_conf) = @_;
require do_pkgs;
require mouse;
- mouse::write_conf(do_pkgs_standalone->new, $modules_conf, mouse::detect($modules_conf), 1);
+ mouse::write_conf(do_pkgs_standalone->new, $modules_conf, my $mouse = mouse::detect($modules_conf), 1);
+ mouse::load_modules($mouse);
}
sub pcmcia {
my ($pcic) = @_;
+ require modules;
+ modules::set_preload_modules("pcmcia", if_($pcic, $pcic));
+}
+
+sub bluetooth {
+ my ($enable) = @_;
+#- FIXME: make sure these packages are installed when needed
+# if ($enable) {
+# require do_pkgs;
+# my $do_pkgs = do_pkgs_standalone->new;
+# $do_pkgs->ensure_is_installed("bluez-utils", "/usr/bin/rfcomm");
+# }
+ require services;
+ services::set_status("bluetooth", $enable);
+ my $kbluetoothd_cfg = '/etc/kde/kbluetoothrc';
+ update_gnomekderc($kbluetoothd_cfg,
+ 'General',
+ 'AutoStart' => bool2text($enable)) if -f $kbluetoothd_cfg;
+}
- #- should be set after installing the package above otherwise the file will be renamed.
- setVarsInSh("$::prefix/etc/sysconfig/pcmcia", {
- PCMCIA => bool2yesno($pcic),
- PCIC => $pcic,
- PCIC_OPTS => "",
- CORE_OPTS => "",
- });
+sub laptop {
+ my ($on_laptop) = @_;
+#- FIXME: make sure these packages are installed when needed
+# require do_pkgs;
+# my $do_pkgs = do_pkgs_standalone->new;
+# if ($on_laptop) {
+# $do_pkgs->ensure_is_installed("cpufreq", "/etc/rc.d/init.d/cpufreq");
+# $do_pkgs->ensure_is_installed("apmd", "/usr/bin/apm");
+# $do_pkgs->ensure_is_installed("hotkeys", "/usr/bin/hotkeys");
+# $do_pkgs->ensure_is_installed("laptop-mode-tools", "/usr/sbin/laptop_mode");
+# } else {
+# $do_pkgs->ensure_is_installed("numlock", "/etc/rc.d/init.d/numlock");
+# }
+ require services;
+ services::set_status("apmd", -e "/proc/apm");
+ services::set_status("laptop-mode", $on_laptop);
+ services::set_status("numlock", !$on_laptop);
+}
+
+sub cpufreq() {
+ require cpufreq;
+ modules::set_preload_modules("cpufreq", cpufreq::get_modules());
+}
+
+sub floppy() {
+ require detect_devices;
+ modules::set_preload_modules("floppy", if_(detect_devices::floppy(), "floppy"));
+}
+
+sub fix_aliases {
+ my ($modules_conf) = @_;
+ require modalias;
+ my %new_aliases;
+ #- first pass: find module targets whose modalias is not valid anymore
+ foreach my $module ($modules_conf->modules) {
+ if (my $aliased_to = $modules_conf->get_alias($module)) {
+ my @valid_modaliases = modalias::get_modules($module, 'skip_config') or next;
+ my ($found, $others) = partition { $_ eq $aliased_to } @valid_modaliases;
+ $new_aliases{$aliased_to} = @{$others || []} == 1 && $others->[0] if is_empty_array_ref($found);
+ }
+ }
+ #- second pass: adapt module targets that are not valid anymore
+ foreach my $module ($modules_conf->modules) {
+ if (my $aliased_to = $modules_conf->get_alias($module)) {
+ if (my $new = exists $new_aliases{$aliased_to} && $new_aliases{$aliased_to}) {
+ $modules_conf->set_alias($module, $new);
+ } else {
+ $modules_conf->remove_alias($module);
+ }
+ }
+ }
+ $modules_conf->write;
}
1;
diff --git a/perl-install/harddrake/check_snd.pl b/perl-install/harddrake/check_snd.pl
index dfa007b80..4721bed40 100755
--- a/perl-install/harddrake/check_snd.pl
+++ b/perl-install/harddrake/check_snd.pl
@@ -10,7 +10,7 @@ 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;
+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";
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index 0bbe76556..76ba48531 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -3,16 +3,26 @@ package harddrake::data;
use strict;
use detect_devices;
use common;
+use modules;
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(version tree);
our ($version, $sbindir, $bindir) = ("10", "/usr/sbin", "/usr/bin");
-my @devices = detect_devices::probeall();
+my @devices = (detect_devices::probeall(), detect_devices::getSCSI());
+
+foreach my $dev (@devices) {
+ # normalize device IDs for devices cthat came from mouse.pm:
+ next if !defined $dev->{Synaptics};
+ foreach my $field (qw(vendor id subvendor subid)) {
+ next if !defined $dev->{$field};
+ $dev->{$field} = hex($dev->{$field});
+ }
+}
# 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)|SYSTEM_OTHER|tape|UPS/
+ grep { $_->{media_type} !~ /BRIDGE|class\|Mouse|DISPLAY|Hub|MEMORY_RAM|MULTIMEDIA_(VIDEO|AUDIO|OTHER)|NETWORK|Printer|SERIAL_(USB|SMBUS)|STORAGE_(IDE|OTHER|RAID|SCSI)|SYSTEM_(OTHER|SDHCI)|tape|UPS/
&& !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'
@@ -22,7 +32,7 @@ sub unknown() {
my @alrd_dected;
sub f {
- my @devs = grep { !member(pciusb_id($_), @alrd_dected) } @_;
+ my @devs = grep { !member(pciusb_id($_), @alrd_dected) } grep { $_ } @_;
push @alrd_dected, map { pciusb_id($_) } @devs;
@devs;
}
@@ -34,29 +44,125 @@ sub f {
# FIXME: add translated items
-sub is_removable { $_[0] =~ /FLOPPY|ZIP|DVDROM|CDROM|BURNER/ }
+sub is_removable { member($_[0], qw(FLOPPY ZIP DVDROM CDROM BURNER)) }
+sub is_auto_configurable_media { !detect_devices::isKeyUsb($_[0]) }
sub set_removable_configurator {
my ($class, $device) = @_;
- return "/usr/sbin/diskdrake --removable=$device->{device}" if is_removable($class);
+ is_removable($class) ? "/usr/sbin/diskdrake --removable=$device->{device}" : undef;
}
-sub set_removable_auto_configurator {
- my ($class, $device) = @_;
- return "/usr/sbin/drakupdate_fstab --no-flag --auto --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);
-}
-
my $modules_conf = modules::any_conf->read;
# Format is (HW class ID, l18n class name, icon, config tool , is_to_be_detected_on_boot)
our @tree =
(
{
+ class => "SATA_STORAGE",
+ string => N("SATA controllers"),
+ icon => "ide_hd.png",
+ configurator => "",
+ detector => sub { f(grep { $_->{driver} !~ /^pata/ } detect_devices::probe_category('disk/sata')) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "RAID_STORAGE",
+ string => N("RAID controllers"),
+ icon => "ide_hd.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('disk/hardware_raid')),
+ f(grep { $_->{media_type} =~ /STORAGE_RAID/ } @devices) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "ATA_STORAGE",
+ string => N("(E)IDE/ATA controllers"),
+ icon => "ide_hd.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('disk/ide')),
+ f(grep { $_->{driver} =~ /^pata/ && $_->{media_type} =~ /IDE|STORAGE_SATA/ } @devices),
+ f(grep { $_->{media_type} =~ /STORAGE_(IDE|OTHER)/ } @devices) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "CARD_READER",
+ string => N("Card readers"),
+ icon => "ide_hd.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('disk/card_reader')) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "FIREWIRE_CONTROLLER",
+ string => N("Firewire controllers"),
+ icon => "usb.png",
+ configurator => "",
+ detector => sub { f(grep { $_->{driver} =~ /firewire_ohci|ohci1394/ } @devices) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "PCMCIA_CONTROLLER",
+ string => N("PCMCIA controllers"),
+ icon => "hw-pcmcia.png",
+ configurator => "",
+ detector => sub { f(detect_devices::pcmcia_controller_probe()) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "SCSI_CONTROLLER",
+ string => N("SCSI controllers"),
+ icon => "scsi.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('disk/scsi'), grep { $_->{media_type} =~ /STORAGE_SCSI/ } @devices) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "USB_CONTROLLER",
+ string => N("USB controllers"),
+ icon => "usb.png",
+ configurator => "",
+ detector => sub { f(grep { $_->{media_type} eq 'SERIAL_USB' } @devices) },
+ checked_on_boot => 1,
+ },
+
+ {
+ class => "USB_HUB",
+ string => N("USB ports"),
+ icon => "hw-usb.png",
+ configurator => "",
+ detector => sub { f(grep { $_->{media_type} =~ /Hub/ } @devices) },
+ checked_on_boot => 0,
+ },
+
+ {
+ class => "SMB_CONTROLLER",
+ string => N("SMBus controllers"),
+ icon => "hw-smbus.png",
+ configurator => "",
+ detector => sub { f(grep { $_->{media_type} =~ /SERIAL_SMBUS/ } @devices) },
+ 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|SYSTEM_(OTHER|SDHCI)|MEMORY_OTHER|SYSTEM_PIC|COMMUNICATION_OTHER/
+ || $_->{description} =~ /Parallel Port Adapter/;
+ } @devices) },
+ checked_on_boot => 0,
+ },
+
+
+ {
class => "FLOPPY",
string => N("Floppy"),
icon => "floppy.png",
@@ -89,6 +195,16 @@ our @tree =
configurator => "$sbindir/diskdrake",
detector => sub { f(detect_devices::hds()) },
checked_on_boot => 0,
+ automatic => 1,
+ },
+
+ {
+ class => "USB_STORAGE",
+ string => N("USB Mass Storage Devices"),
+ icon => "usb.png",
+ configurator => "",
+ detector => sub { f(grep { member($_->{driver}, qw(usb_storage ub Removable:memory_card)) } @devices) },
+ checked_on_boot => 0,
},
{
@@ -96,7 +212,7 @@ our @tree =
string => N("CDROM"),
icon => "cd.png",
configurator => "",
- detector => sub { grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms },
+ detector => sub { f(grep { !(detect_devices::isBurner($_) || detect_devices::isDvdDrive($_)) } &detect_devices::cdroms) },
checked_on_boot => 1,
automatic => 1,
},
@@ -106,7 +222,7 @@ our @tree =
string => N("CD/DVD burners"),
icon => "cd.png",
configurator => "",
- detector => \&detect_devices::burners,
+ detector => sub { f(detect_devices::burners()) },
checked_on_boot => 1,
automatic => 1,
},
@@ -116,7 +232,7 @@ our @tree =
string => N("DVD-ROM"),
icon => "cd.png",
configurator => "",
- detector => sub { grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms() },
+ detector => sub { f(grep { ! detect_devices::isBurner($_) } detect_devices::dvdroms()) },
checked_on_boot => 1,
automatic => 1,
},
@@ -130,22 +246,41 @@ our @tree =
checked_on_boot => 0,
},
+ # AGP devices must be detected prior to video cards because some DRM drivers doesn't like be loaded
+ # after agpgart thus order in /etc/modprobe.preload is important (modules.pm should enforce such sorting):
+ {
+ class => "AGP",
+ string => N("AGP controllers"),
+ icon => "memory.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('various/agpgart')) },
+ checked_on_boot => 1,
+ },
+
{
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 => "DVB",
+ string => N("DVB card"),
+ icon => "tv.png",
+ detector => sub { f(detect_devices::probe_category('multimedia/dvb')) },
+ 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) },
+ configurator => "/usr/sbin/drakxtv",
+ detector => sub { f(detect_devices::probe_category('multimedia/tv')),
+ f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO/ && $_->{bus} eq 'PCI' } @devices) },
checked_on_boot => 1,
},
@@ -166,7 +301,8 @@ our @tree =
detector => sub {
require list_modules;
my @modules = list_modules::category2modules('multimedia/sound');
- f(grep { $_->{media_type} =~ /MULTIMEDIA_AUDIO/ || member($_->{driver}, @modules) } @devices);
+ f(grep { $_->{media_type} =~ /MULTIMEDIA_AUDIO|PROCESSOR_CO/ || member($_->{driver}, @modules)
+ || $_->{description} =~ /PC Speaker/ } @devices);
},
checked_on_boot => 1,
},
@@ -178,8 +314,9 @@ our @tree =
configurator => "",
detector => sub {
require list_modules;
- my @modules = list_modules::category2modules('multimedia/webcam');
- f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO/ && $_->{bus} ne 'PCI' || member($_->{driver}, @modules) } @devices);
+ my @modules = (list_modules::category2modules('multimedia/webcam'), 'Removable:camera');
+ f(grep { $_->{media_type} =~ /MULTIMEDIA_VIDEO|Video\|Video Control|Imaging|Camera/ && $_->{bus} ne 'PCI'
+ || member($_->{driver}, @modules) || $_->{driver} =~ /^gpsca/ } @devices);
},
# managed by hotplug:
checked_on_boot => 0,
@@ -192,7 +329,7 @@ our @tree =
configurator => "",
detector => sub { detect_devices::getCPUs() },
# maybe should we install schedutils?
- checked_on_boot => 0,
+ checked_on_boot => 1,
},
{
@@ -200,11 +337,57 @@ our @tree =
string => N("ISDN adapters"),
icon => "modem.png",
configurator => "$sbindir/drakconnect",
- detector => sub { require network::isdn; my $isdn = network::isdn::detect_backend($modules_conf); if_(@$isdn, f(@$isdn)) },
+ detector => sub { require network::connection::isdn; my $isdn = network::connection::isdn::detect_backend($modules_conf); if_(@$isdn, f(@$isdn)) },
# we do not check these b/c this need user interaction (auth, ...):
checked_on_boot => 0,
},
+
+ {
+ class => "USB_AUDIO",
+ string => N("USB sound devices"),
+ icon => "sound.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('multimedia/usb_sound')) },
+ checked_on_boot => 0,
+ },
+
+ {
+ class => "RADIO",
+ string => N("Radio cards"),
+ icon => "tv.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('multimedia/radio')) },
+ checked_on_boot => 0,
+ },
+
+ {
+ class => "ATM",
+ string => N("ATM network cards"),
+ icon => "hw_network.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('network/atm')) },
+ checked_on_boot => 0,
+ },
+
+ {
+ class => "WAN",
+ string => N("WAN network cards"),
+ icon => "hw_network.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('network/wan')) },
+ checked_on_boot => 0,
+ },
+
+ {
+ class => "BLUETOOTH",
+ string => N("Bluetooth devices"),
+ icon => "hw_network.png",
+ configurator => "",
+ detector => sub { f(detect_devices::probe_category('bus/bluetooth')), f(grep { $_->{description} =~ /Bluetooth Dongle/ } @devices) },
+ checked_on_boot => 1,
+ },
+
{
class => "ETHERNET",
string => N("Ethernetcard"),
@@ -212,7 +395,6 @@ our @tree =
configurator => "$sbindir/drakconnect",
detector => sub {
require list_modules;
- require network::ethernet;
my @net_modules = list_modules::category2modules(list_modules::ethernet_categories());
f(grep {
$_->{media_type} && $_->{media_type} =~ /^NETWORK/
@@ -228,7 +410,7 @@ our @tree =
string => N("Modem"),
icon => "modem.png",
configurator => "$sbindir/drakconnect",
- detector => sub { detect_devices::getModem($modules_conf) },
+ detector => sub { f(detect_devices::getModem($modules_conf)), f(grep { $_->{description} =~ /SoftModem/ } @devices) },
# we do not check these b/c this need user interaction (auth, ...):
checked_on_boot => 0,
},
@@ -238,11 +420,9 @@ our @tree =
string => N("ADSL adapters"),
icon => "modem.png",
configurator => "$sbindir/drakconnect",
- detector => sub {
- require network::adsl;
- my $a = network::adsl::adsl_detect();
- $a ? f(map { @$_ } grep { defined($_) } values %$a) : ();
- },
+ detector => sub { f(detect_devices::get_xdsl_usb_devices()),
+ f(grep { $_->{description} =~ /Cohiba 3887 rev0/ } @devices);
+ },
# we do not check these b/c this need user interaction (auth, ...):
checked_on_boot => 0,
},
@@ -250,167 +430,92 @@ our @tree =
{
class => "MEMORY",
string => N("Memory"),
- icon => "memory.png",
+ icon => "hw-memory.png",
configurator => "",
detector => sub { grep { member($_->{name}, 'Cache', 'Memory Module') } detect_devices::dmidecode() },
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 => 1,
- },
-
- {
class => "PRINTER",
string => N("Printer"),
icon => "hw_printer.png",
configurator => "$sbindir/printerdrake",
- detector => sub { require printer::detect; printer::detect::local_detect() },
+ detector => sub {},
# we do not check these b/c this need user interaction (auth, ...):
checked_on_boot => 0,
},
- {
- class => "JOYSTICK",
- string => N("Joystick"),
- icon => "joystick.png",
- configurator => "",
- detector => sub { f(grep { $_->{description} =~ /Joystick/ } @devices) },
- 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)/ } @devices) },
- checked_on_boot => 1,
- },
{
- class => "SATA_STORAGE",
- string => N("SATA controllers"),
- icon => "ide_hd.png",
- configurator => "",
- detector => sub {
- require list_modules;
- my @modules = list_modules::category2modules('disk/sata');
- f(grep { member($_->{driver}, @modules) } @devices);
- },
- checked_on_boot => 1,
- },
-
- {
- class => "RAID_STORAGE",
- string => N("RAID controllers"),
- icon => "ide_hd.png",
- configurator => "",
- detector => sub {
- require list_modules;
- my @modules = list_modules::category2modules('disk/hardware_raid');
- f(grep { member($_->{driver}, @modules) } @devices);
- },
- checked_on_boot => 1,
- },
-
- {
- class => "FIREWIRE_CONTROLLER",
- string => N("Firewire controllers"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{driver} =~ /ohci1394/ } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "PCMCIA_CONTROLLER",
- string => N("PCMCIA controllers"),
- icon => "scsi.png",
- configurator => "",
- detector => sub { f(detect_devices::pcmcia_controller_probe()) },
- checked_on_boot => 1,
- },
-
- {
- class => "SCSI_CONTROLLER",
- string => N("SCSI controllers"),
- icon => "scsi.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /STORAGE_SCSI/ } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "USB_CONTROLLER",
- string => N("USB controllers"),
- icon => "usb.png",
- configurator => "",
- detector => sub { f(grep { $_->{media_type} eq 'SERIAL_USB' } @devices) },
- checked_on_boot => 1,
- },
-
- {
- class => "USB_HUB",
- string => N("USB ports"),
- icon => "usb.png",
+ class => "GAMEPORT",
+ string =>
+ #-PO: these are joysticks controllers:
+ N("Game port controllers"),
+ icon => "joystick.png",
configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /Hub/ } @devices) },
+ detector => sub { f(detect_devices::probe_category('multimedia/gameport')) },
checked_on_boot => 0,
},
{
- class => "SMB_CONTROLLER",
- string => N("SMBus controllers"),
- icon => "usb.png",
+ class => "JOYSTICK",
+ string => N("Joystick"),
+ icon => "joystick.png",
configurator => "",
- detector => sub { f(grep { $_->{media_type} =~ /SERIAL_SMBUS/ } @devices) },
+ detector => sub { f(detect_devices::probe_category('input/joystick')), f(grep { $_->{description} =~ /Joystick/i } @devices) },
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|SYSTEM_OTHER/ } @devices) },
- checked_on_boot => 0,
- },
{
class => "KEYBOARD",
string => N("Keyboard"),
- icon => "usb.png",
- configurator => "$sbindir/keyboardrake",
+ icon => "hw-keyboard.png",
+ configurator => "$sbindir/keyboarddrake",
detector => sub {
- f(grep { $_->{description} =~ /Keyboard/i } @devices),
- # USB devices are filtered out since we already catch them through probeall():
- grep { $_->{bus} ne 'usb' && $_->{driver} eq 'kbd' && $_->{description} !~ /PC Speaker/ } detect_devices::getInputDevices();
+ f(grep { $_->{description} =~ /Keyboard/i || $_->{media_type} =~ /Subclass\|Keyboard/i ||
+ # USB devices are filtered out since we already catch them through probeall():
+ $_->{bus} ne 'usb' && $_->{driver} =~ /^event|kbd/ && $_->{description} !~ /PC Speaker/;
+ } @devices);
},
checked_on_boot => 0,
},
{
+ class => "MISC_INPUT",
+ string => N("Tablet and touchscreen"),
+ icon => "hw_mouse.png",
+ detector => sub { f(detect_devices::probe_category('input/tablet'), detect_devices::probe_category('input/touchscreen')) },
+ configurator => "$sbindir/mousedrake",
+ checked_on_boot => 0,
+ },
+
+ {
class => "MOUSE",
string => N("Mouse"),
icon => "hw_mouse.png",
configurator => "$sbindir/mousedrake",
detector => sub {
- f(grep { $_->{driver} =~ /^Mouse:|^Tablet:/ || $_->{media_type} =~ /class\|Mouse/ } @devices),
- # USB devices are filtered out since we already catch them through probeall():
- grep { $_->{bus} ne 'usb' && $_->{driver} =~ /mouse/ } detect_devices::getInputDevices();
+ f(grep { $_->{driver} =~ /^Mouse:|^Tablet:|^mouse/ || $_->{media_type} =~ /class\|Mouse/ ||
+ # USB devices are filtered out since we already catch them through probeall():
+ $_->{bus} ne 'usb' && $_->{Handlers}{mouse};
+ } @devices);
},
checked_on_boot => 1,
automatic => 1,
},
{
+ class => "BIOMETRIC",
+ string => N("Biometry"),
+ icon => "ups.png",
+ detector => sub { f(grep { $_->{description} =~ /fingerprint|biometric/i } @devices) },
+ checked_on_boot => 0,
+ },
+
+ {
class => "UPS",
string => N("UPS"),
icon => "ups.png",
@@ -425,7 +530,8 @@ our @tree =
icon => "scanner.png",
configurator => "$sbindir/scannerdrake",
detector => sub {
- require scanner; f(scanner::detect()) },
+ require scanner; f(map { $_->{val}{drakx_device} } f(scanner::detect()));
+ },
checked_on_boot => 0,
},
@@ -450,7 +556,9 @@ sub pciusb_id {
pci_device => 'usb_pci_device',
vendor => 'usb_vendor',
);
- join(':', map { $dev->{$alt{$_}} || $dev->{$_} } qw(bus pci_bus pci_device vendor id subvendor subid description));
+ my @fields = ('bus', if_($dev->{bus} =~ /pci/, qw(pci_bus pci_device)), qw(vendor id subvendor subid),
+ if_($dev->{bus} !~ /usb/i, 'description'));
+ join(':', map { uc($dev->{$alt{$_}} || $dev->{$_}) } @fields);
}
@@ -462,8 +570,7 @@ sub custom_id {
N("cpu # ") . $device->{processor} . ": " . $device->{'model name'} :
$device->{"Socket Designation"} ?
"$device->{name} (" . $device->{"Socket Designation"} . ")" :
- $device->{name} ? $device->{name} :
- (defined($device->{description}) ? $device->{description} : $str));
+ $device->{name} || $device->{description} || $device->{Vendor} || $str);
}
1;
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index e1651f23c..5bf5c55ab 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -5,10 +5,10 @@ package harddrake::sound;
# 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
-# o pcmcia cards: snd-vxp440 snd-vxpocket
+# o pci cards: snd_als4000, snd_es968, snd_hdsp
+# o isa cards: snd_azt2320, snd_cs4231, snd_cs4236,
+# snd_dt0197h, snd_korg1212, snd_rme32
+# o pcmcia cards: snd_vxp440 snd_vxpocket
# TODO:
# o ensure sound is not user (either dsp/midi/sequencer/mixer)
@@ -16,7 +16,6 @@ package harddrake::sound;
use strict;
use common;
-use interactive;
use run_program;
use modules;
use list_modules;
@@ -26,151 +25,230 @@ use log;
our %alsa2oss =
(
- if_(arch() =~ /ppc/, "snd-powermac" => [ "dmasound_pmac" ]),
+ if_(arch() =~ /ppc/, "snd_powermac" => [ "dmasound_pmac" ]),
if_(arch() =~ /sparc/,
- "snd-sun-amd7930" => [ "unknown" ],
- "snd-sun-cs4231" => [ "unknown" ],
- "snd-sun-dbri" => [ "unknown" ],
+ "snd_sun_amd7930" => [ "unknown" ],
+ "snd_sun_cs4231" => [ "unknown" ],
+ "snd_sun_dbri" => [ "unknown" ],
),
- "snd-ad1816a" => [ "ad1816" ], # isa
- "snd-ad1848" => [ "ad1848", "pss" ], # isa
- "snd-ali5451" => [ "trident" ],
- "snd-als100" => [ "sb" ], # isa
- "snd-als4000" => [ "unknown" ],
- "snd-atiixp" => [ "unknown" ],
- "snd-au8810" => [ "unknown" ],
- "snd-au8820" => [ "unknown" ],
- "snd-au8830" => [ "unknown" ],
- "snd-audigyls" => [ "unknown" ], # pci, renamed as snd-ca0106
- "snd-azt2320" => [ "unknown" ], # isa
- "snd-azt3328" => [ "unknown" ], # isa
- "snd-azx" => [ "unknown" ],
- "snd-bt87x" => [ "btaudio" ],
- "snd-ca0106" => [ "unknown" ], # pci
- "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-darla20" => [ "unknown" ],
- "snd-darla24" => [ "unknown" ],
- "snd-dt0197h" => [ "unknown" ], # isa
- "snd-dt019x" => [ "unknown" ], # isa
- "snd-emu10k1" => [ "audigy", "emu10k1" ],
- "snd-emu10k1x" => [ "unknown" ],
- "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-gina20" => [ "unknown" ],
- "snd-gina24" => [ "unknown" ],
- "snd-gina3g" => [ "unknown" ],
- "snd-gusclassic" => [ "gus" ], # isa
- "snd-gusextreme" => [ "gus" ], # isa
- "snd-gusmax" => [ "gus" ], # isa
- "snd-hda-intelp" => [ "unknown" ],
- "snd-hdspm" => [ "unknown" ],
- "snd-hdsp" => [ "unknown" ],
- "snd-ice1712" => [ "unknown" ], # isa
- "snd-ice1724" => [ "unknown" ], # isa
- "snd-indi" => [ "unknown" ], # pci
- "snd-indigo" => [ "unknown" ], # pci
- "snd-indigodj" => [ "unknown" ], # pci
- "snd-indigoio" => [ "unknown" ], # pci
- "snd-intel8x0" => [ "ali5455", "i810_audio", "nvaudio" ],
- "snd-interwave" => [ "gus" ], # isa
- "snd-interwave-stb" => [ "unknown" ], # isa
- "snd-korg1212" => [ "unknown" ], # isa
- "snd-layla20" => [ "unknown" ],
- "snd-layla24" => [ "unknown" ],
- "snd-layla3g" => [ "unknown" ],
- "snd-maestro3" => [ "maestro3" ],
- "snd-mia" => [ "unknown" ],
- "snd-mixart" => [ "unknown" ],
- "snd-mona" => [ "unknown" ],
- "snd-mpu401" => [ "mpu401" ],
- "snd-nm256" => [ "nm256_audio" ],
- "snd-opl3sa2" => [ "opl3", "opl3sa", "opl3sa2" ], # isa
- "snd-opti92x-ad1848" => [ "unknown" ], # isa
- "snd-opti92x-cs4231" => [ "unknown" ], # isa
- "snd-opti93x" => [ "mad16" ],
- "snd-pcxhr" => [ "unknown" ], # pci
- "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-sscape" => [ "sscape" ], # isa
- "snd-trident" => [ "trident" ],
- "snd-usb-audio" => [ "audio" ], # usb
- "snd-via82xx" => [ "via82cxxx_audio" ],
- "snd-vx222" => [ "unknown" ],
- "snd-vxp440" => [ "unknown" ], # pcmcia
- "snd-vxpocket" => [ "unknown" ], # pcmcia
- "snd-wavefront" => [ "wavefront" ], # isa
- "snd-ymfpci" => [ "ymfpci" ],
+ "snd_ad1816a" => [ "ad1816" ], # isa
+ "snd_ad1848" => [ "ad1848", "pss" ], # isa
+ "snd_ad1889" => [ "ad1889" ],
+ "snd_ali5451" => [ "trident" ],
+ "snd_als100" => [ "sb" ], # isa
+ "snd_als300" => [ "unknown" ],
+ "snd_als4000" => [ "unknown" ],
+ "snd_aoa" => [ "unknown" ],
+ "snd_asihpi" => [ "unknown" ],
+ "snd_atiixp" => [ "unknown" ],
+ "snd_au8810" => [ "unknown" ],
+ "snd_au8820" => [ "unknown" ],
+ "snd_au8830" => [ "unknown" ],
+ "snd_audigyls" => [ "unknown" ], # pci, renamed as snd_ca0106
+ "snd_azt2320" => [ "unknown" ], # isa
+ "snd_azt3328" => [ "unknown" ], # isa
+ "snd_azx" => [ "unknown" ],
+ "snd_bt87x" => [ "btaudio" ],
+ "snd_ca0106" => [ "unknown" ], # pci
+ "snd_cmi8330" => [ "sb" ], # isa
+ "snd_cmi8788" => [ "unknown" ], # pci
+ "snd_cmipci" => [ "cmpci" ],
+ "snd_cs4231" => [ "unknown" ], # isa
+ "snd_cs4232" => [ "cs4232" ], # isa
+ "snd_cs4236" => [ "ad1848" ], # isa
+ "snd_cs4281" => [ "cs4281" ],
+ "snd_cs46xx" => [ "cs46xx" ],
+ "snd_cs5530" => [ "unknown" ],
+ "snd_cs5535audio" => [ "unknown" ],
+ "snd_darla20" => [ "unknown" ],
+ "snd_darla24" => [ "unknown" ],
+ "snd_dt0197h" => [ "unknown" ], # isa
+ "snd_dt019x" => [ "unknown" ], # isa
+ "snd_echo3g" => [ "unknown" ],
+ "snd_emu10k1" => [ "audigy", "emu10k1" ],
+ "snd_emu10k1x" => [ "unknown" ],
+ "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_gina20" => [ "unknown" ],
+ "snd_gina24" => [ "unknown" ],
+ "snd_gina3g" => [ "unknown" ],
+ "snd_gusclassic" => [ "gus" ], # isa
+ "snd_gusextreme" => [ "gus" ], # isa
+ "snd_gusmax" => [ "gus" ], # isa
+ "snd_hda_intel" => [ "unknown" ],
+ "snd_hdspm" => [ "unknown" ],
+ "snd_hdsp" => [ "unknown" ],
+ "snd_ice1712" => [ "unknown" ], # isa
+ "snd_ice1724" => [ "unknown" ], # isa
+ "snd_indi" => [ "unknown" ], # pci
+ "snd_indigo" => [ "unknown" ], # pci
+ "snd_indigodj" => [ "unknown" ], # pci
+ "snd_indigoio" => [ "unknown" ], # pci
+ "snd_intel8x0" => [ "ali5455", "i810_audio", "nvaudio" ],
+ "snd_interwave" => [ "gus" ], # isa
+ "snd_interwave_stb" => [ "unknown" ], # isa
+ "snd_korg1212" => [ "unknown" ], # isa
+ "snd_layla20" => [ "unknown" ],
+ "snd_layla24" => [ "unknown" ],
+ "snd_layla3g" => [ "unknown" ],
+ "snd_maestro3" => [ "maestro3" ],
+ "snd_mia" => [ "unknown" ],
+ "snd_mixart" => [ "unknown" ],
+ "snd_mona" => [ "unknown" ],
+ "snd_mpu401" => [ "mpu401" ],
+ "snd_nm256" => [ "nm256_audio" ],
+ "snd_opl3sa2" => [ "opl3", "opl3sa", "opl3sa2" ], # isa
+ "snd_opti92x_ad1848" => [ "unknown" ], # isa
+ "snd_opti92x_cs4231" => [ "unknown" ], # isa
+ "snd_opti93x" => [ "mad16" ],
+ "snd_pcxhr" => [ "unknown" ], # pci
+ "snd_riptide" => [ "unknown" ],
+ "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_sscape" => [ "sscape" ], # isa
+ "snd_trident" => [ "trident" ],
+ "snd_usb_audio" => [ "audio" ], # usb
+ "snd_usb_caiaq" => [ "unknown" ],
+ "snd_usb_usx2y" => [ "unknown" ],
+ "snd_via82xx" => [ "via82cxxx_audio" ],
+ "snd_vx222" => [ "unknown" ],
+ "snd_vxp440" => [ "unknown" ], # pcmcia
+ "snd_vxpocket" => [ "unknown" ], # pcmcia
+ "snd_wavefront" => [ "wavefront" ], # isa
+ "snd_ymfpci" => [ "ymfpci" ],
);
our %oss2alsa =
(
- if_(arch() =~ /ppc/, "dmasound_pmac" => [ "snd-powermac" ]),
- "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" ],
+ if_(arch() =~ /ppc/, "dmasound_pmac" => [ "snd_powermac" ]),
+ "ad1816" => [ "snd_ad1816a" ],
+ "ad1848" => [ "snd_ad1848", "snd_cs4236" ],
+ "ad1889" => [ "snd_ad1889" ],
+ "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" ],
+ "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" ],
+ "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", "snd-sscape" ],
- "trident" => [ "snd-ali5451", "snd-trident" ],
- "via82cxxx_audio" => [ "snd-via82xx" ],
- "wavefront" => [ "snd-wavefront" ],
- "ymfpci" => [ "snd-ymfpci" ],
+ "sb" => [ "snd_als100", "snd_cmi8330", "snd_es1688", "snd_es18xx", "snd_es968", "snd_sb8", "snd_sb16" ],
+ "sgalaxy" => [ "snd_sgalaxy" ],
+ "sonicvibes" => [ "snd_sonicvibes" ],
+ "sscape" => [ "snd_sb16", "snd_sscape" ],
+ "trident" => [ "snd_ali5451", "snd_trident" ],
+ "via82cxxx_audio" => [ "snd_via82xx" ],
+ "wavefront" => [ "snd_wavefront" ],
+ "ymfpci" => [ "snd_ymfpci" ],
);
my @blacklist = qw(cs46xx cs4281);
my $blacklisted = 0;
+sub is_pulseaudio_enabled() {
+ my $soundprofile = common::read_alternative('soundprofile');
+ $soundprofile =~ /pulse$/;
+}
+
+sub set_pulseaudio {
+ my ($val) = @_;
+
+ my $alterative = '/etc/sound/profiles/' . ($val ? 'pulse' : 'alsa');
+ return if ! -d $alterative;
+
+ common::symlinkf_update_alternatives('soundprofile', $alterative);
+
+ # (cg) This config file will eventually be dropped, but it is still needed for now
+ # as several packages/patches depend on it.
+ my $config_file = "$::prefix/etc/sysconfig/pulseaudio";
+ $val = 'PULSE_SERVER_TYPE=' . ($val ? 'personal' : 'none') . "\n";
+ my $done;
+ substInFile {
+ if (/^PULSE_SERVER_TYPE=/) {
+ $_ = $val;
+ $done = 1;
+ }
+ } $config_file;
+ append_to_file($config_file, $val) if !$done;
+}
+
+
+my $pa_startup_scriptfile = "$::prefix/etc/pulse/default.pa";
+
+sub is_pulseaudio_glitchfree_enabled() {
+ return -f $pa_startup_scriptfile &&
+ cat_($pa_startup_scriptfile) !~ /^load-module\s+module-(udev|hal)-detect\s+tsched=0/m;
+}
+
+sub set_pulseaudio_glitchfree {
+ my ($val) = @_;
+
+ return if ! -f $pa_startup_scriptfile;
+
+ substInFile {
+ if ($val) {
+ s/^(load-module\s+module-(udev|hal)-detect)\s+tsched=0/$1/;
+ } else {
+ s/^(load-module\s+module-(udev|hal)-detect).*/$1 tsched=0/;
+ }
+ } $pa_startup_scriptfile;
+}
+
+my $pa_client_conffile = "$::prefix/etc/pulse/client.conf";
+
+sub set_PA_autospan {
+ my ($val) = @_;
+
+ return if ! -f $pa_client_conffile;
+
+ $val = 'autospawn = ' . bool2yesno($val) . "\n";
+ my $done;
+ substInFile {
+ if (/^autospawn\s*=/) {
+ $_ = $val;
+ $done = 1;
+ }
+ } $pa_client_conffile;
+ append_to_file($pa_client_conffile, $val) if !$done;
+}
+
+
sub rooted { run_program::rooted($::prefix, @_) }
sub unload { modules::unload(@_) if $::isStandalone || $blacklisted }
@@ -182,7 +260,8 @@ sub load {
sub get_alternative {
my ($driver) = @_;
- $alsa2oss{$driver} || $oss2alsa{$driver};
+ my $list = $alsa2oss{$driver} || $oss2alsa{$driver};
+ $list ? @$list : "unknown";
}
sub do_switch {
@@ -192,14 +271,15 @@ sub do_switch {
log::explanations("removing old $old_driver\n");
if ($::isStandalone) {
rooted("service sound stop") unless $blacklisted;
- rooted("service alsa stop") if $old_driver =~ /^snd-/ && !$blacklisted;
+ rooted("service alsa stop") if $old_driver =~ /^snd_/ && !$blacklisted;
unload($old_driver); # run_program("/sbin/modprobe -r $driver"); # just in case ...
}
$modules_conf->remove_module($old_driver);
- $modules_conf->set_sound_slot("sound-slot-$index", $new_driver);
+ configure_one_sound_slot($modules_conf, $index, $new_driver);
$modules_conf->write;
- if ($new_driver =~ /^snd-/) { # new driver is an alsa one
- $in->do_pkgs->ensure_binary_is_installed('alsa-utils', 'alsactl');
+ if ($new_driver =~ /^snd_/) { # new driver is an alsa one
+ $in->do_pkgs->ensure_binary_is_installed(qw(alsa-utils alsactl), 1);
+ $in->do_pkgs->ensure_binary_is_installed(qw(aoss aoss), 1);
rooted("service alsa start") if $::isStandalone && !$blacklisted;
rooted("/sbin/chkconfig --add alsa") if $::isStandalone;
load($modules_conf, $new_driver) if $::isStandalone; # service alsa is buggy
@@ -214,23 +294,71 @@ sub switch {
my $driver = $device->{current_driver} || $device->{driver};
foreach (@blacklist) { $blacklisted = 1 if $driver eq $_ }
- my @alternative = @{get_alternative($driver)};
+ my @alternative = $driver ne 'unknown' ? get_alternative($driver) : ();
unless ($driver eq $device->{driver} || member($device->{driver}, @alternative)) {
- push @alternative, @{get_alternative($device->{driver})}, $device->{driver};
+ 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');
+
+ my $is_pulseaudio_installed = (-f $pa_startup_scriptfile && -f $pa_client_conffile && -d '/etc/sound/profiles/pulse');
+ my $is_pulseaudio_enabled = is_pulseaudio_enabled();
+ my $is_pulseaudio_glitchfree_enabled = is_pulseaudio_glitchfree_enabled();
+
+ my $old_value = $is_pulseaudio_enabled;
+
+ my $write_config = sub {
+ return if !$is_pulseaudio_installed;
+ set_pulseaudio($is_pulseaudio_enabled);
+ set_pulseaudio_glitchfree($is_pulseaudio_glitchfree_enabled);
+ set_PA_autospan($is_pulseaudio_enabled);
+ if ($is_pulseaudio_enabled) {
+ my $lib = (arch() =~ /x86_64/ ? 'lib64' : 'lib');
+ $in->do_pkgs->ensure_is_installed($lib . 'alsa-plugins-pulseaudio',
+ '/usr/' . $lib . '/alsa-lib/libasound_module_pcm_pulse.so');
+ }
+ if ($old_value ne $is_pulseaudio_enabled) {
+ require any;
+ any::ask_for_X_restart($in);
+ }
+ };
+
+ my @common = (
+ get_any_driver_entry($in, $modules_conf, $driver, $device),
+ {
+ text => N("Enable PulseAudio"),
+ type => 'bool', val => \$is_pulseaudio_enabled,
+ disabled => sub { !$is_pulseaudio_installed },
+ },
+ {
+ text => N("Use Glitch-Free mode"),
+ type => 'bool', val => \$is_pulseaudio_glitchfree_enabled,
+ disabled => sub { !$is_pulseaudio_installed || !$is_pulseaudio_enabled },
+ },
+ {
+ advanced => 1,
+ val => N("Reset sound mixer to default values"),
+ clicked => sub { run_program::run('reset_sound') }
+ },
+ {
+ advanced => 1,
+ val => N("Troubleshooting"), disabled => sub {},
+ clicked => sub { &trouble($in) }
+ },
+ );
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, $modules_conf, $driver, $device),
- ]
- );
+ if ($in->ask_from_({
+ title => N("No alternative driver"),
+ messages => N("There's no known OSS/ALSA alternative driver for your sound card (%s) which currently uses \"%s\"",
+ $device->{description}, $driver),
+ },
+ \@common,
+ )) {
+ $write_config->();
+ }
} 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).",
@@ -238,7 +366,7 @@ sub switch {
#-PO: here the first %s is either "OSS" or "ALSA",
#-PO: the second %s is the name of the current driver
#-PO: and the third %s is the name of the default driver
- N("\n\nYour card currently use the %s\"%s\" driver (default driver for your card is \"%s\")", ($driver =~ /^snd-/ ? "ALSA " : "OSS "), $driver, $device->{driver}),
+ N("\n\nYour card currently uses the %s\"%s\" driver (the 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.
@@ -247,24 +375,25 @@ 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.
+- 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) }
+ allow_empty_list => 1,
+ format => sub { my ($drv) = @_;
+ $drv eq 'unknown' ? $drv :
+ sprintf(($des{$drv} ? "$des{$drv} (%s [%s])"
+ : "%s [%s]"), $drv, $drv =~ /^snd_/ ? 'ALSA' : 'OSS');
+ }
},
- get_any_driver_entry($in, $modules_conf, $driver, $device),
+ @common,
]))
{
+ $write_config->();
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
@@ -283,10 +412,6 @@ The new \"%s\" driver will only be used on next bootstrap.", $device->{current_d
N("There's no known driver for your sound card (%s)",
$device->{description}),
[ get_any_driver_entry($in, $modules_conf, $driver, $device) ]);
- } else {
- $in->ask_warn(N("Unknown driver"),
- N("Error: The \"%s\" driver for your sound card is unlisted",
- $driver));
}
end:
}
@@ -299,23 +424,23 @@ sub config {
sub trouble {
my ($in) = @_;
- $in->ask_warn(N("Sound trouble shooting"),
+ $in->ask_warn(N("Sound troubleshooting"),
formatAlaTeX(
#-PO: keep the double empty lines between sections, this is formatted a la LaTeX
N("The classic bug sound tester is to run the following commands:
-- \"lspcidrake -v | fgrep AUDIO\" will tell you which driver your card uses
+- \"lspcidrake -v | fgrep -i AUDIO\" will tell you which driver your card uses
by default
-- \"grep sound-slot /etc/modules.conf\" will tell you what driver it
+- \"grep sound-slot /etc/modprobe.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
+tell you if sound and alsa services are configured to be run on
initlevel 3
- \"aumix -q\" will tell you if the sound volume is muted or not
@@ -328,6 +453,7 @@ sub get_any_driver_entry {
my ($in, $modules_conf, $driver, $device) = @_;
return () if $::isInstall;
+{
+ advanced => 1,
val => N("Let me pick any driver"), disabled => sub {},
clicked => sub {
my $old_driver = $driver;
@@ -335,7 +461,7 @@ sub get_any_driver_entry {
formatAlaTeX(
#-PO: keep the double empty lines between sections, this is formatted a la LaTeX
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.
+you can pick one from the above list.
The current driver for your \"%s\" sound card is \"%s\" ", $device->{description}, $driver)),
[
@@ -349,16 +475,22 @@ The current driver for your \"%s\" sound card is \"%s\" ", $device->{description
};
}
+sub configure_one_sound_slot {
+ my ($modules_conf, $index, $driver) = @_;
+ $modules_conf->set_sound_slot("sound-slot-$index", $driver);
+ $modules_conf->set_options($driver, "xbox=1") if $driver eq "snd_intel8x0" && detect_devices::is_xbox();
+ $modules_conf->set_options('snd-ac97-codec', "power_save=1") if $driver =~ /^snd/ && detect_devices::isLaptop()
+ && arch() !~ /mips/;
+}
sub configure_sound_slots {
my ($modules_conf) = @_;
my $altered = 0;
each_index {
my $default_driver = $modules_conf->get_alias("sound-slot-$::i");
- if (!member($default_driver, @{get_alternative($_->{driver})}, $_->{driver})) {
+ if (!member($default_driver, get_alternative($_->{driver}), $_->{driver})) {
$altered ||= $default_driver;
- $modules_conf->set_sound_slot("sound-slot-$::i", $_->{driver});
- $modules_conf->set_options($_->{driver}, "xbox=1") if $_->{driver} eq "snd-intel8x0" && is_xbox();
+ configure_one_sound_slot($modules_conf, $::i, $_->{driver});
}
} detect_devices::getSoundDevices();
$modules_conf->write if $altered && $::isStandalone;
diff --git a/perl-install/harddrake/v4l.pm b/perl-install/harddrake/v4l.pm
index aa005b664..12d130240 100644
--- a/perl-install/harddrake/v4l.pm
+++ b/perl-install/harddrake/v4l.pm
@@ -3,9 +3,7 @@ package harddrake::v4l;
use strict;
use common;
-use interactive;
use detect_devices;
-use lang;
use log;
use modules;
@@ -47,7 +45,7 @@ my %tuners_lst =
28 => "LG|PAL_BG+FM (TPI8PSB01D)",
29 => "LG|PAL_BG (TPI8PSB11D)",
30 => "Temic|PAL* auto + FM (4009 FN5)",
- 31 => "SHARP|NTSC_JP (2U5JF5540)",
+ 31 => "SHARP NTSC_JP (2U5JF5540)",
32 => "Samsung|PAL TCPM9091PD27",
33 => "MT20xx universal",
34 => "Temic|PAL_BG (4106 FH5)",
@@ -62,6 +60,33 @@ my %tuners_lst =
43 => "Philips|NTSC MK3 (FM1236MK3 or FM1236/F)",
44 => "Philips|4 in 1 (ATI TV Wonder Pro/Conexant)",
45 => "Microtune|4049 FM5",
+ 46 => "Panasonic VP27s/ENGE4324D",
+ 47 => "LG|NTSC (TAPE series)",
+ 48 => "Tena|TNF 8831 BGFF",
+ 49 => "Microtune|4042 FI5 ATSC/NTSC dual in",
+ 50 => "TCL 2002N",
+ 51 => "Philips|PAL/SECAM_D (FM 1256 I-H3)",
+ 52 => "Thomson|DDT 7610 (ATSC/NTSC)",
+ 53 => "Philips|FQ1286",
+ 54 => "tda8290+75",
+ 55 => "LG|PAL (TAPE series)",
+ 56 => "Philips|PAL/SECAM multi (FQ1216AME MK4)",
+ 57 => "Philips|FQ1236A MK4",
+ 58 => "Ymec|TVision|TVF-8531MF",
+ 59 => "Ymec|TVision|TVF-5533MF",
+ 60 => "Thomson|DDT 7611 (ATSC/NTSC)",
+ 61 => "Tena|TNF9533-D/IF/TNF9533-B/DF",
+ 62 => "Philips|TEA5767HN FM Radio",
+ 63 => "Philips|FMD1216ME MK3 Hybrid Tuner",
+ 64 => "LG|TDVS-H062F/TUA6034",
+ 65 => "Ymec|TVF66T5-B/DFF",
+ 66 => "LG|NTSC (TALN mini series)",
+ 67 => "Philips|TD1316 Hybrid Tuner",
+ 68 => "Philips|TUV1236D ATSC/NTSC dual in",
+ 69 => "Tena|TNF 5335 MF",
+ 70 => "Samsung|TCPN 2121P30A",
+ 71 => "Xceive xc3028",
+
);
@@ -75,27 +100,27 @@ my $cards_lst = {
"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,
+ "D|Diamond DTV2000" => 5,
"A|AVerMedia|TVPhone" => 6,
- "M|MATRIX-Vision|MV-Delta" => 7,
+ "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,
+ "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,
+ "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,
+ "C|CEI Raffles Card" => 20,
"L|Lifeview|FlyVideo 98" => 21,
- "L|Lucky Star|Image World ConferenceTV LR50" => 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,
@@ -105,13 +130,13 @@ my $cards_lst = {
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,
+ "V|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,
+ "I|Imagenation PXC200" => 29,
"L|Lifeview|FlyVideo 98 LR50" => 30,
"Formac|iProTV" => 31,
"Formac|iProTV I (bt848)" => 31,
@@ -121,7 +146,7 @@ my $cards_lst = {
"L|Leadtek|WinFast TV 2000" => 34,
"L|Leadtek|WinFast VC 100" => 35,
"L|Lifeview|FlyVideo 98 LR50" => 35,
- "C|Chronos|Video Shuttle II" => 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,
@@ -131,19 +156,19 @@ my $cards_lst = {
"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,
+ "L|Little OnAir TV" => 43,
+ "S|Sigma TVII-FM" => 44,
+ "M|MATRIX Vision|MV-Delta 2" => 45,
+ "Zoltrix|Genie TV/FM" => 46,
"T|Terratec|TV/Radio+" => 47,
"A|Askey|CPH03x" => 48,
- "D|Dynalink|Magic TView" => 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,
+ "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,
@@ -164,7 +189,7 @@ my $cards_lst = {
"A|Askey|CPH061" => 62,
"Bestbuy|Easy TV (bt878)" => 62,
"L|Lifetec|LT9306" => 62,
- "M|Medion|MD9306" => 62,
+ "M|Medion MD9306" => 62,
"A|ATI|TV-Wonder" => 63,
"A|ATI|TV-Wonder VE" => 64,
"L|Lifeview|FlyVideo 2000S LR90" => 65,
@@ -178,95 +203,233 @@ my $cards_lst = {
# "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,
+ "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,
+ "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,
+ "Jetway TV/Capture JW-TV878-FBK" => 78,
+ "K|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,
+ "Osprey|100/150 (878)" => 82,
+ "Osprey|100/150 (848)" => 83,
+ "Osprey|101 (848)" => 84,
+ "Osprey|101/151" => 85,
+ "Osprey|101/151 w/ svid" => 86,
+ "Osprey|200/201/250/251" => 87,
+ "Osprey|200/250" => 88,
+ "Osprey|210/220" => 89,
+ "Osprey|500" => 90,
+ "Osprey|540" => 91,
+ "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,
+ "H|Hercules Smart TV Stereo" => 100,
+ "P|Pace TV & Radio Card" => 101,
+ "I|IVC|200" => 102,
+ "G|GrandTec|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,
+ "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,
+ "T|Teppro TEV-560/InterVision IV-560" => 115,
+ "S|SIMUS GVC1100" => 116,
+ "N|NGS NGSTV+" => 117,
"L|LMLBT4" => 118,
- "T|Tekram|M205 PRO" => 119,
+ "T|Tekram M205 PRO" => 119,
"C|Conceptronic|CONTVFMi" => 120,
+ "E|Euresys|Picolo Tetra" => 121,
+ "S|Spirit TV Tuner" => 122,
+ "A|AverMedia|AVerTV DVB-T 771" => 123,
+ "A|AverMedia|AverTV DVB-T 761" => 124,
+ "M|MATRIX Vision|Sigma-SQ" => 125,
+ "M|MATRIX Vision|Sigma-SLC" => 126,
+ "A|APAC Viewcomp 878(AMAX)" => 127,
+ "D|DViCO|FusionHDTV DVB-T Lite" => 128,
+ "V|V-Gear MyVCD" => 129,
+ "S|Super TV Tuner" => 130,
+ "T|Tibet Systems 'Progress DVR' CS16" => 131,
+ "K|Kodicom|4400R (master)" => 132,
+ "K|Kodicom|4400R (slave)" => 133,
+ "A|Adlink|RTV24" => 134,
+ "D|DViCO|FusionHDTV 5 Lite" => 135,
+ "A|Acorp|Y878F" => 136,
+ "C|Conceptronic|CTVFMi v2" => 137,
+ "P|Prolink|Pixelview PV-BT878P+ (Rev.2E)" => 138,
+ "P|Prolink|PixelView PlayTV MPEG2 PV-M4900" => 139,
+ "Osprey|440" => 140,
+ "A|Asound|Skyeye PCTV" => 141,
+ "S|Sabrent TV-FM (bttv version)" => 142,
+ "H|Hauppauge|ImpactVCB (bt878)" => 143,
+ "M|MagicTV" => 144,
+
+ },
+
+ 'cx88' => {
+ N("Unknown|Generic") => 0,
+ "Hauppauge|WinTV 34xxx models" => 1,
+ "GDI Black Gold" => 2,
+ "PixelView|???" => 3,
+ "ATI|TV Wonder Pro" => 4,
+ "Leadtek|Winfast 2000XP Expert" => 5,
+ "AVerTV|Studio 303 (M126) " => 6,
+ 'MSI|TV-@nywhere Master' => 7,
+ "Leadtek|Winfast DV2000" => 8,
+ "Leadtek|PVR 2000" => 9,
+ "IODATA|GV-VCP3/PCI" => 10,
+ "Prolink PlayTV PVR" => 11,
+ "ASUS PVR-416" => 12,
+ 'MSI|TV-@nywhere' => 13,
+ "VStream|XPert DVB-T" => 14,
+ "KWorld|XPert DVB-T" => 14,
+ "DViCO|FusionHDTV DVB-T1" => 15,
+ "KWorld|LTV883RF" => 16,
+ "DViCO|FusionHDTV 3 Gold" => 17,
+ "Hauppauge|Nova-T DVB-T" => 18,
+ "Conexant DVB-T reference design" => 19,
+ "Provideo PV259" => 20,
+ "DViCO|FusionHDTV DVB-T Plus" => 21,
+ "digitalnow|DNTV Live! DVB-T" => 22,
+ "pcHDTV HD3000 HDTV" => 23,
+ "Hauppauge|WinTV 28xxx (Roslyn) models" => 24,
+ "Digital-Logic MICROSPACE Entertainment Center (MEC)" => 25,
+ "IODATA|GV/BCTV7E" => 26,
+ "PixelView|PlayTV Ultra Pro (Stereo)" => 27,
+ "DViCO|FusionHDTV 3 Gold-T" => 28,
+ "ADS Tech Instant TV DVB-T PCI" => 29,
+ "TerraTec Cinergy 1400 DVB-T" => 30,
+ "DViCO|FusionHDTV 5 Gold" => 31,
+ "AverMedia UltraTV Media Center PCI 550" => 32,
+ "KWorld|V-Stream Xpert DVD" => 33,
+ "ATI|HDTV Wonder" => 34,
+ "WinFast DTV1000-T" => 35,
+ "AVerTV|303 (M126)" => 36,
+ "Hauppauge|Nova-S-Plus DVB-S" => 37,
+ "Hauppauge|Nova-SE2 DVB-S" => 38,
+ "KWorld|VB-S 100" => 39,
+ "Hauppauge|WinTV-HVR1100 DVB-T/Hybrid" => 40,
+ "Hauppauge|WinTV-HVR1100 DVB-T/Hybrid (Low Profile) [0070:9800,0070:9802]" => 41,
+ "digitalnow|DNTV Live! DVB-T Pro" => 42,
+ "VStream|XPert DVB-T with cx22702" => 43,
+ "KWorld|XPert DVB-T with cx22702" => 43,
+ "DViCO|FusionHDTV DVB-T Dual Digital" => 44,
+ "KWorld|HardwareMpegTV XPert" => 45,
},
+
'saa7134' => {
N("Unknown|Generic") => 0,
- "Proteus|Pro [philips reference design]" => 1,
+ "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,
+ "Typhoon|TV Tuner RDS" => 7,
"Terratec|Cinergy 400 TV" => 8,
"Medion|5044" => 9,
- "Kworld/KuroutoShikou SAA7130-TVPCI" => 10,
+ "Kworld|SAA7130-TVPCI" => 10,
+ "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,
+ "Typhoon|TV+Radio 90031" => 13,
+ "ELSA|EX-VISION 300TV" => 14,
+ "ELSA|EX-VISION 500TV" => 15,
+ "ASUS|TV-FM 7134" => 16,
+ "AOPEN VA1000 POWER" => 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,
+ "Compro|VideoMate TV" => 19,
+ "Matrox CronosPlus" => 20,
+ "10MOONS PCI TV CAPTURE CARD" => 21,
+ "Medion|2819" => 22,
+ "AverMedia|M156" => 22,
+ "BMK|MPEX Tuner" => 23,
+ "KNC|One TV-Station DVR" => 24,
"ASUS|TV-FM 7133" => 25,
"Pinnacle|PCTV Stereo (saa7134)" => 26,
- "Manli|MuchTV M-TV002" => 27,
- "Manli|MuchTV M-TV001" => 28,
+ "Manli|MuchTV M-TV002/Behold TV 403 FM" => 27,
+ "Manli|MuchTV M-TV001/Behold TV 401" => 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,
+ "AVACS SmartTV" => 32,
+ "AverMedia|DVD EZMaker" => 33,
+ "Noval Prime TV 7133" => 34,
+ "AverMedia|AverTV Studio 305" => 35,
+ "UPMOST PURPLE TV" => 36,
+ "Items MuchTV Plus / IT-005" => 37,
+ "Terratec|Cinergy 200 TV" => 38,
+ "LifeView|FlyTV Platinum Mini" => 39,
+ "Compro|VideoMate TV PVR/FM" => 40,
+ "Compro|VideoMate TV Gold+" => 41,
+ "Sabrent SBT-TVFM (saa7130)" => 42,
+ "Zolid Xpert TV7134" => 43,
+ "Empire PCI TV-Radio LE" => 44,
+ "AverMedia|AVerTV Studio 307" => 45,
+ "AverMedia|Cardbus TV/Radio" => 46,
+ "Terratec|Cinergy 400 mobile" => 47,
+ "Terratec|Cinergy 600 TV MK3" => 48,
+ "Compro|VideoMate Gold+ Pal" => 49,
+ "Pinnacle|PCTV 300i DVB-T + PAL" => 50,
+ "ProVideo PV952" => 51,
+ "AverMedia|AverTV/305" => 52,
+ "ASUS|TV-FM 7135" => 53,
+ "LifeView|FlyTV Platinum FM" => 54,
+ "LifeView|FlyDVB-T DUO" => 55,
+ "AverMedia|AVerTV 307" => 56,
+ "AverMedia|AVerTV GO 007 FM" => 57,
+ "ADS Tech Instant TV (saa7135)" => 58,
+ "Kworld|V-Stream Xpert TV PVR7134" => 59,
+ "Tevion|V-Stream Xpert TV PVR7134" => 59,
+ "Typhoon|DVB-T Duo Digital/Analog Cardbus" => 60,
+ "Philips|TOUGH DVB-T reference design" => 61,
+ "Compro|VideoMate TV Gold+II" => 62,
+ "Kworld|Xpert TV PVR7134" => 63,
+ "FlyTV mini Asus Digimatrix" => 64,
+ "Kworld|V-Stream Studio TV Terminator" => 65,
+ "Yuan TUN-900 (saa7135)" => 66,
+ "Beholder BeholdTV 409 FM" => 67,
+ "GoTView 7135 PCI" => 68,
+ "Philips|EUROPA V3 reference design" => 69,
+ "Compro|Videomate DVB-T300" => 70,
+ "Compro|Videomate DVB-T200" => 71,
+ "RTD|Embedded Technologies VFG7350" => 72,
+ "RTD|Embedded Technologies VFG7330" => 73,
+ "LifeView|FlyTV Platinum Mini2" => 74,
+ "AverMedia|AVerTVHD MCE A180" => 75,
+ "SKNet|MonsterTV Mobile" => 76,
+ "Pinnacle|PCTV 40i/50i/110i (saa7133)" => 77,
+ "ASUSTeK P7131 Dual" => 78,
+ "Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B)" => 79,
+ "ASUS|Digimatrix TV" => 80,
+ "Philips|Tiger reference design" => 81,
+ 'MSI TV@Anywhere plus' => 82,
+ "Terratec|Cinergy 250 PCI TV" => 83,
+ "LifeView|FlyDVB Trio" => 84,
+ "AverTV DVB-T 777" => 85,
+ "LifeView|FlyDVB-T" => 86,
+ "ADS Instant TV Duo Cardbus PTV331" => 87,
+ "Tevion|DVB-T 220RF" => 88,
+ "ELSA|EX-VISION 700TV" => 89,
+ "Kworld|ATSC110" => 90,
+
}
};
@@ -286,6 +449,7 @@ sub config {
my %conf = (gbuffers => 4, card => $default, tuner => -1, radio => 0, pll => -1);
+ return if !$cards_lst->{$driver};
my %cards_list = %{$cards_lst->{$driver}};
my %rvs_cards_list = reverse %cards_list;
@@ -302,28 +466,22 @@ sub config {
$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 ($driver eq 'bttv') {
+ $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."),
+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("Card model:"), val => \$conf{card}, list => [ keys %cards_list ], 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) {
+ if (my $options = join(' ', if_($driver eq 'bttv', 'radio=' . ($conf{radio} ? 1 : 0)), map { if_($conf{$_} ne -1, "$_=$conf{$_}") } qw(card pll tuner gbuffers))) {
log::l(qq([harddrake::v4l] set "$options" options for $driver));
# log::explanations("modified file /etc/modules.conf ($options)") if $::isStandalone;
$modules_conf->set_options($driver, $options);