v4l2 usage question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi folks,

	How can I tell if v4l2 is available to my applications?  I know this
may seem silly but my capture apps act as though v4l2 does not exist.

I am using kernel 2.4.18 patched with v4l2-20020205.tar.gz from the site:
http://bytesex.org/patches/2.4.18/

Compiled v4l as module, BT848 as module (I have an Hauppauge bt878 card),
then I run the following insmods:

insmod i2c-core
insmod i2c-algo-bit
insmod i2c-dev
insmod i2c-proc
insmod videodev
insmod v4l2-common
insmod bttv card=10 tuner=2 gbuffers=10   <-- no longer has "v4l2=1" param?
insmod tuner type=2
insmod msp3400
insmod soundcore
insmod btaudio

The btaudio actually works great on this card so I've avoided putting a sound
card in this (server) box.  Next I set up for TV capture (NTSC) through my
cable box:

/usr/local/bin/v4lctl -c /dev/video0 setnorm ntsc
/usr/local/bin/v4lctl -c /dev/video0 setinput Television
/usr/local/bin/v4lctl -c /dev/video0 setchannel 3

For capture, I've been working with mp1e.  Under v4l1, mp1e's output begins
to have A/V sync problems well before the end of my 30-minute show.  On the
zapping mailing list, somebody said this problem was fixed under v4l2.  But
mp1e fails to detect v4l2 with this code from mp1e-1.9.1/video/v4l2.c (same
as recent CVS):

        if (IOCTL(fd, VIDIOC_QUERYCAP, &vcap) == -1) {
                close(fd);
                return NULL; /* Supposedly no V4L2 device, we'll try V4L */
        }

I have patched mp1e to open /dev/video O_RDWR and mmap PROT_READ|PROT_WRITE
as suggested here on video4linux-list.

I do not think this is a bug in mp1e, or else I would not bother you folks
here on this list.  I think my config of v4l2 is incorrect somehow, because
FFMPEGrec (from NVrec-20020318 package) also fails to use v4l2.

Does v4l2 use different device numbers?  I have ones that worked for v4l1:

lrwxrwxrwx    1 root     root      11 Mar 10 01:39 /dev/video -> /dev/video0
crw-rw-rw-    1 root     root   81, 0 Mar 10 01:39 /dev/video0
crw-rw-rw-    1 root     root   81, 1 Mar 10 01:39 /dev/video1
crw-rw-rw-    1 root     root   81, 2 Mar 10 01:39 /dev/video2
crw-rw-rw-    1 root     root   81, 3 Mar 10 01:39 /dev/video3

...but I have searched for an updated MAKEDEV for v4l2 or someone discussing
mknod options and found nothing.

Oh please tell me I've done something very simple very wrong!  I'm at my wits
end with this A/V sync problem.

Here's my dmesg and lsmod output:

Linux video capture interface: v1.00
bttv: driver version 0.7.91 loaded
bttv: using 10 buffers with 2080k (20800k total) for capture
bttv: Host bridge is Advanced Micro Devices [AMD] AMD-760 [Irongate] System Controller
bttv: Bt8xx card found (0).
PCI: Found IRQ 12 for device 00:0c.0
PCI: Sharing IRQ 12 with 00:0a.0
PCI: Sharing IRQ 12 with 00:0c.1
bttv0: Bt878 (rev 17) at 00:0c.0, irq: 12, latency: 32, memory: 0xe3042000
bttv0: detected: Hauppauge WinTV [card=10], PCI subsystem ID is 0070:13eb
bttv0: using: BT878(Hauppauge (bt878)) [card=10,insmod option]
bttv0: Hauppauge/Voodoo msp34xx: reset line init [5]
bttv0: i2c attach [client=EEPROM chip,ok]
i2c-core.o: client [EEPROM chip] registered to adapter [bt848 #0](pos. 0).
i2c-dev.o: Registered 'bt848 #0' as minor 1
i2c-core.o: adapter bt848 #0 registered as adapter 1.
bttv0: Hauppauge eeprom: model=44371, tuner=Philips FM1236 (2), radio=yes
bttv0: i2c: checking for MSP34xx @ 0x80... found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
i2c-core.o: driver i2c TV tuner driver registered.
tuner: ignoring SMBus Via Pro adapter at 5000 i2c adapter [id=0x40002]
tuner: probing bt848 #0 i2c adapter [id=0x10005]
tuner: chip found @ 0xc2
bttv0: i2c attach [client=Philips NTSC,ok]
i2c-core.o: client [Philips NTSC] registered to adapter [bt848 #0](pos. 1).
i2c-core.o: driver i2c msp3400 driver registered.
msp34xx: init: chip=MSP3435G-B6, has NICAM support
msp3410: daemon started
bttv0: i2c attach [client=MSP3435G-B6,ok]
i2c-core.o: client [MSP3435G-B6] registered to adapter [bt848 #0](pos. 2).
btaudio: driver version 0.6 loaded [digital+analog]
PCI: Found IRQ 12 for device 00:0c.1
PCI: Sharing IRQ 12 with 00:0a.0
PCI: Sharing IRQ 12 with 00:0c.0
btaudio: Bt878 (rev 17) at 00:0c.1, irq: 12, latency: 32, memory: 0xe3043000
btaudio: registered device dsp0 [digital]
btaudio: registered device dsp1 [analog]
btaudio: registered device mixer0

Module                  Size  Used by
btaudio                10000   0  (unused)
soundcore               3376   3  [btaudio]
msp3400                14480   1 
tuner                   8368   1 
bttv                   66736   0  (unused)
v4l2-common             4400   0  (unused)
videodev                5664   3  [bttv]
i2c-dev                 3776   0  (unused)
i2c-algo-bit            7136   1  [bttv]
eeprom                  3520   0  (unused)
lm80                    5456   0  (unused)
i2c-proc                6288   0  [eeprom lm80]
i2c-viapro              3840   0  (unused)
i2c-core               12448   0  [msp3400 tuner bttv i2c-dev i2c-algo-bit eeprom lm80 i2c-proc i2c-viapro]

-Nathan Bradshaw
 nb@xxxxxxxxxxxx






[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux