- 论坛徽章:
- 0
|
Hardware Detection
Please note: In some cases, getting your TV tuner card is not going to be as simple as loading the module and starting up your favorite tv tuner frontend. You will need to do a little hardware detection first before you can watch any TV.
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.
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 i2c_scan=1" > /etc/modules.d/saa7134
modules-update
modprobe saa7134
If it doesn't work for you, you can always manually find the correct type by passing card and tuner options yourself.
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."
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
...
如果配置正确的话,tvtime中会多一个“Channel management”的菜单,
“Change frequency table”选“China”,
然后“Reset all channels..”,在“Scan channel..”
搜索就能出台!!!
Another way could be this:
#/bin/sh
MAXTUNER=46
i=0
while [ $i -lt $MAXTUNER ];
do
rmmod tuner saa7134
modprobe saa7134 card=25 tuner=$i
echo "Actual tuner is:" $i
tvtime
i=$(($i+1))
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.
Once you have the card number and the tuner number, you can load the module.
# modprobe saa7134 card=2 tuner=2
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
Once you find your module settings, add them to /etc/modules.d/saa7134 so you don't have to pass the options each time.
# echo "options saa7134 card=2 tuner=2 oss=1" > /etc/modules.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
[ 本帖最后由 wander1234 于 2006-1-6 22:34 编辑 ] |
|