All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin-Éric Racine" <martin-eric.racine@iki.fi>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Jean-François Moine" <moinejf@free.fr>,
	677533@bugs.debian.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: video: USB webcam fails since kernel 3.2
Date: Mon, 9 Jul 2012 14:33:46 +0300	[thread overview]
Message-ID: <CAPZXPQd026xfKrAU0D7CLQGbdAs8U01u5vsHp+5-wbVofAwdqQ@mail.gmail.com> (raw)
In-Reply-To: <4FF9CA30.9050105@redhat.com>

2012/7/8 Hans de Goede <hdegoede@redhat.com>:
> On 07/08/2012 03:01 PM, Martin-Éric Racine wrote:
>>
>> 2012/6/17 Martin-Éric Racine <martin-eric.racine@iki.fi>:
>>>
>>> pe, 2012-06-15 kello 23:41 -0500, Jonathan Nieder kirjoitti:
>>>>
>>>> Martin-Éric Racine wrote:
>>>>>
>>>>> usb 1-7: new high-speed USB device number 3 using ehci_hcd
>>>>
>>>> [...]
>>>>>
>>>>> usb 1-7: New USB device found, idVendor=0ac8, idProduct=0321
>>>>> usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>>>>> usb 1-7: Product: USB2.0 Web Camera
>>>>> usb 1-7: Manufacturer: Vimicro Corp.
>>>>
>>>> [...]
>>>>>
>>>>> Linux media interface: v0.10
>>>>> Linux video capture interface: v2.00
>>>>> gspca_main: v2.14.0 registered
>>>>> gspca_main: vc032x-2.14.0 probing 0ac8:0321
>>>>> usbcore: registered new interface driver vc032x
>>>>
>>>>
>>>> The device of interest is discovered.
>>>>
>>>>> gspca_main: ISOC data error: [36] len=0, status=-71
>>>>> gspca_main: ISOC data error: [65] len=0, status=-71
>>>>
>>>> [...]
>>>>>
>>>>> gspca_main: ISOC data error: [48] len=0, status=-71
>>>>> video_source:sr[3246]: segfault at 0 ip   (null) sp ab36de1c error 14
>>>>> in cheese[8048000+21000]
>>>>> gspca_main: ISOC data error: [17] len=0, status=-71
>>>>
>>>>
>>>> (The above data error spew starts around t=121 seconds and continues
>>>> at a rate of about 15 messages per second.  The segfault is around
>>>> t=154.)
>>>
>>>
>>>> The vc032x code hasn't changed since 3.4.1, so please report your
>>>> symptoms to Jean-François Moine <moinejf@free.fr>, cc-ing
>>>> linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, and either
>>>> me or this bug log so we can track it.  Be sure to mention:
>>>>
>>>>   - steps to reproduce, expected result, actual result, and how the
>>>>     difference indicates a bug (should be simple enough in this case)
>>>
>>>
>>> 1. Ensure that user 'myself' is a member of the 'video' group.
>>> 2. Launch the webcam application Cheese from the GNOME desktop.
>>>
>>> Expected result: Cheese displays whatever this laptop's camera sees.
>>>
>>> Actual result: Cheese crashes while attempting to access the camera.
>>>
>>>>   - how reproducible the bug is (100%?)
>>>
>>>
>>> 100%
>>>
>>>>   - which kernel versions you have tested and result with each (what is
>>>>     the newest kernel version that worked?)
>>>
>>>
>>> It probably was 3.1.0 or some earlier 3.2 release (the upcoming Debian
>>> will release with 3.2.x; 3.4 was only used here for testing purposes),
>>> but I wouldn't know for sure since I don't use my webcam too often.
>>
>>
>> I finally found time to perform further testing, using kernel packages
>> from snapshots.debian.org, and the last one that positively worked (at
>> least using GNOME's webcam application Cheese) was:
>>
>> linux-image-3.1.0-1-686-pae          3.1.8-2
>>   Linux 3.1 for modern PCs
>>
>> This loaded the following video modules:
>>
>> gspca_vc032x
>> gspca_main
>> videodev
>> media
>>
>> Tests using 3.2.1-1 or more recent crashed as described before. This
>> at least gives us a time frame for when the regression started.
>
>
> Hmm, this is then likely caused by the new isoc bandwidth negotiation code
> in 3.2, unfortunately the vc032x driver is one of the few gspca drivers
> for which I don't have a cam to test with. Can you try to build your own
> kernel from source?
>
> Boot into your own kernel, and verify the regression is still there,
> then edit drivers/media/video/gspca/gspca.c and go to the which_bandwidth
> function, and at the beginning of this function add the following line:
>
> return 2000 * 2000 * 120;
>
> Then rebuild and re-install the kernel and try again.
>
> If that helps, remove the added
> return 2000 * 2000 * 120;
> line, and also remove the following lines from which_bandwidth:
>
>         /* if the image is compressed, estimate its mean size */
>         if (!gspca_dev->cam.needs_full_bandwidth &&
>             bandwidth < gspca_dev->cam.cam_mode[i].width *
>                                 gspca_dev->cam.cam_mode[i].height)
>                 bandwidth = bandwidth * 3 / 8;  /* 0.375 */
>
> And try again if things still work this way.
>
> Once you've tested this I can try to write a fix for this.

Hans,

Thank you for your reply.

Just to eliminate the possibility of mistakes on my part while trying
to perform the above changes, could you send me a patch against Linux
3.2.21 that I could apply as-is, before building myself a test kernel
package?

Cheers!
Martin-Éric

  parent reply	other threads:[~2012-07-09 11:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120614162609.4613.22122.reportbug@henna.lan>
     [not found] ` <20120614215359.GF3537@burratino>
     [not found]   ` <CAPZXPQd9gNCxn7xGyqj_xymPaF5OxvRtxRFkt+SsLs942te4og@mail.gmail.com>
     [not found]     ` <20120616044137.GB4076@burratino>
2012-06-17 11:23       ` video: USB webcam fails since kernel 3.2 Martin-Éric Racine
2012-06-17 17:11         ` Jonathan Nieder
2012-06-17 17:12           ` Jonathan Nieder
2012-07-08 13:01         ` Martin-Éric Racine
2012-07-08 17:58           ` Hans de Goede
2012-07-08 18:33             ` Jean-Francois Moine
2012-07-09  8:43               ` Hans de Goede
2012-07-09 11:33             ` Martin-Éric Racine [this message]
2012-07-09 13:12               ` Hans de Goede
2012-07-09 20:39                 ` Jonathan Nieder
2012-07-10 12:56                   ` Martin-Éric Racine
2012-07-10 14:36                     ` Jean-Francois Moine
2012-07-11  7:02                       ` Martin-Éric Racine
2012-07-11  8:04                         ` Jean-Francois Moine
2012-07-11 10:21                           ` Martin-Éric Racine
2012-07-11 10:44                             ` Jean-Francois Moine
2012-07-11 11:14                               ` Martin-Éric Racine
2012-07-11 11:27                                 ` Jean-Francois Moine
     [not found]                                   ` <CAPZXPQeDKLAu13Qs-MhhxJEBrF-5620HNZDmPiH+4NRmkxx3Ag@mail.gmail.com>
2012-07-11 12:19                                     ` Jonathan Nieder
2012-07-11 13:27                                     ` Hans de Goede
2012-07-11 13:43                                       ` Martin-Éric Racine
2012-07-11 17:18                                         ` Jean-Francois Moine
2012-07-11 18:08                                           ` Martin-Éric Racine
2012-10-09 22:54                                             ` Jonathan Nieder
2012-10-10  5:53                                               ` Martin-Éric Racine
2012-10-10  6:23                                               ` Jean-Francois Moine
2012-10-10  6:32                                                 ` Jonathan Nieder
2012-10-10  6:49                                                 ` Martin-Éric Racine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPZXPQd026xfKrAU0D7CLQGbdAs8U01u5vsHp+5-wbVofAwdqQ@mail.gmail.com \
    --to=martin-eric.racine@iki.fi \
    --cc=677533@bugs.debian.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=moinejf@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.