[libcamera-devel] include: linux: Update v4l2-controls.h

Message ID 20200519125050.256010-1-jacopo@jmondi.org
State Accepted
Headers show
Series
  • [libcamera-devel] include: linux: Update v4l2-controls.h
Related show

Commit Message

Jacopo Mondi May 19, 2020, 12:50 p.m. UTC
Update include/linux/v4l2-controls.h with the latest version from the
Linux kernel media tree master.

The most notable update is the definition of the V4L2_CID_ORIENTATION
control that replaces the downstream V4L2_CID_LOCATION.

The here copied version is not a 1-to-1 copy of the kernel exported
header , because of this conflicting definition

< /* The base for the bcm2835-isp driver controls.
<  * We reserve 16 controls for this driver. */
< #define V4L2_CID_USER_BCM2835_ISP_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> /*
>  * The base for the atmel isc driver controls.
>  * We reserve 32 controls for this driver.
>  */
> #define V4L2_CID_USER_ATMEL_ISC_BASE		(V4L2_CID_USER_BASE + 0x10c0)

In order to keep the RPi pipeline working, keep the downstream
V4L2_CID_USER_BCM2835_ISP_BASE definition and post-pone the inclusion
of V4L2_CID_USER_ATMEL_ISC_BASE, which is not used by libcamera.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 include/linux/v4l2-controls.h | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

--
2.26.2

Comments

Laurent Pinchart May 19, 2020, 1:52 p.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Tue, May 19, 2020 at 02:50:50PM +0200, Jacopo Mondi wrote:
> Update include/linux/v4l2-controls.h with the latest version from the
> Linux kernel media tree master.

Could you please mention the commit ID ?

Instead of pulling a random commit ID, one option would be to only
replace the control macros we need, similarly to what we did in
972bb30c4b2fdd50f8fc02683130fd45b0d793f6, and then update to v5.8 when
it will be released (or most likely v5.8-rc1 already to avoid delays).

> The most notable update is the definition of the V4L2_CID_ORIENTATION
> control that replaces the downstream V4L2_CID_LOCATION.
> 
> The here copied version is not a 1-to-1 copy of the kernel exported
> header , because of this conflicting definition
> 
> < /* The base for the bcm2835-isp driver controls.
> <  * We reserve 16 controls for this driver. */
> < #define V4L2_CID_USER_BCM2835_ISP_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> > /*
> >  * The base for the atmel isc driver controls.
> >  * We reserve 32 controls for this driver.
> >  */
> > #define V4L2_CID_USER_ATMEL_ISC_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> 
> In order to keep the RPi pipeline working, keep the downstream
> V4L2_CID_USER_BCM2835_ISP_BASE definition and post-pone the inclusion
> of V4L2_CID_USER_ATMEL_ISC_BASE, which is not used by libcamera.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  include/linux/v4l2-controls.h | 26 ++++++++++----------------
>  1 file changed, 10 insertions(+), 16 deletions(-)
> 
> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
> index 171351aee6fc..ffa0d74dd195 100644
> --- a/include/linux/v4l2-controls.h
> +++ b/include/linux/v4l2-controls.h
> @@ -469,6 +469,10 @@ enum v4l2_mpeg_video_h264_level {
>  	V4L2_MPEG_VIDEO_H264_LEVEL_4_2	= 13,
>  	V4L2_MPEG_VIDEO_H264_LEVEL_5_0	= 14,
>  	V4L2_MPEG_VIDEO_H264_LEVEL_5_1	= 15,
> +	V4L2_MPEG_VIDEO_H264_LEVEL_5_2	= 16,
> +	V4L2_MPEG_VIDEO_H264_LEVEL_6_0	= 17,
> +	V4L2_MPEG_VIDEO_H264_LEVEL_6_1	= 18,
> +	V4L2_MPEG_VIDEO_H264_LEVEL_6_2	= 19,
>  };
>  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA	(V4L2_CID_MPEG_BASE+360)
>  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA	(V4L2_CID_MPEG_BASE+361)
> @@ -497,6 +501,7 @@ enum v4l2_mpeg_video_h264_profile {
>  	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA	= 14,
>  	V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH		= 15,
>  	V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH		= 16,
> +	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH		= 17,
>  };
>  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT	(V4L2_CID_MPEG_BASE+364)
>  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH	(V4L2_CID_MPEG_BASE+365)
> @@ -914,22 +919,10 @@ enum v4l2_auto_focus_range {
>  #define V4L2_CID_PAN_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+32)
>  #define V4L2_CID_TILT_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+33)
> 
> -/*
> - * This version of the v4l2-controls.h header part of the libcamera sources has
> - * deviated from the version distributed by the mainline Linux kernel.
> - *
> - * Specifically, this version includes temporary definitions of a few custom
> - * controls (V4L2_CID_CAMERA_SENSOR_ROTATION and
> - * V4L2_CID_CAMERA_SENSOR_LOCATION) which have not yet made their way to
> - * upstream Linux.
> - *
> - * When updating this header with a more recent version, make sure the new
> - * version has those additional controls defined.
> - */
> -#define V4L2_CID_CAMERA_SENSOR_LOCATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> -#define V4L2_LOCATION_FRONT			0
> -#define V4L2_LOCATION_BACK			1
> -#define V4L2_LOCATION_EXTERNAL			2
> +#define V4L2_CID_CAMERA_ORIENTATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> +#define V4L2_CAMERA_ORIENTATION_FRONT		0
> +#define V4L2_CAMERA_ORIENTATION_BACK		1
> +#define V4L2_CAMERA_ORIENTATION_EXTERNAL	2
> 
>  #define V4L2_CID_CAMERA_SENSOR_ROTATION		(V4L2_CID_CAMERA_CLASS_BASE+35)
> 
> @@ -1055,6 +1048,7 @@ enum v4l2_jpeg_chroma_subsampling {
>  #define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
>  #define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
>  #define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
> +#define V4L2_CID_UNIT_CELL_SIZE			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
> 
> 
>  /* Image processing controls */
Jacopo Mondi May 19, 2020, 2:19 p.m. UTC | #2
Hi Laurent,

On Tue, May 19, 2020 at 04:52:45PM +0300, Laurent Pinchart wrote:
> Hi Jacopo,
>
> Thank you for the patch.
>
> On Tue, May 19, 2020 at 02:50:50PM +0200, Jacopo Mondi wrote:
> > Update include/linux/v4l2-controls.h with the latest version from the
> > Linux kernel media tree master.
>
> Could you please mention the commit ID ?
>
> Instead of pulling a random commit ID, one option would be to only
> replace the control macros we need, similarly to what we did in
> 972bb30c4b2fdd50f8fc02683130fd45b0d793f6, and then update to v5.8 when
> it will be released (or most likely v5.8-rc1 already to avoid delays).

That would work as well, as I only need to replace LOCATION with
ORIENTATION. If that's ok, I'll re-send updating the header and the
control parsing routines to use ORIENTATIOn

Thanks
  j

>
> > The most notable update is the definition of the V4L2_CID_ORIENTATION
> > control that replaces the downstream V4L2_CID_LOCATION.
> >
> > The here copied version is not a 1-to-1 copy of the kernel exported
> > header , because of this conflicting definition
> >
> > < /* The base for the bcm2835-isp driver controls.
> > <  * We reserve 16 controls for this driver. */
> > < #define V4L2_CID_USER_BCM2835_ISP_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> > > /*
> > >  * The base for the atmel isc driver controls.
> > >  * We reserve 32 controls for this driver.
> > >  */
> > > #define V4L2_CID_USER_ATMEL_ISC_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> >
> > In order to keep the RPi pipeline working, keep the downstream
> > V4L2_CID_USER_BCM2835_ISP_BASE definition and post-pone the inclusion
> > of V4L2_CID_USER_ATMEL_ISC_BASE, which is not used by libcamera.
> >
> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > ---
> >  include/linux/v4l2-controls.h | 26 ++++++++++----------------
> >  1 file changed, 10 insertions(+), 16 deletions(-)
> >
> > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
> > index 171351aee6fc..ffa0d74dd195 100644
> > --- a/include/linux/v4l2-controls.h
> > +++ b/include/linux/v4l2-controls.h
> > @@ -469,6 +469,10 @@ enum v4l2_mpeg_video_h264_level {
> >  	V4L2_MPEG_VIDEO_H264_LEVEL_4_2	= 13,
> >  	V4L2_MPEG_VIDEO_H264_LEVEL_5_0	= 14,
> >  	V4L2_MPEG_VIDEO_H264_LEVEL_5_1	= 15,
> > +	V4L2_MPEG_VIDEO_H264_LEVEL_5_2	= 16,
> > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_0	= 17,
> > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_1	= 18,
> > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_2	= 19,
> >  };
> >  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA	(V4L2_CID_MPEG_BASE+360)
> >  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA	(V4L2_CID_MPEG_BASE+361)
> > @@ -497,6 +501,7 @@ enum v4l2_mpeg_video_h264_profile {
> >  	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA	= 14,
> >  	V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH		= 15,
> >  	V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH		= 16,
> > +	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH		= 17,
> >  };
> >  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT	(V4L2_CID_MPEG_BASE+364)
> >  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH	(V4L2_CID_MPEG_BASE+365)
> > @@ -914,22 +919,10 @@ enum v4l2_auto_focus_range {
> >  #define V4L2_CID_PAN_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+32)
> >  #define V4L2_CID_TILT_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+33)
> >
> > -/*
> > - * This version of the v4l2-controls.h header part of the libcamera sources has
> > - * deviated from the version distributed by the mainline Linux kernel.
> > - *
> > - * Specifically, this version includes temporary definitions of a few custom
> > - * controls (V4L2_CID_CAMERA_SENSOR_ROTATION and
> > - * V4L2_CID_CAMERA_SENSOR_LOCATION) which have not yet made their way to
> > - * upstream Linux.
> > - *
> > - * When updating this header with a more recent version, make sure the new
> > - * version has those additional controls defined.
> > - */
> > -#define V4L2_CID_CAMERA_SENSOR_LOCATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> > -#define V4L2_LOCATION_FRONT			0
> > -#define V4L2_LOCATION_BACK			1
> > -#define V4L2_LOCATION_EXTERNAL			2
> > +#define V4L2_CID_CAMERA_ORIENTATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> > +#define V4L2_CAMERA_ORIENTATION_FRONT		0
> > +#define V4L2_CAMERA_ORIENTATION_BACK		1
> > +#define V4L2_CAMERA_ORIENTATION_EXTERNAL	2
> >
> >  #define V4L2_CID_CAMERA_SENSOR_ROTATION		(V4L2_CID_CAMERA_CLASS_BASE+35)
> >
> > @@ -1055,6 +1048,7 @@ enum v4l2_jpeg_chroma_subsampling {
> >  #define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
> >  #define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
> >  #define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
> > +#define V4L2_CID_UNIT_CELL_SIZE			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
> >
> >
> >  /* Image processing controls */
>
> --
> Regards,
>
> Laurent Pinchart
Laurent Pinchart May 19, 2020, 2:31 p.m. UTC | #3
Hi Jacopo,

On Tue, May 19, 2020 at 04:19:08PM +0200, Jacopo Mondi wrote:
> On Tue, May 19, 2020 at 04:52:45PM +0300, Laurent Pinchart wrote:
> > On Tue, May 19, 2020 at 02:50:50PM +0200, Jacopo Mondi wrote:
> > > Update include/linux/v4l2-controls.h with the latest version from the
> > > Linux kernel media tree master.
> >
> > Could you please mention the commit ID ?
> >
> > Instead of pulling a random commit ID, one option would be to only
> > replace the control macros we need, similarly to what we did in
> > 972bb30c4b2fdd50f8fc02683130fd45b0d793f6, and then update to v5.8 when
> > it will be released (or most likely v5.8-rc1 already to avoid delays).
> 
> That would work as well, as I only need to replace LOCATION with
> ORIENTATION. If that's ok, I'll re-send updating the header and the
> control parsing routines to use ORIENTATIOn

I think I would prefer that, and then doing a larger update from
v5.8(-rcx).

> > > The most notable update is the definition of the V4L2_CID_ORIENTATION
> > > control that replaces the downstream V4L2_CID_LOCATION.
> > >
> > > The here copied version is not a 1-to-1 copy of the kernel exported
> > > header , because of this conflicting definition
> > >
> > > < /* The base for the bcm2835-isp driver controls.
> > > <  * We reserve 16 controls for this driver. */
> > > < #define V4L2_CID_USER_BCM2835_ISP_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> > > > /*
> > > >  * The base for the atmel isc driver controls.
> > > >  * We reserve 32 controls for this driver.
> > > >  */
> > > > #define V4L2_CID_USER_ATMEL_ISC_BASE		(V4L2_CID_USER_BASE + 0x10c0)
> > >
> > > In order to keep the RPi pipeline working, keep the downstream
> > > V4L2_CID_USER_BCM2835_ISP_BASE definition and post-pone the inclusion
> > > of V4L2_CID_USER_ATMEL_ISC_BASE, which is not used by libcamera.
> > >
> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > > ---
> > >  include/linux/v4l2-controls.h | 26 ++++++++++----------------
> > >  1 file changed, 10 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
> > > index 171351aee6fc..ffa0d74dd195 100644
> > > --- a/include/linux/v4l2-controls.h
> > > +++ b/include/linux/v4l2-controls.h
> > > @@ -469,6 +469,10 @@ enum v4l2_mpeg_video_h264_level {
> > >  	V4L2_MPEG_VIDEO_H264_LEVEL_4_2	= 13,
> > >  	V4L2_MPEG_VIDEO_H264_LEVEL_5_0	= 14,
> > >  	V4L2_MPEG_VIDEO_H264_LEVEL_5_1	= 15,
> > > +	V4L2_MPEG_VIDEO_H264_LEVEL_5_2	= 16,
> > > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_0	= 17,
> > > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_1	= 18,
> > > +	V4L2_MPEG_VIDEO_H264_LEVEL_6_2	= 19,
> > >  };
> > >  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA	(V4L2_CID_MPEG_BASE+360)
> > >  #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA	(V4L2_CID_MPEG_BASE+361)
> > > @@ -497,6 +501,7 @@ enum v4l2_mpeg_video_h264_profile {
> > >  	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA	= 14,
> > >  	V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH		= 15,
> > >  	V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH		= 16,
> > > +	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH		= 17,
> > >  };
> > >  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT	(V4L2_CID_MPEG_BASE+364)
> > >  #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH	(V4L2_CID_MPEG_BASE+365)
> > > @@ -914,22 +919,10 @@ enum v4l2_auto_focus_range {
> > >  #define V4L2_CID_PAN_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+32)
> > >  #define V4L2_CID_TILT_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+33)
> > >
> > > -/*
> > > - * This version of the v4l2-controls.h header part of the libcamera sources has
> > > - * deviated from the version distributed by the mainline Linux kernel.
> > > - *
> > > - * Specifically, this version includes temporary definitions of a few custom
> > > - * controls (V4L2_CID_CAMERA_SENSOR_ROTATION and
> > > - * V4L2_CID_CAMERA_SENSOR_LOCATION) which have not yet made their way to
> > > - * upstream Linux.
> > > - *
> > > - * When updating this header with a more recent version, make sure the new
> > > - * version has those additional controls defined.
> > > - */
> > > -#define V4L2_CID_CAMERA_SENSOR_LOCATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> > > -#define V4L2_LOCATION_FRONT			0
> > > -#define V4L2_LOCATION_BACK			1
> > > -#define V4L2_LOCATION_EXTERNAL			2
> > > +#define V4L2_CID_CAMERA_ORIENTATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
> > > +#define V4L2_CAMERA_ORIENTATION_FRONT		0
> > > +#define V4L2_CAMERA_ORIENTATION_BACK		1
> > > +#define V4L2_CAMERA_ORIENTATION_EXTERNAL	2
> > >
> > >  #define V4L2_CID_CAMERA_SENSOR_ROTATION		(V4L2_CID_CAMERA_CLASS_BASE+35)
> > >
> > > @@ -1055,6 +1048,7 @@ enum v4l2_jpeg_chroma_subsampling {
> > >  #define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
> > >  #define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
> > >  #define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
> > > +#define V4L2_CID_UNIT_CELL_SIZE			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)
> > >
> > >
> > >  /* Image processing controls */

Patch

diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
index 171351aee6fc..ffa0d74dd195 100644
--- a/include/linux/v4l2-controls.h
+++ b/include/linux/v4l2-controls.h
@@ -469,6 +469,10 @@  enum v4l2_mpeg_video_h264_level {
 	V4L2_MPEG_VIDEO_H264_LEVEL_4_2	= 13,
 	V4L2_MPEG_VIDEO_H264_LEVEL_5_0	= 14,
 	V4L2_MPEG_VIDEO_H264_LEVEL_5_1	= 15,
+	V4L2_MPEG_VIDEO_H264_LEVEL_5_2	= 16,
+	V4L2_MPEG_VIDEO_H264_LEVEL_6_0	= 17,
+	V4L2_MPEG_VIDEO_H264_LEVEL_6_1	= 18,
+	V4L2_MPEG_VIDEO_H264_LEVEL_6_2	= 19,
 };
 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA	(V4L2_CID_MPEG_BASE+360)
 #define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA	(V4L2_CID_MPEG_BASE+361)
@@ -497,6 +501,7 @@  enum v4l2_mpeg_video_h264_profile {
 	V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA	= 14,
 	V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH		= 15,
 	V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH		= 16,
+	V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_HIGH		= 17,
 };
 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT	(V4L2_CID_MPEG_BASE+364)
 #define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH	(V4L2_CID_MPEG_BASE+365)
@@ -914,22 +919,10 @@  enum v4l2_auto_focus_range {
 #define V4L2_CID_PAN_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+32)
 #define V4L2_CID_TILT_SPEED			(V4L2_CID_CAMERA_CLASS_BASE+33)

-/*
- * This version of the v4l2-controls.h header part of the libcamera sources has
- * deviated from the version distributed by the mainline Linux kernel.
- *
- * Specifically, this version includes temporary definitions of a few custom
- * controls (V4L2_CID_CAMERA_SENSOR_ROTATION and
- * V4L2_CID_CAMERA_SENSOR_LOCATION) which have not yet made their way to
- * upstream Linux.
- *
- * When updating this header with a more recent version, make sure the new
- * version has those additional controls defined.
- */
-#define V4L2_CID_CAMERA_SENSOR_LOCATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
-#define V4L2_LOCATION_FRONT			0
-#define V4L2_LOCATION_BACK			1
-#define V4L2_LOCATION_EXTERNAL			2
+#define V4L2_CID_CAMERA_ORIENTATION		(V4L2_CID_CAMERA_CLASS_BASE+34)
+#define V4L2_CAMERA_ORIENTATION_FRONT		0
+#define V4L2_CAMERA_ORIENTATION_BACK		1
+#define V4L2_CAMERA_ORIENTATION_EXTERNAL	2

 #define V4L2_CID_CAMERA_SENSOR_ROTATION		(V4L2_CID_CAMERA_CLASS_BASE+35)

@@ -1055,6 +1048,7 @@  enum v4l2_jpeg_chroma_subsampling {
 #define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
 #define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
 #define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)
+#define V4L2_CID_UNIT_CELL_SIZE			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)


 /* Image processing controls */