[yast-commit] r38305 - in /trunk/tv: VERSION data/CARDLIST.ivtv data/Makefile.am data/create_tv_db data/tv_dvbcards.ycp data/tv_dvbfirmware.ycp package/yast2-tv.changes src/Tv.ycp
Author: lslezak Date: Wed Jun 6 11:16:24 2007 New Revision: 38305 URL: http://svn.opensuse.org/viewcvs/yast?rev=38305&view=rev Log: - support for ivtv based TV cards (#130098) - install firmware/packages before loading drivers - updated DVB card DB (#222806, #223188) - 2.15.6 Added: trunk/tv/data/CARDLIST.ivtv Modified: trunk/tv/VERSION trunk/tv/data/Makefile.am trunk/tv/data/create_tv_db trunk/tv/data/tv_dvbcards.ycp trunk/tv/data/tv_dvbfirmware.ycp trunk/tv/package/yast2-tv.changes trunk/tv/src/Tv.ycp Modified: trunk/tv/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/VERSION?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/VERSION (original) +++ trunk/tv/VERSION Wed Jun 6 11:16:24 2007 @@ -1 +1 @@ -2.15.5 +2.15.6 Added: trunk/tv/data/CARDLIST.ivtv URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/data/CARDLIST.ivtv?rev=38305&view=auto ============================================================================== --- trunk/tv/data/CARDLIST.ivtv (added) +++ trunk/tv/data/CARDLIST.ivtv Wed Jun 6 11:16:24 2007 @@ -0,0 +1,18 @@ + 1 -> Hauppauge WinTV PVR-250 + 2 -> Hauppauge WinTV PVR-350 + 3 -> Hauppauge WinTV PVR-150 or PVR-500 + 4 -> AVerMedia M179 [1461:a3ce,1461:a3cf] + 5 -> Yuan MPG600/Kuroutoshikou iTVC16-STVLP [12ab:fff3,12ab:ffff] + 6 -> Yuan MPG160/Kuroutoshikou iTVC15-STVLP [12ab:0000,10fc:40a0] + 7 -> Yuan PG600/DiamondMM PVR-550 [ff92:0070,ffab:0600] + 8 -> Adaptec AVC-2410 [9005:0093] + 9 -> Adaptec AVC-2010 [9005:0092] +10 -> NAGASE TRANSGEAR 5000TV [1461:bfff] +11 -> AOpen VA2000MAX-STN6 [0000:ff5f] +12 -> YUAN MPG600GR/Kuroutoshikou CX23416GYC-STVLP [12ab:0600,fbab:0600,1154:0523] +13 -> I/O Data GV-MVP/RX [10fc:d01e,10fc:d038,10fc:d039] +14 -> I/O Data GV-MVP/RX2E [10fc:d025] +15 -> GOTVIEW PCI DVD (partial support only) [12ab:0600] +16 -> GOTVIEW PCI DVD2 Deluxe [ffac:0600] +17 -> Yuan MPC622 [ff01:d998] +18 -> Digital Cowboy DCT-MTVP1 [1461:bfff] Modified: trunk/tv/data/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/data/Makefile.am?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/data/Makefile.am (original) +++ trunk/tv/data/Makefile.am Wed Jun 6 11:16:24 2007 @@ -6,13 +6,13 @@ ydata_DATA = tv_cards-lirc_gpio.ycp tv_cards.ycp tv_tuners.ycp tv_dvbcards.ycp tv_dvbfirmware.ycp -tv_cards.ycp: CARDLIST.bttv CARDLIST.saa7134 CARDLIST.cx88 +tv_cards.ycp: CARDLIST.bttv CARDLIST.saa7134 CARDLIST.cx88 CARDLIST.ivtv $(srcdir)/create_tv_db $^ > $@ tv_tuners.ycp: CARDLIST.tuner $(srcdir)/create_tuner_db $^ > $@ -EXTRA_DIST = CARDLIST.bttv CARDLIST.saa7134 CARDLIST.cx88 CARDLIST.tuner\ +EXTRA_DIST = CARDLIST.bttv CARDLIST.saa7134 CARDLIST.cx88 CARDLIST.ivtv CARDLIST.tuner\ create_tv_db create_tuner_db tv_cards-lirc_gpio.ycp tv_dvbcards.ycp tv_dvbfirmware.ycp # delete generated files Modified: trunk/tv/data/create_tv_db URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/data/create_tv_db?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/data/create_tv_db (original) +++ trunk/tv/data/create_tv_db Wed Jun 6 11:16:24 2007 @@ -5,6 +5,7 @@ # $1 - the CARDLIST.bttv source file # $2 - the CARDLIST.saa7134 source file # $3 - the CARDLIST.cx88 source file +# $4 - the CARDLIST.ivtv source file # ...more to come... if ($#ARGV < 1) @@ -16,6 +17,7 @@ $bttv_cardlist_fname = $ARGV[0]; $saa7134_cardlist_fname = $ARGV[1]; $cx88_cardlist_fname = $ARGV[2]; +$ivtv_cardlist_fname = $ARGV[3]; # ... more to come ... # Names to translate @@ -149,6 +151,7 @@ push @cards, ReadDatabase($bttv_cardlist_fname, "bttv"); push @cards, ReadDatabase($saa7134_cardlist_fname, "saa7134"); push @cards, ReadDatabase($cx88_cardlist_fname, "cx88xx"); +push @cards, ReadDatabase($ivtv_cardlist_fname, "ivtv"); #...more to come... # Sort @cards Modified: trunk/tv/data/tv_dvbcards.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/data/tv_dvbcards.ycp?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/data/tv_dvbcards.ycp (original) +++ trunk/tv/data/tv_dvbcards.ycp Wed Jun 6 11:16:24 2007 @@ -24,7 +24,21 @@ $[ "name" : "B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card", "module" : [ "b2c2-flexcop-pci", "mt312" ] - ] + ], + // (#222806) + $[ + "name" : "Nova-T DVB-T Model 909", + "module" : [ "cx88_dvb", "bcm3510" ] + ], + // (#223188) + $[ + "name" : "Twinhan VisionPlus DVB-T", + "module" : [ "dvb-bt8xx", "bcm3510" ] + ], + $[ + "name" : "AVermedia DVB-T 771", + "module" : [ "dvb-bt8xx", "mt352" ] + ], ] ] ]; Modified: trunk/tv/data/tv_dvbfirmware.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/data/tv_dvbfirmware.ycp?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/data/tv_dvbfirmware.ycp (original) +++ trunk/tv/data/tv_dvbfirmware.ycp Wed Jun 6 11:16:24 2007 @@ -132,6 +132,13 @@ ] ] ], + + "ivtv" : + [ + $[ + "packages" : [ "ivtv", "ivtv-firmware", "ivtv-kmp-default" ] + ] + ], ]; } Modified: trunk/tv/package/yast2-tv.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/package/yast2-tv.changes?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/package/yast2-tv.changes (original) +++ trunk/tv/package/yast2-tv.changes Wed Jun 6 11:16:24 2007 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Wed Jun 6 10:30:42 CEST 2007 - lslezak@suse.cz + +- support for ivtv based TV cards (#130098) +- install firmware/packages before loading drivers +- updated DVB card DB (#222806, #223188) +- 2.15.6 + +------------------------------------------------------------------- Mon Jun 4 14:35:57 CEST 2007 - lslezak@suse.cz - tv card DB updated to kernel-default-2.6.21-12 Modified: trunk/tv/src/Tv.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/src/Tv.ycp?rev=38305&r1=38304&r2=38305&view=diff ============================================================================== --- trunk/tv/src/Tv.ycp (original) +++ trunk/tv/src/Tv.ycp Wed Jun 6 11:16:24 2007 @@ -1248,6 +1248,8 @@ y2milestone("required modules with FW: %1", reqmod); + list<string> packages_to_install = []; + if (size(reqmod) > 0) { foreach(string drv, reqmod, { @@ -1255,24 +1257,29 @@ string cardname = "TV"; // is the firmware really needed? - boolean firmware_needed = false; + boolean firmware_needed = nil; foreach(map card, (list<map>) cards, { list<string> drvs = card["module"]:[]; - - if (card["fw_install"]:true) - { - firmware_needed = true; - } - if (contains(drvs, drv)) { cardname = card["name"]:"TV"; + + // install the firmware? + boolean inst = card["fw_install"]:true; + if (firmware_needed == nil) + { + firmware_needed = inst; + } + else + { + firmware_needed = firmware_needed || inst; + } } } ); - if (firmware_needed) + if (firmware_needed == false) { y2milestone("Skipping firmware installation for driver '%1' (card '%2')", drv, cardname); continue; @@ -1281,19 +1288,27 @@ list<map<string,any> > fws = (list<map<string,any> >)firmware_database[drv]:[]; foreach(map<string,any> fw, fws, { - string target = fw["target"]:""; - string source = fw["source"]:""; + list<string> required_packages = fw["packages"]:[]; - boolean inst = IsFWInstalled(firmware_prefix + target); - if (inst) + if (size(required_packages) > 0) { - // the firmware is already installed - y2milestone("Firmware %1 has been already installed.", firmware_prefix + target); - continue; + y2milestone("Driver %1 requires these packages: %2", drv, required_packages); + packages_to_install = (list<string>)union(packages_to_install, required_packages); } + string target = fw["target"]:""; + string source = fw["source"]:""; + if (target != nil && target != "" && source != nil && source != "") { + boolean inst = IsFWInstalled(firmware_prefix + target); + if (inst) + { + // the firmware is already installed + y2milestone("Firmware %1 has been already installed.", firmware_prefix + target); + continue; + } + boolean install = true; // install fw in a loop until it succeeds or a wrong fw is confirmed @@ -1365,6 +1380,21 @@ } ); + + y2milestone("Collected packages: %1", packages_to_install); + + if (size(packages_to_install) > 0) + { + // do not install the packages again + packages_to_install = filter(string pkg, packages_to_install, {return !Package::Installed(pkg);}); + + y2milestone("Packages to install: %1", packages_to_install); + + if (size(packages_to_install) > 0) + { + ret = ret && Package::DoInstall(packages_to_install); + } + } } return ret; @@ -2098,30 +2128,55 @@ // Summary text (%1 is number) _("Installed as DVB card number %1."), dvbcard_no); - if (firmware_database != nil && size(firmware_database) > 0) - { - foreach(string fwmod, list<map<string,any> > fws, (map<string,list<map<string,any> > >)firmware_database, { + } + else + { + installed_str = sformat( + // Summary text (%1 is number) + _("Installed as TV card number %1"), card_no); + } - if (contains(card["module"]:[], fwmod)) - { - foreach(map<string,any> fw, fws, { - string target = fw["target"]:""; - string source = fw["source"]:""; + if (firmware_database != nil && size(firmware_database) > 0) + { + foreach(string fwmod, list<map<string,any> > fws, (map<string,list<map<string,any> > >)firmware_database, { + if (contains(card["module"]:[], fwmod)) + { + foreach(map<string,any> fw, fws, { + string target = fw["target"]:""; + string source = fw["source"]:""; + + if (target != "" && source != "") + { boolean inst = IsFWInstalled(firmware_prefix + target); installed_str = installed_str + "<BR>" + _("Firmware: ") + ((inst) ? sformat(_("Installed (%1)"), target) : sformat(_("Not installed (%1)"), source)); } - ); - } + + // add packages + list<string> required_packages = fw["packages"]:[]; + + if (size(required_packages) > 0) + { + y2milestone("Required packages for driver %1: %2", fwmod, required_packages); + } + + foreach(string pkg, required_packages, + { + // summary string, %1 is a package name, %2 is a status string: installed + installed_str = installed_str + "<BR>" + sformat(_("Package: %1 (%2)"), + // package status + pkg, Package::Installed(pkg) ? _("Installed") : _("Not Installed")); + } + ); + } + ); + } - ); - } + } + ); } - else - installed_str = sformat( - // Summary text (%1 is number) - _("Installed as TV card number %1"), card_no); + card_item = Summary::Device(name, installed_str); } @@ -2470,33 +2525,51 @@ } // add firmware data if available - if (isdvb) + if (firmware_database != nil && size(firmware_database) > 0) { - if (firmware_database != nil && size(firmware_database) > 0) + if (card["fw_install"]:nil == false) { - if (card["fw_install"]:nil == false) - { - y2milestone("Card '%1' doesn't need a firmware", card ["name"]:""); - } - else - { - foreach(string fwmod, list<map<string,any> > fws, (map<string,list<map<string,any> > >)firmware_database, { + y2milestone("Card '%1' doesn't need a firmware", card ["name"]:""); + } + else + { + foreach(string fwmod, list<map<string,any> > fws, (map<string,list<map<string,any> > >)firmware_database, { - if (contains(card["module"]:[], fwmod)) - { - foreach(map<string,any> fw, fws, { - string target = fw["target"]:""; - string source = fw["source"]:""; + if (contains(card["module"]:[], fwmod)) + { + foreach(map<string,any> fw, fws, { + string target = fw["target"]:""; + string source = fw["source"]:""; + + if (target != "" && source != "") + { boolean inst = IsFWInstalled(firmware_prefix + target); descr = add(descr, _("Firmware: ") + ((inst) ? sformat(_("Installed (%1)"), target) : sformat(_("Not installed (%1 -> %2)"), source, target))); } - ); - } + + // any required package? + list<string> required_packages = fw["packages"]:[]; + + if (size(required_packages) > 0) + { + y2milestone("Required packages for driver %1: %2", fwmod, required_packages); + } + + foreach(string pkg, required_packages, + { + // summary string, %1 is a package name, %2 is a status string: installed + descr = add(descr, sformat(_("Package: %1 (%2)"), + // package status + pkg, Package::Installed(pkg) ? _("Installed") : _("Not Installed"))); + } + ); + } + ); } - ); - } + } + ); } } @@ -3290,18 +3363,18 @@ list<string> stages = [ // Progress stage - _("Write the settings"), - // Progress stage _("Install firmware"), // Progress stage + _("Write the settings"), + // Progress stage _("Update sound volume")]; list steps = [ // Progress step - _("Writing the settings..."), - // Progress step _("Installing firmware..."), // Progress step + _("Writing the settings..."), + // Progress step _("Updating the sound volume...")]; if (!not_ask) @@ -3334,7 +3407,14 @@ y2debug("cards: %1", cards); - // Write the settings + // Install firmware + Progress::NextStage (); + + if (cards_dirty && !InstallFW()) + { + return false; + } + Progress::NextStage (); // install required kernel packages @@ -3345,17 +3425,12 @@ Package::InstallKernel(kernelmodules); } + // Write the settings if (cards_dirty && !WriteSettings()) { return false; } - Progress::NextStage (); - if (cards_dirty && !InstallFW()) - { - return false; - } - // Write the sound volume Progress::NextStage (); if (cards_dirty && !WriteSoundVolume()) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org