go7007 patch for 3.2.x
Subsystems (2)
PATCH 1/1 go7007 patch for 3.2.x
please reply this at [email protected] I`ve some trouble
- add new tuning option for card(
V4L2_MPEG_VIDEO_ENCODING_H263
,V4L2_CID_MPEG_VIDEO_B_FRAMES)
- add framesizes&frameintervals control
- tested&realize motion detector control(
GO7007IOC_REGION_NUMBER
,GO7007IOC_PIXEL_THRESOLD
,GO7007IOC_MOTION_THRESOLD
,GO7007IOC_TRIGGER
,GO7007IOC_REGION_CONTROL
,GO7007IOC_CLIP_LEFT
,GO7007IOC_CLIP_TOP
,GO7007IOC_CLIP_WIDTH
,GO7007IOC_CLIP_HEIGHT)Tested with Angelo PCI-MPG24(Adlink) with go7007&tw2804 onboard Regards Volokh
drivers/staging/media/go7007/go7007.h +57 -19
@@ -21,12 +21,27 @@* to select between MPEG1, MPEG2, and MPEG4 */ #define V4L2_PIX_FMT_MPEG4 v4l2_fourcc('M', 'P', 'G', '4')/* MPEG4 */ +/* Temporary defines until accepted in v4l2-api (videodev2.h) */ +#ifndef V4L2_MPEG_STREAM_TYPE_MPEG_ELEM +#define V4L2_MPEG_STREAM_TYPE_MPEG_ELEM 6/* MPEG elementary stream */ +#endif +#ifndef V4L2_MPEG_VIDEO_ENCODING_MPEG_4 +#define V4L2_MPEG_VIDEO_ENCODING_MPEG_4 3 +#endif + +#ifndef V4L2_MPEG_VIDEO_ENCODING_H263 +#define V4L2_MPEG_VIDEO_ENCODING_H263 4 +#endif + +///deprecated defs +#if 0 /* These will be replaced with a better interface * soon, so don't get too attached to them */ #define GO7007IOC_S_BITRATE _IOW('V', BASE_VIDIOC_PRIVATE + 0, int)#define GO7007IOC_G_BITRATE _IOR('V', BASE_VIDIOC_PRIVATE + 1, int) -enum go7007_aspect_ratio { +enum go7007_aspect_ratio +{GO7007_ASPECT_RATIO_1_1 =0 ,GO7007_ASPECT_RATIO_4_3_NTSC =1 , GO7007_ASPECT_RATIO_4_3_PAL = 2,
@@ -35,7 +50,8 @@ enum go7007_aspect_ratio { };/* Used to set generic compression parameters */ -struct go7007_comp_params { +struct go7007_comp_params +{__u32 gop_size;__u32 max_b_frames;enum go7007_aspect_ratio aspect_ratio;
@@ -46,14 +62,16 @@ struct go7007_comp_params {#define GO7007_COMP_CLOSED_GOP 0x00000001#define GO7007_COMP_OMIT_SEQ_HEADER 0x00000002 -enum go7007_mpeg_video_standard { +enum go7007_mpeg_video_standard +{GO7007_MPEG_VIDEO_MPEG1 =0 ,GO7007_MPEG_VIDEO_MPEG2 =1 ,GO7007_MPEG_VIDEO_MPEG4 =2 , };/* Used to set parameters for V4L2_PIX_FMT_MPEG format */ -struct go7007_mpeg_params { +struct go7007_mpeg_params +{enum go7007_mpeg_video_standard mpeg_video_standard;__u32 flags;__u32 pali;
@@ -83,21 +101,6 @@ struct go7007_mpeg_params {#define GO7007_MPEG4_PROFILE_AS_L4 GO7007_MPEG_PROFILE(4, 0xf4)#define GO7007_MPEG4_PROFILE_AS_L5 GO7007_MPEG_PROFILE(4, 0xf5) -struct go7007_md_params { -__u16 region; -__u16 trigger; -__u16 pixel_threshold; -__u16 motion_threshold; -__u32 reserved[8 ]; -}; - -struct go7007_md_region { -__u16 region; -__u16 flags; -struct v4l2_clip *clips; -__u32 reserved[8 ]; -}; -#define GO7007IOC_S_MPEG_PARAMS _IOWR('V', BASE_VIDIOC_PRIVATE + 2, \ struct go7007_mpeg_params)#define GO7007IOC_G_MPEG_PARAMS _IOR('V', BASE_VIDIOC_PRIVATE + 3, \
@@ -112,3 +115,38 @@ struct go7007_md_region { struct go7007_md_params)#define GO7007IOC_S_MD_REGION _IOW('V', BASE_VIDIOC_PRIVATE + 8, \ struct go7007_md_region) +#endif + +struct go7007_md_params +{ +__u16 region; +__u16 trigger; +__u16 pixel_threshold; +__u16 motion_threshold; +__u32 reserved[8 ]; +}; + +struct go7007_md_region +{ +__u16 region; +__u16 flags; +struct v4l2_clip *clips; +__u32 reserved[8 ]; +}; + +#define GO7007IOC_REGION_NUMBER V4L2_CID_PRIVATE_BASE +#define GO7007IOC_PIXEL_THRESOLD V4L2_CID_PRIVATE_BASE+1 +#define GO7007IOC_MOTION_THRESOLD V4L2_CID_PRIVATE_BASE+2 +#define GO7007IOC_TRIGGER V4L2_CID_PRIVATE_BASE+3 +#define GO7007IOC_REGION_CONTROL V4L2_CID_PRIVATE_BASE+4 +#define GO7007IOC_CLIP_LEFT V4L2_CID_PRIVATE_BASE+5 +#define GO7007IOC_CLIP_TOP V4L2_CID_PRIVATE_BASE+6 +#define GO7007IOC_CLIP_WIDTH V4L2_CID_PRIVATE_BASE+7 +#define GO7007IOC_CLIP_HEIGHT V4L2_CID_PRIVATE_BASE+8 + +enum RegionControl +{ + rcAdd=0 + ,rcDelete=1 + ,rcClear=2 +};
drivers/staging/media/go7007/go7007-priv.h +2 -1
@@ -215,7 +215,8 @@ struct go7007 { } modet[4 ];unsigned char modet_map[1624 ];unsigned char active_map[216 ]; - +struct v4l2_rect fClipRegion; + unsigned char fCurrentRegion:2;/* Video streaming */ struct go7007_buffer *active_buf;enum go7007_parser_state state;
drivers/staging/media/go7007/go7007-v4l2.c +675 -404
1,176 lines not on this page · raw message
drivers/staging/media/go7007/wis-tw2804.c +244 -174
482 lines not on this page · raw message
Greg KH
maintainerQuoted 17 lines · volokh
please reply this at [email protected] I`ve some trouble
- add new tuning option for card(
V4L2_MPEG_VIDEO_ENCODING_H263 ,V4L2_CID_MPEG_VIDEO_B_FRAMES) - add framesizes&frameintervals control - tested&realize motion detector control( GO7007IOC_REGION_NUMBER ,GO7007IOC_PIXEL_THRESOLD ,GO7007IOC_MOTION_THRESOLD ,GO7007IOC_TRIGGER ,GO7007IOC_REGION_CONTROL ,GO7007IOC_CLIP_LEFT ,GO7007IOC_CLIP_TOP ,GO7007IOC_CLIP_WIDTH ,GO7007IOC_CLIP_HEIGHT)
Quoted 4 lines
Tested with Angelo PCI-MPG24(Adlink) with go7007&tw2804 onboard Regards Volokh
diff -uprN -X linux-3.2.11-vanilla/Documentation/dontdiff
linux-3.2.11-vanilla/drivers/staging/media/go7007/go7007.hlinux-3.2.11/drivers/staging/media/go7007/go7007.h
You would need to make this at least against the 3.3 kernel, preferably against the linux-next branch.
Also, you didn't read the Documentation/SubmittingPatches file, please follow it properly, otherwise there is nothing we can do with your patch :(
Hi Volokh,
Quoted 3 lines
You would need to make this at least against the 3.3 kernel, preferably against the linux-next branch.
You can follow the instructions here to work off the for_v3.4 branch:
http://git.linuxtv.org/media_tree.git
Quoted 3 lines
Also, you didn't read the
Documentation/SubmittingPatchesfile, please follow it properly, otherwise there is nothing we can do with your patch :(
I think you will find this useful:
http://www.youtube.com/watch?v=LLBrBBImJt4
It shows how you can submit patches using nothing but git. It's *much* easier than using diff yourself.
It also shows the usage of checkpatch and get_maintainers script.
Also, please read other patches sent to the list, so you can see how commit messages should look like.
A little googling won't hurt:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
http://spheredev.org/wiki/Git_for_the_lazy#Writing_good_commit_messages
Don't get discourage if your patches aren't accepted right away:
it looks hard at first, but it's only until you get used to.
Hope it helps,
Ezequiel.