Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Sylwester Nawrocki
Hi Sakari,

On 01/14/2012 09:51 PM, Sakari Ailus wrote:
 diff --git a/drivers/media/video/v4l2-ctrls.c
 b/drivers/media/video/v4l2-ctrls.c index 083bb79..da1ec52 100644
 --- a/drivers/media/video/v4l2-ctrls.c
 +++ b/drivers/media/video/v4l2-ctrls.c
 @@ -606,6 +606,12 @@ const char *v4l2_ctrl_get_name(u32 id)
 case V4L2_CID_FLASH_CHARGE: return Charge;
 case V4L2_CID_FLASH_READY:  return Ready to strobe;

 +   case V4L2_CID_IMAGE_SOURCE_CLASS:   return Image source controls;
 +   case V4L2_CID_IMAGE_SOURCE_VBLANK:  return Vertical blanking;
 +   case V4L2_CID_IMAGE_SOURCE_HBLANK:  return Horizontal blanking;
 +   case V4L2_CID_IMAGE_SOURCE_LINK_FREQ:   return Link frequency;
 +   case V4L2_CID_IMAGE_SOURCE_ANALOGUE_GAIN: return Analogue gain;

 Please capitalize each word, as done for the other controls.
 
 This isn't done for the flash controls either, have you noticed that?
 
 Well, I guess I have to admit that they were added by myself. ;-)
 
 I can fix this for the next patchset.
 
I don't want to be annoying (too much ;)) but the FLASH controls documentation
is missing some constant tags in the text.  Other classes use them for
standard identifiers.

Regards, 
Sylwester
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Sakari Ailus
Hi Sylwester,

Sylwester Nawrocki wrote:
 On 01/14/2012 09:51 PM, Sakari Ailus wrote:
 diff --git a/drivers/media/video/v4l2-ctrls.c
 b/drivers/media/video/v4l2-ctrls.c index 083bb79..da1ec52 100644
 --- a/drivers/media/video/v4l2-ctrls.c
 +++ b/drivers/media/video/v4l2-ctrls.c
 @@ -606,6 +606,12 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_FLASH_CHARGE: return Charge;
case V4L2_CID_FLASH_READY:  return Ready to strobe;

 +  case V4L2_CID_IMAGE_SOURCE_CLASS:   return Image source controls;
 +  case V4L2_CID_IMAGE_SOURCE_VBLANK:  return Vertical blanking;
 +  case V4L2_CID_IMAGE_SOURCE_HBLANK:  return Horizontal blanking;
 +  case V4L2_CID_IMAGE_SOURCE_LINK_FREQ:   return Link frequency;
 +  case V4L2_CID_IMAGE_SOURCE_ANALOGUE_GAIN: return Analogue gain;

 Please capitalize each word, as done for the other controls.

 This isn't done for the flash controls either, have you noticed that?

 Well, I guess I have to admit that they were added by myself. ;-)

 I can fix this for the next patchset.
  
 I don't want to be annoying (too much ;)) but the FLASH controls documentation
 is missing some constant tags in the text.  Other classes use them for
 standard identifiers.

Thanks for letting me know --- that could be fixed with the flash timing
control API, or unrelated to that. We should btw. continue discussion on
that one. :-)

Speaking of things to do... The colour of the object to point and press
V4L2_CID_DO_WHITE_BALANCE (or what was it called) to fix the white
balance --- is that white, gray, something else or implementation
dependent? I vaguely remember having seen some grayish plates being used
for that but I'm definitely not sure. :-) Any idea?

Regards,

-- 
Sakari Ailus
sakari.ai...@maxwell.research.nokia.com
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Sakari Ailus
Hi Laurent,

Laurent Pinchart wrote:
 On Saturday 14 January 2012 21:51:31 Sakari Ailus wrote:
 Laurent Pinchart wrote:
 On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
 From: Sakari Ailus sakari.ai...@iki.fi

 Add image source control class. This control class is intended to
 contain low level controls which deal with control of the image capture
 process --- the A/D converter in image sensors, for example.

 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 ---

  Documentation/DocBook/media/v4l/controls.xml   |  101
  + .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   |
 6 +
  drivers/media/video/v4l2-ctrls.c   |   10 ++
  include/linux/videodev2.h  |   10 ++
  4 files changed, 127 insertions(+), 0 deletions(-)

 diff --git a/Documentation/DocBook/media/v4l/controls.xml
 b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3356,6 +3356,107 @@ interface and may change in the future./para

/table
  
  /section

 +
 +section id=image-source-controls
 +  titleImage Source Control Reference/title
 +
 +  note
 +  titleExperimental/title
 +
 +  paraThis is an link
 +  linkend=experimentalexperimental/link interface and may
 +  change in the future./para
 +  /note
 +
 +  para
 +  The Image Source control class is intended for low-level
 +  control of image source devices such as image sensors. The
 +  devices feature an analogue to digital converter and a bus

 Is the V4L2 documentation written in US or UK English ? US uses analog,
 UK uses analogue. Analog would be shorter in control names.

 Both appear to be used, but the US English appears to be more commonly
 used. I guess it's mostly chosen by whatever happened to be used by the
 author of the patch. I prefer UK spelling which you might have noticed
 already. :-)
 
 Yes I have. I haven't checked whether V4L2 prefers the UK or US spelling. 
 I'll 
 trust you on that.

I have checked and most seem to have used US spelling. If you wish me to
change it, I can do that.

 I remember there was a discussion on this topic years ago within the
 kernel community but I don't remember how it ended up with... LWN.net
 appears to remember better than I do, but by a quick check I can't find
 any definitive conclusion.

 URL:http://lwn.net/Articles/44262/
 URL:http://lkml.org/lkml/2003/8/7/245

 +  transmitter to transmit the image data out of the device.
 +  /para
 +
 +  table pgwide=1 frame=none id=image-source-control-id
 +  titleImage Source Control IDs/title
 +
 +  tgroup cols=4
 +  colspec colname=c1 colwidth=1* /
 +  colspec colname=c2 colwidth=6* /
 +  colspec colname=c3 colwidth=2* /
 +  colspec colname=c4 colwidth=6* /
 +  spanspec namest=c1 nameend=c2 spanname=id /
 +  spanspec namest=c2 nameend=c4 spanname=descr /
 +  thead
 +row
 +  entry spanname=id align=leftID/entry
 +  entry align=leftType/entry
 +/rowrow rowsep=1entry spanname=descr
 align=leftDescription/entry +   /row
 +  /thead
 +  tbody valign=top
 +rowentry/entry/row
 +row
 +  entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry +

   entryclass/entry

 +/row
 +row
 +  entry spanname=descrThe IMAGE_SOURCE class descriptor./entry
 +/row
 +row
 +  entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry
 +

entryinteger/entry

 +/row
 +row
 +  entry spanname=descrVertical blanking. The idle
 +  preriod after every frame during which no image data is

 s/preriod/period/

 +  produced. The unit of vertical blanking is a line. Every
 +  line has length of the image width plus horizontal
 +  blanking at the pixel clock specified by struct
 +  v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
 +  /./entry
 +/row
 +row
 +  entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry
 +

entryinteger/entry

 +/row
 +row
 +  entry spanname=descrHorizontal blanking. The idle
 +  preriod after every line of image data during which no

 s/preriod/period/

 +  image data is produced. The unit of horizontal blanking is
 +  pixels./entry
 +/row
 +row
 +  entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/entr
 y +   entryinteger menu/entry
 +/row
 +row
 +  entry spanname=descrImage source's data bus frequency.

 What's the frequency unit ? Sample/second ?

 Hz --- that's the unit of frequency. I fixed that in the new version.
 
 Is the user supposed to compute the pixel clock from this information ? 
 That's 
 what the text below seems to imply.

Apparently I have forgotten to update this in the new patchset. But yes,
these factors do define it. The sensors' internal clock tree will be
involved and calculation is non-trivial. This is why we 

Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Laurent Pinchart
Hi Sakari,

On Sunday 15 January 2012 20:44:02 Sakari Ailus wrote:
 Laurent Pinchart wrote:
  On Saturday 14 January 2012 21:51:31 Sakari Ailus wrote:
  Laurent Pinchart wrote:
  On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
  From: Sakari Ailus sakari.ai...@iki.fi
  
  Add image source control class. This control class is intended to
  contain low level controls which deal with control of the image
  capture process --- the A/D converter in image sensors, for example.
  
  Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
  ---
  
   Documentation/DocBook/media/v4l/controls.xml   |  101
   + .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml  
   |
   
  6 +
   
   drivers/media/video/v4l2-ctrls.c   |   10 ++
   include/linux/videodev2.h  |   10 ++
   4 files changed, 127 insertions(+), 0 deletions(-)
  
  diff --git a/Documentation/DocBook/media/v4l/controls.xml
  b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
  100644
  --- a/Documentation/DocBook/media/v4l/controls.xml
  +++ b/Documentation/DocBook/media/v4l/controls.xml
  @@ -3356,6 +3356,107 @@ interface and may change in the future./para
  
 /table
   
   /section
  
  +
  +section id=image-source-controls
  +  titleImage Source Control Reference/title
  +
  +  note
  +titleExperimental/title
  +
  +paraThis is an link
  +linkend=experimentalexperimental/link interface and may
  +change in the future./para
  +  /note
  +
  +  para
  +The Image Source control class is intended for low-level
  +control of image source devices such as image sensors. The
  +devices feature an analogue to digital converter and a bus
  
  Is the V4L2 documentation written in US or UK English ? US uses analog,
  UK uses analogue. Analog would be shorter in control names.
  
  Both appear to be used, but the US English appears to be more commonly
  used. I guess it's mostly chosen by whatever happened to be used by the
  author of the patch. I prefer UK spelling which you might have noticed
  already. :-)
  
  Yes I have. I haven't checked whether V4L2 prefers the UK or US spelling.
  I'll trust you on that.
 
 I have checked and most seem to have used US spelling. If you wish me to
 change it, I can do that.

As you (and others) wish.

  I remember there was a discussion on this topic years ago within the
  kernel community but I don't remember how it ended up with... LWN.net
  appears to remember better than I do, but by a quick check I can't find
  any definitive conclusion.
  
  URL:http://lwn.net/Articles/44262/
  URL:http://lkml.org/lkml/2003/8/7/245
  
  +transmitter to transmit the image data out of the device.
  +  /para
  +
  +  table pgwide=1 frame=none id=image-source-control-id
  +  titleImage Source Control IDs/title
  +
  +  tgroup cols=4
  +colspec colname=c1 colwidth=1* /
  +colspec colname=c2 colwidth=6* /
  +colspec colname=c3 colwidth=2* /
  +colspec colname=c4 colwidth=6* /
  +spanspec namest=c1 nameend=c2 spanname=id /
  +spanspec namest=c2 nameend=c4 spanname=descr /
  +thead
  +  row
  +entry spanname=id align=leftID/entry
  +entry align=leftType/entry
  +  /rowrow rowsep=1entry spanname=descr
  align=leftDescription/entry + /row
  +/thead
  +tbody valign=top
  +  rowentry/entry/row
  +  row
  +entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry
  +
  
entryclass/entry
  
  +  /row
  +  row
  +entry spanname=descrThe IMAGE_SOURCE class
  descriptor./entry +  /row
  +  row
  +entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry
   +
  
 entryinteger/entry
  
  +  /row
  +  row
  +entry spanname=descrVertical blanking. The idle
  +preriod after every frame during which no image data is
  
  s/preriod/period/
  
  +produced. The unit of vertical blanking is a line. Every
  +line has length of the image width plus horizontal
  +blanking at the pixel clock specified by struct
  +v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
  +/./entry
  +  /row
  +  row
  +entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry
   +
  
 entryinteger/entry
  
  +  /row
  +  row
  +entry spanname=descrHorizontal blanking. The idle
  +preriod after every line of image data during which no
  
  s/preriod/period/
  
  +image data is produced. The unit of horizontal blanking is
  +pixels./entry
  +  /row
  +  row
  +entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/en
  tr 

Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Sylwester Nawrocki
On 01/15/2012 08:30 PM, Sakari Ailus wrote:
 Hi Sylwester,
 
 Sylwester Nawrocki wrote:
 On 01/14/2012 09:51 PM, Sakari Ailus wrote:
 diff --git a/drivers/media/video/v4l2-ctrls.c
 b/drivers/media/video/v4l2-ctrls.c index 083bb79..da1ec52 100644
 --- a/drivers/media/video/v4l2-ctrls.c
 +++ b/drivers/media/video/v4l2-ctrls.c
 @@ -606,6 +606,12 @@ const char *v4l2_ctrl_get_name(u32 id)
   case V4L2_CID_FLASH_CHARGE: return Charge;
   case V4L2_CID_FLASH_READY:  return Ready to 
 strobe;

 + case V4L2_CID_IMAGE_SOURCE_CLASS:   return Image source controls;
 + case V4L2_CID_IMAGE_SOURCE_VBLANK:  return Vertical blanking;
 + case V4L2_CID_IMAGE_SOURCE_HBLANK:  return Horizontal blanking;
 + case V4L2_CID_IMAGE_SOURCE_LINK_FREQ:   return Link frequency;
 + case V4L2_CID_IMAGE_SOURCE_ANALOGUE_GAIN: return Analogue gain;

 Please capitalize each word, as done for the other controls.

 This isn't done for the flash controls either, have you noticed that?

 Well, I guess I have to admit that they were added by myself. ;-)

 I can fix this for the next patchset.

 I don't want to be annoying (too much ;)) but the FLASH controls 
 documentation
 is missing someconstant  tags in the text.  Other classes use them for
 standard identifiers.
 
 Thanks for letting me know --- that could be fixed with the flash timing
 control API, or unrelated to that. We should btw. continue discussion on
 that one. :-)

Sure, I remember having a patch for that style correction somewhere around.

Certainly the Flash topic needs continuation, I'll get back to it shortly.
I just need to do some more research about it and it is not of really high
priority on my side now. Plus I have temporarily been out of order for the
last week..

I have just prepared an auto focus controls draft patch. I'll post it
hopefully tonight to move things forward.

 Speaking of things to do... The colour of the object to point and press
 V4L2_CID_DO_WHITE_BALANCE (or what was it called) to fix the white
 balance --- is that white, gray, something else or implementation
 dependent? I vaguely remember having seen some grayish plates being used
 for that but I'm definitely not sure. :-) Any idea?

As far as I know it should be always an object which is perceived as white.
Something else don't seem to be terribly useful to set up white balance.
Unfortunately I don't have much of experience with that yet.

--
Regards,
Sylwester
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 08/17] v4l: Image source control class

2012-01-15 Thread Sakari Ailus
Hi Laurent,

Laurent Pinchart wrote:
 On Sunday 15 January 2012 20:44:02 Sakari Ailus wrote:
 Laurent Pinchart wrote:
 On Saturday 14 January 2012 21:51:31 Sakari Ailus wrote:
 Laurent Pinchart wrote:
 On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
 From: Sakari Ailus sakari.ai...@iki.fi

 Add image source control class. This control class is intended to
 contain low level controls which deal with control of the image
 capture process --- the A/D converter in image sensors, for example.

 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 ---

  Documentation/DocBook/media/v4l/controls.xml   |  101
  + .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml  
  |
  
 6 +
  
  drivers/media/video/v4l2-ctrls.c   |   10 ++
  include/linux/videodev2.h  |   10 ++
  4 files changed, 127 insertions(+), 0 deletions(-)

 diff --git a/Documentation/DocBook/media/v4l/controls.xml
 b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3356,6 +3356,107 @@ interface and may change in the future./para

/table
  
  /section

 +
 +section id=image-source-controls
 +  titleImage Source Control Reference/title
 +
 +  note
 +titleExperimental/title
 +
 +paraThis is an link
 +linkend=experimentalexperimental/link interface and may
 +change in the future./para
 +  /note
 +
 +  para
 +The Image Source control class is intended for low-level
 +control of image source devices such as image sensors. The
 +devices feature an analogue to digital converter and a bus

 Is the V4L2 documentation written in US or UK English ? US uses analog,
 UK uses analogue. Analog would be shorter in control names.

 Both appear to be used, but the US English appears to be more commonly
 used. I guess it's mostly chosen by whatever happened to be used by the
 author of the patch. I prefer UK spelling which you might have noticed
 already. :-)

 Yes I have. I haven't checked whether V4L2 prefers the UK or US spelling.
 I'll trust you on that.

 I have checked and most seem to have used US spelling. If you wish me to
 change it, I can do that.
 
 As you (and others) wish.
 
 I remember there was a discussion on this topic years ago within the
 kernel community but I don't remember how it ended up with... LWN.net
 appears to remember better than I do, but by a quick check I can't find
 any definitive conclusion.

 URL:http://lwn.net/Articles/44262/
 URL:http://lkml.org/lkml/2003/8/7/245

 +transmitter to transmit the image data out of the device.
 +  /para
 +
 +  table pgwide=1 frame=none id=image-source-control-id
 +  titleImage Source Control IDs/title
 +
 +  tgroup cols=4
 +colspec colname=c1 colwidth=1* /
 +colspec colname=c2 colwidth=6* /
 +colspec colname=c3 colwidth=2* /
 +colspec colname=c4 colwidth=6* /
 +spanspec namest=c1 nameend=c2 spanname=id /
 +spanspec namest=c2 nameend=c4 spanname=descr /
 +thead
 +  row
 +entry spanname=id align=leftID/entry
 +entry align=leftType/entry
 +  /rowrow rowsep=1entry spanname=descr
 align=leftDescription/entry + /row
 +/thead
 +tbody valign=top
 +  rowentry/entry/row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry
 +

   entryclass/entry

 +  /row
 +  row
 +entry spanname=descrThe IMAGE_SOURCE class
 descriptor./entry +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry
 +

entryinteger/entry

 +  /row
 +  row
 +entry spanname=descrVertical blanking. The idle
 +preriod after every frame during which no image data is

 s/preriod/period/

 +produced. The unit of vertical blanking is a line. Every
 +line has length of the image width plus horizontal
 +blanking at the pixel clock specified by struct
 +v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
 +/./entry
 +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry
 +

entryinteger/entry

 +  /row
 +  row
 +entry spanname=descrHorizontal blanking. The idle
 +preriod after every line of image data during which no

 s/preriod/period/

 +image data is produced. The unit of horizontal blanking is
 +pixels./entry
 +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/en
 tr y +  entryinteger menu/entry
 +  /row
 +  row
 +entry spanname=descrImage source's data bus frequency.

 

Re: [RFC 08/17] v4l: Image source control class

2012-01-14 Thread Sakari Ailus
Hi Laurent,

Thanks for the review!

Laurent Pinchart wrote:
 On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
 From: Sakari Ailus sakari.ai...@iki.fi

 Add image source control class. This control class is intended to contain
 low level controls which deal with control of the image capture process ---
 the A/D converter in image sensors, for example.

 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 ---
  Documentation/DocBook/media/v4l/controls.xml   |  101 +
  .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   |6 +
  drivers/media/video/v4l2-ctrls.c   |   10 ++
  include/linux/videodev2.h  |   10 ++
  4 files changed, 127 insertions(+), 0 deletions(-)

 diff --git a/Documentation/DocBook/media/v4l/controls.xml
 b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3356,6 +3356,107 @@ interface and may change in the future./para
/table

  /section
 +
 +section id=image-source-controls
 +  titleImage Source Control Reference/title
 +
 +  note
 +titleExperimental/title
 +
 +paraThis is an link
 +linkend=experimentalexperimental/link interface and may
 +change in the future./para
 +  /note
 +
 +  para
 +The Image Source control class is intended for low-level
 +control of image source devices such as image sensors. The
 +devices feature an analogue to digital converter and a bus
 
 Is the V4L2 documentation written in US or UK English ? US uses analog, UK 
 uses analogue. Analog would be shorter in control names.

Both appear to be used, but the US English appears to be more commonly
used. I guess it's mostly chosen by whatever happened to be used by the
author of the patch. I prefer UK spelling which you might have noticed
already. :-)

I remember there was a discussion on this topic years ago within the
kernel community but I don't remember how it ended up with... LWN.net
appears to remember better than I do, but by a quick check I can't find
any definitive conclusion.

URL:http://lwn.net/Articles/44262/
URL:http://lkml.org/lkml/2003/8/7/245

 +transmitter to transmit the image data out of the device.
 +  /para
 +
 +  table pgwide=1 frame=none id=image-source-control-id
 +  titleImage Source Control IDs/title
 +
 +  tgroup cols=4
 +colspec colname=c1 colwidth=1* /
 +colspec colname=c2 colwidth=6* /
 +colspec colname=c3 colwidth=2* /
 +colspec colname=c4 colwidth=6* /
 +spanspec namest=c1 nameend=c2 spanname=id /
 +spanspec namest=c2 nameend=c4 spanname=descr /
 +thead
 +  row
 +entry spanname=id align=leftID/entry
 +entry align=leftType/entry
 +  /rowrow rowsep=1entry spanname=descr
 align=leftDescription/entry + /row
 +/thead
 +tbody valign=top
 +  rowentry/entry/row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry + 
  
   entryclass/entry
 +  /row
 +  row
 +entry spanname=descrThe IMAGE_SOURCE class descriptor./entry
 +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry +
entryinteger/entry
 +  /row
 +  row
 +entry spanname=descrVertical blanking. The idle
 +preriod after every frame during which no image data is
 
 s/preriod/period/
 
 +produced. The unit of vertical blanking is a line. Every
 +line has length of the image width plus horizontal
 +blanking at the pixel clock specified by struct
 +v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
 +/./entry
 +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry +
entryinteger/entry
 +  /row
 +  row
 +entry spanname=descrHorizontal blanking. The idle
 +preriod after every line of image data during which no
 
 s/preriod/period/
 
 +image data is produced. The unit of horizontal blanking is
 +pixels./entry
 +  /row
 +  row
 +entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/entry
 +entryinteger menu/entry
 +  /row
 +  row
 +entry spanname=descrImage source's data bus frequency.
 
 What's the frequency unit ? Sample/second ?

Hz --- that's the unit of frequency. I fixed that in the new version.

 +Together with the media bus pixel code, bus type (clock
 +cycles per sample), the data bus frequency defines the
 +pixel clock. xref linkend=v4l2-mbus-framefmt / The
 +frame rate can be calculated from the pixel clock, image
 +width and height and horizontal and vertical blanking. The
 +frame rate control is performed by selecting the desired
 +horizontal and vertical blanking.
 +/entry
 +  /row
 +  row
 +  

Re: [RFC 08/17] v4l: Image source control class

2012-01-14 Thread Laurent Pinchart
Hi Sakari,

On Saturday 14 January 2012 21:51:31 Sakari Ailus wrote:
 Laurent Pinchart wrote:
  On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
  From: Sakari Ailus sakari.ai...@iki.fi
  
  Add image source control class. This control class is intended to
  contain low level controls which deal with control of the image capture
  process --- the A/D converter in image sensors, for example.
  
  Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
  ---
  
   Documentation/DocBook/media/v4l/controls.xml   |  101
   + .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   |
  6 +
   drivers/media/video/v4l2-ctrls.c   |   10 ++
   include/linux/videodev2.h  |   10 ++
   4 files changed, 127 insertions(+), 0 deletions(-)
  
  diff --git a/Documentation/DocBook/media/v4l/controls.xml
  b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
  100644
  --- a/Documentation/DocBook/media/v4l/controls.xml
  +++ b/Documentation/DocBook/media/v4l/controls.xml
  @@ -3356,6 +3356,107 @@ interface and may change in the future./para
  
 /table
   
   /section
  
  +
  +section id=image-source-controls
  +  titleImage Source Control Reference/title
  +
  +  note
  +  titleExperimental/title
  +
  +  paraThis is an link
  +  linkend=experimentalexperimental/link interface and may
  +  change in the future./para
  +  /note
  +
  +  para
  +  The Image Source control class is intended for low-level
  +  control of image source devices such as image sensors. The
  +  devices feature an analogue to digital converter and a bus
  
  Is the V4L2 documentation written in US or UK English ? US uses analog,
  UK uses analogue. Analog would be shorter in control names.
 
 Both appear to be used, but the US English appears to be more commonly
 used. I guess it's mostly chosen by whatever happened to be used by the
 author of the patch. I prefer UK spelling which you might have noticed
 already. :-)

Yes I have. I haven't checked whether V4L2 prefers the UK or US spelling. I'll 
trust you on that.

 I remember there was a discussion on this topic years ago within the
 kernel community but I don't remember how it ended up with... LWN.net
 appears to remember better than I do, but by a quick check I can't find
 any definitive conclusion.
 
 URL:http://lwn.net/Articles/44262/
 URL:http://lkml.org/lkml/2003/8/7/245
 
  +  transmitter to transmit the image data out of the device.
  +  /para
  +
  +  table pgwide=1 frame=none id=image-source-control-id
  +  titleImage Source Control IDs/title
  +
  +  tgroup cols=4
  +  colspec colname=c1 colwidth=1* /
  +  colspec colname=c2 colwidth=6* /
  +  colspec colname=c3 colwidth=2* /
  +  colspec colname=c4 colwidth=6* /
  +  spanspec namest=c1 nameend=c2 spanname=id /
  +  spanspec namest=c2 nameend=c4 spanname=descr /
  +  thead
  +row
  +  entry spanname=id align=leftID/entry
  +  entry align=leftType/entry
  +/rowrow rowsep=1entry spanname=descr
  align=leftDescription/entry +   /row
  +  /thead
  +  tbody valign=top
  +rowentry/entry/row
  +row
  +  entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry +
  
entryclass/entry
  
  +/row
  +row
  +  entry spanname=descrThe IMAGE_SOURCE class descriptor./entry
  +/row
  +row
  +  entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry
  +
  
 entryinteger/entry
  
  +/row
  +row
  +  entry spanname=descrVertical blanking. The idle
  +  preriod after every frame during which no image data is
  
  s/preriod/period/
  
  +  produced. The unit of vertical blanking is a line. Every
  +  line has length of the image width plus horizontal
  +  blanking at the pixel clock specified by struct
  +  v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
  +  /./entry
  +/row
  +row
  +  entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry
  +
  
 entryinteger/entry
  
  +/row
  +row
  +  entry spanname=descrHorizontal blanking. The idle
  +  preriod after every line of image data during which no
  
  s/preriod/period/
  
  +  image data is produced. The unit of horizontal blanking is
  +  pixels./entry
  +/row
  +row
  +  entry
  spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/entr
  y +   entryinteger menu/entry
  +/row
  +row
  +  entry spanname=descrImage source's data bus frequency.
  
  What's the frequency unit ? Sample/second ?
 
 Hz --- that's the unit of frequency. I fixed that in the new version.

Is the user supposed to compute the pixel clock from this information ? That's 
what the text below seems to imply.

  +  Together with the media bus pixel code, bus type (clock
  +  cycles per sample), the data bus frequency defines the
  +  pixel clock. xref linkend=v4l2-mbus-framefmt / The
  

Re: [RFC 08/17] v4l: Image source control class

2012-01-05 Thread Laurent Pinchart
Hi Sakari,

Thanks for the patch.

On Tuesday 20 December 2011 21:28:00 Sakari Ailus wrote:
 From: Sakari Ailus sakari.ai...@iki.fi
 
 Add image source control class. This control class is intended to contain
 low level controls which deal with control of the image capture process ---
 the A/D converter in image sensors, for example.
 
 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 ---
  Documentation/DocBook/media/v4l/controls.xml   |  101 +
  .../DocBook/media/v4l/vidioc-g-ext-ctrls.xml   |6 +
  drivers/media/video/v4l2-ctrls.c   |   10 ++
  include/linux/videodev2.h  |   10 ++
  4 files changed, 127 insertions(+), 0 deletions(-)
 
 diff --git a/Documentation/DocBook/media/v4l/controls.xml
 b/Documentation/DocBook/media/v4l/controls.xml index 3bc5ee8..69ede83
 100644
 --- a/Documentation/DocBook/media/v4l/controls.xml
 +++ b/Documentation/DocBook/media/v4l/controls.xml
 @@ -3356,6 +3356,107 @@ interface and may change in the future./para
/table
 
  /section
 +
 +section id=image-source-controls
 +  titleImage Source Control Reference/title
 +
 +  note
 + titleExperimental/title
 +
 + paraThis is an link
 + linkend=experimentalexperimental/link interface and may
 + change in the future./para
 +  /note
 +
 +  para
 + The Image Source control class is intended for low-level
 + control of image source devices such as image sensors. The
 + devices feature an analogue to digital converter and a bus

Is the V4L2 documentation written in US or UK English ? US uses analog, UK 
uses analogue. Analog would be shorter in control names.

 + transmitter to transmit the image data out of the device.
 +  /para
 +
 +  table pgwide=1 frame=none id=image-source-control-id
 +  titleImage Source Control IDs/title
 +
 +  tgroup cols=4
 + colspec colname=c1 colwidth=1* /
 + colspec colname=c2 colwidth=6* /
 + colspec colname=c3 colwidth=2* /
 + colspec colname=c4 colwidth=6* /
 + spanspec namest=c1 nameend=c2 spanname=id /
 + spanspec namest=c2 nameend=c4 spanname=descr /
 + thead
 +   row
 + entry spanname=id align=leftID/entry
 + entry align=leftType/entry
 +   /rowrow rowsep=1entry spanname=descr
 align=leftDescription/entry +  /row
 + /thead
 + tbody valign=top
 +   rowentry/entry/row
 +   row
 + entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_CLASS/constant/entry +  
  
   entryclass/entry
 +   /row
 +   row
 + entry spanname=descrThe IMAGE_SOURCE class descriptor./entry
 +   /row
 +   row
 + entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_VBLANK/constant/entry + 
entryinteger/entry
 +   /row
 +   row
 + entry spanname=descrVertical blanking. The idle
 + preriod after every frame during which no image data is

s/preriod/period/

 + produced. The unit of vertical blanking is a line. Every
 + line has length of the image width plus horizontal
 + blanking at the pixel clock specified by struct
 + v4l2_mbus_framefmt xref linkend=v4l2-mbus-framefmt
 + /./entry
 +   /row
 +   row
 + entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_HBLANK/constant/entry + 
entryinteger/entry
 +   /row
 +   row
 + entry spanname=descrHorizontal blanking. The idle
 + preriod after every line of image data during which no

s/preriod/period/

 + image data is produced. The unit of horizontal blanking is
 + pixels./entry
 +   /row
 +   row
 + entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_LINK_FREQ/constant/entry
 + entryinteger menu/entry
 +   /row
 +   row
 + entry spanname=descrImage source's data bus frequency.

What's the frequency unit ? Sample/second ?

 + Together with the media bus pixel code, bus type (clock
 + cycles per sample), the data bus frequency defines the
 + pixel clock. xref linkend=v4l2-mbus-framefmt / The
 + frame rate can be calculated from the pixel clock, image
 + width and height and horizontal and vertical blanking. The
 + frame rate control is performed by selecting the desired
 + horizontal and vertical blanking.
 + /entry
 +   /row
 +   row
 + entry
 spanname=idconstantV4L2_CID_IMAGE_SOURCE_ANALOGUE_GAIN/constant/en
 try +entryinteger/entry
 +   /row
 +   row
 + entry spanname=descrAnalogue gain is gain affecting
 + all colour components in the pixel matrix. The gain
 + operation is performed in the analogue domain before A/D
 + conversion.

Should we define one gain per color component ?

 + /entry
 +   /row
 +   rowentry/entry/row
 + /tbody
 +  /tgroup
 +  /table
 +
 +/section
 +
  /section
 
!--
 diff --git