{"id":69,"date":"2007-01-17T23:13:04","date_gmt":"2007-01-18T04:13:04","guid":{"rendered":"http:\/\/otac.isa-geek.net\/blog\/?p=69"},"modified":"2007-01-17T23:52:07","modified_gmt":"2007-01-18T04:52:07","slug":"building-a-pvr-redux-a-story-of-ubuntu-and-mythtv-part-2","status":"publish","type":"post","link":"https:\/\/otac.isa-geek.net\/blog\/?p=69","title":{"rendered":"Building a PVR: redux (a story of Ubuntu and MythTV) &#8211; Part 2"},"content":{"rendered":"<p>In the contining saga of my foray into the Linux-based PVR world, I had just finished describing the installation of Ubuntu 6.10 (Edgy Eft) as my base operating system (<a title=\"Building a PVR: redux (a story of Ubuntu and MythTV) - Part 1\" href=\"http:\/\/otac.isa-geek.net\/blog\/?p=53\">Building a PVR: Part 1<\/a>). I was able to successfully detect my USB WiFi adapter, giving me access to the Internet from the PVR computer (for updates, channel information, etc.). The next step is to actually try and watch TV.<\/p>\n<p>Watching TV on Ubuntu is actually a little more work than expected. Ubuntu does not come with a bundled TV tuner program (Unlike Knoppix, which uses <a href=\"http:\/\/linux.bytesex.org\/xawtv\/\">xawtv<\/a>). As a result, its necessary to install some TV program(s), and any associated  libraries or applications which might be required. I chose a couple of the more popular ones to try out, prior to installing MythTV, which is going to be the main TV program. I decided that <a href=\"http:\/\/tvtime.sourceforge.net\/\">tvtime <\/a>and xawtv have a wide base of user support and work with practically every tuner card known, so I installed them using apt-get:<\/p>\n<blockquote><p><strong>$ sudo apt-get install tvtime<\/strong><\/p><\/blockquote>\n<blockquote><p><strong>$ sudo apt-get install xmltv<\/strong><\/p>\n<p><strong>$ sudo apt-get install xawtv<\/strong><\/p><\/blockquote>\n<p>This installed the tvtime, xmltv and xawtv packages and their supporting components. Incidentally, <a href=\"http:\/\/xmltv.org\/wiki\/\">xmltv<\/a> is a very popular open-source program used to deliver channel guide information for practically every tv channel in every country. Very cool stuff, particularly if you have an online PVR!<\/p>\n<p>I then tried to watch tv. Executing tvtime from a shell gave a blank, black window &#8211; not even static (audio or video). This suggested something wasn&#8217;t working (duh!). The first step then was to see what our diagnostics said about the installed devices.<\/p>\n<p>I used dmesg to return information on the loaded devices<\/p>\n<p><strong>        $ dmesg<\/strong><\/p>\n<p>with the following result:<\/p>\n<blockquote><p><strong> saa7134:  <\/strong><strong>Congratulations!  Your TV card vendor saved a few<br \/>\nsaa7134:  cents for a eeprom, thus your pci board has no<br \/>\nsaa7134:  subsystem ID and I can&#8217;t identify it automatically<br \/>\nsaa7134:<br \/>\nsaa7134: I feel better now.  Ok, here are the good news:<br \/>\nsaa7134: You can use the card= insmod option to specify<br \/>\nsaa7134: which board do you have.  The list:<br \/>\nsaa7134:   card=0 -> UNKNOWN\/GENERIC<\/strong><\/p>\n<p><strong>saa7134:   card=1 -> Proteus Pro [philips reference design]   1131:2001 1131:2001<br \/>\nsaa7134:   card=2 -> LifeView FlyVIDEO3000 5168:0138 4e42:0138<br \/>\nsaa7134:   card=3 -> LifeView\/Typhoon FlyVIDEO2000 5168:0138 4e42:0138<br \/>\nsaa7134:   card=4 -> EMPRESS 1131:6752<br \/>\nsaa7134:   card=5 -> SKNet Monster TV 1131:4e85<br \/>\nsaa7134:   card=6 -> Tevion MD 9717<br \/>\nsaa7134:   card=7 -> KNC One TV-Station RDS \/ Typhoon TV Tune 1131:fe01 1894:fe01<br \/>\nsaa7134:   card=8 -> Terratec Cinergy 400 TV 153b:1142<br \/>\nsaa7134:   card=9 -> Medion 5044<br \/>\nsaa7134:   card=10 -> Kworld\/KuroutoShikou SAA7130-TVPCI<br \/>\nsaa7134:   card=11 -> Terratec Cinergy 600 TV 153b:1143<br \/>\nsaa7134:   card=12 -> Medion 7134 16be:0003<br \/>\nsaa7134:   card=13 -> Typhoon TV+Radio 90031<br \/>\nsaa7134:   card=14 -> ELSA EX-VISION 300TV 1048:226b<br \/>\nsaa7134:   card=15 -> ELSA EX-VISION 500TV 1048:226a<br \/>\nsaa7134:   card=16 -> ASUS TV-FM 7134 1043:4842 1043:4830 1043:4840<br \/>\nsaa7134:   card=17 -> AOPEN VA1000 POWER 1131:7133<br \/>\nsaa7134:   card=18 -> BMK MPEX No Tuner<br \/>\nsaa7134:   card=19 -> Compro VideoMate TV 185b:c100<br \/>\nsaa7134:   card=20 -> Matrox CronosPlus 102b:48d0<br \/>\nsaa7134:   card=21 -> 10MOONS PCI TV CAPTURE CARD 1131:2001<br \/>\nsaa7134:   card=22 -> AverMedia M156 \/ Medion 2819 1461:a70b<br \/>\nsaa7134:   card=23 -> BMK MPEX Tuner<br \/>\nsaa7134:   card=24 -> KNC One TV-Station DVR 1894:a006<br \/>\nsaa7134:   card=25 -> ASUS TV-FM 7133 1043:4843<br \/>\nsaa7134:   card=26 -> Pinnacle PCTV Stereo (saa7134) 11bd:002b<br \/>\nsaa7134:   card=27 -> Manli MuchTV M-TV002\/Behold TV 403 FM<br \/>\nsaa7134:   card=28 -> Manli MuchTV M-TV001\/Behold TV 401<br \/>\nsaa7134:   card=29 -> Nagase Sangyo TransGear 3000TV 1461:050c<br \/>\nsaa7134:   card=30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card( 1019:4cb4<br \/>\nsaa7134:   card=31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card  1019:4cb5<br \/>\nsaa7134:   card=32 -> AVACS SmartTV<br \/>\nsaa7134:   card=33 -> AVerMedia DVD EZMaker 1461:10ff<br \/>\nsaa7134:   card=34 -> Noval Prime TV 7133<br \/>\nsaa7134:   card=35 -> AverMedia AverTV Studio 305 1461:2115<br \/>\nsaa7134:   card=36 -> UPMOST PURPLE TV 12ab:0800<br \/>\nsaa7134:   card=37 -> Items MuchTV Plus \/ IT-005<br \/>\nsaa7134:   card=38 -> Terratec Cinergy 200 TV 153b:1152<br \/>\nsaa7134:   card=39 -> LifeView FlyTV Platinum Mini 5168:0212 4e42:0212<br \/>\nsaa7134:   card=40 -> Compro VideoMate TV PVR\/FM 185b:c100<br \/>\nsaa7134:   card=41 -> Compro VideoMate TV Gold+ 185b:c100<br \/>\nsaa7134:   card=42 -> Sabrent SBT-TVFM (saa7130)<br \/>\nsaa7134:   card=43 -> :Zolid Xpert TV7134<br \/>\nsaa7134:   card=44 -> Empire PCI TV-Radio LE<br \/>\nsaa7134:   card=45 -> Avermedia AVerTV Studio 307 1461:9715<br \/>\nsaa7134:   card=46 -> AVerMedia Cardbus TV\/Radio (E500)        1461:d6ee<br \/>\nsaa7134:   card=47 -> Terratec Cinergy 400 mobile 153b:1162<br \/>\nsaa7134:   card=48 -> Terratec Cinergy 600 TV MK3 153b:1158<br \/>\nsaa7134:   card=49 -> Compro VideoMate Gold+ Pal 185b:c200<br \/>\nsaa7134:   card=50 -> Pinnacle PCTV 300i DVB-T + PAL 11bd:002d<br \/>\nsaa7134:   card=51 -> ProVideo PV952 1540:9524<br \/>\nsaa7134:   card=52 -> AverMedia AverTV\/305 1461:2108<br \/>\nsaa7134:   card=53 -> ASUS TV-FM 7135 1043:4845<br \/>\nsaa7134:   card=54 -> LifeView FlyTV Platinum FM \/ Gold        5168:0214 1489:0214 5168:0304<br \/>\nsaa7134:   card=55 -> LifeView FlyDVB-T DUO 5168:0306<br \/>\nsaa7134:   card=56 -> Avermedia AVerTV 307 1461:a70a<br \/>\nsaa7134:   card=57 -> Avermedia AVerTV GO 007 FM 1461:f31f<br \/>\nsaa7134:   card=58 -> ADS Tech Instant TV (saa7135) 1421:0350 1421:0351 1421:0370 1421:1370<br \/>\nsaa7134:   card=59 -> Kworld\/Tevion V-Stream Xpert TV PVR7134<br \/>\nsaa7134:   card=60 -> LifeView\/Typhoon FlyDVB-T Duo Cardbus    5168:0502 4e42:0502<br \/>\nsaa7134:   card=61 -> Philips TOUGH DVB-T reference design     1131:2004<br \/>\nsaa7134:   card=62 -> Compro VideoMate TV Gold+II<br \/>\nsaa7134:   card=63 -> Kworld Xpert TV PVR7134<br \/>\nsaa7134:   card=64 -> FlyTV mini Asus Digimatrix 1043:0210<br \/>\nsaa7134:   card=65 -> V-Stream Studio TV Terminator<br \/>\nsaa7134:   card=66 -> Yuan TUN-900 (saa7135)<br \/>\nsaa7134:   card=67 -> Beholder BeholdTV 409 FM 0000:4091<br \/>\nsaa7134:   card=68 -> GoTView 7135 PCI 5456:7135<br \/>\nsaa7134:   card=69 -> Philips EUROPA V3 reference design       1131:2004<br \/>\nsaa7134:   card=70 -> Compro Videomate DVB-T300 185b:c900<br \/>\nsaa7134:   card=71 -> Compro Videomate DVB-T200 185b:c901<br \/>\nsaa7134:   card=72 -> RTD Embedded Technologies VFG7350        1435:7350<br \/>\nsaa7134:   card=73 -> RTD Embedded Technologies\u00a0 VFG7330        1435:7330<br \/>\nsaa7134:   card=74 -> LifeView FlyTV Platinum Mini2 14c0:1212<br \/>\nsaa7134:   card=75 -> AVerMedia AVerTVHD MCE A180 1461:1044<br \/>\nsaa7134:   card=76 -> SKNet MonsterTV Mobile 1131:4ee9<br \/>\nsaa7134:   card=77 -> Pinnacle PCTV 40i\/50i\/110i (saa7133)     11bd:002e<br \/>\nsaa7134:   card=78 -> ASUSTeK P7131 Dual 1043:4862<br \/>\nsaa7134:   card=79 -> Sedna\/MuchTV PC TV Cardbus TV\/Radio (ITO<br \/>\nsaa7134:   card=80 -> ASUS Digimatrix TV 1043:0210<br \/>\nsaa7134:   card=81 -> Philips Tiger reference design 1131:2018<br \/>\nsaa7134:   card=82 -> MSI TV@Anywhere plus 1462:6231<br \/>\nsaa7134:   card=83 -> Terratec Cinergy 250 PCI TV 153b:1160<br \/>\nsaa7134:   card=84 -> LifeView FlyDVB Trio 5168:0319<br \/>\nsaa7134:   card=85 -> AverTV DVB-T 777 1461:2c05<br \/>\nsaa7134:   card=86 -> LifeView FlyDVB-T \/ Genius VideoWonder D 5168:0301 1489:0301<br \/>\nsaa7134:   card=87 -> ADS Instant TV Duo Cardbus PTV331        0331:1421<br \/>\nsaa7134:   card=88 -> Tevion\/KWorld DVB-T 220RF 17de:7201<br \/>\nsaa7134:   card=89 -> ELSA EX-VISION 700TV 1048:226c<br \/>\nsaa7134:   card=90 -> Kworld ATSC110 17de:7350<br \/>\nsaa7134:   card=91 -> AVerMedia A169 B 1461:7360<br \/>\nsaa7134:   card=92 -> AVerMedia A169 B1 1461:6360<br \/>\nsaa7134:   card=93 -> Medion 7134 Bridge #2 16be:0005<br \/>\nsaa7134:   card=94 -> LifeView FlyDVB-T Hybrid Cardbus 5168:3306 5168:3502<br \/>\nsaa7134:   card=95 -> LifeView FlyVIDEO3000 (NTSC) 5169:0138<br \/>\nsaa7130[0]: subsystem: 1131:0000, board: UNKNOWN\/GENERIC [card=0,autodetected]<br \/>\nsaa7130[0]: board init: gpio is c000<br \/>\nsaa7130[0]: Huh, no eeprom present (err=-5)?<br \/>\nsaa7130[0]: registered device video0 [v4l2]<br \/>\nsaa7130[0]: registered device vbi0<br \/>\nsaa7130[0]: registered device radio0<\/strong><br \/>\n<strong>saa7134 ALSA driver for DMA sound loaded<\/strong><br \/>\n<strong>saa7130[0]\/alsa: saa7130[0] at 0xe2001000 irq 201 registered as card -1<\/strong><\/p><\/blockquote>\n<p>Huh! From the above message, it was apparent that my cheapo, discount tv-card was detected &#8211; partially. We can see that the saa7130 indicates the presence of a Phillips saa7130-based tuner chipset (handled by the saa7134 module), while the saa7130\/alsa enables the sound from the tuner card (using module saa7134_alsa). The full name of my card is the PowerView TV Tuner Card (PCI) &#8211; PO0010, but glancing through the Windows driver disk, turned up another (posibly) supported tuner card name &#8211; FlyVideo 2000. Scrolling through our card list above, we see that the FlyVideo 2000 is card number 3.<\/p>\n<p>I unloaded the incorrectly working modules using<\/p>\n<blockquote><p>$ rmmod saa7134 saa7134_alsa<\/p><\/blockquote>\n<p>then reloaded the tuner modules with the card parameter set<\/p>\n<blockquote><p><strong>$ modprobe saa7134 card=3<\/strong><\/p><\/blockquote>\n<p>I then executed tvtime again.<\/p>\n<blockquote><p><strong>$ tvtime <\/strong><\/p><\/blockquote>\n<p>Success! Well, 0.5 Success! I now had a picture &#8211; but no sound. A quick look at dmesg suggested the reason:<\/p>\n<blockquote><p><strong>[17270965.288000] saa7130[0]: found at 0000:02:0e.0, rev: 1, irq: 201, latency: 123, mmio: 0xe2001000<\/strong><br \/>\n<strong>[17270965.288000] saa7130[0]: subsystem: 1131:0000, board: LifeView\/Typhoon FlyVIDEO2000 [card=3,insmod option]<\/strong><br \/>\n<strong>[17270965.292000] saa7130[0]: board init: gpio is 38500<\/strong><br \/>\n<strong>[17270965.292000] saa7130[0]: there are different flyvideo cards with different tuners<\/strong><br \/>\n<strong>[17270965.292000] saa7130[0]: out there, you might have to use the tuner= insmod<\/strong><br \/>\n<strong>[17270965.292000] saa7130[0]: option to override the default value.<\/strong><br \/>\n<strong>[17270965.292000] input: saa7134 IR (LifeView\/Typhoon Fl as \/class\/input\/input5<\/strong><\/p><\/blockquote>\n<p>It appears that I need to specify my tuner type as well. But what are the different tuner types available to the saa7134 module? Google returned a site which conveniently lists the possible <a href=\"http:\/\/www.wlug.org.nz\/TvTunerCards\">saa7130-based cards and tuner types<\/a> &#8211; unfortunately, there is no way of knowing which one I have! Basically, its trial and error time. I ran the following lines over and over again, changer the tuner number each time:<\/p>\n<blockquote><p><strong>$ rmmod saa7134 saa7134_alsa; modprobe saa7134 card=3 tuner=0<br \/>\n<\/strong><\/p>\n<p><strong>$tvtime <\/strong><\/p><\/blockquote>\n<p>I struck gold on tuner=43 &#8211; sound and video on Ubuntu. Sweet!<\/p>\n<p>A look at dmesg tells the story:<\/p>\n<blockquote><p><strong>[17270965.288000] saa7130[0]: found at 0000:02:0e.0, rev: 1, irq: 201, latency: 123, mmio: 0xe2001000<br \/>\n[17270965.288000] saa7130[0]: subsystem: 1131:0000, board: LifeView\/Typhoon FlyVIDEO2000 [card=3,insmod option]<br \/>\n[17270965.292000] saa7130[0]: board init: gpio is 38500<br \/>\n[17270965.292000] saa7130[0]: there are different flyvideo cards with different tuners<br \/>\n[17270965.292000] saa7130[0]: out there, you might have to use the tuner= insmod<br \/>\n[17270965.292000] saa7130[0]: option to override the default value.<br \/>\n[17270965.292000] input: saa7134 IR (LifeView\/Typhoon Fl as \/class\/input\/input5<br \/>\n[17270965.408000] tuner 0-0061: chip found @ 0xc2 (saa7130[0])<br \/>\n[17270965.412000] tuner 0-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236\/F))<br \/>\n[17270965.420000] tuner 0-0063: chip found @ 0xc6 (saa7130[0])<br \/>\n[17270965.424000] saa7130[0]: Huh, no eeprom present (err=-5)?<br \/>\n[17270965.468000] saa7130[0]: registered device video0 [v4l2]<br \/>\n[17270965.472000] saa7130[0]: registered device vbi0<br \/>\n[17270965.476000] saa7130[0]: registered device radio0<br \/>\n[17270965.528000] saa7134 ALSA driver for DMA sound loaded<br \/>\n[17270965.528000] saa7130[0]\/alsa: saa7130[0] at 0xe2001000 irq 201 registered as card -1<br \/>\n<\/strong><\/p><\/blockquote>\n<p>Will this setup work for everyone? I doubt it &#8211; it appears that these tuner chips are so cheap that any one of a number of variants can be found in the same product. An important check is the model number and driver details. In the end, trial and error may be the most important factor in getting your own tuner card to work.<\/p>\n<p>So, now we have tv actually working under Ubuntu &#8211; the next (and almost final) step is to install and configure MythTV. I&#8217;ll cover that off in my next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the contining saga of my foray into the Linux-based PVR world, I had just finished describing the installation of Ubuntu 6.10 (Edgy Eft) as my base operating system (Building a PVR: Part 1). I was able to successfully detect my USB WiFi adapter, giving me access to the Internet from the PVR computer (for [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69"}],"version-history":[{"count":0,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}