public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: Correct way to do s_ctrl ioctl taking into account subdev 	framework?
Date: Sat, 26 Jun 2010 22:34:36 -0300	[thread overview]
Message-ID: <4C26AAAC.1020803@redhat.com> (raw)
In-Reply-To: <AANLkTikPKv6iCQmV14JSiR61AUMswsOoTB7i-eSHAwH4@mail.gmail.com>

Em 26-06-2010 16:04, Devin Heitmueller escreveu:
> On Sat, Jun 26, 2010 at 2:51 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
>> There really is no good way at the moment to handle cases like this, or at
>> least not without a lot of work.
> 
> Ok, it's good to know I'm not missing something obvious.
> 
>> The plan is to have the framework merged in time for 2.6.36. My last patch
>> series for the framework already converts a bunch of subdevs to use it. Your
>> best bet is to take the patch series and convert any remaining subdevs used
>> by em28xx and em28xx itself. I'd be happy to add those patches to my patch
>> series, so that when I get the go ahead the em28xx driver will be fixed
>> automatically.
>>
>> It would be useful for me anyway to have someone else use it: it's a good
>> check whether my documentation is complete.
> 
> Sure, could you please point me to the tree in question and I'll take a look?
> 
> Given I've got applications failing, for the short term I will likely
> just submit a patch which makes the s_ctrl always return zero
> regardless of the subdev response, instead of returning 1.

Yeah, something like:

if (rc = 1) {
	rc = 0;
...

would do the trick. Yet, the application is broken, as it is considering a positive
return as an error. A positive code should never be considered as an error. So, we
need to fix v4l2-ctl as well (ok, returning 1 is wrong as well, as this is a non-v4l2
compliance in this case).

We might add a new handler at subdev, but, as Laurent is reworking
it, the above trick would be an acceptable workaround.

Cheers,
Mauro.

  reply	other threads:[~2010-06-27  1:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26 18:37 Correct way to do s_ctrl ioctl taking into account subdev framework? Devin Heitmueller
2010-06-26 18:51 ` Hans Verkuil
2010-06-26 19:04   ` Devin Heitmueller
2010-06-27  1:34     ` Mauro Carvalho Chehab [this message]
2010-06-27  3:26       ` Devin Heitmueller
2010-06-27 10:12         ` Mauro Carvalho Chehab
2010-06-27  9:12     ` Hans Verkuil

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=4C26AAAC.1020803@redhat.com \
    --to=mchehab@redhat.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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