public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@nokia.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Hans Verkuil <hansverk@cisco.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Nayden Kanchev <nkanchev@mm-sol.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Cohen David Abraham <david.cohen@nokia.com>
Subject: Re: [RFC] V4L2 API for flash devices
Date: Tue, 05 Apr 2011 13:00:28 +0300	[thread overview]
Message-ID: <4D9AE83C.4070305@nokia.com> (raw)
In-Reply-To: <201103301047.15678.laurent.pinchart@ideasonboard.com>

Laurent Pinchart wrote:
> Hi Sakari,

Hi Laurent,

> On Tuesday 29 March 2011 13:51:38 Sakari Ailus wrote:
>> Sakari Ailus wrote:
>>> Hans Verkuil wrote:
>>>> On Tuesday, March 29, 2011 11:35:19 Sakari Ailus wrote:
>>>>> Hi Hans,
>>>>>
>>>>> Many thanks for the comments!
>>>
>>> ...
>>>
>>>>> It occurred to me that an application might want to turn off a flash
>>>>> which has been strobed on software. That can't be done on a single
>>>>> button control.
>>>>>
>>>>> V4L2_CID_FLASH_SHUTDOWN?
>>>>>
>>>>> The application would know the flash strobe is ongoing before it
>>>>> receives a timeout fault. I somehow feel that there should be a control
>>>>> telling that directly.
>>>>>
>>>>> What about using a bool control for the strobe?
>>>>
>>>> It depends: is the strobe signal just a pulse that kicks off the flash,
>>>> or is it active throughout the flash duration? In the latter case a
>>>> bool makes sense, in the first case an extra button control makes
>>>> sense.
>>>
>>> I like buttons since I associate them with action (like strobing) but on
>>> the other hand buttons don't allow querying the current state. On the
>>> other hand, the current state isn't always determinable, e.g. in the
>>> absence of the interrupt line from the flash controller interrupt pin
>>> (e.g. N900!).
>>
>> Oh, I need to take my words back a bit.
>>
>> There indeed is a way to get the on/off status for the flash, but that
>> involves I2C register access --- when you read the fault registers, you
>> do get the state, even if the interrupt linke is missing from the
>> device. At least I can't see why this wouldn't work, at least on this
>> particular chip.
>>
>> What you can't have in this case is the event.
>>
>> So, in my opinion this suggests that a single boolean control is the way
>> to go.
> 
> Why would an application want to turn off a flash that has been strobbed in 
> software ? Applications should set the flash duration and then strobe it.

The applications won't know beforehand the exact timing of the exposure
of the frames on the sensor and the latencies of the operating system
possibly affected by other processes running on the system. Thus it's
impossible to know exactly how long flash strobe (on software, that is!)
is required.

So, as far as I see there should be a way to turn the flash off and the
timeout would mostly function as a safeguard. This is likely dependent
on the flash controller as well.

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

  reply	other threads:[~2011-04-05 10:01 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 12:55 [RFC] V4L2 API for flash devices Sakari Ailus
2011-03-29  6:49 ` Hans Verkuil
2011-03-29  9:35   ` Sakari Ailus
2011-03-29  9:54     ` Hans Verkuil
2011-03-29 11:38       ` Sakari Ailus
2011-03-29 11:51         ` Sakari Ailus
2011-03-30  8:47           ` Laurent Pinchart
2011-04-05 10:00             ` Sakari Ailus [this message]
2011-05-02 16:04               ` Sakari Ailus
2011-05-02 19:13                 ` Hans Verkuil
2011-05-02 19:32                   ` Laurent Pinchart
2011-05-02 20:07                     ` Hans Verkuil
2011-03-30  8:55     ` Laurent Pinchart
2011-03-30 12:44       ` Sakari Ailus
2011-03-30 13:53         ` Laurent Pinchart
2011-03-30 14:18           ` Sakari Ailus
2011-03-30 14:57             ` David Cohen
2011-03-30 15:00               ` Laurent Pinchart
2011-03-31  8:09                 ` Sakari Ailus
2011-03-29 10:43 ` Kim, HeungJun
2011-03-29 14:41   ` Sakari Ailus
2011-03-30  5:06     ` Kim, HeungJun
2011-03-30 11:37       ` Sakari Ailus
2011-03-30 20:37         ` Kim HeungJun
2011-03-31  8:50           ` Sakari Ailus
2011-03-30  9:34 ` Laurent Pinchart
2011-03-30 11:05   ` Sakari Ailus
2011-03-30 13:54     ` Laurent Pinchart
2011-03-31  8:17       ` Sakari Ailus
2011-04-05 10:23         ` Sakari Ailus
2011-04-05 10:39           ` Laurent Pinchart
2011-04-05 11:21             ` Sakari Ailus
2011-04-05 11:28               ` Laurent Pinchart
2011-04-05 13:35                 ` Sakari Ailus
     [not found]                   ` <4D9B303D.1000003@mm-sol.com>
2011-04-05 16:25                     ` Laurent Pinchart
2011-04-05 12:11 ` David Cohen
2011-04-06  8:04   ` Sakari Ailus
2011-04-12 19:31 ` Sung Hee Park
     [not found] ` <BANLkTik+xqCD7uiGUchsehoUy+gwM+Cjdg@mail.gmail.com>
2011-04-13 12:16   ` Sakari Ailus
2011-04-14 19:38     ` Laurent Pinchart
2011-04-15  5:27       ` Sakari Ailus

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=4D9AE83C.4070305@nokia.com \
    --to=sakari.ailus@nokia.com \
    --cc=david.cohen@nokia.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hansverk@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=nkanchev@mm-sol.com \
    /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