Skip to main content

I want my MTV!

posted onApril 16, 2001
by hitbsecnews

By: L33tdawg

Okay, so I was sitting around, feeling a little bored and thought it would be pretty cool if I could watch TV in my room. I mean since I've got Astro
(Malaysia's version of satellite television if you will), so the thought
of purchasing a TV tuner card for my desktop seemed like a pretty good
idea (or a good way to waste about 200 bucks). I fired up my browser just
to see how much support there was out there for TV tuner cards in Linux -
surprisingly there were quite a fair number of cards listed, however none
of them seemed to be available in Malaysia. All the same, I thought I'd
try my luck and just go out and purchase one I 'felt' would work and see what happened! This article in other words, is a brief 'guide' of sorts to getting a TV Tuner card working in Linux.

So I head over to the shops, and picked up a Mediaforte TV Vision tuner
card. A quick look at the box though and it seemed that I would only get
my MTV through Windows. Certainly not a good sign but I bought the card
anyway. I headed home, installed it, fired up Windows and configured
everything just to make sure the card was working fine (the last thing you
need is to try and muck about with kernel reconfiguration and stuff when
the hardware itself is broken!).

I booted into Linux and went around hunting for drivers and software for
the card. The first thing you'll need to do before attempting to get your
TV Tuner to work is trying to find out what chipset the card is
using. Fortunately for me this information was made available as soon as I
booted up and ran kudzu (the little hardware probing utility for Red Hat
Linux). The card was detected and I found it was using a Hauppauge 878
chipset. The next thing was to download bttv - which is by far the ONLY
TV tuner driver I could find for Linux. You'll need to install and
configure the driver, and this by far is the hardest part of the whole
thing. Just untar the packages:

tar -xvzf i2c-2.5.4.tar.gz

cd i2c-2.5.4.tar.gz

./configure

make

make install

tar -xvzf bttv-0.7.61.tar.gz

cd i2c-2.5.4.tar.gz

./configure

make

make install

(yes, you'll need to download i2c-2.5.4.tar.gz if you want to make use of
the newer bttv package. Once you've run configure on both the packages
you'll need to copy the modules to /usr/src/linux (the path to this is
dependant on the way your system is configured obviously). The next step
is perhaps the biggest hurdle ever. You're going to have to recompile the
modules. I know some of you are saying why not just insmod the modules
directly? Well yes that is an option under 'normal' circumstances, I found
that I had to do the whole make modules and make modules_install routine
to get this working. Failing to do so and you'll get nothing but a fuzzy
image.

Okay so cd to /usr/src/linux/modules and type the following:

make modules

make modules_install

The first step is probrably going to take quite a while so you might want
to go grab a drink or something while waiting. Once you're done with the
module installation, its time to install them, and start up xawtv (the tv
tuner application). Yes, there are several other offerings including
something called Zapping (for the Gnome environment) but I personally
found that xawtv is by far the better offering. If you've already got
xawtv installed then you can skip the following section. However if you
don't, just download the package and install it as you would with any
other app. Basically as root do the following:

tar -xvzf xawtv_3.41.tar.gz

cd xawtv_3.41.tar.gz

./configure

make

make install

Now you're going to have to insert the modules. Basically you have two
options here, you could either let bttv autodetect your card type and hope
for the best or you could manually override the autodetection and specify
your card (which is indexed by the number in the CARDLIST file (located in
the bttv source directory). To get bttv up and running you're first going
to need to insert the i2c modules followed by bttv itself.

modprobe i2c-core i2c_debug=1

modprobe i2c-algo-bit bit_test=1

modprobe videodev

modprobe bttv card=10

As you can most likely guess the last line inserts bttv and in this case
specifies the card type as Hauppauge new (bt878). Just to make sure
everything went well, issue the following:

tail /var/log/messages

You should see something similar to this:

Apr 15 11:27:20 dog kernel: i2c-core.o: i2c core module

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o: i2c bit algorithm module

Apr 15 11:27:20 dog kernel: Linux video capture interface: v1.00

Apr 15 11:27:20 dog kernel: i2c: initialized

Apr 15 11:27:20 dog kernel: bttv: driver version 0.7.61 loaded

Apr 15 11:27:20 dog kernel: bttv: using 2 buffers with 2080k (4160k total) for capture

Apr 15 11:27:20 dog kernel: bttv: Host bridge needs ETBF enabled.

Apr 15 11:27:20 dog kernel: bttv: Bt8xx card found (0).

Apr 15 11:27:20 dog kernel: bttv0: Bt878 (rev 17) at 00:0f.0, irq: 10, latency: 32, memory: 0xdf000000

Apr 15 11:27:20 dog kernel: bttv0: model: BT878(Hauppauge new (bt878)) [insmod option]

Apr 15 11:27:20 dog kernel: bttv0: enabling ETBF (430FX/VP3 compatibilty)

Apr 15 11:27:20 dog kernel: bttv0: Hauppauge msp34xx: reset line init

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o: Adapter: bt848 #0 scl: 1 sda: 1 -- testing...

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o:1 scl: 1 sda: 0

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o:2 scl: 1 sda: 1

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o:3 scl: 0 sda: 1

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o:4 scl: 1 sda: 1

Apr 15 11:27:20 dog kernel: i2c-algo-bit.o: bt848 #0 passed test.

Apr 15 11:27:20 dog kernel: i2c-core.o: adapter bt848 #0 registered as adapter 0.

Apr 15 11:27:20 dog kernel: bttv: readee error

Apr 15 11:27:20 dog kernel: bttv0: Hauppauge eeprom: invalid

Apr 15 11:27:20 dog kernel: bttv0: Hauppauge eeprom: model=0, tuner= (4), radio=no

Apr 15 11:27:20 dog kernel: bttv0: i2c: checking for MSP34xx @ 0x80... not found

Apr 15 11:27:20 dog kernel: bttv0: i2c: checking for TDA9875 @ 0xb0... not found

Apr 15 11:27:20 dog kernel: bttv0: i2c: checking for TDA7432 @ 0x8a... not found

Apr 15 11:27:20 dog kernel: tvaudio: TV audio decoder + audio/video mux driver

Apr 15 11:27:20 dog kernel: tvaudio: known chips: tda9840,tda9873h,tda9850,tda9855,tea6300,tea6420,tda8425,pic16c54 (PV951)

Apr 15 11:27:20 dog kernel: i2c-core.o: driver generic i2c audio driver registered.

Apr 15 11:27:20 dog kernel: bttv0: i2c attach [pic16c54 (PV951)]

Apr 15 11:27:20 dog kernel: i2c-core.o: client [pic16c54 (PV951)] registered to adapter [bt848 #0](pos. 0).

If you've managed to get this far then give yourself a pat on the back cause you're about to start watching TV. All that's left is to fire up
xawtv and tune in to a station. I found that with the TV Vision card, I didn't have to tune in to anything as it automatically locks into the last
tuned station (from Windows) and that's all you're going to be able to watch. In my case this is fine, since I only want to watch satellite TV
anyway and not anything on the local stations. I guess I'll look into this 'problem' when a time comes around that I actually feel the need to
switch stations but for now everything is all good. So if you've got some cash to spend, and think having the ability to watch soccer or catch up
on the latest crappy boy band is something you can't do without, perhaps a TV tuner is just what the doc suggested. At least you don't have to
waste a precious 30 seconds waiting for your machine to reboot into Windows just to find out there's nothing on!

Reources:

bttv: http://www.strusel007.de/linux/bttv/

xawtv: http://www.strusel007.de/linux/xawtv/index.html

i2c: http://www2.lm-sensors.nu/~lm78/

1.) The Plague - bonghittr
2.) State of the Hack Awards #5 - madsaxon
3.) Part I: CISC and Windows the Hardware Weak Link - Knighty Knight
4.) Napster, MPAA, AOL, and how stupid people in power will kill the first amendment - unfrgvnme
5.) NetBios Shares -- Cracking Windows Machines - madirish
6.) I want my MTV - L33tdawg

Source

Tags

Intel

You May Also Like

Recent News

Friday, November 29th

Tuesday, November 19th

Friday, November 8th

Friday, November 1st

Tuesday, July 9th

Wednesday, July 3rd

Friday, June 28th

Thursday, June 27th

Thursday, June 13th

Wednesday, June 12th

Tuesday, June 11th