qc-usb driver does not work anymore with 2.6.27-2.3

Bug #268134 reported by Sebastian Keller
14
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

gst-launch-0.10 v4lsrc autoprobe-fps=false device=/dev/video0 ! "video/x-raw-yuv, format=(fourcc)YUY2, width=360, height=296, framerate=(fraction)15/2" ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /pipeline0/v4lsrc0: Could not get/set settings from/on resource.
Additional debug info:
v4l_calls.c(198): gst_v4l_open (): /pipeline0/v4lsrc0:
Device opened, but wrong type (0x0)
Setting pipeline to NULL ...
FREEING pipeline ...

The according lines from gst-plugins-base/sys/v4l/v4l_calls.c:
  if ((GST_IS_V4LSRC (v4lelement) &&
          !(v4lelement->vcap.type & VID_TYPE_CAPTURE))) {
...
    GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
        ("Device opened, but wrong type (0x%x)", v4lelement->vcap.type));

Nothing strange in dmesg.

lsusb: Bus 004 Device 002: ID 046d:0840 Logitech, Inc. QuickCam Express

Also ekiga does not recognize that cam anymore.

As I noticed some changes to that module regarding v4l2 I tried v4l2src, too:
gst-launch-0.10 v4l2src device=/dev/video0 ! "video/x-raw-yuv, format=(fourcc)YUY2, width=360, height=296, framerate=(fraction)15/2" ! ffmpegcolorspace ! ximagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /pipeline0/v4l2src0: Error getting capabilities for device '/dev/video0': It isn't a v4l2 driver. Check if it is a v4l1 driver.
Additional debug info:
v4l2_calls.c(95): gst_v4l2_get_capabilities (): /pipeline0/v4l2src0:
system error: Unknown error 515
Setting pipeline to NULL ...
FREEING pipeline ...

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Sebastian,

I know you mentioned you didn't see anything strange in dmesg, but could you attach it anyways for our developers to review just in case. Also, can you comment which was the most recent kernel version where this was working? Thanks.

Changed in linux:
status: New → Incomplete
Revision history for this message
Sebastian Keller (skeller) wrote :

dmesg:
[166799.908016] usb 4-2: new full speed USB device using uhci_hcd and address 2
[166800.072374] usb 4-2: configuration #1 chosen from 1 choice
[166801.468907] Linux video capture interface: v2.00
[166801.656005] quickcam: QuickCam USB camera found (driver version QuickCam USB 0.6.6 $Date: 2006/11/04 08:38:14 $)
[166801.656005] quickcam: Kernel:2.6.27-2-generic bus:4 class:FF subclass:FF vendor:046D product:0840
[166801.680011] quickcam: Sensor HDCS-1000/1100 detected
[166801.680011] quickcam: Registered device: /dev/video0
[166801.684850] usbcore: registered new interface driver quickcam

I just tried 2.6.27-1.2 and it did not work either. Previous versions of the 2.6.27 package did not contain this driver, at least according to changelog. So the last working release would be the last 2.6.26 package.

When I tried compiling a version from 2.6.26 in 2.6.27 it gave the following error:
/home/sebastian/Desktop/ubuntu-intrepid/qc-driver.c:3001: error: unknown field ‘type’ specified in initializer
The code in the according line is:
 type: VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,

Later versions of the driver have that line removed (probably because of changes in v4l), but it seems that at least gstreamer and ekiga depend on it. So I guess it is more a general v4l problem than a driver specific one.

Changed in linux:
status: Incomplete → New
Revision history for this message
Sebastian Keller (skeller) wrote :

This looks like the commit which led to the removal of the type-field in this driver:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0ea6bc8d43c9ee3c5384bea184eab020927a5b2c

Revision history for this message
Sebastian Keller (skeller) wrote :

I wrote a small patch for the qc-usb module which fixes the issue for me.

Revision history for this message
joshyg6 (josheg) wrote :

I can confirm a similar problem. I don't know how to apply and use this "patch", however? Should we all be using this patch, and will it fix the issue?

I have a Quickcam Logitech Express 046d:0870, 2.26-27-7 Linux, Intrepid 8.10, and similar DMESG lines..

Please advise, or tell me what more information you need from me!

Revision history for this message
joshyg6 (josheg) wrote :

Oh, I should note -- this camera works perfectly fine, plug and play, with 7.10 Ubuntu.. Never had any problem at all there...

Revision history for this message
joshyg6 (josheg) wrote :

Even works on 8.04, actually, or at least, according to how it works on my laptop which has 8.04 (instead of the Desktop which has 8.10)..

Revision history for this message
Sebastian Keller (skeller) wrote :

I added a guide how to patch and compile the driver here:
https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/196811/comments/32
(That also includes the patch to make the cam work with cheese)

Revision history for this message
Andres Mujica (andres.mujica) wrote :

Hi, thanks for your report, is it possible for you to test if this bug still exists with fully updated Intrepid? If it is still an issue can you send as separate attachments the output for the following files?

 uname -a > uname-a.log
 cat /proc/version_signature > proc_version_signature.log
 sudo lspci -vvnn > lspci-vvnn.log (those are 2 v's not a w)
 dmesg > dmesg.log
 lsusb > lsusb.log
 lshal > lshal.log

 Thanks in advance

Changed in linux:
status: New → Incomplete
Revision history for this message
Sebastian Keller (skeller) wrote :

I don't have Intrepid anymore, but only Jaunty and its kernel currently does not ship the quickcam driver. But I'm quite sure the current behaviour in the driver is broken, as it assigns the wrong kind of type to the b.type variable. When I wrote the patch I also found why it worked before (even though it was wrong) and which change caused it to stop working, but I can't remember that right now and I don't have the time to look it up again.
So I don't think all that info is actually needed, since it should be already know what is wrong and how to fix it, but if you really need all that info please change again to incomplete.

Changed in linux:
status: Incomplete → Confirmed
Revision history for this message
Ramon Casha (rcasha) wrote :

I'm using Intrepid and the issue is still there. There appear to be other bugs probably related to this one. In most programs I simply can't see anything, whereas a few show a very dark screen (eg, you can just about see a light bulb right in front of the cam)

Revision history for this message
joshyg6 (josheg) wrote : Re: [Bug 268134] Re: qc-usb driver does not work anymore with 2.6.27-2.3

that's too bad, man. i wish this driver would work.. are other people
working on it? think it will be fixed in the next driver release?

On Wed, Dec 17, 2008 at 9:12 AM, Sebastian Keller
<email address hidden>wrote:

> I don't have Intrepid anymore, but only Jaunty and its kernel currently
> does not ship the quickcam driver. But I'm quite sure the current behaviour
> in the driver is broken, as it assigns the wrong kind of type to the b.type
> variable. When I wrote the patch I also found why it worked before (even
> though it was wrong) and which change caused it to stop working, but I can't
> remember that right now and I don't have the time to look it up again.
> So I don't think all that info is actually needed, since it should be
> already know what is wrong and how to fix it, but if you really need all
> that info please change again to incomplete.
>
> ** Changed in: linux (Ubuntu)
> Status: Incomplete => Confirmed
>
> --
> qc-usb driver does not work anymore with 2.6.27-2.3
> https://bugs.launchpad.net/bugs/268134
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "linux" source package in Ubuntu: Confirmed
>
> Bug description:
> gst-launch-0.10 v4lsrc autoprobe-fps=false device=/dev/video0 !
> "video/x-raw-yuv, format=(fourcc)YUY2, width=360, height=296,
> framerate=(fraction)15/2" ! ffmpegcolorspace ! ximagesink
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /pipeline0/v4lsrc0: Could not get/set settings from/on
> resource.
> Additional debug info:
> v4l_calls.c(198): gst_v4l_open (): /pipeline0/v4lsrc0:
> Device opened, but wrong type (0x0)
> Setting pipeline to NULL ...
> FREEING pipeline ...
>
> The according lines from gst-plugins-base/sys/v4l/v4l_calls.c:
> if ((GST_IS_V4LSRC (v4lelement) &&
> !(v4lelement->vcap.type & VID_TYPE_CAPTURE))) {
> ...
> GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
> ("Device opened, but wrong type (0x%x)", v4lelement->vcap.type));
>
>
> Nothing strange in dmesg.
>
> lsusb: Bus 004 Device 002: ID 046d:0840 Logitech, Inc. QuickCam Express
>
> Also ekiga does not recognize that cam anymore.
>
> As I noticed some changes to that module regarding v4l2 I tried v4l2src,
> too:
> gst-launch-0.10 v4l2src device=/dev/video0 ! "video/x-raw-yuv,
> format=(fourcc)YUY2, width=360, height=296, framerate=(fraction)15/2" !
> ffmpegcolorspace ! ximagesink
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /pipeline0/v4l2src0: Error getting capabilities for
> device '/dev/video0': It isn't a v4l2 driver. Check if it is a v4l1 driver.
> Additional debug info:
> v4l2_calls.c(95): gst_v4l2_get_capabilities (): /pipeline0/v4l2src0:
> system error: Unknown error 515
> Setting pipeline to NULL ...
> FREEING pipeline ...
>

Revision history for this message
timfelgentreff (timfelgentreff) wrote :

Didn't work with the aforementioned patch. Had to apply another patch I found on the Gentoo butracker to get it going.
The following patch includes the previous two+Gentoo patch+ original Makefile

Driver compiles fine here with "make quickcam.ko" (2.6.27-11)

Revision history for this message
shclim (shclim) wrote :

@ Sebastian Keller (2008-10-20)

I just followed your instructions and failed to get the qc-usb driver (with the patch) to work with my QuickCam Web (046d:0850) in Ubuntu amd64.

Revision history for this message
Andres Mujica (andres.mujica) wrote :

@timfelgentreff can you point us to the gentoo bug report? is this one ? http://bugs.gentoo.org/232390

Revision history for this message
Andres Mujica (andres.mujica) wrote :

As this bug is against 2.6.27, and jaunty is already at 2.6.28 i would recommend to integrate patches from bug #213114 with the one created by tim.

The mentioned bug probably would get a better chance to be integrated by Jaunty insted of this one, from there we could try a backport for intrepid kernel.

Revision history for this message
timfelgentreff (timfelgentreff) wrote : Re: [Bug 268134] Re: qc-usb driver does not work anymore with 2.6.27-2.3

On 28/02/2009, Andres Mujica <email address hidden> wrote:
> @timfelgentreff can you point us to the gentoo bug report? is this one
> ? http://bugs.gentoo.org/232390

Yes, that's the one. And +1 for moving this bug to jaunty and solving
it for 2.6.28.

Revision history for this message
Ka-Hing Cheung (kahing) wrote :

with jaunty, I see that in kcompat-2.6.28.patch it sets it to:

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
+ b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE;
+#else
                        b.type = VID_TYPE_CAPTURE;
+#endif

If I remove the | VID_TYPE_SUBCAPTURE and recompile, it works.

I also had to do `qcset /dev/video0 compat=dblbuf`

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.