Thread (1 message) 1 message, 1 author, 2016-09-21

Re: [PATCH v5 2/2] media: Add a driver for the ov5645 camera sensor.

From: Sakari Ailus <hidden>
Date: 2016-09-21 20:54:43
Also in: linux-media

Hi Todor,

Todor Tomov wrote:
Hi Sakari,

One more question below:

On 08/25/2016 10:18 AM, Sakari Ailus wrote:
quoted
quoted
quoted
quoted
+
+static struct v4l2_subdev_core_ops ov5645_core_ops = {
+	.s_power = ov5645_s_power,
+};
+
+static struct v4l2_subdev_video_ops ov5645_video_ops = {
+	.s_stream = ov5645_s_stream,
+};
+
+static struct v4l2_subdev_pad_ops ov5645_subdev_pad_ops = {
+	.enum_mbus_code = ov5645_enum_mbus_code,
+	.enum_frame_size = ov5645_enum_frame_size,
+	.get_fmt = ov5645_get_format,
+	.set_fmt = ov5645_set_format,
+	.get_selection = ov5645_get_selection,
Could you add init_cfg() pad op to initialise the try format and selections?
Yes, I'll do that.
If I follow the code correctly this init_cfg() is called whenever the device is opened, right?
This means that the format will be reset to default values every time the userspace opens the device.
So I wonder if this is what we really want, or do we want to keep the last set format instead. For
example if we use media-ctl only to get the current format, this is already enough - it opens the
subdev node and resets the format to default.
What's getting set in init_cfg() called through open system call is the
try format, not the active format.

Whether to choose the default or current format for the try format for a
file handle was discussed some years ago and we indeed settled to use
the default one, since that's independent of whatever configuration
happened to be set --- quite possibly by a different application. AFAIR.

-- 
Kind regards,

Sakari Ailus
sakari.ailus-X3B1VOXEql0@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help