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 updates, channel information, etc.). The next step is to actually try and watch TV.

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 xawtv). 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 tvtime and xawtv have a wide base of user support and work with practically every tuner card known, so I installed them using apt-get:

$ sudo apt-get install tvtime

$ sudo apt-get install xmltv

$ sudo apt-get install xawtv

This installed the tvtime, xmltv and xawtv packages and their supporting components. Incidentally, xmltv 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!

I then tried to watch tv. Executing tvtime from a shell gave a blank, black window – not even static (audio or video). This suggested something wasn’t working (duh!). The first step then was to see what our diagnostics said about the installed devices.

I used dmesg to return information on the loaded devices

$ dmesg

with the following result:

saa7134: Congratulations! Your TV card vendor saved a few
saa7134: cents for a eeprom, thus your pci board has no
saa7134: subsystem ID and I can’t identify it automatically
saa7134:
saa7134: I feel better now. Ok, here are the good news:
saa7134: You can use the card= insmod option to specify
saa7134: which board do you have. The list:
saa7134: card=0 -> UNKNOWN/GENERIC

saa7134: card=1 -> Proteus Pro [philips reference design] 1131:2001 1131:2001
saa7134: card=2 -> LifeView FlyVIDEO3000 5168:0138 4e42:0138
saa7134: card=3 -> LifeView/Typhoon FlyVIDEO2000 5168:0138 4e42:0138
saa7134: card=4 -> EMPRESS 1131:6752
saa7134: card=5 -> SKNet Monster TV 1131:4e85
saa7134: card=6 -> Tevion MD 9717
saa7134: card=7 -> KNC One TV-Station RDS / Typhoon TV Tune 1131:fe01 1894:fe01
saa7134: card=8 -> Terratec Cinergy 400 TV 153b:1142
saa7134: card=9 -> Medion 5044
saa7134: card=10 -> Kworld/KuroutoShikou SAA7130-TVPCI
saa7134: card=11 -> Terratec Cinergy 600 TV 153b:1143
saa7134: card=12 -> Medion 7134 16be:0003
saa7134: card=13 -> Typhoon TV+Radio 90031
saa7134: card=14 -> ELSA EX-VISION 300TV 1048:226b
saa7134: card=15 -> ELSA EX-VISION 500TV 1048:226a
saa7134: card=16 -> ASUS TV-FM 7134 1043:4842 1043:4830 1043:4840
saa7134: card=17 -> AOPEN VA1000 POWER 1131:7133
saa7134: card=18 -> BMK MPEX No Tuner
saa7134: card=19 -> Compro VideoMate TV 185b:c100
saa7134: card=20 -> Matrox CronosPlus 102b:48d0
saa7134: card=21 -> 10MOONS PCI TV CAPTURE CARD 1131:2001
saa7134: card=22 -> AverMedia M156 / Medion 2819 1461:a70b
saa7134: card=23 -> BMK MPEX Tuner
saa7134: card=24 -> KNC One TV-Station DVR 1894:a006
saa7134: card=25 -> ASUS TV-FM 7133 1043:4843
saa7134: card=26 -> Pinnacle PCTV Stereo (saa7134) 11bd:002b
saa7134: card=27 -> Manli MuchTV M-TV002/Behold TV 403 FM
saa7134: card=28 -> Manli MuchTV M-TV001/Behold TV 401
saa7134: card=29 -> Nagase Sangyo TransGear 3000TV 1461:050c
saa7134: card=30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card( 1019:4cb4
saa7134: card=31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card 1019:4cb5
saa7134: card=32 -> AVACS SmartTV
saa7134: card=33 -> AVerMedia DVD EZMaker 1461:10ff
saa7134: card=34 -> Noval Prime TV 7133
saa7134: card=35 -> AverMedia AverTV Studio 305 1461:2115
saa7134: card=36 -> UPMOST PURPLE TV 12ab:0800
saa7134: card=37 -> Items MuchTV Plus / IT-005
saa7134: card=38 -> Terratec Cinergy 200 TV 153b:1152
saa7134: card=39 -> LifeView FlyTV Platinum Mini 5168:0212 4e42:0212
saa7134: card=40 -> Compro VideoMate TV PVR/FM 185b:c100
saa7134: card=41 -> Compro VideoMate TV Gold+ 185b:c100
saa7134: card=42 -> Sabrent SBT-TVFM (saa7130)
saa7134: card=43 -> :Zolid Xpert TV7134
saa7134: card=44 -> Empire PCI TV-Radio LE
saa7134: card=45 -> Avermedia AVerTV Studio 307 1461:9715
saa7134: card=46 -> AVerMedia Cardbus TV/Radio (E500) 1461:d6ee
saa7134: card=47 -> Terratec Cinergy 400 mobile 153b:1162
saa7134: card=48 -> Terratec Cinergy 600 TV MK3 153b:1158
saa7134: card=49 -> Compro VideoMate Gold+ Pal 185b:c200
saa7134: card=50 -> Pinnacle PCTV 300i DVB-T + PAL 11bd:002d
saa7134: card=51 -> ProVideo PV952 1540:9524
saa7134: card=52 -> AverMedia AverTV/305 1461:2108
saa7134: card=53 -> ASUS TV-FM 7135 1043:4845
saa7134: card=54 -> LifeView FlyTV Platinum FM / Gold 5168:0214 1489:0214 5168:0304
saa7134: card=55 -> LifeView FlyDVB-T DUO 5168:0306
saa7134: card=56 -> Avermedia AVerTV 307 1461:a70a
saa7134: card=57 -> Avermedia AVerTV GO 007 FM 1461:f31f
saa7134: card=58 -> ADS Tech Instant TV (saa7135) 1421:0350 1421:0351 1421:0370 1421:1370
saa7134: card=59 -> Kworld/Tevion V-Stream Xpert TV PVR7134
saa7134: card=60 -> LifeView/Typhoon FlyDVB-T Duo Cardbus 5168:0502 4e42:0502
saa7134: card=61 -> Philips TOUGH DVB-T reference design 1131:2004
saa7134: card=62 -> Compro VideoMate TV Gold+II
saa7134: card=63 -> Kworld Xpert TV PVR7134
saa7134: card=64 -> FlyTV mini Asus Digimatrix 1043:0210
saa7134: card=65 -> V-Stream Studio TV Terminator
saa7134: card=66 -> Yuan TUN-900 (saa7135)
saa7134: card=67 -> Beholder BeholdTV 409 FM 0000:4091
saa7134: card=68 -> GoTView 7135 PCI 5456:7135
saa7134: card=69 -> Philips EUROPA V3 reference design 1131:2004
saa7134: card=70 -> Compro Videomate DVB-T300 185b:c900
saa7134: card=71 -> Compro Videomate DVB-T200 185b:c901
saa7134: card=72 -> RTD Embedded Technologies VFG7350 1435:7350
saa7134: card=73 -> RTD Embedded Technologies  VFG7330 1435:7330
saa7134: card=74 -> LifeView FlyTV Platinum Mini2 14c0:1212
saa7134: card=75 -> AVerMedia AVerTVHD MCE A180 1461:1044
saa7134: card=76 -> SKNet MonsterTV Mobile 1131:4ee9
saa7134: card=77 -> Pinnacle PCTV 40i/50i/110i (saa7133) 11bd:002e
saa7134: card=78 -> ASUSTeK P7131 Dual 1043:4862
saa7134: card=79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO
saa7134: card=80 -> ASUS Digimatrix TV 1043:0210
saa7134: card=81 -> Philips Tiger reference design 1131:2018
saa7134: card=82 -> MSI TV@Anywhere plus 1462:6231
saa7134: card=83 -> Terratec Cinergy 250 PCI TV 153b:1160
saa7134: card=84 -> LifeView FlyDVB Trio 5168:0319
saa7134: card=85 -> AverTV DVB-T 777 1461:2c05
saa7134: card=86 -> LifeView FlyDVB-T / Genius VideoWonder D 5168:0301 1489:0301
saa7134: card=87 -> ADS Instant TV Duo Cardbus PTV331 0331:1421
saa7134: card=88 -> Tevion/KWorld DVB-T 220RF 17de:7201
saa7134: card=89 -> ELSA EX-VISION 700TV 1048:226c
saa7134: card=90 -> Kworld ATSC110 17de:7350
saa7134: card=91 -> AVerMedia A169 B 1461:7360
saa7134: card=92 -> AVerMedia A169 B1 1461:6360
saa7134: card=93 -> Medion 7134 Bridge #2 16be:0005
saa7134: card=94 -> LifeView FlyDVB-T Hybrid Cardbus 5168:3306 5168:3502
saa7134: card=95 -> LifeView FlyVIDEO3000 (NTSC) 5169:0138
saa7130[0]: subsystem: 1131:0000, board: UNKNOWN/GENERIC [card=0,autodetected]
saa7130[0]: board init: gpio is c000
saa7130[0]: Huh, no eeprom present (err=-5)?
saa7130[0]: registered device video0 [v4l2]
saa7130[0]: registered device vbi0
saa7130[0]: registered device radio0

saa7134 ALSA driver for DMA sound loaded
saa7130[0]/alsa: saa7130[0] at 0xe2001000 irq 201 registered as card -1

Huh! From the above message, it was apparent that my cheapo, discount tv-card was detected – 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) – PO0010, but glancing through the Windows driver disk, turned up another (posibly) supported tuner card name – FlyVideo 2000. Scrolling through our card list above, we see that the FlyVideo 2000 is card number 3.

I unloaded the incorrectly working modules using

$ rmmod saa7134 saa7134_alsa

then reloaded the tuner modules with the card parameter set

$ modprobe saa7134 card=3

I then executed tvtime again.

$ tvtime

Success! Well, 0.5 Success! I now had a picture – but no sound. A quick look at dmesg suggested the reason:

[17270965.288000] saa7130[0]: found at 0000:02:0e.0, rev: 1, irq: 201, latency: 123, mmio: 0xe2001000
[17270965.288000] saa7130[0]: subsystem: 1131:0000, board: LifeView/Typhoon FlyVIDEO2000 [card=3,insmod option]
[17270965.292000] saa7130[0]: board init: gpio is 38500
[17270965.292000] saa7130[0]: there are different flyvideo cards with different tuners
[17270965.292000] saa7130[0]: out there, you might have to use the tuner= insmod
[17270965.292000] saa7130[0]: option to override the default value.
[17270965.292000] input: saa7134 IR (LifeView/Typhoon Fl as /class/input/input5

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 saa7130-based cards and tuner types – 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:

$ rmmod saa7134 saa7134_alsa; modprobe saa7134 card=3 tuner=0

$tvtime

I struck gold on tuner=43 – sound and video on Ubuntu. Sweet!

A look at dmesg tells the story:

[17270965.288000] saa7130[0]: found at 0000:02:0e.0, rev: 1, irq: 201, latency: 123, mmio: 0xe2001000
[17270965.288000] saa7130[0]: subsystem: 1131:0000, board: LifeView/Typhoon FlyVIDEO2000 [card=3,insmod option]
[17270965.292000] saa7130[0]: board init: gpio is 38500
[17270965.292000] saa7130[0]: there are different flyvideo cards with different tuners
[17270965.292000] saa7130[0]: out there, you might have to use the tuner= insmod
[17270965.292000] saa7130[0]: option to override the default value.
[17270965.292000] input: saa7134 IR (LifeView/Typhoon Fl as /class/input/input5
[17270965.408000] tuner 0-0061: chip found @ 0xc2 (saa7130[0])
[17270965.412000] tuner 0-0061: type set to 43 (Philips NTSC MK3 (FM1236MK3 or FM1236/F))
[17270965.420000] tuner 0-0063: chip found @ 0xc6 (saa7130[0])
[17270965.424000] saa7130[0]: Huh, no eeprom present (err=-5)?
[17270965.468000] saa7130[0]: registered device video0 [v4l2]
[17270965.472000] saa7130[0]: registered device vbi0
[17270965.476000] saa7130[0]: registered device radio0
[17270965.528000] saa7134 ALSA driver for DMA sound loaded
[17270965.528000] saa7130[0]/alsa: saa7130[0] at 0xe2001000 irq 201 registered as card -1

Will this setup work for everyone? I doubt it – 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.

So, now we have tv actually working under Ubuntu – the next (and almost final) step is to install and configure MythTV. I’ll cover that off in my next post.

Like!
0