All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kim HeungJun <riverful@gmail.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: Re: [RFC] snapshot mode, flash capabilities and control
Date: Fri, 25 Feb 2011 21:56:50 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.64.1102252135480.26361@axis700.grange> (raw)
In-Reply-To: <20110225185511.GG23853@valkosipuli.localdomain>

On Fri, 25 Feb 2011, Sakari Ailus wrote:

> On Fri, Feb 25, 2011 at 06:08:07PM +0100, Guennadi Liakhovetski wrote:
> > Hi Sakari
> 
> Hi Guennadi,
> 
> > On Fri, 25 Feb 2011, Sakari Ailus wrote:
> > > I agree with that. Flash synchronisation is just one of the many parameters
> > > that would benefit from frame level synchronisation. Exposure time, gain
> > > etc. are also such. The sensors provide varying level of hardware support
> > > for all these.
> > 
> > Well, that's true, but... From what I've seen so far, many sensors 
> > synchronise such sensitive configuration changes with their frame readout 
> > automatically, i.e., you configure some new parameter in a sensor 
> > register, but it will only become valid with the next frame. On other 
> > sensors you can issue a "hold" command, perform any needed changed, then 
> > issue a "commit" and all your changes will be applied atomically.
> 
> At that level it's automatic, but what I meant is synchronising the
> application of the settings to the exposure start of a given frame. This is
> very similar to flash synchronisation.

Right... But I don't think we can do more, than what the sensor supports 
about this, can we? Only stop the sensor, apply parameters, start the 
sensor...

> > Also, we already _can_ configure gain, exposure and many other parameters, 
> > but we have no way to use sensor snapshot and flash-synchronisation 
> > capabilities.
> 
> There is a way to configure them but the interface doesn't allow to specify
> when they should take effect.

??? There are V4L ioctl()s to control the flash?...

> FCam type applications requires this sort of functionality.
> 
> <URL:http://fcam.garage.maemo.org/>
> 
> > What we could also do, we could add an optional callback to subdev (core?) 
> > operations, which, if activated, the host would call on each frame 
> > completion.
> 
> It's not quite that simple. The exposure of the next frame has started long
> time before that. This requires much more thought probably --- in the case
> of lack of hardware support, when the parameters need to be actually given
> to the sensor depend somewhat on sensors, I suppose.

Yes, that's right. I seem to remember, there was a case, for which such a 
callback would have been useful... Don't remember what that was though.

> > > Flash and indicator power setting can be included to the list of controls
> > > above.
> > 
> > As I replied to Laurent, not sure we need to control the power indicator 
> > from V4L2, unless there are sensors, that have support for that.
> 
> Um, flash controllers, that is. Yes, there are; the ADP1653, which is just
> one example.

No, not flash controllers, just an indicator, that a capture is running 
(normally a small red LED).

> > > The power management of the camera is
> > > preferrably optimised for speed so that the camera related devices need not
> > > to be power cycled when using it. If the flash interface is available on a
> > > subdev separately the flash can also be easily powered separately without
> > > making this a special case --- the rest of the camera related devices (ISP,
> > > lens and sensor) should stay powered off.
> > > 
> > > > configure the sensor to react on an external trigger provided by the flash 
> > > > controller is needed, and that could be a control on the flash sub-device. 
> > > > What we would probably miss is a way to issue a STREAMON with a number of 
> > > > frames to capture. A new ioctl is probably needed there. Maybe that would be 
> > > > an opportunity to create a new stream-control ioctl that could replace 
> > > > STREAMON and STREAMOFF in the long term (we could extend the subdev s_stream 
> > > > operation, and easily map STREAMON and STREAMOFF to the new ioctl in 
> > > > video_ioctl2 internally).
> > > 
> > > How would this be different from queueing n frames (in total; count
> > > dequeueing, too) and issuing streamon? --- Except that when the last frame
> > > is processed the pipeline could be stopped already before issuing STREAMOFF.
> > > That does indeed have some benefits. Something else?
> > 
> > Well, you usually see in your host driver, that the videobuffer queue is 
> > empty (no more free buffers are available), so, you stop streaming 
> > immediately too.
> 
> That's right. Disabling streaming does save some power but even more is
> saved when switching the devices off completely. This is important in
> embedded systems that are often battery powered.
> 
> The hardware could be switched off when no streaming takes place. However,
> this introduces extra delays to power-up at times they are unwanted --- for
> example, when switching from viewfinder to still capture.
> 
> The alternative to this is to add a timer to the driver: power off if no
> streaming has taken place for n seconds, for example. I would consider this
> much inferior to just providing a simple subdev for the flash chip and not
> involve the ISP at all.

There's an .s_power() method already in subdev core-ops.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

  reply	other threads:[~2011-02-25 20:57 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 12:18 [RFC] snapshot mode, flash capabilities and control Guennadi Liakhovetski
2011-02-24 12:40 ` Hans Verkuil
2011-02-24 16:07   ` Guennadi Liakhovetski
2011-02-24 17:57     ` Kim HeungJun
2011-02-25 10:05       ` Laurent Pinchart
2011-02-25 13:53         ` Sakari Ailus
2011-02-25 17:08           ` Guennadi Liakhovetski
2011-02-25 18:55             ` Sakari Ailus
2011-02-25 20:56               ` Guennadi Liakhovetski [this message]
2011-02-28 11:57                 ` Guennadi Liakhovetski
2011-03-06  9:53                 ` Sakari Ailus
2011-02-26 12:31             ` Hans Verkuil
2011-02-26 13:03               ` Guennadi Liakhovetski
2011-02-26 13:39                 ` Sylwester Nawrocki
2011-02-26 13:56                   ` Hans Verkuil
2011-02-26 15:42                     ` Sylwester Nawrocki
2011-02-28 10:28                     ` Laurent Pinchart
2011-02-28 10:40                       ` Hans Verkuil
2011-02-28 10:47                         ` Laurent Pinchart
2011-02-28 11:02                         ` Guennadi Liakhovetski
2011-02-28 11:07                           ` Laurent Pinchart
2011-02-28 11:17                             ` Hans Verkuil
2011-02-28 11:19                               ` Laurent Pinchart
2011-02-28 11:54                               ` Guennadi Liakhovetski
2011-02-28 22:41                                 ` Guennadi Liakhovetski
2011-03-02 17:51                                   ` Guennadi Liakhovetski
2011-03-02 18:19                                     ` Hans Verkuil
2011-03-03  1:05                                       ` Andy Walls
2011-03-03 11:50                                         ` Laurent Pinchart
2011-03-03 13:56                                           ` Andy Walls
2011-03-03 14:04                                             ` Laurent Pinchart
2011-03-03 14:55                                               ` Andy Walls
2011-03-03 14:29                                             ` Sakari Ailus
2011-03-03  8:02                                       ` Guennadi Liakhovetski
2011-03-03  9:25                                         ` Hans Verkuil
2011-02-28 13:33                               ` Andy Walls
2011-02-28 13:37                                 ` Andy Walls
2011-02-28 11:37                             ` Guennadi Liakhovetski
2011-02-28 12:03                               ` Sakari Ailus
2011-02-28 12:44                                 ` Guennadi Liakhovetski
2011-02-28 15:07                                   ` Sakari Ailus
2011-02-28 10:24                 ` Laurent Pinchart
2011-02-25 16:58         ` Guennadi Liakhovetski
2011-02-25 18:49           ` Sakari Ailus
2011-02-25 20:33             ` Guennadi Liakhovetski
2011-02-27 21:00               ` Sakari Ailus
2011-02-28 11:20                 ` Guennadi Liakhovetski
2011-02-28 13:44                   ` Sakari Ailus
2011-03-03  7:09 ` Kim, HeungJun
2011-03-03  7:30   ` Guennadi Liakhovetski

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=Pine.LNX.4.64.1102252135480.26361@axis700.grange \
    --to=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=riverful@gmail.com \
    --cc=sakari.ailus@iki.fi \
    --cc=svarbanov@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 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.