public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] V4L changes for OMAP 3 camera, try 2
@ 2008-10-06 11:07 Sakari Ailus
       [not found] ` <12232912722008-git-send-email-sakari.ailus@nokia.com>
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: Linux and Kernel Video
  Cc: Zutshi Vimarsh (Nokia-D-MSW/Helsinki),
	Toivonen Tuukka Olli Artturi, Nagalla, Hari

Hi,

I've made some changes to the patchset I sent some time ago.

As suggested by Laurent Pinchart, VIDIOC_G_PRIV_MEM is no more. 
According to suggestion from Hans, I have also added more comments to 
the patch that changes how vidioc_int_s_power works.

The patches apply against v4l-dvb, Linus' tree or linux-omap.

Regards,

-- 
Sakari Ailus
sakari.ailus@nokia.com


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] V4L: Int if: Add cropcap, g_crop and s_crop commands.
       [not found] ` <12232912722008-git-send-email-sakari.ailus@nokia.com>
@ 2008-10-06 11:07   ` Sakari Ailus
  2008-10-06 11:07     ` [PATCH] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Signed-off-by: Sameer Venkatraman <sameerv@ti.com>
Signed-off-by: Mohit Jalori <mjalori@ti.com>
---
 include/media/v4l2-int-device.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index d9a0053..cee941c 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -170,6 +170,9 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_queryctrl_num,
 	vidioc_int_g_ctrl_num,
 	vidioc_int_s_ctrl_num,
+	vidioc_int_cropcap_num,
+	vidioc_int_g_crop_num,
+	vidioc_int_s_crop_num,
 	vidioc_int_g_parm_num,
 	vidioc_int_s_parm_num,
 
@@ -266,6 +269,9 @@ V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *);
 V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *);
 V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *);
 V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *);
+V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *);
+V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *);
+V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *);
 V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *);
 V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
 
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] V4L: Add 10-bit RAW Bayer formats
  2008-10-06 11:07   ` [PATCH] V4L: Int if: Add cropcap, g_crop and s_crop commands Sakari Ailus
@ 2008-10-06 11:07     ` Sakari Ailus
  2008-10-06 11:07       ` [PATCH] V4L: Int if: Define new power state changes Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Add 10-bit raw bayer format expanded to 16 bits. Adds also definition
for 10-bit raw bayer format dpcm-compressed to 8 bits.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 include/linux/videodev2.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 303d93f..b80e5ca 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -315,6 +315,13 @@ 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_SGBRG8  v4l2_fourcc('G', 'B', 'R', 'G') /*  8  GBGB.. RGRG.. */
+/*
+ * 10bit raw bayer, expanded to 16 bits
+ * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
+ */
+#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
+/* 10bit raw bayer DPCM compressed to 8 bits */
+#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
 #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16  BGBG.. GRGR.. */
 
 /* compressed formats */
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] V4L: Int if: Define new power state changes
  2008-10-06 11:07     ` [PATCH] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
@ 2008-10-06 11:07       ` Sakari Ailus
  2008-10-06 11:07         ` [PATCH] V4L: Int if: Export more interfaces to modules Sakari Ailus
  2008-10-06 16:38         ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil
  0 siblings, 2 replies; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Use enum v4l2_power instead of int as second argument to
vidioc_int_s_power. The new functionality is that standby state is also
recognised.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 include/media/v4l2-int-device.h |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index cee941c..bf11de7 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -96,6 +96,26 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg);
  *
  */
 
+/*
+ * Slave power state & commands
+ *
+ * V4L2_POWER_OFF, V4L2_POWER_ON and V4L2_POWER_STANDBY are the slave
+ * power states. Resume is a command for transitioning form
+ * V4L2_POWER_STANDBY to V4L2_POWER_ON.
+ *
+ * Possible state transitions:
+ *
+ * V4L2_POWER_OFF: V4L2_POWER_ON
+ * V4L2_POWER_ON: V4L2_POWER_OFF, V4L2_POWER_STANDBY
+ * V4L2_POWER_STANDBY: V4L2_POWER_OFF, V4L2_POWER_ON (V4L2_POWER_RESUME)
+ */
+enum v4l2_power {
+	V4L2_POWER_OFF = 0,
+	V4L2_POWER_ON,
+	V4L2_POWER_STANDBY,
+	V4L2_POWER_RESUME,
+};
+
 /* Slave interface type. */
 enum v4l2_if_type {
 	/*
@@ -185,7 +205,7 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_dev_init_num = 1000,
 	/* Delinitialise the device at slave detach. */
 	vidioc_int_dev_exit_num,
-	/* Set device power state: 0 is off, non-zero is on. */
+	/* Set device power state. */
 	vidioc_int_s_power_num,
 	/*
 	* Get slave private data, e.g. platform-specific slave
@@ -277,7 +297,7 @@ V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
 
 V4L2_INT_WRAPPER_0(dev_init);
 V4L2_INT_WRAPPER_0(dev_exit);
-V4L2_INT_WRAPPER_1(s_power, int, );
+V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
 V4L2_INT_WRAPPER_1(g_priv, void, *);
 V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
 V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] V4L: Int if: Export more interfaces to modules
  2008-10-06 11:07       ` [PATCH] V4L: Int if: Define new power state changes Sakari Ailus
@ 2008-10-06 11:07         ` Sakari Ailus
  2008-10-06 11:07           ` [PATCH] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls Sakari Ailus
  2008-10-06 16:38         ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil
  1 sibling, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Export v4l2_int_device_try_attach_all. This allows initiating the
initialisation of int if device after the drivers have been registered.

Also allow drivers to call ioctls if v4l2-int-if was compiled as
module.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 drivers/media/video/v4l2-int-device.c |    5 ++++-
 include/media/v4l2-int-device.h       |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c
index 0e45499..a935bae 100644
--- a/drivers/media/video/v4l2-int-device.c
+++ b/drivers/media/video/v4l2-int-device.c
@@ -32,7 +32,7 @@
 static DEFINE_MUTEX(mutex);
 static LIST_HEAD(int_list);
 
-static void v4l2_int_device_try_attach_all(void)
+void v4l2_int_device_try_attach_all(void)
 {
 	struct v4l2_int_device *m, *s;
 
@@ -66,6 +66,7 @@ static void v4l2_int_device_try_attach_all(void)
 		}
 	}
 }
+EXPORT_SYMBOL_GPL(v4l2_int_device_try_attach_all);
 
 static int ioctl_sort_cmp(const void *a, const void *b)
 {
@@ -144,6 +145,7 @@ int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd)
 		find_ioctl(d->u.slave, cmd,
 			   (v4l2_int_ioctl_func *)no_such_ioctl_0))(d);
 }
+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_0);
 
 static int no_such_ioctl_1(struct v4l2_int_device *d, void *arg)
 {
@@ -156,5 +158,6 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg)
 		find_ioctl(d->u.slave, cmd,
 			   (v4l2_int_ioctl_func *)no_such_ioctl_1))(d, arg);
 }
+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_1);
 
 MODULE_LICENSE("GPL");
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index bf11de7..9b7b008 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -84,6 +84,8 @@ struct v4l2_int_device {
 	void *priv;
 };
 
+void v4l2_int_device_try_attach_all(void);
+
 int v4l2_int_device_register(struct v4l2_int_device *d);
 void v4l2_int_device_unregister(struct v4l2_int_device *d);
 
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls.
  2008-10-06 11:07         ` [PATCH] V4L: Int if: Export more interfaces to modules Sakari Ailus
@ 2008-10-06 11:07           ` Sakari Ailus
  0 siblings, 0 replies; 14+ messages in thread
From: Sakari Ailus @ 2008-10-06 11:07 UTC (permalink / raw)
  To: video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 include/media/v4l2-int-device.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index 9b7b008..1356055 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -218,6 +218,8 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_g_ifparm_num,
 	/* Does the slave need to be reset after VIDIOC_DQBUF? */
 	vidioc_int_g_needs_reset_num,
+	vidioc_int_enum_framesizes_num,
+	vidioc_int_enum_frameintervals_num,
 
 	/*
 	 *
@@ -303,6 +305,8 @@ V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
 V4L2_INT_WRAPPER_1(g_priv, void, *);
 V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
 V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
+V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *);
+V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *);
 
 V4L2_INT_WRAPPER_0(reset);
 V4L2_INT_WRAPPER_0(init);
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] V4L: Int if: Define new power state changes
  2008-10-06 11:07       ` [PATCH] V4L: Int if: Define new power state changes Sakari Ailus
  2008-10-06 11:07         ` [PATCH] V4L: Int if: Export more interfaces to modules Sakari Ailus
@ 2008-10-06 16:38         ` Hans Verkuil
  2008-10-07 16:17           ` Sakari Ailus
  1 sibling, 1 reply; 14+ messages in thread
From: Hans Verkuil @ 2008-10-06 16:38 UTC (permalink / raw)
  To: video4linux-list
  Cc: vimarsh.zutshi, Sakari Ailus, tuukka.o.toivonen, hnagalla

Hi Sakari,

I'm OK with the other changes, but the V4L2_POWER_RESUME command in this 
patch is still really very ugly. In my opinion you should either let 
the slave store the old powerstate (this seems to be the more logical 
approach), or let s_power pass the old powerstate as an extra argument 
if you think it is really needed. But the RESUME command is just 
unnecessary. Without the RESUME there is no more need to document 
anything, since then it is suddenly self-documenting.

Regards,

	Hans

On Monday 06 October 2008 13:07:50 Sakari Ailus wrote:
> Use enum v4l2_power instead of int as second argument to
> vidioc_int_s_power. The new functionality is that standby state is
> also recognised.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
> ---
>  include/media/v4l2-int-device.h |   24 ++++++++++++++++++++++--
>  1 files changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/include/media/v4l2-int-device.h
> b/include/media/v4l2-int-device.h index cee941c..bf11de7 100644
> --- a/include/media/v4l2-int-device.h
> +++ b/include/media/v4l2-int-device.h
> @@ -96,6 +96,26 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d,
> int cmd, void *arg); *
>   */
>
> +/*
> + * Slave power state & commands
> + *
> + * V4L2_POWER_OFF, V4L2_POWER_ON and V4L2_POWER_STANDBY are the
> slave 
> + * power states. Resume is a command for transitioning form 
> + * V4L2_POWER_STANDBY to V4L2_POWER_ON.
> + *
> + * Possible state transitions:
> + *
> + * V4L2_POWER_OFF: V4L2_POWER_ON
> + * V4L2_POWER_ON: V4L2_POWER_OFF, V4L2_POWER_STANDBY
> + * V4L2_POWER_STANDBY: V4L2_POWER_OFF, V4L2_POWER_ON
> (V4L2_POWER_RESUME) + */
> +enum v4l2_power {
> +	V4L2_POWER_OFF = 0,
> +	V4L2_POWER_ON,
> +	V4L2_POWER_STANDBY,
> +	V4L2_POWER_RESUME,
> +};
> +
>  /* Slave interface type. */
>  enum v4l2_if_type {
>  	/*
> @@ -185,7 +205,7 @@ enum v4l2_int_ioctl_num {
>  	vidioc_int_dev_init_num = 1000,
>  	/* Delinitialise the device at slave detach. */
>  	vidioc_int_dev_exit_num,
> -	/* Set device power state: 0 is off, non-zero is on. */
> +	/* Set device power state. */
>  	vidioc_int_s_power_num,
>  	/*
>  	* Get slave private data, e.g. platform-specific slave
> @@ -277,7 +297,7 @@ V4L2_INT_WRAPPER_1(s_parm, struct
> v4l2_streamparm, *);
>
>  V4L2_INT_WRAPPER_0(dev_init);
>  V4L2_INT_WRAPPER_0(dev_exit);
> -V4L2_INT_WRAPPER_1(s_power, int, );
> +V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
>  V4L2_INT_WRAPPER_1(g_priv, void, *);
>  V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
>  V4L2_INT_WRAPPER_1(g_needs_reset, void, *);


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] V4L: Int if: Define new power state changes
  2008-10-06 16:38         ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil
@ 2008-10-07 16:17           ` Sakari Ailus
       [not found]             ` <12233962961256-git-send-email-sakari.ailus@nokia.com>
  2008-10-08  6:09             ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil
  0 siblings, 2 replies; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:17 UTC (permalink / raw)
  To: ext Hans Verkuil
  Cc: vimarsh.zutshi, video4linux-list, tuukka.o.toivonen, hnagalla

ext Hans Verkuil wrote:
> Hi Sakari,
> 
> I'm OK with the other changes, but the V4L2_POWER_RESUME command in this 
> patch is still really very ugly. In my opinion you should either let 
> the slave store the old powerstate (this seems to be the more logical 
> approach), or let s_power pass the old powerstate as an extra argument 
> if you think it is really needed. But the RESUME command is just 
> unnecessary. Without the RESUME there is no more need to document 
> anything, since then it is suddenly self-documenting.

Yeah, I agree. I'll remove that and send a new patchset, this time with
git-format-patch -n. :-)

Ps. Last time the first patch got caught by a spam filter and my hunch 
is that it'll happen again.

Regards,

-- 
Sakari Ailus
sakari.ailus@nokia.com

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 2/6] V4L: Int if: Add cropcap, g_crop and s_crop commands.
       [not found]             ` <12233962961256-git-send-email-sakari.ailus@nokia.com>
@ 2008-10-07 16:18               ` Sakari Ailus
  2008-10-07 16:18                 ` [PATCH 3/6] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:18 UTC (permalink / raw)
  To: hverkuil, video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Signed-off-by: Sameer Venkatraman <sameerv@ti.com>
Signed-off-by: Mohit Jalori <mjalori@ti.com>
---
 include/media/v4l2-int-device.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index d9a0053..cee941c 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -170,6 +170,9 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_queryctrl_num,
 	vidioc_int_g_ctrl_num,
 	vidioc_int_s_ctrl_num,
+	vidioc_int_cropcap_num,
+	vidioc_int_g_crop_num,
+	vidioc_int_s_crop_num,
 	vidioc_int_g_parm_num,
 	vidioc_int_s_parm_num,
 
@@ -266,6 +269,9 @@ V4L2_INT_WRAPPER_1(try_fmt_cap, struct v4l2_format, *);
 V4L2_INT_WRAPPER_1(queryctrl, struct v4l2_queryctrl, *);
 V4L2_INT_WRAPPER_1(g_ctrl, struct v4l2_control, *);
 V4L2_INT_WRAPPER_1(s_ctrl, struct v4l2_control, *);
+V4L2_INT_WRAPPER_1(cropcap, struct v4l2_cropcap, *);
+V4L2_INT_WRAPPER_1(g_crop, struct v4l2_crop, *);
+V4L2_INT_WRAPPER_1(s_crop, struct v4l2_crop, *);
 V4L2_INT_WRAPPER_1(g_parm, struct v4l2_streamparm, *);
 V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
 
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/6] V4L: Add 10-bit RAW Bayer formats
  2008-10-07 16:18               ` [PATCH 2/6] V4L: Int if: Add cropcap, g_crop and s_crop commands Sakari Ailus
@ 2008-10-07 16:18                 ` Sakari Ailus
  2008-10-07 16:18                   ` [PATCH 4/6] V4L: Int if: Define new power state changes Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:18 UTC (permalink / raw)
  To: hverkuil, video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Add 10-bit raw bayer format expanded to 16 bits. Adds also definition
for 10-bit raw bayer format dpcm-compressed to 8 bits.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
---
 include/linux/videodev2.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 303d93f..b80e5ca 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -315,6 +315,13 @@ 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_SGBRG8  v4l2_fourcc('G', 'B', 'R', 'G') /*  8  GBGB.. RGRG.. */
+/*
+ * 10bit raw bayer, expanded to 16 bits
+ * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
+ */
+#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
+/* 10bit raw bayer DPCM compressed to 8 bits */
+#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
 #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16  BGBG.. GRGR.. */
 
 /* compressed formats */
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/6] V4L: Int if: Define new power state changes
  2008-10-07 16:18                 ` [PATCH 3/6] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
@ 2008-10-07 16:18                   ` Sakari Ailus
  2008-10-07 16:18                     ` [PATCH 5/6] V4L: Int if: Export more interfaces to modules Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:18 UTC (permalink / raw)
  To: hverkuil, video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Use enum v4l2_power instead of int as second argument to
vidioc_int_s_power. The new functionality is that standby state is also
recognised.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 include/media/v4l2-int-device.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index cee941c..3351dcf 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -96,6 +96,12 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg);
  *
  */
 
+enum v4l2_power {
+	V4L2_POWER_OFF = 0,
+	V4L2_POWER_ON,
+	V4L2_POWER_STANDBY,
+};
+
 /* Slave interface type. */
 enum v4l2_if_type {
 	/*
@@ -185,7 +191,7 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_dev_init_num = 1000,
 	/* Delinitialise the device at slave detach. */
 	vidioc_int_dev_exit_num,
-	/* Set device power state: 0 is off, non-zero is on. */
+	/* Set device power state. */
 	vidioc_int_s_power_num,
 	/*
 	* Get slave private data, e.g. platform-specific slave
@@ -277,7 +283,7 @@ V4L2_INT_WRAPPER_1(s_parm, struct v4l2_streamparm, *);
 
 V4L2_INT_WRAPPER_0(dev_init);
 V4L2_INT_WRAPPER_0(dev_exit);
-V4L2_INT_WRAPPER_1(s_power, int, );
+V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
 V4L2_INT_WRAPPER_1(g_priv, void, *);
 V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
 V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/6] V4L: Int if: Export more interfaces to modules
  2008-10-07 16:18                   ` [PATCH 4/6] V4L: Int if: Define new power state changes Sakari Ailus
@ 2008-10-07 16:18                     ` Sakari Ailus
  2008-10-07 16:18                       ` [PATCH 6/6] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls Sakari Ailus
  0 siblings, 1 reply; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:18 UTC (permalink / raw)
  To: hverkuil, video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Export v4l2_int_device_try_attach_all. This allows initiating the
initialisation of int if device after the drivers have been registered.

Also allow drivers to call ioctls if v4l2-int-if was compiled as
module.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 drivers/media/video/v4l2-int-device.c |    5 ++++-
 include/media/v4l2-int-device.h       |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c
index 0e45499..a935bae 100644
--- a/drivers/media/video/v4l2-int-device.c
+++ b/drivers/media/video/v4l2-int-device.c
@@ -32,7 +32,7 @@
 static DEFINE_MUTEX(mutex);
 static LIST_HEAD(int_list);
 
-static void v4l2_int_device_try_attach_all(void)
+void v4l2_int_device_try_attach_all(void)
 {
 	struct v4l2_int_device *m, *s;
 
@@ -66,6 +66,7 @@ static void v4l2_int_device_try_attach_all(void)
 		}
 	}
 }
+EXPORT_SYMBOL_GPL(v4l2_int_device_try_attach_all);
 
 static int ioctl_sort_cmp(const void *a, const void *b)
 {
@@ -144,6 +145,7 @@ int v4l2_int_ioctl_0(struct v4l2_int_device *d, int cmd)
 		find_ioctl(d->u.slave, cmd,
 			   (v4l2_int_ioctl_func *)no_such_ioctl_0))(d);
 }
+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_0);
 
 static int no_such_ioctl_1(struct v4l2_int_device *d, void *arg)
 {
@@ -156,5 +158,6 @@ int v4l2_int_ioctl_1(struct v4l2_int_device *d, int cmd, void *arg)
 		find_ioctl(d->u.slave, cmd,
 			   (v4l2_int_ioctl_func *)no_such_ioctl_1))(d, arg);
 }
+EXPORT_SYMBOL_GPL(v4l2_int_ioctl_1);
 
 MODULE_LICENSE("GPL");
diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index 3351dcf..b5cee89 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -84,6 +84,8 @@ struct v4l2_int_device {
 	void *priv;
 };
 
+void v4l2_int_device_try_attach_all(void);
+
 int v4l2_int_device_register(struct v4l2_int_device *d);
 void v4l2_int_device_unregister(struct v4l2_int_device *d);
 
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/6] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls.
  2008-10-07 16:18                     ` [PATCH 5/6] V4L: Int if: Export more interfaces to modules Sakari Ailus
@ 2008-10-07 16:18                       ` Sakari Ailus
  0 siblings, 0 replies; 14+ messages in thread
From: Sakari Ailus @ 2008-10-07 16:18 UTC (permalink / raw)
  To: hverkuil, video4linux-list; +Cc: vimarsh.zutshi, tuukka.o.toivonen, hnagalla

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
---
 include/media/v4l2-int-device.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/media/v4l2-int-device.h b/include/media/v4l2-int-device.h
index b5cee89..9c2df41 100644
--- a/include/media/v4l2-int-device.h
+++ b/include/media/v4l2-int-device.h
@@ -204,6 +204,8 @@ enum v4l2_int_ioctl_num {
 	vidioc_int_g_ifparm_num,
 	/* Does the slave need to be reset after VIDIOC_DQBUF? */
 	vidioc_int_g_needs_reset_num,
+	vidioc_int_enum_framesizes_num,
+	vidioc_int_enum_frameintervals_num,
 
 	/*
 	 *
@@ -289,6 +291,8 @@ V4L2_INT_WRAPPER_1(s_power, enum v4l2_power, );
 V4L2_INT_WRAPPER_1(g_priv, void, *);
 V4L2_INT_WRAPPER_1(g_ifparm, struct v4l2_ifparm, *);
 V4L2_INT_WRAPPER_1(g_needs_reset, void, *);
+V4L2_INT_WRAPPER_1(enum_framesizes, struct v4l2_frmsizeenum, *);
+V4L2_INT_WRAPPER_1(enum_frameintervals, struct v4l2_frmivalenum, *);
 
 V4L2_INT_WRAPPER_0(reset);
 V4L2_INT_WRAPPER_0(init);
-- 
1.5.0.6

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] V4L: Int if: Define new power state changes
  2008-10-07 16:17           ` Sakari Ailus
       [not found]             ` <12233962961256-git-send-email-sakari.ailus@nokia.com>
@ 2008-10-08  6:09             ` Hans Verkuil
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Verkuil @ 2008-10-08  6:09 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: vimarsh.zutshi, video4linux-list, Mauro Carvalho Chehab,
	tuukka.o.toivonen, hnagalla

On Tuesday 07 October 2008 18:17:48 Sakari Ailus wrote:
> ext Hans Verkuil wrote:
> > Hi Sakari,
> >
> > I'm OK with the other changes, but the V4L2_POWER_RESUME command in
> > this patch is still really very ugly. In my opinion you should
> > either let the slave store the old powerstate (this seems to be the
> > more logical approach), or let s_power pass the old powerstate as
> > an extra argument if you think it is really needed. But the RESUME
> > command is just unnecessary. Without the RESUME there is no more
> > need to document anything, since then it is suddenly
> > self-documenting.
>
> Yeah, I agree. I'll remove that and send a new patchset, this time
> with git-format-patch -n. :-)
>
> Ps. Last time the first patch got caught by a spam filter and my
> hunch is that it'll happen again.

No problems this time.

Anyway, here is my SoB for this series of 6 patches:

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>

Mauro, can you merge there patches directly, or do you want me to setup 
a v4l-dvb tree for you that you can merge from?

Thanks,

	Hans

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-10-08  6:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 11:07 [PATCH 0/6] V4L changes for OMAP 3 camera, try 2 Sakari Ailus
     [not found] ` <12232912722008-git-send-email-sakari.ailus@nokia.com>
2008-10-06 11:07   ` [PATCH] V4L: Int if: Add cropcap, g_crop and s_crop commands Sakari Ailus
2008-10-06 11:07     ` [PATCH] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
2008-10-06 11:07       ` [PATCH] V4L: Int if: Define new power state changes Sakari Ailus
2008-10-06 11:07         ` [PATCH] V4L: Int if: Export more interfaces to modules Sakari Ailus
2008-10-06 11:07           ` [PATCH] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls Sakari Ailus
2008-10-06 16:38         ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil
2008-10-07 16:17           ` Sakari Ailus
     [not found]             ` <12233962961256-git-send-email-sakari.ailus@nokia.com>
2008-10-07 16:18               ` [PATCH 2/6] V4L: Int if: Add cropcap, g_crop and s_crop commands Sakari Ailus
2008-10-07 16:18                 ` [PATCH 3/6] V4L: Add 10-bit RAW Bayer formats Sakari Ailus
2008-10-07 16:18                   ` [PATCH 4/6] V4L: Int if: Define new power state changes Sakari Ailus
2008-10-07 16:18                     ` [PATCH 5/6] V4L: Int if: Export more interfaces to modules Sakari Ailus
2008-10-07 16:18                       ` [PATCH 6/6] V4L: Int if: Add enum_framesizes and enum_frameintervals ioctls Sakari Ailus
2008-10-08  6:09             ` [PATCH] V4L: Int if: Define new power state changes Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox