Click to See Complete Forum and Search --> : installing bttv with gentoo-2.6.5


tony_yum
05-07-2004, 11:13 AM
I'm have a Hauppauge 88x PCI card and wish to watch some TV under my gentoo box.

I compiled and installed bttv successfully, but when I typed
modprobe bttv

I get

FATAL: Error inserting bttv (/lib/modules/2.6.5-gentoo/v4l2/bttv.ko): Unknown symbol in module, or unknown parameter (see dmesg)


Any idea?

je_fro
05-07-2004, 11:29 AM
tail -f /var/log/everything/current

See what else it tells you.

tony_yum
05-07-2004, 10:49 PM
part of the tail of my log files that are relevent are

May 8 03:43:23 jin bttv: Unknown symbol i2c_bit_add_bus
May 8 03:43:23 jin bttv: Unknown symbol i2c_bit_del_bus

Does this give more insight to my problem?

bwkaz
05-07-2004, 10:55 PM
How did you install the bttv module?

Have you run /sbin/depmod -ae since installing it?

bttv is dependent on i2c modules (the i2c modules provide the symbols that your kernel log says are missing). Normally, modprobe is able to load up the i2c modules when bttv is inserted, because depmod -ae updates a dependency file that says that bttv depends on certain i2c modules. modprobe uses that dependency file to load up the i2c stuff before bttv. But if you haven't run depmod, that file won't be up to date.

If you just created a bttv.o somehow and copied it into your /lib/modules/*/kernel directory somewhere, then you need to also install the i2c drivers (specifically, "I2C bit-banging interfaces" in the kernel menuconfig) before it'll be able to work.

tony_yum
05-09-2004, 05:12 PM
I did

/sbin/depmod -ae

Doesn't work

and then I compiled the kernel with i2c-dev

did
modprobe i2c-dev

then
modprobe bttv and I still get the same error message. :(

mdwatts
05-09-2004, 05:34 PM
Originally posted by tony_yum

I compiled and installed bttv successfully, but when I typed
modprobe bttv


Isn't bttv and i2c support already included with the 2.4 or 2.6 kernels?

From my stock kernel

/lib/modules/2.4.21-202-smp4G/kernel/drivers/media/video/bttv.o

Any reason why you need to compile bttv support separately?

maccorin
05-09-2004, 05:49 PM
Originally posted by mdwatts
From my stock kernel

/lib/modules/2.4.21-202-smp4G/kernel/drivers/media/video/bttv.o
[/B]

When i hear "stock kernel" i think kernel.org... apparently you think kernel.org+suse's patches

i2c _is_ in the kernels from kernel.org but you have to make sure you compile it in or at least as a module

in make menuconfig go to

device drivers -> i2c support

mdwatts
05-09-2004, 05:52 PM
Originally posted by maccorin
When i hear "stock kernel" i think kernel.org... apparently you think kernel.org+suse's patches

i2c _is_ in the kernels from kernel.org but you have to make sure you compile it in or at least as a module

in make menuconfig go to

device drivers -> i2c support

I would think all distro kernels would have bttv and i2c available to be enabled/disabled.

If tony_yum compiled the kernel himself, then he must have omitted enabling both bttv and i2c support.

maccorin
05-09-2004, 06:13 PM
Originally posted by mdwatts
I would think all distro kernels would have bttv and i2c available to be enabled/disabled

have you ever used a distro that didn't include everything + the kitchen sink :/

maccorin
05-09-2004, 06:17 PM
i just grepped the source code for you

those symbols are defined drivers/i2c/algos/i2c-algo-bit.c

so make sure you have CONFIG_I2C_ALGOBIT set

(stole that from the Makefile ;p)

mdwatts
05-09-2004, 06:28 PM
And to add what maccorin posted, this is from the 2.4 kernel's Configure.help in the Documentation directory and should be in the kernel config help.


BT848 Video For Linux
CONFIG_VIDEO_BT848
Support for BT848 based frame grabber/overlay boards. This includes
the Miro, Hauppauge and STB boards. Please read the material in
<file:Documentation/video4linux/bttv> for more information.

If you say Y or M here, you need to say Y or M to "I2C support" and
"I2C bit-banging interfaces" in the character device section.

This driver is available as a module called bttv.o ( = code
which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read <file:Documentation/modules.txt>.

bwkaz
05-09-2004, 09:26 PM
Originally posted by tony_yum
I did

/sbin/depmod -ae

Doesn't work OK... but what does it do?

tony_yum
05-10-2004, 06:15 PM
:) Thanx ppl. I managed to load the module now. I compiled bttv with my own kernel source and also had CONFIG_I2C_ALGOBIT=m

then

modprobe i2c-algo-bit
modprobe bttv

doing

lsmod | grep bttv

I get this

bttv 141036 0
video_buf 17028 1 bttv
v4l2_common 4864 1 bttv
btcx_risc 3848 1 bttv
videodev 7424 1 bttv
i2c_algo_bit 8840 1 bttv
i2c_core 18180 2 bttv,i2c_algo_bit

But I still don't have /dev/video*

go_away
05-10-2004, 06:28 PM
are you using devfs, udev, or static /dev?

are you _sure_ that it would be called /dev/video (I've never used the video4linux stuff, so i don't know).

bwkaz
05-10-2004, 07:03 PM
If you're using a static /dev, you can create the /dev/video* files with mknod.

They're character devices, and all of them are on major number 81. /dev/video0 is minor 0, /dev/video0 is minor 1, etc., etc.

tony_yum
05-11-2004, 09:53 AM
I not sure whether I'm using devfs, udev, or static /dev . . . I thought devfs is being phased out now? I'm using gentoo with kernel 2.6.5 what's the default /dev?

I've never used mknod before. Do I do this to make video0?

mknod /dev/video0 c 81 0

I managed to create the device, but running kdetv still says no device found.

mdwatts
05-11-2004, 10:13 AM
Originally posted by tony_yum

I've never used mknod before. Do I do this to make video0?

mknod /dev/video0 c 81 0

I managed to create the device, but running kdetv still says no device found.

That would be correct

cd /dev

mknod video0 c 81 0
mknod video1 c 81 1
mknod video2 c 81 2
mknod video3 c 81 3

I also have a symlink from video0 to video which you can create manually with

ln -s /dev/video0 /dev/video

go_away
05-11-2004, 10:42 AM
doesn't gentoo use devfs?

tony_yum
05-11-2004, 11:00 AM
How can I tell what /dev type I'm using and what difference does it make?

Anyway I've followed the instruction to create video0,1,2,3 and the sym link video and did chmod 777 video*

Made sure I have load "v4l" in the XF86Config and tried doing kdetv, it still complains no device found.

I read from kdetv.org that I need to enable video4linux plug-in. How do I do that?

tony_yum
05-11-2004, 11:07 AM
I tried

xawtv

And I got

This is xawtv-3.86, running on Linux/i686 (2.6.5-gentoo)
can't open /dev/v4l/video0: No such device
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/v4l/video0: No such device
v4l2: open /dev/v4l/video0: No such device
v4l: open /dev/v4l/video0: No such device
no video grabber device available

I so guess it must be looking for video inside the /dev/v4l directory so I did the same mknod in the /dev/v3l directory made usre it's read and writable for all and tried again. The same error message appears.

mdwatts
05-11-2004, 02:00 PM
You might want to check to see which devfs Gentoo uses.

Perhaps the Gentoo forums would help with bttv and /dev/video as I would imagine others have had the same or similar problem.

bwkaz
05-11-2004, 06:27 PM
Gentoo's default install (for 2.4 at least) does use devfs, but I really hoped they would get a clue when it was deprecated in 2.6 and move away from it. Maybe not, rats.

Anyway, you can tell if you're using devfs by looking for a character device named /dev/.devfsd -- if that device file exists, then devfs is mounted and in use.

Otherwise, you have either a static /dev or you're using udev. To tell the difference, look at /dev before and after loading up a hardware module (for exampe, the one for your sound card). It wasn't until recent 2.6 kernels (either after 2.6.2 or after 2.6.4) that most drivers started to generate hotplug events that cause udev to do its thing. If you see more devices after loading the sound card module, then you're using udev. Otherwise, it's a static /dev.

The files are generally called /dev/v4l/video* when the application was configured to use devfs names (so maybe that gives a hint as to what you should see in the testing above); and yes, that sucks if you're not using devfs...

Now, as for the error. The "No such device" error does not mean that the device files in question do not exist. If they did not exist, you'd get "No such file or directory" errors instead. What "No such device" means is that the file exists, but nothing in the kernel has "claimed" it, so the kernel doesn't know where to route open()s, read()s, write()s, and ioctl()s to. By far, the most common issue that causes this is either not loading the module that drives a certain device file (in your case, bttv), or using the wrong major or minor number (or the wrong device type -- block and character are different) when you created the device node.

You have to not reboot after modprobe'ing bttv, if you are... other than that, I'm not too sure...

tony_yum
05-12-2004, 07:26 PM
Yer I checked it has /dev/.devfsd so what does that imply?

I checked that my modules are loaded

$ lsmod | grep bttv

bttv 141036 0
video_buf 17028 1 bttv
i2c_algo_bit 8840 1 bttv
v4l2_common 4864 1 bttv
btcx_risc 3848 1 bttv
i2c_core 18180 2 bttv,i2c_algo_bit
videodev 7424 1 bttv

$ ls -l /dev/v4l/v*

lr-xr-xr-x 1 root root 6 May 12 22:32 /dev/v4l/video -> video0
crw-rw---- 1 root video 81, 0 May 12 22:32 /dev/v4l/video0
crw-rw---- 1 root video 81, 1 May 12 22:32 /dev/v4l/video1
crw-rw---- 1 root video 81, 2 May 12 22:32 /dev/v4l/video2
crw-rw---- 1 root video 81, 3 May 12 22:32 /dev/v4l/video3


as root, I did

$xawtv

This is xawtv-3.86, running on Linux/i686 (2.6.5-gentoo)
can't open /dev/v4l/video0: No such device
v4l-conf had some trouble, trying to continue anyway
v4l2: open /dev/v4l/video0: No such device
v4l2: open /dev/v4l/video0: No such device
v4l: open /dev/v4l/video0: No such device
no video grabber device available


Do you think I've loaded the module properly?

bwkaz
05-12-2004, 09:53 PM
Since this is 2.6, devfs might be broken for the newer V4L(2) driver. Does it help to boot passing devfs=nomount to your kernel?

I'm using the same TV card chipset as you (BT878 -- though it's not a Hauppage but rather an ATI TV Wonder VE, it's the same chipset), and lsmod | grep bttv shows just about the same results. But xawtv starts up just fine.

I assume you can't cat /dev/v4l/video0 (you get the same error), correct? Try it with devfs mounted and then again with it not mounted (though with it not mounted, you'll have to use just plain /dev/video0).

tony_yum
05-13-2004, 07:31 PM
With devfs=nomount Now when I do

$ cat /dev/v4l/video0
cat: /dev/v4l/video0: Permission denied
$ cat /dev/video0
cat: /dev/video0: No such device

Is there anyway of probing whether my PC actually detected my TV card?

je_fro
05-13-2004, 07:53 PM
You need to make some changes so you can access the v4l stuff...have a look at /etc/security/console.perms


<console> 0600 <joystick> 0600 root
<console> 0660 <v4l> 0660 root.video
<console> 0700 <gpm> 0700 root

You want it to look like that down at the bottom. This is how you want the permissions to be set at every boot. Otherwise you'll always have to chmod the devices. Alsa screwed me for awhile until I did this:

#<console> 0600 <sound> 0600 root.audio

:p :p :p

bwkaz
05-13-2004, 09:35 PM
Originally posted by tony_yum
$ cat /dev/video0
cat: /dev/video0: No such device Is bttv loaded still (again)? Without devfs, it won't load automatically... though that is kind of farfetched...

Is there anyway of probing whether my PC actually detected my TV card? dmesg and look for messages from the bttv driver.

lspci to see if the card is detected at all (if not, try moving to a different PCI slot, or try disabling PnP OS in your BIOS). Though if it wasn't detected at all, then modprobe'ing bttv would complain, I would think.

tucolino
05-14-2004, 12:35 AM
i also have a hauppauge card. i'm using gentoo as well. i set it up a while ago. if i rememeber correctly, i might have had to create a symbolic link for it. check to see if you have:

/dev/v4l/video0

and do:

ln -s /dev/v4l/video0 /dev/video0

also, using lspci should give you something like:

00:0e.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
00:0e.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

hope that helps.

tuco

tony_yum
05-15-2004, 06:25 AM
and do:

ln -s /dev/v4l/video0 /dev/video0

I tired creating a symlink from /dev/v4l/video0 to /dev/video0, no luck.

also, using lspci should give you something like:

00:0e.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
00:0e.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)


I get something differet when I do lspci

$ lspci | grep Multimedia
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB (ICH4) AC'97 Audio Controller (rev 01)
02:00.0 Multimedia video controller: Conexant: Unknown device 8800 (rev 03)
02:00.1 Multimedia controller: Conexant: Unknown device 8811 (rev 03)
02:0c.0 Multimedia audio controller: Yamaha Corporation YMF-724 (rev 02)


You need to make some changes so you can access the v4l stuff...have a look at /etc/security/console.perms

I tried doing cat as root I complains no device.

bwkaz
05-15-2004, 10:52 AM
Conexant? That's not a Hauppage card, I don't think... but if it is, it's not a Brooktree chip, so the bttv driver is not the correct one to be using.

Unless some other device in the output of lspci is a Brooktree device? I wouldn't think so.

Do you have the PnP OS setting turned off in your BIOS?

tony_yum
05-16-2004, 06:32 AM
I'm sure it is hauppauge because that's how it is recognised when I boot up windows. Do you think linux has recognised it wrongly?

Also I can't find the PnP OS setting in the BIOS, but I think it's on coz the card works fine in Windows.

Anyway I think I might try installing fedora core and see if it works there

bwkaz
05-16-2004, 02:30 PM
Originally posted by tony_yum
Do you think linux has recognised it wrongly? I trust the Linux PCI detection much more than I trust the Windows one, myself. If I had to guess between the two, I'd say that the Windows drivers for this card are reporting an incorrect manufacturer or something.

What does it say on the box that the card came in?

Also I can't find the PnP OS setting in the BIOS, but I think it's on coz the card works fine in Windows. That's not what the option means, though. It does not actually have (hardly) anything to do with PnP. When the option is on, then the BIOS does not initialize (assign resources to) any PCI device that is not considered critical for booting. This means that half the time (or so), Linux does not even see that device, because it has not yet been initalized.

When the setting is off, the BIOS initalizes everything in the system.

Windows will work with the setting either way. Linux will work reliably only with the setting off.

Is there another V4L driver that's supposed to work with Conexant chips?

bwkaz
05-22-2004, 11:11 AM
Originally posted by bwkaz
Is there another V4L driver that's supposed to work with Conexant chips? When configuring my new kernel 2.6.6 to support udev better, I saw this driver and remembered this thread:

Device Drivers -> Multimedia devices -> Video For Linux -> Conexant 2388x (bt878 successor) support

The help says:

CONFIG_VIDEO_CX88:

This is a video4linux driver for Conexant 2388x based
TV cards.

To compile this driver as a module, choose M here: the
module will be called cx8800 So it may be Hauppage with the replacement chipset from Conexant, actually. Might that cx8800 module be what you need?

tony_yum
05-23-2004, 12:06 PM
Thanx. You're right windows got the wrong device it is Conexant. I compiled the modules for cx8800 and cx88xx, installed and loaded it in the kernel. Now neither kdetv nor xawtv complain about device not found. But when I run them I get segmentation fault. I've attached the error.

bwkaz
05-23-2004, 01:33 PM
I have no idea about the kdetv error, but the xawtv error seems to be indicating invalid ioctl()s done on the v4l device...

Can you get a newer version of xawtv to try? I use 3.90, and that may not even be the most recent anymore.

Does it help to pass -noxv to xawtv?

tony_yum
05-23-2004, 01:40 PM
passing -noxv make it crash even sooner

This is xawtv-3.86, running on Linux/i686 (2.6.5-gentoo)
/dev/v4l/video0 [v4l2]: no overlay support
v4l-conf had some trouble, trying to continue anyway
Warning: Cannot convert string "-*-ledfixed-medium-r-*--39-*-*-*-c-*-*-*" to type FontStruct
/root/.xawtv:15: syntax error
config: invalid value for input: (null)
valid choices for "input": "Television", "for debug only", "Composite1"
Xlib: extension "XFree86-DRI" missing on display ":0.0".


I've started a emerge world not long ago so I think it's going to take the rest of the day emerging. Once that's done I could try the new xawtv.

Just wondering, it says extension "XFree86-DRI" missing on display ":0.0" does that been I need DRI for my TV card to work?