| The TuneMe page - Configuring a Tv Tuner for Linux. |
| This issue, previously belonging
to TrickMe page is now moved to a dedicated page. Paragraphs in this page are: Prologue General Difficulties Manual Solution Possibilities Applications |
Prologue Configuring a tv tuner is not very difficult task. I completed it using Lifeview Flyvideo II, not a modern card and not a very easy one. But in fact it was easier in Linux than in Windows 2000/XP. The paragraph's configuration concept will help installing much more cards. General The above tv tuner is based on bt848 chip and is supported by the bttv kernel module. When the bttv module loads, it registers itself under the videodev module. Depending on tuner model, the module might see everything correctly. If so, all the modules loaded for my tv tuner are:
Our concerns are:
So, in another card's case, you just alter "bttv" with the appropriate module. Difficulties The hard part now: 1) The device files might not exist. 2) The bttv module does not always detect the proper model. 3) Even with model detected, the tuner might not be configured properly. 4) The mixer module might have to be configured manually too. 5) Configuring X is required. Manual Solution In this solution, a fully configured kernel with all necessary modules compiled is required. Most Distros have this job done for you. 1) Creating the device files. If the device files are not maintained by the devfs daemon, then we definetly have to check whether they exist along with the proper permissions of course. If not, then the applications can't interact with the hardware through the kernel. Slackware does not maintain a devfs daemon, so we will create - modify them manually. Checking if the device files exist: ls -l /dev/video* ls -l /dev/radio* ls -l /dev/vtx* ls -l /dev/vbi* ls -l /dev/fb* The Framebuffer device is checked "just in case" we want to use the tuner in the tty terminals too apart from X. a) the device files do not exist. Solution for each missing device file: su <type the root password> cd /dev mknod video0 c 81 0 mknod video1 c 81 1 mknod video2 c 81 2 mknod video3 c 81 3 mknod radio0 c 81 64 mknod radio1 c 81 65 mknod radio2 c 81 66 mknod radio3 c 81 67 mknod vtx0 c 81 192 mknod vtx1 c 81 193 mknod vtx2 c 81 194 mknod vtx3 c 81 195 mknod vbi0 c 81 224 mknod vbi1 c 81 225 mknod vbi2 c 81 226 mknod vbi3 c 81 227 ln -s /dev/video0 /dev/video ln -s /dev/radio0 /dev/radio ln -s /dev/vtx0 /dev/vtx ln -s /dev/vbi0 /dev/vbi exit Note: Multiple device files have been created, but for convenience issues the first ones are soft-linked to simpler filenames. This step (creating device files) is required nomatter which card is installed. b) The device files are just created or already exist. The permissions issue now: su <type the root password> cd /dev chmod -v 666 video? radio? vtx? vbi? fb? exit Without this step, regular users may not have access permissions to the device files. The soft links will inherit the actual files permissions. 2) Loading the bttv module. ..... or the appropriate one. Once the device is installed in the computer, the kernel will most probably load the module. In case this does not happen, add this line in /etc/rc.d/rc.modules (or relevant): /sbin/modprobe bttv 3) Configuring loading module options. Add the following lines to /etc/modules.conf (as root) # TV alias char-major-81 bttv # pre-install bttv modprobe -k tuner tvaudio options bttv pll=0 card=8 options tuner type=7 # 0 3 7 are most right choices for tuner and change accordingly for your module - card - subsystem variation. Using /etc/modules.conf, all modules that load directly (through a command) and indirectly (through other modules) will have the appropriate options. Then, if no applications use the tv tuner, issue as root: rmmod bttv tuner (or the relevant) modprobe bttv (or the relevant) 4) Configuring X. I prefer the direct use of /dev/video0 from the tv programs. For this reason I configured my /etc/X11/XF86Config file this way: In Section "Module" add: Load "v4l" In this way, X will use Video For Linux. In SubSection "extmod" inside Section "Module" you may also comment this: Option "omit xfree86-dga" with a "#" in the beginning. But Comment out this again if you experience X instability. Possibilities The possibilities in /etc/modules.conf are many: The bttv module needs to know the tv tuner model almost always. That's the "card" option needed in /etc/modules.conf. If a radio tuner exists inside the tv tuner then on the bttv options we may add radio=1. The tuner module must know the tuner type. The sound+mixer module can be: tvaudio tda7432 tda9875 tda9887 etc. tvaudio in particular supports multiple devices. In this link: http://www.tldp.org/HOWTO/BTTV.html goto "Appentix" page for model details. Keep in mind though that some audio-mixer modules for tv tuners are now actually inside a more generic module and may appear missing, but in reality they are all inside the tvaudio module. Applications The only application I've tested so far for tv is "xawtv" http://linux.bytesex.org/xawtv/ Download it, tar -xzf it, cd to it, ./configure it, make it and su -c 'make install' it. No special parameters are needed. If you continue to experience "blue" screen, then the overlay mode is working fine and you might need to instruct the program to use a specific device: xawtv -c /dev/video0 Then, some trial and errors may occur considering the tuner and sound-mixer type, so if you do not know the card's subsystems in detail, do not panic. That's it. The relevant tv-tuner module and xawtv will behave accordingly to the tv card type if all is well configured. xawtv works on X. fbtv works on framebuffer devices. ttv works with aalib. Aalib renders images or video to text characters.
|