public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* controls, subdevs, and media framework
@ 2010-10-26 15:08 Michael Jones
  2010-10-26 22:12 ` Laurent Pinchart
  2010-10-27 13:48 ` Sakari Ailus
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Jones @ 2010-10-26 15:08 UTC (permalink / raw)
  To: Linux Media Mailing List
  Cc: laurent.pinchart, sakari.ailus@maxwell.research.nokia.com

I'm trying to understand how the media framework and V4L2 share the responsibility of configuring a video device.  Referring to the ISP code on Laurent's media-0004-omap3isp branch, the video device is now split up into several devices... suppose you have a sensor delivering raw bayer data to the CCDC.  I could get this raw data from the /dev/video2 device (named "OMAP3 ISP CCDC output") or I could get YUV data from the previewer or resizer.  But I would no longer have a single device where I could ENUM_FMT and see that I could get either.  Correct?

Having settled on a particular video device, (how) do regular controls (ie. VIDIOC_[S|G]_CTRL) work?  I don't see any support for them in ispvideo.c.  Is it just yet to be implemented?  Or is it expected that the application will access the subdevs individually?

Basically the same Q for CROPCAP:  isp_video_cropcap passes it on to the last link in the chain, but none of the subdevs in the ISP currently have a cropcap function implemented (yet).  Does this still need to be written?

-- 
Michael Jones

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: controls, subdevs, and media framework
  2010-10-26 15:08 controls, subdevs, and media framework Michael Jones
@ 2010-10-26 22:12 ` Laurent Pinchart
  2010-10-27 13:48 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2010-10-26 22:12 UTC (permalink / raw)
  To: Michael Jones
  Cc: Linux Media Mailing List, sakari.ailus@maxwell.research.nokia.com

Hi Michael,

On Tuesday 26 October 2010 17:08:12 Michael Jones wrote:
> I'm trying to understand how the media framework and V4L2 share the
> responsibility of configuring a video device.  Referring to the ISP code
> on Laurent's media-0004-omap3isp branch, the video device is now split up
> into several devices... suppose you have a sensor delivering raw bayer
> data to the CCDC.  I could get this raw data from the /dev/video2 device
> (named "OMAP3 ISP CCDC output") or I could get YUV data from the previewer
> or resizer.  But I would no longer have a single device where I could
> ENUM_FMT and see that I could get either.  Correct?

That's correct. With the OMAP3 ISP driver the video device nodes (/dev/video*) 
are used for video streaming but not for device configuration.

> Having settled on a particular video device, (how) do regular controls (ie.
> VIDIOC_[S|G]_CTRL) work?  I don't see any support for them in ispvideo.c. 
> Is it just yet to be implemented?  Or is it expected that the application
> will access the subdevs individually?

Applications should access the controls on the subdev device nodes directly. 
We might expose some controls on the video device nodes in the future as well, 
but there's no such plan right now.

> Basically the same Q for CROPCAP:  isp_video_cropcap passes it on to the
> last link in the chain, but none of the subdevs in the ISP currently have
> a cropcap function implemented (yet).  Does this still need to be written?

Correct as well, cropcap isn't implemented yet. It's still unclear how exactly 
it will be implemented in the future.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: controls, subdevs, and media framework
  2010-10-26 15:08 controls, subdevs, and media framework Michael Jones
  2010-10-26 22:12 ` Laurent Pinchart
@ 2010-10-27 13:48 ` Sakari Ailus
  1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2010-10-27 13:48 UTC (permalink / raw)
  To: Michael Jones; +Cc: Linux Media Mailing List, laurent.pinchart

Hi Michael,

Michael Jones wrote:
> Having settled on a particular video device, (how) do regular
> controls (ie. VIDIOC_[S|G]_CTRL) work?  I don't see any support for
> them in ispvideo.c.  Is it just yet to be implemented?  Or is it
> expected that the application will access the subdevs individually?

The applications will access the subdevs independently. I'd expect that
regular applications won't be interested in things like
V4L2_CID_EXPOSURE (to manually set exposure value) since they'd more
likely want automatic exposure.

These interfaces (subdevs) can be used by specialised applications and
libraries, most likely a general purpose application would not access
them directly. For example, on N900 the automatic exposure algorithm is
a user space beast, so that functionality cannot be implemented in
kernel level at all.

I'd expect general purpose applications to be using libv4l which will
know how to handle the hardware, in future.

> Basically the same Q for CROPCAP:  isp_video_cropcap passes it on to
> the last link in the chain, but none of the subdevs in the ISP
> currently have a cropcap function implemented (yet).  Does this still
> need to be written?

Setting and getting crop is supported but CROPCAP ioctl isn't actually
even defined for subdevs. I don't think an ioctl similar to CROPCAP even
makes sense since crop is so much more simple for subdevs.

Every time I need to deal with CROPCAP I'll first have to go to read the
specs. ;-)

If there is hardware which has somehow limited crop capability then
there might be a need for an ioctl to query the minimum possible size
after crop. At least the OMAP 3 ISP can crop as much as you want. That
shouldn't be a problem from hardware perspective as fas as I understand.

Cheers,

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-27 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26 15:08 controls, subdevs, and media framework Michael Jones
2010-10-26 22:12 ` Laurent Pinchart
2010-10-27 13:48 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox