SAA7134
From Gentoo Linux Wiki
| Laptops • TV Tuner Cards • Wireless • Servers • Storage • Other Hardware • Motherboards • Related |
Contents |
[edit] About
saa7134 is a video4linux module in the Linux kernel which provides support for certain PCI TV tuner cards.
This guide covers the basics to detecting your card and loading the correct modules so you can watch and record TV.
There is also a saa7134 quick_guide
For a complete list of cards that are supported by this driver, see /usr/src/linux/Documentation/video4linux/CARDLIST.saa7134
There are usually a few more cards supported than are listed in the documentation (whether due to deliberate omission or documentation lag). For the full list, see /usr/src/linux/drivers/media/video/saa7134/saa7134.h and its neighbors.
As per http://linuxtv.org/v4lwiki/index.php/CARDLIST.saa7134 the following cards are currently supported
0 -> UNKNOWN/GENERIC 1 -> Proteus Pro [philips reference design] [1131:2001,1131:2001] 2 -> LifeView FlyVIDEO3000 [5168:0138,4e42:0138] 3 -> LifeView/Typhoon FlyVIDEO2000 [5168:0138,4e42:0138] 4 -> EMPRESS [1131:6752] 5 -> SKNet Monster TV [1131:4e85] 6 -> Tevion MD 9717 7 -> KNC One TV-Station RDS / Typhoon TV Tuner RDS [1131:fe01,1894:fe01] 8 -> Terratec Cinergy 400 TV [153b:1142] 9 -> Medion 5044 10 -> Kworld/KuroutoShikou SAA7130-TVPCI 11 -> Terratec Cinergy 600 TV [153b:1143] 12 -> Medion 7134 [16be:0003] 13 -> Typhoon TV+Radio 90031 14 -> ELSA EX-VISION 300TV [1048:226b] 15 -> ELSA EX-VISION 500TV [1048:226a] 16 -> ASUS TV-FM 7134 [1043:4842,1043:4830,1043:4840] 17 -> AOPEN VA1000 POWER [1131:7133] 18 -> BMK MPEX No Tuner 19 -> Compro VideoMate TV [185b:c100] 20 -> Matrox CronosPlus [102B:48d0] 21 -> 10MOONS PCI TV CAPTURE CARD [1131:2001] 22 -> AverMedia M156 / Medion 2819 [1461:a70b] 23 -> BMK MPEX Tuner 24 -> KNC One TV-Station DVR [1894:a006] 25 -> ASUS TV-FM 7133 [1043:4843] 26 -> Pinnacle PCTV Stereo (saa7134) [11bd:002b] 27 -> Manli MuchTV M-TV002/Behold TV 403 FM 28 -> Manli MuchTV M-TV001/Behold TV 401 29 -> Nagase Sangyo TransGear 3000TV [1461:050c] 30 -> Elitegroup ECS TVP3XP FM1216 Tuner Card(PAL-BG,FM) [1019:4cb4] 31 -> Elitegroup ECS TVP3XP FM1236 Tuner Card (NTSC,FM) [1019:4cb5] 32 -> AVACS SmartTV 33 -> AVerMedia DVD EZMaker [1461:10ff] 34 -> Noval Prime TV 7133 35 -> AverMedia AverTV Studio 305 [1461:2115] 36 -> UPMOST PURPLE TV [12ab:0800] 37 -> Items MuchTV Plus / IT-005 38 -> Terratec Cinergy 200 TV [153b:1152] 39 -> LifeView FlyTV Platinum Mini [5168:0212,4e42:0212] 40 -> Compro VideoMate TV PVR/FM [185b:c100] 41 -> Compro VideoMate TV Gold+ [185b:c100] 42 -> Sabrent SBT-TVFM (saa7130) 43 -> :Zolid Xpert TV7134 44 -> Empire PCI TV-Radio LE 45 -> Avermedia AVerTV Studio 307 [1461:9715] 46 -> AVerMedia Cardbus TV/Radio (E500) [1461:d6ee] 47 -> Terratec Cinergy 400 mobile [153b:1162] 48 -> Terratec Cinergy 600 TV MK3 [153b:1158] 49 -> Compro VideoMate Gold+ Pal [185b:c200] 50 -> Pinnacle PCTV 300i DVB-T + PAL [11bd:002d] 51 -> ProVideo PV952 [1540:9524] 52 -> AverMedia AverTV/305 [1461:2108] 53 -> ASUS TV-FM 7135 [1043:4845] 54 -> LifeView FlyTV Platinum FM / Gold [5168:0214,1489:0214,5168:0304] 55 -> LifeView FlyDVB-T DUO [5168:0306] 56 -> Avermedia AVerTV 307 [1461:a70a] 57 -> Avermedia AVerTV GO 007 FM [1461:f31f] 58 -> ADS Tech Instant TV (saa7135) [1421:0350,1421:0351,1421:0370,1421:1370] 59 -> Kworld/Tevion V-Stream Xpert TV PVR7134 60 -> LifeView/Typhoon/Genius FlyDVB-T Duo Cardbus [5168:0502,4e42:0502,1489:0502] 61 -> Philips TOUGH DVB-T reference design [1131:2004] 62 -> Compro VideoMate TV Gold+II 63 -> Kworld Xpert TV PVR7134 64 -> FlyTV mini Asus Digimatrix [1043:0210] 65 -> V-Stream Studio TV Terminator 66 -> Yuan TUN-900 (saa7135) 67 -> Beholder BeholdTV 409 FM [0000:4091] 68 -> GoTView 7135 PCI [5456:7135] 69 -> Philips EUROPA V3 reference design [1131:2004] 70 -> Compro Videomate DVB-T300 [185b:c900] 71 -> Compro Videomate DVB-T200 [185b:c901] 72 -> RTD Embedded Technologies VFG7350 [1435:7350] 73 -> RTD Embedded Technologies VFG7330 [1435:7330] 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212] 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] 76 -> SKNet MonsterTV Mobile [1131:4ee9] 77 -> Pinnacle PCTV 40i/50i/110i (saa7133) [11bd:002e] 78 -> ASUSTeK P7131 Dual [1043:4862,1043:4876] 79 -> Sedna/MuchTV PC TV Cardbus TV/Radio (ITO25 Rev:2B) 80 -> ASUS Digimatrix TV [1043:0210] 81 -> Philips Tiger reference design [1131:2018] 82 -> MSI TV@Anywhere plus [1462:6231] 83 -> Terratec Cinergy 250 PCI TV [153b:1160] 84 -> LifeView FlyDVB Trio [5168:0319] 85 -> AverTV DVB-T 777 [1461:2c05,1461:2c05] 86 -> LifeView FlyDVB-T / Genius VideoWonder DVB-T [5168:0301,1489:0301] 87 -> ADS Instant TV Duo Cardbus PTV331 [0331:1421] 88 -> Tevion/KWorld DVB-T 220RF [17de:7201] 89 -> ELSA EX-VISION 700TV [1048:226c] 90 -> Kworld ATSC110 [17de:7350] 91 -> AVerMedia A169 B [1461:7360] 92 -> AVerMedia A169 B1 [1461:6360] 93 -> Medion 7134 Bridge #2 [16be:0005] 94 -> LifeView FlyDVB-T Hybrid Cardbus [5168:3306,5168:3502] 95 -> LifeView FlyVIDEO3000 (NTSC) [5169:0138] 96 -> Medion Md8800 Quadro [16be:0007,16be:0008] 97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300] 98 -> Proteus Pro 2309 [0919:2003] 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] 100 -> Asus Europa2 OEM [1043:4860] 101 -> Pinnacle PCTV 310i [11bd:002f] 102 -> Avermedia AVerTV Studio 507 [1461:9715] 103 -> Compro Videomate DVB-T200A 104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid [0070:6701] 105 -> Terratec Cinergy HT PCMCIA [153b:1172] 106 -> Encore ENLTV [1131:2342,1131:2341,3016:2344] 107 -> Encore ENLTV-FM [1131:230f] 108 -> Terratec Cinergy HT PCI [153b:1175] 109 -> Philips Tiger - S Reference design 110 -> Avermedia M102 [1461:f31e] 111 -> ASUS P7131 4871 [1043:4871] 112 -> ASUSTeK P7131 Hybrid [1043:4876] 113 -> Elitegroup ECS TVP3XP FM1246 Tuner Card (PAL,FM) [1019:4cb6] 114 -> KWorld DVB-T 210 [17de:7250] 115 -> Sabrent PCMCIA TV-PCB05 [0919:2003] 116 -> 10MOONS TM300 TV Card [1131:2304] 117 -> Avermedia Super 007 [1461:f01d] 118 -> Beholder BeholdTV 401 [0000:4016] 119 -> Beholder BeholdTV 403 [0000:4036] 120 -> Beholder BeholdTV 403 FM [0000:4037] 121 -> Beholder BeholdTV 405 [0000:4050] 122 -> Beholder BeholdTV 405 FM [0000:4051] 123 -> Beholder BeholdTV 407 [0000:4070] 124 -> Beholder BeholdTV 407 FM [0000:4071] 125 -> Beholder BeholdTV 409 [0000:4090] 126 -> Beholder BeholdTV 505 FM/RDS [0000:5051,0000:505B,5ace:5050] 127 -> Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM [0000:5071,0000:507B,5ace:5070,5ace:5090] 128 -> Beholder BeholdTV Columbus TVFM [0000:5201] 129 -> Beholder BeholdTV 607 / BeholdTV 609 [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093] 130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193,5ace:6191] 131 -> Twinhan Hybrid DTV-DVB 3056 PCI [1822:0022] 132 -> Genius TVGO AM11MCE 133 -> NXP Snake DVB-S reference design 134 -> Medion/Creatix CTX953 Hybrid [16be:0010] 135 -> MSI TV@nywhere A/D v1.1 [1462:8625] 136 -> AVerMedia Cardbus TV/Radio (E506R) [1461:f436] 137 -> AVerMedia Hybrid TV/Radio (A16D) [1461:f936] 138 -> Avermedia M115 [1461:a836] 139 -> Compro VideoMate T750 [185b:c900] 140 -> Avermedia DVB-S Pro A700 [1461:a7a1] 141 -> Avermedia DVB-S Hybrid+FM A700 [1461:a7a2] 142 -> Beholder BeholdTV H6 [5ace:6290]
For more documentation, see /usr/src/linux/Documentation/video4linux/README.saa7134 and /usr/src/linux/Documentation/video4linux/CARDLIST.tuner.
You will need, later, the card and tuner type. Usually, and once you have compiled the module and loaded it in the kernel, it can be seen using the dmesg command, and can be seen as
... saa7134[0] subsystem: xxxx:xxxx board: xxxxxxxxxx (saa7134) [card=yy, insmod option] ... tuner: type set to zz (xxxxxxxx) by saa7134[0] ...
Where the card number is the one shown as yy and the tuner type the one shown as zz.
[edit] Setup Modules
You will have to configure your kernel to load the correct modules so that your hardware will work.
# cd /usr/src/linux # make menuconfig
Video For Linux support can be compiled in your kernel (though you will have to reboot, if you do), or loaded as a module. However, the saa7134 module will need to be added as a module, since you will have to pass options when loading the driver.
Note : You need first to add I2C support to see SAA7134 module in V4l list.
| Linux Kernel Configuration: Device Drivers |
Multimedia devices --->
<M> Video For Linux (config: CONFIG_VIDEO_DEV, module: videodev)
Video capture adapters --->
<M> Philips SAA7134 support (config: CONFIG_VIDEO_SAA7134, module: saa7134)
|
You will also need the i2c_core module loaded in your kernel.
| Linux Kernel Configuration: Device Drivers |
I2C support --->
<M> I2C support (config: CONFIG_I2C, module: i2c_core)
< > I2C device interface
|
For kernel 2.6.18:
| Linux Kernel Configuration: Device Drivers |
Multimedia devices --->
<M> Video For Linux
Video Capture Adapters --->
<M> Philips SAA7134 support
<M> Philips SAA7134 DMA audio support
|
and the i2c_core module for 2.6.18 kernel
| Linux Kernel Configuration: Device Drivers |
I2C support --->
<M> I2C support
|
After saving your kernel config, make and install the kernel modules
# make modules modules_install
Genkernel users just use the command
# genkernel --menuconfig all
and make the nessecary changes for your kernel edition from this section.
[edit] Hardware Detection
There are two ways to detect the exact card and tuner type. One is using I2C to scan the bus, which may or may not work. The second way is to manually determine the card and tuner numbers.
[edit] i2c Scan
If you are running a recent kernel, a new option is available, using i2c to scan the card and tuner type. Ideally, all you need to do is load the module with i2c_scan=1 as an option, and it will be autodetected
modprobe saa7134 i2c_scan=1
Again, this may or may not work for you. If it does, just make the option the default setting.
echo "options saa7134 i2c_scan=1" > /etc/modprobe.d/saa7134 update-modules modprobe saa7134
If it doesn't work for you, you can always manually find the correct type by passing card and tuner options yourself.
echo "options saa7134 i2c_scan=1" > /etc/modprobe.d/saa7134 modprobe saa7134
[edit] card and tuner
There are two options that need to be passed when loading the modules: card and tuner.
The module will load fine even if you pass the wrong values, so just because it doesn't throw an error doesn't mean it will work correctly. You may need to do some trial and error, but it is worth it -- when setup correctly, the tuner delivers a nice picture.
From the v4l2 driver FAQ
"Unfortunately it is impossible to detect the tuner type directly. For some TV cards it is known how to figure the exact tuner type indirectly, for example by parsing the configuration info within the card's eeprom. For most cards the drivers simply have a hardcoded default value. That catches most cases, but there are a few exceptions where the vendors ship the TV cards with different tuners depending on the region they are sold (PAL tuner in europe, NTSC tuner in the US) and there is no known way to figure what tuner the card actually has."
[edit] card
You should be able to determine your card type by running lspci, which is part of the pciutils package.
| Code: lspci |
# lspci ... 0000:01:07.0 Multimedia controller: Philips Semiconductors SAA7133 Audio+video broadcast decoder (rev 10) ... |
See /usr/src/linux/Documentation/video4linux/CARDLIST.saa7134 for the card numbers (or the list above). Once you find it, pass the option card=x where x is the card number when loading the module.
In this example, the card # is 2 from the list above: LifeView FlyVIDEO3000
# modprobe saa7134 card=2
You can also use the dmesg command as explained in the about section
[edit] tuner
You will also have to select the tuner number from the list of tuners, which can be found in /usr/src/linux/Documentation/video4linux/CARDLIST.tuner or this list below:
tuner=0 - Temic PAL (4002 FH5) tuner=1 - Philips PAL_I (FI1246 and compatibles) tuner=2 - Philips NTSC (FI1236,FM1236 and compatibles) tuner=3 - Philips (SECAM+PAL_BG) (FI1216MF, FM1216MF, FR1216MF) tuner=4 - NoTuner tuner=5 - Philips PAL_BG (FI1216 and compatibles) tuner=6 - Temic NTSC (4032 FY5) tuner=7 - Temic PAL_I (4062 FY5) tuner=8 - Temic NTSC (4036 FY5) tuner=9 - Alps HSBH1 tuner=10 - Alps TSBE1 tuner=11 - Alps TSBB5 tuner=12 - Alps TSBE5 tuner=13 - Alps TSBC5 tuner=14 - Temic PAL_BG (4006FH5) tuner=15 - Alps TSCH6 tuner=16 - Temic PAL_DK (4016 FY5) tuner=17 - Philips NTSC_M (MK2) tuner=18 - Temic PAL_I (4066 FY5) tuner=19 - Temic PAL* auto (4006 FN5) tuner=20 - Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5) tuner=21 - Temic NTSC (4039 FR5) tuner=22 - Temic PAL/SECAM multi (4046 FM5) tuner=23 - Philips PAL_DK (FI1256 and compatibles) tuner=24 - Philips PAL/SECAM multi (FQ1216ME) tuner=25 - LG PAL_I+FM (TAPC-I001D) tuner=26 - LG PAL_I (TAPC-I701D) tuner=27 - LG NTSC+FM (TPI8NSR01F) tuner=28 - LG PAL_BG+FM (TPI8PSB01D) tuner=29 - LG PAL_BG (TPI8PSB11D) tuner=30 - Temic PAL* auto + FM (4009 FN5) tuner=31 - SHARP NTSC_JP (2U5JF5540) tuner=32 - Samsung PAL TCPM9091PD27 tuner=33 - MT20xx universal tuner=34 - Temic PAL_BG (4106 FH5) tuner=35 - Temic PAL_DK/SECAM_L (4012 FY5) tuner=36 - Temic NTSC (4136 FY5) tuner=37 - LG PAL (newer TAPC series) tuner=38 - Philips PAL/SECAM multi (FM1216ME MK3) tuner=39 - LG NTSC (newer TAPC series) tuner=40 - HITACHI V7-J180AT tuner=41 - Philips PAL_MK (FI1216 MK) tuner=42 - Philips 1236D ATSC/NTSC daul in tuner=43 - Philips NTSC MK3 (FM1236MK3 or FM1236/F) tuner=44 - Philips 4 in 1 (ATI TV Wonder Pro/Conexant) tuner=45 - Microtune 4049 FM5 tuner=46 - Panasonic VP27s/ENGE4324D tuner=47 - LG NTSC (TAPE series) tuner=48 - Tenna TNF 8831 BGFF) tuner=49 - Microtune 4042 FI5 ATSC/NTSC dual in tuner=50 - TCL 2002N tuner=51 - Philips PAL/SECAM_D (FM 1256 I-H3) tuner=52 - Thomson DDT 7610 (ATSC/NTSC) tuner=53 - Philips FQ1286 tuner=54 - tda8290+75 tuner=55 - TCL 2002MB tuner=56 - Philips PAL/SECAM multi (FQ1216AME MK4) tuner=57 - Philips FQ1236A MK4 tuner=58 - Ymec TVision TVF-8531MF/8831MF/8731MF tuner=59 - Ymec TVision TVF-5533MF tuner=60 - Thomson DDT 7611 (ATSC/NTSC) tuner=61 - Tena TNF9533-D/IF/TNF9533-B/DF tuner=62 - Philips TEA5767HN FM Radio tuner=63 - Philips FMD1216ME MK3 Hybrid Tuner tuner=64 - LG TDVS-H062F/TUA6034 tuner=65 - Ymec TVF66T5-B/DFF tuner=66 - LG NTSC (TALN mini series) tuner=67 - Philips TD1316 Hybrid Tuner tuner=68 - Philips TUV1236D ATSC/NTSC dual in tuner=69 - Tena TNF 5335 MF
One way to find out your tuner number if you don't see it in the list is simple trial and error, or you can also use the dmesg command as explained in the about section
# modprobe saa7134 card=2 tuner=1 # tvtime # rmmod saa7134 # modprobe saa7134 card=2 tuner=2 # tvtime ...
Another way could be this:
#/bin/sh
MAXTUNER=69
for i in $(seq 0 $MAXTUNER);
do
rmmod tuner saa7134
modprobe saa7134 card=25 tuner=$i
echo "Actual tuner is:" $i
sleep 1 # this is to make sure /dev/video is registered when tvtime starts
tvtime
done
write this to probe_tuner.sh and run it as root
If your TV uses NTSC, try the NTSC tuners. If you use PAL, try the PAL ones.
You must know that it's possible that more then one tuner type will work with Your card, but one can work better and the other worse so don't stop search after finding first working tuner and when checking if tuner type works it's good not to check only one or two frequencies.
Once you have the card number and the tuner number, you can load the module.
# modprobe saa7134 card=2 tuner=2
# modprobe tuner
Once the modules are loaded, they should create radio0, vbi0 and video0 in /dev/v4l/ These are your video4linux devices that programs like freevo, kdetv, mythtv and tvtime will use.
If you need to remove the module and try again with different options, use rmmod. To do this the kernel must be compliled with the module unload feature enabled.
# rmmod saa7134
Add the module to be loaded on bootup:
# echo "saa7134" >> /etc/modules.autoload.d/kernel-2.6
or emerge coldplug, and add it to your boot init scripts.
# emerge coldplug # rc-update add coldplug boot
[edit] More Module Options
There are more options you can pass when loading the module. They are: oss, oss_rate, radio_nr, mixer_nr, dsp_nr, vbi_nr and video_nr.
The options ending in _nr let you pass which device number you want the card to register as in /dev, in case you have conflicting devices. By default you don't need to use these options, since the module will automatically register the next available sequence of numbers.
Example: Load the card and register the device as /dev/video2
# modprobe saa7134 video_nr=2
The oss option will enable both a dsp and mixer device in /dev/sound so that you can record audio using the tuner's audio. Just pass a 1 to enable it.
# modprobe saa7134 oss=1
In addition to the oss option there is a new module saa7134-alsa (seems to be in 2.6.15, don't know about earlier versions) which will do about the same thing as the oss option mentioned above (which doesn't seem to work with 2.6.15 kernels). With my card (Medion 5044, card=9, tuner=38, audio_clock_override=0x200000) the line,2 channel contained the sound I needed. This will also create the /dev/sound/dsp1 device, so if the above with oss=1 doesn't work try this method.
# modprobe saa7134 # modprobe saa7134-alsa
Once you find your module settings, add them to /etc/modprobe.d/saa7134 so you don't have to pass the options each time.
# echo "options saa7134 card=2 tuner=2 oss=1" > /etc/modprobe.d/saa7134 # update-modules # modprobe saa7134
[edit] dmesg output
Assuming everything loads fine, you should see your dmesg output to something similar like this:
# modprobe saa7134 card=2 tuner=2 oss=1 dsp_nr=1 mixer_nr=1 video_nr=0 # dmesg
saa7133[0]: found at 0000:02:0c.0, rev: 16, irq: 5, latency: 32, mmio: 0xda800000 saa7133[0]: subsystem: 5169:0138, board: LifeView FlyVIDEO3000 [card=2,insmod option] saa7133[0]: board init: gpio is 39800 saa7133[0]: there are different flyvideo cards with different tuners saa7133[0]: out there, you might have to use the tuner=<nr> insmod saa7133[0]: option to override the default value. saa7133[0]: registered input device for IR saa7133[0]: dsp access wait timeout [bit=WRR] saa7133[0]: dsp access wait timeout [bit=WRR] saa7133[0]: dsp access wait timeout [bit=WRR] tuner 1-0061: chip found @ 0xc2 (saa7133[0]) tuner 1-0061: type set to 2 (Philips NTSC (FI1236,FM1236 and compatibles)) saa7133[0]: i2c eeprom 00: 69 51 38 01 10 28 ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff saa7133[0]: registered device video0 [v4l2] saa7133[0]: registered device vbi0 saa7133[0]: registered device radio0 saa7133[0]: registered device dsp1 saa7133[0]: registered device mixer1
[edit] Audio Settings
There are two ways to record audio with your TV card: using a short audio cable that goes from the card's audio out to your computer's audio in (line or mic), or recording the audio with the board's mixer device.
Some cards, even though they have composite video input and S-Video input, have no audio input except through the TV antenna. At least on some cards, it is possible to capture audio through the TV input and video through S-Video input at the same time. You might like to do this if you have one of the kernel versions whose saa713x module collides with ALSA and hangs the system.
For example say you have an analog camcorder and you are trying to capture the video and sound. Your cabling would be like this:
camcorder --> S-Video --> card
camcorder --> Composite audio --> RF converter device, VCR, etcetera --> TV signal --> card
If you want to use the board's mixer device, make sure you pass oss=1 when loading the module. This will register /dev/dsp1 and /dev/mixer1. You can change the dsp and mixer number by passing dsp_nr=x and mixer_nr=x when loading the module as well.
So, if you have a soundcard using ALSA + OSS emulation or just OSS, those will already be using /dev/dsp and /dev/mixer. Otherwise, if those aren't in use, those are the ones that the module would create. If you have more than one soundcard using ALSA + OSS or OSS, then it will still register the next available device nodes.
If you're not sure, chances are that you are already using OSS (through ALSA or not), and dsp1 and mixer1 will be the new device nodes.
Once its loaded, you will need to use a mixer to change the settings so sound will record. By default, the recording device is not set correctly, so anything you record will be muted.
Aumix is one of the few mixers in portage (emerge: aumix) that can edit mixer settings on more than one mixer device. After you have emerged aumix, run the program passing the option to edit /dev/mixer1.
$ aumix -d /dev/mixer1 -I
The -d argument tells aumix which mixer device to open. By default, it will go to /dev/mixer or /dev/mixer0. The -I means interactive mode, which will bring up the console or X window program.
By default, the "R" (recording) device will be set to Video. Change it to any of the other options (Line 1 or Line 2) to record onboard audio. In console mode for aumix, use the arrow keys to select Line1 or Line2, and then the space bar to select that one as the recording device. In the X window, just select it with your mouse so there is a red box next to it. Save your settings and exit.
You don't need to worry about setting the volume on the tuner's mixer.
If you don't want to manually set your mixer everytime you boot your computer, aumix makes it easy to do so with one command.
This example will set the recording device to Line1 for /dev/mixer1:
$ aumix -d /dev/mixer1 -1 R
You can add that line to /etc/conf.d/local.start to have it automatically set on boot.
# echo "aumix -d /dev/mixer1 -1 R" >> /etc/conf.d/local.start
Tvtime And Sound
If you want to get sound from your cards dma output you can use sox. I am using tvtime and sox. I have chosen pcm to control sound in tvtime, but it is muting pcm after i close it. After some fight with bash i wrote this :
#!/bin/sh sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp -w -r 32000 /dev/dsp & tvtime --mixer=/dev/mixer:pcm wait tvtime t=`pidof sox`; kill $t; amixer -c 0 sset PCM 80%,80% unmute
I hope it is useful.
Even if your system is pure alsa, I prefer the oss-emulation based sox method, because the sound latency is way better then with the pure alsa toolset method below. The reason for this is that sox in the sample above just copies raw sound data from one dsp device to another without much buffering, which kills the latency in the arecord | aplay sample. I finally came to a slightly modified version of the above script, which is more pid-safe regarding the sox kill and also avoid ugly line noise while the analogue tuner is still syncing when tvtime starts:
#!/bin/sh
(sleep 5; amixer -q -c 0 sset PCM 80%,80% unmute; exec sox -q -c 2 -s -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp -w -r 32000 /dev/dsp) &
tvtime --mixer=/dev/mixer:pcm
kill `ps | awk '/sox/ && !/awk/ {print $1}'`
amixer -q -c 0 sset PCM 80%,80% unmute
If you don't want bother with sox and OSS emulation, a better way to start tvtime with DMA sound would be:
tvtime | arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -
Change the hw:1,0 to suit your needs.
[edit] Recording TV
There are a few programs you can use to record TV with your tuner card. This guide will briefly cover how to configure mencoder (emerge: mplayer). For instructions on setting up mplayer and how to use mencoder, see the MEncoder guide.
This guide will also try to explain how to use your card's onboard audio processor to record audio instead of using a cable from your tuner to your audio card.
[edit] What You Don't Need
For those tweakers who run around trying every option, let me assure you that these are some things you do not need to save you some time. :)
- bt878 module
- bttv sound module
- any OSS sound modules (unless you need them for your sound card, of course)
[edit] v4lctl Settings
If you haven't already, you will need to emerge media-tv/xawtv so that you can have access to the v4lctl program.
Setting up your tuner card to record (or even watch) TV requires a lot of configuration sometimes. Be sure to take notes as you go along, and record what works and what doesn't work.
Once you have xawtv installed, go ahead and fix all your v4lctl settings so you can properly watch TV.
Run this command to see your current settings:
# v4lctl list
The default settings (fourth column) are probably not what you want. You can use the v4lctl command to change them to what they should be. Read man v4lctl for your options.
There are two ways to set every v4lctl config: using "v4lctl <setcommand> <value>" or "v4lctl setattr <attrname> <value>". You can also see indivual settings with "v4lctl show <attrname>".
The most critical settings in getting your TV card to work, record, and use the onboard sound are going to be: norm and input. Changing volume and mute don't appear to have any effect on being able to record sound.
Below are some examples on how to set your v4lctl settings. If they are already listed correctly in "v4lctl list" then you won't need to change them.
Set your TV norm to NTSC:
# v4lctl setnorm NTSC
Set your TV input to Television:
# v4lctl setinput Television
Note: I know the Lifeview FlyVideo 3000 has an S-Video in port on the card. Logically, if you set v4lctl input to S-Video, it should work, though I've never tested it.
Set your TV's audio mode to stereo:
# v4lctl audio stereo
[edit] Mplayer and Mencoder
Now that your v4lctl settings are in place, the next step is to actually see if you can watch TV. I would actually recommend installing and using tvtime (emerge: media-tv/tvtime) since it comes with a very nice onscreen configuration setup. Once your cable is connected to your TV card and you run tvtime, you should be able to watch TV just fine.
Mplayer and mencoder use their own specific config files, found in ~/.mplayer/ for watching and recording TV. You can save your options in those files (~/.mplayer/config for mplayer, ~/mplayer/mencoder for mencoder) so you don't have to pass them to the command line each time.
Here is a sample ~/.mplayer/config settings for TV. I apologize for the US-centric settings, but it's the only thing I've ever had to fiddle with:
mplayer tv:// -tv driver=v4l2:device=/dev/video0:fps=29.97:chanlist=us-cable:audiorate=32000: adevice=/dev/dsp1:input=0:amode=1:normid=4
Edit: Here is some European settings, including setting norm/input/audio without installing xawtv
This is good for initially finding all your channels manually and checking that everything works (h & k are the default keys for changing channel in Mplayer)
mplayer tv:// -tv driver=v4l2:norm=PAL:input=0:amode=1:width=384:height=288 :outfmt=yuy2:device=/dev/video0:chanlist=europe-west:channel=E2
Once you have found what program is on which channel you can make your own channellist, here is mine eg
mplayer tv:// -tv driver=v4l2:norm=PAL:input=0:amode=1:width=768:height=576:outfmt=yuy2 :device=/dev/video0:chanlist=europe-west:channels=E5-SVT1,E7-SVT2,E10-TV3,E8-TV4,SE18-Kanal_5 ,SE14-TV4plus,SE12-Discovery_Mix,E11-Eurosport,SE8-SVT24,E9-ZTV,SE15-MTV,SE11-LokalTV
(to find a list of all frequencies and channel id's, checkout this link
I'll explain the options being passed:
- driver=v4l2 - uses video4linux driver v2 (always use this one)
- device=/dev/video0 - the /dev device for the TV tuner card
- fps=29.97 - framerate to display TV at (optional)
- chanlist=us-cable - available: europe-east, europe-west, us-bcast, us-cable, etc (always use)
- audiorate=32000 - mencoder only, set audio capture bitrate (REQUIRED!! saa7134 will only record sound at this rate)
- adevice=/dev/dsp1 - the device generated by passing the oss=1 option when loading the saa7134 module (REQUIRED for DMA Audio!! Not needed if you have a pass through cable directly from TVcard to Soundcard)
- input - Specify input (default: 0 (TV), see console output for avail-able inputs) (from man mencoder)
- amode - 0: mono, 1: stereo, 2: language 1, 3: language 2 (from man mencoder)
- normid - Sets the TV norm to the given numeric ID. The TV norm depends on the capture card. See the console output for a list of available TV norms. (from man mencoder)
Note: You'll see that mentioned a lot in the mplayer manual, "See the console output for a list of <whatever> list of values." You can see those actual values by running "mplayer (or mencoder) -v ...". For example:
# mencoder tv:// -endpos 1 -ovc copy -oac copy -v .... TV detected! ;-) Selected driver: v4l2 name: Video 4 Linux 2 input author: Martin Olschewski <olschewski@zpr.uni-koeln.de> comment: first try, more to come ;-) Selected device: LifeView FlyVIDEO3000 Tuner cap: STEREO LANG1 LANG2 Tuner rxs: MONO STEREO Capabilites: video capture video overlay VBI capture device tuner read/write streaming supported norms: 0 = PAL; 1 = PAL-BG; 2 = PAL-I; 3 = PAL-DK; 4 = NTSC; 5 = SECAM; 6 = PAL-M; 7 = PAL-Nc; inputs: 0 = Television; 1 = TV (mono only); 2 = Composite1; 3 = Composite2; 4 = S-Video; Current input: 0 .... v4l2: set input: 0 Selected norm: ntsc v4l2: set norm: NTSC v4l2: set width: 640 v4l2: set height: 480 Selected channel list: us-cable (including 133 channels) Current frequency: 0 (0.000) ==> Found video stream: 0 v4l2: get format: YUV420 v4l2: get fps: 29.000000 v4l2: get width: 640 v4l2: get height: 480 v4l2: set audio samplerate: 32000 v4l2: get audio format: 16 ==> Found audio stream: 0 v4l2: get audio samplerate: 32000 v4l2: get audio samplesize: 2 v4l2: get audio channels: 2 TV audio: 2 channels, 16 bits, 32000 Hz
Running -v is obviously a really good place to get some detailed information about what mplayer/mencoder is doing, and where your configuration might be incorrect.
When you want to watch a certain channel, use it with the tv:// option. If you don't have one set, it will simply default to the last channel you tuned into.
Watch something on channel 39:
$ mplayer tv://39
See man mencoder for more optional arguments that can be passed. Here are some you may find useful:
- forcechan=<1-2> - By default, the count of recorded audio channels is determined automatically by querying the audio mode from the TV card. This option allows forcing stereo/mono recording regardless of the amode option and the values returned by v4l. This can be used for troubleshooting when the TV card is unable to report the current audio mode. (from man mencoder)
- channel=<value> - Set tuner to <value> channel (from man mencoder)
To record a show using mencoder you could use this:
mencoder tv:// -tv driver=v4l2:norm=PAL:fps=25:outfmt=yuy2:quality=0:input=0:width=720:height=578:chanlist=europe-west:volume=80:amode=1:normid=0:audiorate=32000:adevice=/dev/sound/dsp2:channel=SE13 \ -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1500:keyint=25 \ -oac mp3lame -lameopts cbr:br=128:mode=0 \ -endpos 01:00:00 \ -vf pp=hb/vb/dr/al/lb,denoise3d \ -o videocap.avi
I'll explain the options being passed (for others, see above):
- width=720 and height=578 - sets the movie size
- volume=80 - sets the volume of the tv-card mixer
- -ovc lavc - selects lavc as video encoder
- vcodec=mpeg4 - sets the encoding codec to mpeg4
- vbitrate=1500 - sets the video-bitrate to a variable bitrate of 1500
- keyint=25 - tells mencoder to set a keyframe every second
- -oac mp3lame - select mp3lame as audio encoder
- cbr:br=128:mode=0 - sets the audio bitrate to constant 128kbps and stero mode
- -endpos 01:00:00 - tells mencoder to record a stream for exactly one hour (format: HH:MM:SS)
- -vf pp=hb/vb/dr/al/lb,denoise3d - this applies some filtering (have a look at "man mencoder" for details)
- -o videocap.avi - sets the output file
Those options should work pretty well. Of course you can set the capture size to 640x480 as well, and maybe do some cropping. Have fun!
[edit] MythTV
Setup in MythTV is fairly straight-forward.. Just run mythtv-setup, add the card and setup your video device and you should be fine.
However, be sure to set the audio rate to 32000, or else you won't hear any sound.
If you created a separate sound device, don't forget to set that as well.
For more generic MythTV usage, see HOWTO Use MythTV.
[edit] Enable DVB-T
If your card supports DVB-T, you need to configure
Symbol: VIDEO_SAA7134_DVB [=m]
Prompt: DVB Support for saa7134 based TV cards
Defined at drivers/media/video/Kconfig:250
Depends on: VIDEO_DEV && VIDEO_SAA7134 && DVB_CORE
Location:
-> Device Drivers
-> Multimedia devices
-> Video For Linux (VIDEO_DEV [=m])
-> Video For Linux
-> Philips SAA7134 support (VIDEO_SAA7134 [=m])
Selects: VIDEO_BUF_DVB && DVB_MT352
and load the resulting saa7134-dvb module as well.
In addition you need to find out the tuner that the your card came with. A look in saa7134-dvb.c reveals supported configurations. This tuner needs firmware loading!
To get the proper firmware use the /usr/src/linux/Documentation/dvb/get_dvb_firmware shell script. and copy the resulting xxx.fw file to /lib/firmware or /usr/lib/hotplug/firmware, depending on your hotplug setup.
If installation works ok for you but you cannot tune with scan, follow this procedure:
Look into /var/log/messages for a line containing: "v4l2 driver version". If this is version 0.2.14 you can try to replace it with an older version. 0.2.14 introduced tuning problems for the 300i.
Note that the Pinnacle 300i is a hybrid card, for which you can install both tv and dvb-t tuner. For the latter the video4linux drivers of kernels 2.6.12, 2.6.13 and 2.6.13.1 don't work.
There are two ways to download the driver source. The first is to get a driver snapshot:
wget http://linuxtv.org/hg/v4l-dvb/archive/tip.tar.bz2 tar xjf tip.tar.bz2 cd $(tar tf tip.tar.bz2 | head -n1 | cut -d/ -f1)
The second is to clone the repository:
hg clone http://linuxtv.org/hg/v4l-dvb cd v4l-dvb
If you already have a clone of the repository, just update it:
cd v4l-dvb make clean hg pull -u
Then, regardless of how you acquired the source:
make make install
This will directly overwrite installed dvb-t related kernel modules in /lib/modules/<kernel-version>/... If you encounter compilation errors (2.6.13.1 kernel, you will), go into /usr/src/video4linux open up the two files msp3400.c and video-buf-dvb.c, search for the line containing "refrigerator" and remove the content in between the parantheses. Don't remove the parantheses themselves. If the 300i is your only tuner card you can also open up Make.config and change all "m" to "n" in the three CX88 related lines. These steps will workaround the incompatibilities of the old video4linux source code with the newer kernel headers. Hopefully the video4linux guys will fix the root cause because this is an ugly workaround. Note that you have got to repeat this procedure after installing a new kernel with modules - but only if the newer kernel still exhibits the same tuning problem, of course! In case of questions send a mail to me: ingo|at|ingoschmiegel|dot|de (Replace |at| and |dot| with @ and . respectively)
[edit] Card Configurations
If you have a TV tuner card working, please list the output of lspci and the module options you passed to get it working.
Zogis ra220 FM
- 02:0a.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- modprobe saa7134 card=27 tuner=38
- All inputs work but the
Zogis Real Angel 200 ra220 (NTSC)
- 00:09.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- modprobe saa7134 card=3 tuner=0
- Strange -- the video output doesn't appear on the 'Television' output. But instead appears on 'Composite2' output. You can only tune channels by using 'Input Configuration', switching to a blue-screen 'Television' and then switching back to 'Composite' to view it.
LG LTT-200
- 00:09.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d0)
- modprobe saa7134 card=24 tuner=54 ;not completely sure about tuner, but it worked to display composite from a video camera .
- modprobe saa7134-alsa
ADSTech InstantHDTV
- 01:07.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev 11)
- modprobe saa7134 card=90
- modprobe saa7134_alsa
- modprobe tuner
This gets the NTSC tuner working. Loading saa7134_dvb enables the ATSC device, but I am not within range of any ATSC signals, so I am unable to test. This card is pretty much undocumented, even for windows.
ASUS TV-FM PCI
- 01:06.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev f0)
- modprobe saa7134 card=25 tuner=14 #this tuner is for colombian users
ASUS TV-FM PCI - PAL version
- 01:08.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=16 tuner=38 (Optional setting, card worked perfectly on auto-detection)
EasyLite
- 01:06.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=2 tuner=37
- card=3 tuner=37
Intex PC TV Capture
- 00:09.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
modprobe saa7134 card=3 tuner=14
- 01:0a.0 Multimedia controller: Philips Semiconductors SAA7134 Video Broadcast Decoder (rev 01)
- card=3 sold at roughly $18 nice value card
Lifeview Flyvideo 2000
- 01:09.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- card=3 tuner=2
Lifeview Flyvideo 3000
- 02:0a.0 Multimedia controller: Philips Semiconductors SAA7133 Video Broadcast Decoder (rev 10)
- card=2 tuner=2
Lifeview FlyDVB-T Hybrid CardBus / Typhoon 50500
- 04:00.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev f0)
- card=60
Lifeview Flydvb Trio
- 05:02.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d0)
- card=84 tuner=54
Mercury TV Tuner
- 0000:02:0b.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- card=2 tuner=3
MSI TV @nywhere Plus
- 01:07.0 Multimedia controller: Philips Semiconductors SAA7133 Video Broadcast Decoder (rev d0)
- card=82 tuner=54
Pinnacle 50i
- 02:0c.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d0)
- card=77 tuner=54
Pinnacle 310i
- 02:00.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d0)
- card=77 tuner=54
Typhoon PCI Capture TV Card
- 01:0a.0 Multimedia controller: Philips Semiconductors SAA7134 Video Broadcast Decoder (rev 01)
- card=7
- card=2 tuner=37 #card autodetected, tuner tested in Germany
Terratec Cinergy 250 PCI
- 00:09.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d0)
- card=83 tuner=54
Terratec Cinergy 400
- 01:06.0 Multimedia controller: Philips Semiconductors SAA7134 Video Broadcast Decoder (rev 01)
- card=8 tuner=5 (both autodetected)
Compro DVB T200
- 01:07.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- card=71 (not autodetected correctly)
Super TV PRO
- 01:08.0 Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder
- saa7134 card=1 tuner=37 gbuffers=4
ASUS MyCinema P7131 Hybrid
- 00:0c.0 Multimedia controller: Philips Semiconductors SAA7133 Video Broadcast Decoder (rev d1)
- saa7134 card=78 tuner=54 # for analog signal
- Troubleshooting on card [1043:4876]
- In /usr/src/linux/drivers/media/video/saa7134/saa7134-dvb.c, line 873, struct tda1004x_config philips_tiger_config
- change the entry
- .request_firmware = NULL,
- to
- .request_firmware = philips_tu1216_request_firmware,
- run /usr/src/linux/Documentation/dvb/get_dvb_firmware and copy the dvb-fe-tda10046.fw to /lib/firmware
- modprobe saa7134 card=78 gpio_tracking=1
- see http://www.spinics.net/lists/vfl/msg27672.html
- STOP PRESS - the Mercurial version "emerge v4l-dvb-hg" gives the card a proper card number of 112.
- The card can then be brought up with "modprobe saa7134 card=112 tuner=54 gpio_tracking=1 i2c_scan=1". You may also need to modprobe saa7134-dvb and saa7134-alsa. This works now but may not continue to do so.
KWorld Mpeg TV Station/PCI - KW-TV7134RF-PRO
- 00:0b.0 Multimedia controller: Philips Semiconductors SAA7134 Video Broadcast Decoder (rev 01)
- saa7134 card=3 tuner=5
- poor signal detection (a bit worse then on the original drivers/win98se), tested in poland
Global TV Terminator
- 00:0a.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
- card=65 tuner=54
Hauppauge WinTV HVR-1110
- (often marketed as the 1100, this card is triangular whereas the 1100 is an oblong)
- 00:0c.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
- card=104 tuner=54
Compro VideoMate TV Gold M350
- 02:0c.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=59 tuner=23
Kworld V-Stream Xpert TV PVR7134
- 01:08.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=59 tuner=23
Easy TV Capture
- Multimedia controller: Philips Semiconductors SAA7130 Video Broadcast Decoder (rev 01)
- card=34 tuner=39
- card=36 tuner=39
Gigabyte GT-PTV-TAF-RH
- 03:01.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
- Tuner: Philips TDA8275A, Analog decoder: Philips SAA7131E, Digital decoder: Philips TDA10046A
- modprobe saa7134 card=81 tuner=54 # for analog
- DVB-T needs small modification and firmware:
- In /usr/src/linux/drivers/media/video/saa7134/saa7134-dvb.c, line 890 (2.6.21-r4), struct tda1004x_config philips_tiger_config
- change the entry
- .request_firmware = NULL,
- to
- .request_firmware = philips_tda1004x_request_firmware,
- run /usr/src/linux/Documentation/dvb/get_dvb_firmware tda10046 and copy the dvb-fe-tda10046.fw to /lib/firmware
- modprobe saa7134-dvb
Conceptronic CTVFMi2
- 00:08.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
- modprobe saa7134 card=78 tuner=54
Note: card=2, 54, 65, 78, 81, 90 and 104 worked too so I guess it doesn't really matter. For me it takes about 1s to modprobe and change channels.
Kworld PlusTV Analog lite PCI (PVR-TV 7134SE)
- 04:08.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=59 tuner=56
Pinnacle PCTV 300i DVB-T + PAL
- 04:09.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)
- card=50 tuner=33 # for analog
- I do not have DVB running, but I think you will need the Zarlink MT352 frontend for it to work.
- Note: I did not have to set the card and tuner type, as everything was detected automatically. I got my card working with gentoo-sources-2.6.24-r8, but starting from version 2.6.25 I get a picture but only static noise. I did not find a solution yet, so I guess I will stick with my older kernel to watch tv.
[edit] Troubleshooting
[edit] Card & tuner type
If you are not sure what card and tuner you got (the case of noname cards) try following script:
#/bin/sh
MAXTUNER=71
MAXCARD=94
for j in $(seq 0 $MAXCARD);
do
for i in $(seq 0 $MAXTUNER);
do
pccardctl eject #I use pcmcia card end the card had to be ejected in order to apply new tuner and card numbers. You should delete this line if you use PCI card!
rmmod tuner saa7134 tda9887
sync;sync
sleep 1;
modprobe saa7134 card=$j tuner=$i
pccardctl insert #insert card back. You should delete the line if you use PCI card!
echo "Actual tuner is:" $i "card: " $j
sleep 1 # this is to make sure /dev/video is registered when tvtime starts
sync;sync;
xdtv_scantv -n PAL-I -f pal-europe-west -v4l2 #xdtv_scantv is a fast method of scanning. Change the options to you country. (-n PAL-I -f pal-europe-west works in the UK)
done
done
Note that it takes a long time to go through all the cards and tuners and if it finds a channel it does not stop, just signals that channel is found.
Grzegorz Dymarek 15:28, 10 August 2006 (GMT)
TIP : you will maybe have to pass extra arguments to the "tuner" module. If you live in France for example, you will have to set secam=l this way :
# modprobe tuner secam=l
It took me a long time to understand why my Pinnacle PCTV 310i didn't work correctly. In order to solve sound problems (some channels had no sound, or hashed sound...) I have had to pass more arguments to saa7134 :
# modprobe saa7134 card=77 tuner=54 gbuffers=32 vbibufs=32 audio_ddep=10 tsbufs=32 alsa=1
Maybe some of these options are not really useful, but at least, it's ok now !
[edit] Recording sound using audio cable and m/b built-in audio
If your motherboard has built-in audio then check the manual for Audio AUX_IN connector and connect one to your TV-tuner Audio output. Then start alsamixer -V capture, find Aux channel and set one to CAPTURE (press Spacebar to toggle). This is important to set proper capture input otherwise you will be able to hear TV only in headphones but all recorders (e.g. mencoder) will fail to record sound. The same apply if you decide to use CD_IN connector. It worked with Pinnacle 50i TV-card.
