Skip to contentSkip to conversation

OMAP3 camera driver V4L2 g_priv_mem

PATCH New Mohit Jalori 1 participant 1 message Jul 1, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 5/16 OMAP3 camera driver V4L2 g_priv_mem

Quoted 1 line

From 3f9a1f1c20fadcd9fcc4fdb95f70a02a85e0140d Mon Sep 17 00:00:00 2001

From: Sakari Ailus <[email protected]>
Date: Thu, 8 May 2008 19:28:18 +0300
Subject: [PATCH] V4L: Add VIDIOC_G_PRIV_MEM

Some devices, for example image sensors, contain settings in their EEPROM memory that are useful to userspace programs. VIDIOC_G_PRIV_MEM can be used to read those settings.

This patch adds also the corresponding v4l2_int_device command.

---
 include/linux/videodev2.h       |    8 ++++++++
 include/media/v4l2-int-device.h |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)
include/linux/videodev2.h +8 -0
index 29a3e25..15c0f2b 100644
@@ -1370,6 +1370,13 @@ struct v4l2_chip_ident {
 	__u32 revision;    /* chip revision, chip specific */
 };
 
+/* VIDIOC_G_PRIV_MEM */
+struct v4l2_priv_mem {
+	__u32 offset;	/* offset to data */
+	__u32 length;	/* memory allocated to ptr or read length */
+	void *ptr;	/* pointer to allocated memory */
+};
+
 /*
  *	I O C T L   C O D E S   F O R   V I D E O   D E V I C E S
  *
@@ -1441,6 +1448,7 @@ struct v4l2_chip_ident {
 #define	VIDIOC_DBG_G_REGISTER 	_IOWR ('V', 80, struct v4l2_register)
 
 #define VIDIOC_G_CHIP_IDENT     _IOWR ('V', 81, struct v4l2_chip_ident)
+#define VIDIOC_G_PRIV_MEM	_IOWR ('V', 82, struct v4l2_priv_mem)
 #endif
 
 #ifdef __OLD_VIDIOC_
include/media/v4l2-int-device.h +3 -0
index 0eda169..fc14264 100644
@@ -309,6 +309,8 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_init_num,
 	/* VIDIOC_INT_G_CHIP_IDENT */
 	vidioc_int_g_chip_ident_num,
+	/* VIDIOC_INT_G_PRIV_MEM */
+	vidioc_int_g_priv_mem_num,
 
 	/*
 	 *
@@ -386,5 +388,6 @@ V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
 V4L2_INT_WRAPPER_0(reset);
 V4L2_INT_WRAPPER_0(init);
 V4L2_INT_WRAPPER_1(g_chip_ident, int, *);
+V4L2_INT_WRAPPER_1(g_priv_mem, struct v4l2_priv_mem, *);
 
 #endif
Signature · 6 lines
1.5.5.1

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list