# Skype Webcam

## Shazam

Hello!

I recently got a webcam, that on first sight says skype webcam.

my problem, as u might already guessed, is that i can't get it to work.

under Windows it works fine, of course.

Under Windows it is called Cyber Series 7 Camera, lsusb only gives me a 0c45:613e Microdia.

I compiled most of the usb video camera modules in the kernel, hotplug autoloads the sn9c102 driver.

inserting the module manuelly returns folling dmesg

```

Linux video capture interface: v2.00

sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.34

usb 3-2: SN9C120 PC Camera Controller detected (vid/pid 0x0C45:0x613E)

usb 3-2: OV7630 image sensor detected

usb 3-2: Bridge not supported

usbcore: registered new interface driver sn9c102

USB driver sn9c102 lacks resume support.

```

I don't know, how I have to interpret the Bridge not supported part ...

Anyways, I don't get a /dev/video device or anything similar to it.

And obviously 

```

mplayer tv:// -tv driver=v4l:width=352:height=288:device=/dev/video0

```

doesn't give me any output.

BTW, do you know a VoIP program, which has webcam support?

thanx in advance

----------

## bec

kopete, the kde instant messenger has webcam support, but I have never tried it ...

----------

## Shazam

yeah, your right, it has webcam support.

however, i just see a blue screen and have no camera to select.

Any ideas concerning the camera?

----------

## mudrii

did you try to boot from knoppix or gentoo live cd and check if your cam is supported ?

lspci -vvv

lsmod

----------

## zaai

 *Quote:*   

> sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.34

 

Looks like this driver is for V4L2 only, meaning that V4L1 software doesn't know about it. 

Is a device node added under /dev/video* after plugging in the camera? 

Do you have permissions for this device? (are you a member of the video group?)

If the above is yes:

Does the camera show up in xawtv or kdetv?

Alternatively you might try adding V4L1 compatibility  support. That might work better with some apps.

See: device drivers -> multimedia devices -> 

    [*] Video For Linux

    [*] Enable Video For Linux API 1

    ---  Enable Video For Linux API 1 compatiblity layer

----------

## Shazam

well, a /dev/video device isn't created and the v4l1_compat module is already compiled-in and running.

lsmod returns me.

```

vboxdrv                37128  0

sn9c102                94092  0

compat_ioctl32          1408  1 sn9c102

videodev               23808  1 sn9c102

v4l1_compat            12548  1 videodev

v4l2_common            14208  2 sn9c102,videodev

nvidia               6828148  32

```

all drivers, except the vboxdrv are loaded automatically at start up.

and for the permissons, yes, i'm user of the video group, but as the device node is never added, it doesn't matter.

----------

## zaai

Ah, I overlooked "bridge not supported".

Looks like the driver doesn't fully support the OV7630.

I found a thread with a similar issue here:

http://www.linux-projects.org/modules/newbb/viewtopic.php?topic_id=249&forum=3

You might have better luck with a more recent SN9C10x driver as suggested in the above thread, or look here: http://www.linux-projects.org/modules/mydownloads/viewcat.php?cid=2

Your version is 1.34, the latest is v1.48.

This requires kernel 2.6.19 or newer.

Good luck   :Wink: 

----------

## Shazam

now I have a /dev/video device, which doesn't work...

dmesg output of the driver:

```

Linux video capture interface: v2.00

sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.48

usb 5-2: SN9C120 PC Camera Controller detected (vid:pid 0x0C45:0x613E)

usb 5-2: OV7630 image sensor detected

usb 5-2: Initialization succeeded

usb 5-2: V4L2 device registered as /dev/video0

------------[ cut here ]------------

kernel BUG at fs/sysfs/file.c:467!

invalid opcode: 0000 [#1]

PREEMPT SMP

Modules linked in: sn9c102 compat_ioctl32 videodev v4l1_compat v4l2_common usblp usbhid hid nvidia(P) sky2 b2c2_flexcop_pci b2c2_flexcop mt352 mt312 bcm3510 dvb_pll stv0297 nxt200x lgdt330x stv0299 dvb_core i2c_core piix ide_core ehci_hcd uhci_hcd usbcore snd_hda_intel snd_pcm snd_timer snd soundcore snd_page_alloc

CPU:    1

EIP:    0060:[<c0198afd>]    Tainted: P       VLI

EFLAGS: 00010202   (2.6.22-suspend2 #1)

EIP is at sysfs_create_file+0x1b/0x2f

eax: ffbbbd01   ebx: fa3b0d24   ecx: f78ab5dc   edx: fa3b0d00

esi: 00000000   edi: 00000000   ebp: f71cc000   esp: f7445dc8

ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068

Process modprobe (pid: 2721, ti=f7444000 task=c22a3580 task.ti=f7444000)

Stack: f78ab5d4 fa398610 fa3ad42e fa150ee9 f728c524 00000000 0000613e fa39d470

       fa14733a f7b65800 f71ce25c f7b65800 fa3b0c00 fa3b0c34 f7b658e4 fa147e86

       f7b65818 00000000 c024de53 c0356911 f7b6587c f7b6587c c02fa359 f7b65818

Call Trace:

 [<fa398610>] sn9c102_usb_probe+0x57b/0x754 [sn9c102]

 [<fa14733a>] usb_match_one_id+0x1c/0x71 [usbcore]

 [<fa147e86>] usb_probe_interface+0x5d/0x7f [usbcore]

 [<c024de53>] driver_probe_device+0xe1/0x15f

 [<c02fa359>] klist_next+0x58/0x6d

 [<c024df63>] __driver_attach+0x0/0x7f

 [<c024dfac>] __driver_attach+0x49/0x7f

 [<c024d3f3>] bus_for_each_dev+0x33/0x55

 [<c024dcab>] driver_attach+0x16/0x18

 [<c024df63>] __driver_attach+0x0/0x7f

 [<c024d6dd>] bus_add_driver+0x6d/0x170

 [<fa1479d4>] usb_register_driver+0x74/0xf3 [usbcore]

 [<fa13f02e>] sn9c102_module_init+0x2e/0x4f [sn9c102]

 [<c013fcc9>] sys_init_module+0x1528/0x165f

 [<c015c57e>] unmap_region+0xfc/0x11a

 [<c0169868>] vfs_read+0x88/0x10a

 [<c0103d3a>] sysenter_past_esp+0x5f/0x85

 [<c02f0000>] unix_seq_show+0xbc/0x11f

 =======================

Code: 74 e8 a2 2f 16 00 89 f8 83 c4 1c 5b 5e 5f 5d c3 53 89 c1 89 d3 85 c0 74 12 83 78 30 00 0f 94 c0 85 d2 0f 94 c2 09 d0 a8 01 74 04 <0f> 0b eb fe 8b 41 30 b9 04 00 00 00 89 da 5b e9 61 ff ff ff 57

EIP: [<c0198afd>] sysfs_create_file+0x1b/0x2f SS:ESP 0068:f7445dc8

```

I'm using supsend2-sources-2.6.22, but i'll try another kernel, maybe the gentoo-sources ...

----------

## Shazam

Okay, got the driver running with the 2.6.19-gentoo-r7 kernel.

however, mplayer still returns me an error and kopete still has the 'blue screen'

mplayers output is:

```

mplayer tv:// -tv driver=v4l2:width=352:height=288:device=/dev/video0

MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team

CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 3, Stepping: 4)

CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1

Compiled with runtime CPU detection.

Playing tv://.

TV file format detected.

Selected driver: v4l2

 name: Video 4 Linux 2 input

 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>

 comment: first try, more to come ;-)

v4l2: ioctl get standard failed: Invalid argument

Selected device: SN9C1xx PC Camera

 Capabilites:  video capture  read/write  streaming

 supported norms:

 inputs: 0 = Camera;

 Current input: 0

 Current format: unknown (0x4745504a)

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

v4l2: ioctl query control failed: Invalid argument

v4l2: ioctl query control failed: Invalid argument

v4l2: ioctl query control failed: Invalid argument

v4l2: ioctl query control failed: Invalid argument

FPS not specified in the header or invalid, use the -fps option.

No stream found.

v4l2: ioctl set mute failed: Invalid argument

v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)

shark shazam # mplayer tv:// -tv driver=v4l:width=352:height=288:device=/dev/video0

MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team

CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 3, Stepping: 4)

CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1

Compiled with runtime CPU detection.

Playing tv://.

TV file format detected.

Selected driver: v4l

 name: Video 4 Linux input

 author: Alex Beregszaszi

 comment: under development

=================================================================

 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!

 As the V4L1 compatibility layer is broken, this may not work.

 If you encounter any problems, use driver=v4l2 instead.

 Bugreports on driver=v4l with v4l2 drivers will be ignored.

=================================================================

ioctl get capabilites failed: Invalid argument

Exiting... (End of file)

```

and thanks so far! seems to be the right way  :Wink: 

----------

## zaai

Very good, we're getting close. Sofar the easy part.

The hard part is to find software that can handle v4l2 camera's decently. Its a pretty sad affair IMHO. I suspect the drivers are partly to blame for this.

* mplayer doesn't work for me either. Maybe some clever person can figure out what options apply in this case. 

* tvtime is superb but doesn't support v4l2.

* Kopete v4l2 support is flimsy. Some people are lucky. It sometimes works for me and sometimes doesn't.

* motion did work for me in the past but it requires some patches and I can't get it to work any more.

* xawtv doesn't work for me today

* kdetv decides its doesn't want to play today either

* luvcview is a viewer for uvcvideo drivers and is the only one that works at the moment

I'm open for suggestions and tips here.

----------

