Thanks Pawel for this enhancement. The app_offset is needed in the ICS for the app to store meta data header in recording frame. --Mingcheng -----Original Message----- From: Pawel Osciak [mailto:pawel@xxxxxxxxxx] Sent: Monday, November 21, 2011 9:27 PM To: linux-media@xxxxxxxxxxxxxxx Cc: Zhu, Mingcheng; hverkuil@xxxxxxxxx; Pawel Osciak; Marek Szyprowski Subject: [PATCH v1 2/2] vb2: add support for app_offset field of the v4l2_plane struct The app_offset can only be set by userspace and will be passed by vb2 to the driver. Signed-off-by: Pawel Osciak <pawel@xxxxxxxxxx> CC: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> --- drivers/media/video/videobuf2-core.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 979e544..41cc8e9 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -830,6 +830,11 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb, const struct v4l2_buffer *b, } } + /* App offset can only be set by userspace, for all types */ + for (plane = 0; plane < vb->num_planes; ++plane) + v4l2_planes[plane].app_offset = + b->m.planes[plane].app_offset; + if (b->memory == V4L2_MEMORY_USERPTR) { for (plane = 0; plane < vb->num_planes; ++plane) { v4l2_planes[plane].m.userptr = -- 1.7.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html