trouble with sn9c20x.ko

768 views
Skip to first unread message

David Mebane

unread,
Feb 4, 2010, 7:28:27 PM2/4/10
to microdia
Hi folks,

I know I am a little behind, but i just upgraded my kernel to 2.6.27-16, and so I had to recompile the webcam drivers.  And now it's not working.

Here's what I do:

   $ sudo mknod /dev/video0 c 81 0
   $ sudo modprobe videodev
   $ sudo modprobe -v compat_ioctl32
   $ sudo insmod sn9c20x.ko

When I run

   $ mplayer tv:// -tv driver=v4l2:width=640:height=480:outfmt=i420:fps=30

I get

MPlayer 1.0rc2-4.3.2 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olsch...@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: SN9C20x USB 2.0 Webcam Driver
 Capabilites:  video capture  read/write  streaming
 supported norms:
 inputs: 0 = Webcam;v4l2: ioctl get input failed: Invalid argument

 Current input: 1
 Current format: unknown (0x30323953)
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Cannot find codec matching selected -vo and video format 0x30323953.
Read DOCS/HTML/en/codecs.html!
==========================================================================

v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)


The relevant-looking part of dmesg is


[18716.235952] Linux video capture interface: v2.00
[18829.774461] sn9c20x: SN9C20X USB 2.0 Webcam - 0C45:624F plugged-in.
[18829.885532] sn9c20x: Detected OV9650 Sensor.
[18829.885706] sn9c20x: Webcam device 0C45:624F is now controlling video device /dev/video0
[18829.885867] input: SN9C20X Webcam as /devices/pci0000:00/0000:00:1d.7/usb5/5-4/input/input8
[18829.927397] sn9c20x: No ack from I2C slave 0x30 for write to address 0x17
[18829.931496] sn9c20x: Using yuv420 output format
[18829.931563] usbcore: registered new interface driver sn9c20x
[18829.931569] sn9c20x: SN9C20x USB 2.0 Webcam Driver v2009.04 loaded
[18976.539926] sn9c20x: Using yuv420 output format
[18976.546680] sn9c20x: Using yuv420 output format
[18976.553554] sn9c20x: Using yuv420 output format
[19117.586283] sn9c20x: Using yuv420 output format
[19358.558051] process `skype' is using obsolete setsockopt SO_BSDCOMPAT
[19975.081756] sn9c20x: Using yuv420 output format
[19975.101228] sn9c20x: Using yuv420 output format
[19975.106011] sn9c20x: Using yuv420 output format
[20209.535218] sn9c20x: Using yuv420 output format
[20209.542318] sn9c20x: Using yuv420 output format
[20209.547693] sn9c20x: Using yuv420 output format
[20250.027806] sn9c20x: Using yuv420 output format
[20250.034302] sn9c20x: Using yuv420 output format
[20250.039677] sn9c20x: Using yuv420 output format


Any help is much appreciated.


-David

Brian Johnson

unread,
Feb 4, 2010, 11:15:37 PM2/4/10
to micr...@googlegroups.com
David,
Well first of all you should not actually need to do a mknod since
devfs automatically creates and removes device nodes as needed. The
problem that i see is that it does not appear from hat you typed that
you are using libv4l libraries. These are needed as many applications
including mplayer do not natively support the image output format used
by the sn9c20x driver.

After installing libv4l you can use it with mplayer via the following
command line
$ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv:// -tv


driver=v4l2:width=640:height=480:outfmt=i420:fps=30

I should also point out that this driver is actually deprecated in
favor of the a newer gspca based driver that can be obtained from the
v4l-dvb tree at linuxtv.org. That tree also contains the latest
version of libv4l as well.


Brian Johnson

> --
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia

David Mebane

unread,
Feb 6, 2010, 2:43:14 PM2/6/10
to micr...@googlegroups.com
Brian,

Thanks -- I actually did have libv4l installed, but not making the node (I think it had to be done before) does the trick.  I also have to start skype with the preloaded v4l2compat.so (a 32-bit one -- my system is 64-bit), but that also now works.

I remember two years ago or so when I happened upon you guys -- there had been much hand-wringing among various Linux user groups about when gspca would get around to our camera types.  I guess that all finally happened, eh?  Any particular advantage to migrating over to their version?



Josua Grawitter

unread,
Feb 6, 2010, 3:02:05 PM2/6/10
to micr...@googlegroups.com
Brian actually wrote that driver himself and integrated it into the gspca framework.

There are two advantages:
The gspca driver is in mainline/vanilla/linus kernel and thus shipped with every major distribution; no need to compile and configure stuff yourself. So basically using kernel 2.6.31 or later saves a lot of time.
Also this (non-gspca) driver isn't under development anymore. There are no bug fixes (or rather no bug reports) or new features and of course no support for new kernel versions being introduced to the repository.

Good luck,
GWater

Reply all
Reply to author
Forward
0 new messages