Re: My Microdia (SN9C201) webcam doesn't work properly in Linux anymore

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

 



Hi,

On 03/04/2012 10:58 PM, Xavion wrote:
Hi Jean-Francois

I can confirm that GSPCA v2.15.1 removes the bad pixels when I use
Cheese or VLC.  However, I'm sorry to report that the Motion problems
unfortunately still remain.  Is there something else I must do to
overcome the below errors?  I'm happy to keep testing newer GSPCA
versions for you until we get this fixed.

I guess that motion is using the JPG compressed frames rather then
the i420 like special format these cameras also support, and it looks
like we don't reserve enoug space to buffer these frames. To fix this
we need to enlarge the size we reserve per frame in the sn9c20x driver,
edit sn9c20x.c and search for vga_mode, in that table you will
find a factor "4 / 8" (its in there 3 times), change all 3 occurences
to "5 / 8" and try again, then "6 / 8", etc.

Normally I would be suspicious about SOF / EOF detection when we
need such a factor, but the timestamps in your log exactly match 30
fps, so that seems to be fine. And in my experience with the USB bandwidth
stuff the sn9c20x does seem to compress less then other JPG cams, so
it makes sense that it needs bigger buffers to store the frames too.

Alternatively you can try if motion can be made to use a different format
then JPG, by forcing it to use libv4l by starting it like this:
LD_PRELOAD=/usr/lib/libv4l/v4l1-compat.so motion

Note if you're on a rpm based 64 bit distro and motion is 64 bit too
that should be:
LD_PRELOAD=/usr/lib64/libv4l/v4l1-compat.so motion

But that would just be working around the issue, it is better to
fix the issue with using the JPG mode of the camera instead.

Regards,

Hans







`-->  tail /var/log/kernel.log
Mar  5 08:25:52 Desktop kernel: [ 6673.781987] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:52 Desktop kernel: [ 6673.813992] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6673.849986] gspca_main: frame
overflow 155693>  155648
Mar  5 08:25:53 Desktop kernel: [ 6673.881989] gspca_main: frame
overflow 156021>  155648
Mar  5 08:25:53 Desktop kernel: [ 6673.917991] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6673.949993] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6673.985990] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6674.021981] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6674.053985] gspca_main: frame
overflow 156309>  155648
Mar  5 08:25:53 Desktop kernel: [ 6674.089989] gspca_main: frame
overflow 156309>  155648


`-->  tail /var/log/errors.log
Mar  5 08:24:16 Desktop motion: [1] v4l2_next: VIDIOC_QBUF: Invalid argument
Mar  5 08:24:16 Desktop motion: [1] Video device fatal error - Closing
video device
Mar  5 08:24:20 Desktop motion: [1] Retrying until successful
connection with camera
Mar  5 08:24:27 Desktop motion: [1] v4l2_next: VIDIOC_DQBUF: EIO
(s->pframe 3): Input/output error
Mar  5 08:24:27 Desktop motion: [1] v4l2_next: VIDIOC_QBUF: Invalid argument
Mar  5 08:24:27 Desktop motion: [1] Video device fatal error - Closing
video device
Mar  5 08:24:30 Desktop motion: [1] Retrying until successful
connection with camera
Mar  5 08:24:33 Desktop motion: [1] v4l2_next: VIDIOC_DQBUF: EIO
(s->pframe 0): Input/output error
Mar  5 08:24:33 Desktop motion: [1] v4l2_next: VIDIOC_QBUF: Invalid argument
Mar  5 08:24:33 Desktop motion: [1] Video device fatal error - Closing
video device
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux