Round Two: videodev2.h additions for UVC merge
PATCH 1/1 Round Two: videodev2.h additions for UVC merge
Hello All,
Please review and pull from http://ifup.org/hg/v4l-spec for:
- Backed out changeset d002378ff8c2
- [v4l] Add new user class controls and deprecate others
- [v4l] Add camera class control definitions
b/linux/drivers/media/video/Kconfig | 9 -- b/linux/include/linux/videodev2.h | 5 - b/mailimport | 4 - linux/include/linux/videodev2.h | 50 ++++++++++++++-- 4 files changed, 46 insertions(+), 22 deletions(-)
V4L specification updates related to these changes can be found here:
http://ifup.org/~philips/review/v4l2-proposed/x784.htm#CAMERA-CLASS
http://ifup.org/~philips/review/v4l2-proposed/x536.htm
Thanks,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
PATCH 1/1 Backed out changeset d002378ff8c2
# HG changeset patch
# User Brandon Philips <[email protected]> # Date 1202175426 28800
# Node ID 0810f250d078bf6159de69569828c07cb54f4389 # Parent d002378ff8c2d8e8bf3842d8f05469dd68398fc6 Backed out changeset d002378ff8c2
This change had a number of issues:
- Adding an undiscussed control
- Adding an unrelated mailimport change
- Adding an unrelated kconfig change
linux/drivers/media/video/Kconfig +0 -9
@@ -836,13 +836,4 @@ config USB_STKWEBCAM endif # V4L_USB_DRIVERS -config SOC_CAMERA - tristate "SoC camera support" - depends on VIDEO_V4L2 - select VIDEOBUF_DMA_SG - help - SoC Camera is a common API to several cameras, not connecting - over a bus like PCI or USB. For example some i2c camera connected - directly to the data bus of an SoC. - endif # VIDEO_CAPTURE_DRIVERS
linux/include/linux/videodev2.h +1 -4
@@ -281,7 +281,6 @@ struct v4l2_pix_format#define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4')/* 32 BGR-8-8-8-8 */ #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4')/* 32 RGB-8-8-8-8 */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y')/* 8 Greyscale */ -#define V4L2_PIX_FMT_Y16 v4l2_fourcc('Y','1','6',' ')/* 16 Greyscale */ #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P','A','L','8')/* 8 8-bit palette */ #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9')/* 9 YVU 4:1:0 */ #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2')/* 12 YVU 4:2:0 */
@@ -308,7 +307,6 @@ struct v4l2_pix_format/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1')/* 8 BGBG.. GRGR.. */ -#define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B','Y','R','2')/* 16 BGBG.. GRGR.. */ /* compressed formats */ #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G')/* Motion-JPEG */
@@ -864,8 +862,7 @@ struct v4l2_querymenu#define V4L2_CID_VFLIP (V4L2_CID_BASE+21)#define V4L2_CID_HCENTER (V4L2_CID_BASE+22)#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) -#define V4L2_CID_AUTOEXPOSURE (V4L2_CID_BASE+24) -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+25)/* last CID + 1 */ +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)/* last CID + 1 */ /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
mailimport +0 -4
@@ -224,10 +224,6 @@ if [ -d "$NAME" ]; then else echo "Processing patches from tree $NAME" for i in $NAME/*; do - if [ ! -r $i ]; then - sudo chmod og+r $i - fi - echo "$i" proccess_patch "$i" done
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Re: [PATCH 1 of 3] Backed out changeset d002378ff8c2
linux/drivers/media/video/Kconfig
Quoted 15 lines · Brandon Philips
# HG changeset patch
# User Brandon Philips <[email protected]> # Date 1202175426 28800
# Node ID0810f250d078bf6159de69569828c07cb54f4389# Parentd002378ff8c2d8e8bf3842d8f05469dd68398fc6Backed out changesetd002378ff8c2This change had a number of issues:
- Adding an undiscussed control
- Adding an unrelated mailimport change
- Adding an unrelated kconfig changelinux/drivers/media/video/Kconfig +0
-0
Brandon, you wanted -p1 style patches - same for 2/3 and 3/3.
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Re: [PATCH 1 of 3] Backed out changeset d002378ff8c2
Quoted 14 lines · On Tue, 5 Feb 2008 10:52:01 +0100 (CET) Guennadi Liakhovetski…
Quoted 12 lines · Brandon Philips
# HG changeset patch
# User Brandon Philips <[email protected]> # Date 1202175426 28800
# Node ID0810f250d078bf6159de69569828c07cb54f4389# Parentd002378ff8c2d8e8bf3842d8f05469dd68398fc6Backed out changesetd002378ff8c2This change had a number of issues:
- Adding an undiscussed control
- Adding an unrelated mailimport change
- Adding an unrelated kconfig change
Quoted 5 lines
linux/drivers/media/video/Kconfig
Quoted 3 lines
linux/drivers/media/video/Kconfig +0
-0Brandon, you wanted -p1 style patches - same for 2/3 and 3/3.
The patch is against -hg tree. So, the patch is correct. However, I've already committed a backout patch at the tree. Probably, -hg will merge this correctly.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
PATCH 1/1 Add new user class controls and deprecate others
In reply to Brandon Philips# HG changeset patch
# User Brandon Philips <[email protected]>
# Date 1202175714 28800
# Node ID a030ada87143b0e559aecb0bbd9fc1ed7384d0be # Parent 0810f250d078bf6159de69569828c07cb54f4389 [v4l] Add new user class controls and deprecate others
These changes should appear in the next update of the v4l2spec.
HCENTER and VCENTER are unused in the tree so I added a _DEPRECATED postfix so applications can remove their use.
linux/include/linux/videodev2.h +18 -5
@@ -848,21 +848,34 @@ struct v4l2_querymenu#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8)#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9)#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) -#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11)/* Deprecated */ #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12)#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13)#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14)#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15)#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) -#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)/* ? Not sure */ +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA)/* Deprecated */ #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17)#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18)#define V4L2_CID_GAIN (V4L2_CID_BASE+19)#define V4L2_CID_HFLIP (V4L2_CID_BASE+20)#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) -#define V4L2_CID_HCENTER (V4L2_CID_BASE+22) -#define V4L2_CID_VCENTER (V4L2_CID_BASE+23) -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+24)/* last CID + 1 */ + +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ +#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) + +#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) +enum v4l2_power_line_frequency { +V4L2_CID_POWER_LINE_FREQUENCY_DISABLED =0 , +V4L2_CID_POWER_LINE_FREQUENCY_50HZ =1 , +V4L2_CID_POWER_LINE_FREQUENCY_60HZ =2 , +}; +#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) +#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) +#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) +#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29)/* last CID + 1 */ /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Re: [PATCH 2 of 3] [v4l] Add new user class controls and deprecate others
Quoted 9 lines · Brandon Philips
linux/include/linux/videodev2.h +9
-0+ +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ +#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) + +#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) +enum v4l2_power_line_frequency { +V4L2_CID_POWER_LINE_FREQUENCY_DISABLED =0 , +V4L2_CID_POWER_LINE_FREQUENCY_50HZ =1 ,
linux/include/linux/videodev2.h struct v4l2_querymenu · line 881
Quoted 10 lines
linux/include/linux/videodev2.h +7
-0+ V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, +}; +#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) +#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) +#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) +#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29)/* last CID + 1 */ /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
Also, please, remove trailing blanks in 7 lines:
Adds trailing whitespace.
.dotest/patch:26:#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22)
Adds trailing whitespace.
.dotest/patch:27:#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23)
Adds trailing whitespace.
.dotest/patch:29:#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) Adds trailing whitespace.
.dotest/patch:35:#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25)
Adds trailing whitespace.
.dotest/patch:36:#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
(git only listed 5 out of 7 lines explicitly above)
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Re: [PATCH 2 of 3] [v4l] Add new user class controls and deprecate others
Quoted 37 lines · Guennadi Liakhovetski
Quoted 9 lines · Brandon Philips
linux/include/linux/videodev2.h +9
-0+ +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ +#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) + +#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) +enum v4l2_power_line_frequency { +V4L2_CID_POWER_LINE_FREQUENCY_DISABLED =0 , +V4L2_CID_POWER_LINE_FREQUENCY_50HZ =1 ,linux/include/linux/videodev2.h struct v4l2_querymenu · line 881
Quoted 10 lines
linux/include/linux/videodev2.h +7
-0+ V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, +}; +#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) +#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) +#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) +#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29)/* last CID + 1 */ /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)Also, please, remove trailing blanks in 7 lines:
Adds trailing whitespace.
.dotest/patch:26:#defineV4L2_CID_HCENTER_DEPRECATED(V4L2_CID_BASE+22)
Adds trailing whitespace.
.dotest/patch:27:#defineV4L2_CID_VCENTER_DEPRECATED(V4L2_CID_BASE+23)
Adds trailing whitespace.
.dotest/patch:29:#defineV4L2_CID_POWER_LINE_FREQUENCY(V4L2_CID_BASE+24) Adds trailing whitespace.
.dotest/patch:35:#defineV4L2_CID_HUE_AUTO(V4L2_CID_BASE+25)
Adds trailing whitespace.
.dotest/patch:36:#defineV4L2_CID_WHITE_BALANCE_TEMPERATURE(V4L2_CID_BASE+26)
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Quoted 1 line
(git only listed 5 out of 7 lines explicitly above)
Sorry about that, I am used to git and quilt checking for me :)
Mauro: the patches have been updated here http://ifup.org/hg/v4l-spec
For future reference here is a commit hook that I stole from git to check for trailing whitespace.
http://ifup.org/~philips/hg-pre-commit
Cheers,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
Re: [PATCH 2 of 3] [v4l] Add new user class controls and deprecate others
Quoted 38 lines · On Tue, 5 Feb 2008 15:43:56 -0800 Brandon Philips <[email protected]> wrote:
Quoted 37 lines · Guennadi Liakhovetski
Quoted 9 lines · Brandon Philips
linux/include/linux/videodev2.h +9
-0+ +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */ +#define V4L2_CID_HCENTER_DEPRECATED (V4L2_CID_BASE+22) +#define V4L2_CID_VCENTER_DEPRECATED (V4L2_CID_BASE+23) + +#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) +enum v4l2_power_line_frequency { +V4L2_CID_POWER_LINE_FREQUENCY_DISABLED =0 , +V4L2_CID_POWER_LINE_FREQUENCY_50HZ =1 ,linux/include/linux/videodev2.h struct v4l2_querymenu · line 881
Quoted 10 lines
linux/include/linux/videodev2.h +7
-0+ V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, +}; +#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) +#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) +#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) +#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29)/* last CID + 1 */ /* MPEG-class control IDs defined by V4L2 */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)Also, please, remove trailing blanks in 7 lines:
Adds trailing whitespace.
.dotest/patch:26:#defineV4L2_CID_HCENTER_DEPRECATED(V4L2_CID_BASE+22)
Adds trailing whitespace.
.dotest/patch:27:#defineV4L2_CID_VCENTER_DEPRECATED(V4L2_CID_BASE+23)
Adds trailing whitespace.
.dotest/patch:29:#defineV4L2_CID_POWER_LINE_FREQUENCY(V4L2_CID_BASE+24) Adds trailing whitespace.
.dotest/patch:35:#defineV4L2_CID_HUE_AUTO(V4L2_CID_BASE+25)
Adds trailing whitespace.
.dotest/patch:36:#defineV4L2_CID_WHITE_BALANCE_TEMPERATURE(V4L2_CID_BASE+26)
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.
Quoted 6 lines
Quoted 1 line
(git only listed 5 out of 7 lines explicitly above)
Sorry about that, I am used to git and quilt checking for me :)
Mauro: the patches have been updated here http://ifup.org/hg/v4l-spec
Committed.
Quoted 4 lines
For future reference here is a commit hook that I stole from git to check for trailing whitespace.
http://ifup.org/~philips/hg-pre-commit
You should use "make commit". It calls some scripts that strips bad whitespaces, checks CodingStyle violations, re-generates Documentation/video4linux/CARDLIST.*, ...
The patch above has one intesting thing: it checks for merge conflicts. Maybe we can add this also to make commit scripts.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
PATCH 1/1 Add camera class control definitions
In reply to Brandon Philips# HG changeset patch
# User Brandon Philips <[email protected]> # Date 1201510166 28800
# Node ID 88a377fb918b28696d086194cb25951667b0c7f9 # Parent a030ada87143b0e559aecb0bbd9fc1ed7384d0be [v4l] Add camera class control definitions
Add all of the recently proposed camera class controls. These controls should appear in the next version of the v4l2spec.
linux/include/linux/videodev2.h +27 -0
@@ -792,6 +792,7 @@ struct v4l2_ext_controls/* Values for ctrl_class field */ #define V4L2_CTRL_CLASS_USER 0x00980000/* Old-style 'user' controls */ #define V4L2_CTRL_CLASS_MPEG 0x00990000/* MPEG-compression controls */ +#define V4L2_CTRL_CLASS_CAMERA 0x009a0000/* Camera class controls */ #define V4L2_CTRL_ID_MASK (0x0fffffff)#define V4L2_CTRL_ID2CLASS (id) ((id) & 0x0fff0000UL)
@@ -1063,6 +1064,32 @@ enum v4l2_mpeg_cx2341x_video_median_filt#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) +/* Camera class control IDs */ +#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) +#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) + +#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) +enum v4l2_exposure_auto_type { +V4L2_EXPOSURE_AUTO =0 , +V4L2_EXPOSURE_MANUAL =1 , +V4L2_EXPOSURE_SHUTTER_PRIORITY =2 , +V4L2_EXPOSURE_APERTURE_PRIORITY =3 +}; +#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) +#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) + +#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) +#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) +#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) +#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) + +#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) +#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) + +#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) +#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) +#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) +/* * T U N I N G */
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list