From: Hans de Goede <hdegoede@redhat.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH for 3.2 URGENT] gspca: Fix bulk mode cameras no longer working (regression fix)
Date: Fri, 30 Dec 2011 11:54:18 +0100 [thread overview]
Message-ID: <4EFD985A.4050301@redhat.com> (raw)
In-Reply-To: <20111230112121.03e8b59b@tele>
Hi,
On 12/30/2011 11:21 AM, Jean-Francois Moine wrote:
> On Thu, 29 Dec 2011 21:36:42 +0100
> Hans de Goede<hdegoede@redhat.com> wrote:
>
>> The new iso bandwidth calculation code accidentally has broken support
>> for bulk mode cameras. This has broken the following drivers:
>> finepix, jeilinj, ovfx2, ov534, ov534_9, se401, sq905, sq905c, sq930x,
>> stv0680, vicam.
>>
>> Thix patch fixes this. Fix tested with: se401, sq905, sq905c, stv0680& vicam
>> cams.
>
> Hi Hans,
>
> Sorry for I should not be fully awoken yet, but I don't understand the
> problem from your fix.
>
> The patch just sets the altsetting to the highest one for bulk
> transfer. Does this mean that, in this case, the altsetting table
> created by build_ep_tb is wrong and the highest altsetting cannot
> selected?
Most bulk mode cameras have only one altsetting, altsetting 0, which is
seen as invalid by build_ep_tb, since it is invalid for isoc mode, resulting
in the cameras not working with a: "no transfer endpoint found" error.
I've opted to fix things by causing build_ep_tb to not be called for
bulk mode cameras at all, since doing bandwidth calculations for
bulk mode makes no sense. bulk transfers get whatever bandwidth is
left on the bus, there is no guarantee that there are 1000 / interval
packets a second like there is with isoc transfers, so the bandwidth
is unknown. Also note that because of this interval is 0 for bulk
endpoints, since it is unused. So calling build_ep_tb for bulk mode
transfers makes no sense.
WRT just choosing the highest numbered alt setting this is because
some bulk mode cameras (stv0680 based ones) report 2 alt settings
(which makes no sense for bulk mode, but they do it anyways),
with alt setting 0 not listing any endpoints at all, and alt setting
1 listening the bulk endpoint we want, so by picking the highest alt
setting we end up with picking the one and only alt setting most cameras
have and picking one which actually has the bulk endpoint listed for
weird cases like the stv0680 based ones.
Note that I'm spending most of my time today on testing the new
bandwidth code with various cameras, I'll send you a patchset
with some more proposed patches today. We should then evaluate
if we want to get those into 3.2 too. I send this one yesterday since
it fixes a large bunch of cameras not working at all and it is a
simple and safe fix IMHO.
Regards,
Hans
next prev parent reply other threads:[~2011-12-30 10:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 20:36 [PATCH for 3.2 URGENT 0/1] Fix major regression in gspca Hans de Goede
2011-12-29 20:36 ` [PATCH for 3.2 URGENT] gspca: Fix bulk mode cameras no longer working (regression fix) Hans de Goede
2011-12-29 21:09 ` Mauro Carvalho Chehab
2011-12-30 10:21 ` Jean-Francois Moine
2011-12-30 10:54 ` Hans de Goede [this message]
2011-12-31 19:08 ` Theodore Kilgore
2012-01-02 8:01 ` Hans de Goede
2011-12-30 4:15 ` [PATCH for 3.2 URGENT 0/1] Fix major regression in gspca Theodore Kilgore
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=4EFD985A.4050301@redhat.com \
--to=hdegoede@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).