[sane-devel] Can't access bttv card

rob at mediasolution.it rob at mediasolution.it
Tue Aug 20 10:27:30 BST 2002


Hi All,

This is my first post to the ML. I'd like to be more contributive, but 
right now I'm quite busy with other kinds of work.


> > I know that the card works because I can run xawtv and get a picture.

> Does scanimage -L show your v4l device?

Does V4L devices detection works at all?

I mean, looking at the code inside V4L, in sane_init there's a call to 
attach that reads:

605:               attach(dev_name, 0);

But in the attach function, declared you find:

178:     static SANE_Status 
179:     attach(const char *devname, V4L_Device **devp)
180:     {
181:         V4L_Device *q;
182: 
183:         if(!devp)
184:             return SANE_STATUS_INVAL;
185: 
186:         errno = 0,

Providing a pointer from the sane_init function does allow to list V4L 
devices again, but I've still seen too little of the V4L code to 
understand why the attach function isn't called with a valid devp from 
sane_init.
The CVS commit code (I think.. or maybe the Changelog) say something about 
avoiding memory leaks, and that's what could happen here if the list 
created in attach isn't freed, as it should happen when you only call 
sane_init().

BTW, since in sane_open the attach function is called with full 
parameters, the device should work. You only have to give the full device 
name to the scanning program, that is   v4l:/dev/video0   or v4l:/dev/bttv

BTW, I'm here to try to be able to use the V4L interface with a USB webcam 
(OV511), and that still continue do be broken, maybe due to some changes 
in the way the kernel interface with the device changed recently: I think 
this may be the case because the cam works with xawtv, but doesn't with 
KWinTV. And since xawtv is from Gert Knorr (aka V4L mantainer...).

Latest news: I just tried both bttv and ov511 on another computer I have 
here, with SuSE's sane 1.0.7: I get a segfault from my BTTV card, and a 
black screen from by OV511 webcam, and a segfault after a while. I'll try 
with selfcompiled 1.0.8, but maybe sane V4L suport for V4L in  kernel 
2.4.? is "a little" broken...


Ciao,
    Roberto.





More information about the sane-devel mailing list