All of lore.kernel.org
 help / color / mirror / Atom feed
* [Query] Is there a spec to request video sensor information?
@ 2010-09-09 18:51 Aguirre, Sergio
  2010-09-13 15:27 ` Sakari Ailus
  0 siblings, 1 reply; 6+ messages in thread
From: Aguirre, Sergio @ 2010-09-09 18:51 UTC (permalink / raw)
  To: linux-media; +Cc: Laurent Pinchart, sakari.ailus

Hi,

I was wondering if there exists a current standard way to query a
Imaging sensor driver for knowing things like the signal vert/horz blanking time.

In an old TI custom driver, we used to have a private IOCTL in the sensor
Driver we interfaced with the omap3 ISP, which was basically reporting:

- Active resolution (Actual image size)
- Full resolution (Above size + dummy pixel columns/rows representing blanking times)

However I resist to keep importing that custom interface, since I think its
Something that could be already part of an standard API.

Any pointers will be much appreciated.

Regards,
Sergio


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

* Re: [Query] Is there a spec to request video sensor information?
  2010-09-09 18:51 [Query] Is there a spec to request video sensor information? Aguirre, Sergio
@ 2010-09-13 15:27 ` Sakari Ailus
  2010-09-13 17:06   ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Sakari Ailus @ 2010-09-13 15:27 UTC (permalink / raw)
  To: Aguirre, Sergio; +Cc: linux-media, Laurent Pinchart, Ivan Ivanov

Aguirre, Sergio wrote:
> Hi,

Hi Sergio,

> I was wondering if there exists a current standard way to query a
> Imaging sensor driver for knowing things like the signal vert/horz blanking time.
> 
> In an old TI custom driver, we used to have a private IOCTL in the sensor
> Driver we interfaced with the omap3 ISP, which was basically reporting:
> 
> - Active resolution (Actual image size)
> - Full resolution (Above size + dummy pixel columns/rows representing blanking times)
> 
> However I resist to keep importing that custom interface, since I think its
> Something that could be already part of an standard API.

The N900 sensor drivers currently use private controls for this purpose.
That is an issue which should be resolved. I agree there should be a
uniform, standard way to access this information.

What we currently have is this, not in upstream:

---
/* SMIA-type sensor information */
#define V4L2_CID_MODE_CLASS_BASE                (V4L2_CTRL_CLASS_MODE |
0x900)
#define V4L2_CID_MODE_CLASS                     (V4L2_CTRL_CLASS_MODE | 1)
#define V4L2_CID_MODE_FRAME_WIDTH               (V4L2_CID_MODE_CLASS_BASE+1)
#define V4L2_CID_MODE_FRAME_HEIGHT              (V4L2_CID_MODE_CLASS_BASE+2)
#define V4L2_CID_MODE_VISIBLE_WIDTH             (V4L2_CID_MODE_CLASS_BASE+3)
#define V4L2_CID_MODE_VISIBLE_HEIGHT            (V4L2_CID_MODE_CLASS_BASE+4)
#define V4L2_CID_MODE_PIXELCLOCK                (V4L2_CID_MODE_CLASS_BASE+5)
#define V4L2_CID_MODE_SENSITIVITY               (V4L2_CID_MODE_CLASS_BASE+6)
---

The pixel clock is read-only but some of the others should likely be
changeable.

Regards,

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

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

* Re: [Query] Is there a spec to request video sensor information?
  2010-09-13 15:27 ` Sakari Ailus
@ 2010-09-13 17:06   ` Hans Verkuil
  2010-09-16  9:40     ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2010-09-13 17:06 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: Aguirre, Sergio, linux-media, Laurent Pinchart, Ivan Ivanov

On Monday, September 13, 2010 17:27:52 Sakari Ailus wrote:
> Aguirre, Sergio wrote:
> > Hi,
> 
> Hi Sergio,
> 
> > I was wondering if there exists a current standard way to query a
> > Imaging sensor driver for knowing things like the signal vert/horz blanking time.
> > 
> > In an old TI custom driver, we used to have a private IOCTL in the sensor
> > Driver we interfaced with the omap3 ISP, which was basically reporting:
> > 
> > - Active resolution (Actual image size)
> > - Full resolution (Above size + dummy pixel columns/rows representing blanking times)
> > 
> > However I resist to keep importing that custom interface, since I think its
> > Something that could be already part of an standard API.
> 
> The N900 sensor drivers currently use private controls for this purpose.
> That is an issue which should be resolved. I agree there should be a
> uniform, standard way to access this information.
> 
> What we currently have is this, not in upstream:
> 
> ---
> /* SMIA-type sensor information */
> #define V4L2_CID_MODE_CLASS_BASE                (V4L2_CTRL_CLASS_MODE |
> 0x900)
> #define V4L2_CID_MODE_CLASS                     (V4L2_CTRL_CLASS_MODE | 1)
> #define V4L2_CID_MODE_FRAME_WIDTH               (V4L2_CID_MODE_CLASS_BASE+1)
> #define V4L2_CID_MODE_FRAME_HEIGHT              (V4L2_CID_MODE_CLASS_BASE+2)
> #define V4L2_CID_MODE_VISIBLE_WIDTH             (V4L2_CID_MODE_CLASS_BASE+3)
> #define V4L2_CID_MODE_VISIBLE_HEIGHT            (V4L2_CID_MODE_CLASS_BASE+4)
> #define V4L2_CID_MODE_PIXELCLOCK                (V4L2_CID_MODE_CLASS_BASE+5)
> #define V4L2_CID_MODE_SENSITIVITY               (V4L2_CID_MODE_CLASS_BASE+6)
> ---
> 
> The pixel clock is read-only but some of the others should likely be
> changeable.

It is very similar to the VIDIOC_G/S_DV_TIMINGS ioctls. I think we should look
into adding an e.g. V4L2_DV_SMIA_SENSOR type or something along those lines.

I'm no sensor expert, so I don't know what sort of timing information is needed
for the various sensor types. But I'm sure there are other people who have this
knowledge. It would be useful if someone can list the information that you need
from the various sensor types. Based on that we can see if this ioctl is a good
fit.

Regards,

	Hans

> 
> Regards,
> 
> 

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco

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

* Re: [Query] Is there a spec to request video sensor information?
  2010-09-13 17:06   ` Hans Verkuil
@ 2010-09-16  9:40     ` Laurent Pinchart
  2010-09-16 10:36       ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2010-09-16  9:40 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Sakari Ailus, Aguirre, Sergio, linux-media, Ivan Ivanov

Hi Hans,

On Monday 13 September 2010 19:06:20 Hans Verkuil wrote:
> On Monday, September 13, 2010 17:27:52 Sakari Ailus wrote:
> > Aguirre, Sergio wrote:
> > > I was wondering if there exists a current standard way to query a
> > > Imaging sensor driver for knowing things like the signal vert/horz
> > > blanking time.
> > > 
> > > In an old TI custom driver, we used to have a private IOCTL in the
> > > sensor Driver we interfaced with the omap3 ISP, which was basically
> > > reporting:
> > > 
> > > - Active resolution (Actual image size)
> > > - Full resolution (Above size + dummy pixel columns/rows representing
> > > blanking times)
> > > 
> > > However I resist to keep importing that custom interface, since I think
> > > its Something that could be already part of an standard API.
> > 
> > The N900 sensor drivers currently use private controls for this purpose.
> > That is an issue which should be resolved. I agree there should be a
> > uniform, standard way to access this information.
> > 
> > What we currently have is this, not in upstream:
> > 
> > ---
> > /* SMIA-type sensor information */
> > #define V4L2_CID_MODE_CLASS_BASE            (V4L2_CTRL_CLASS_MODE | 0x900)
> > #define V4L2_CID_MODE_CLASS                 (V4L2_CTRL_CLASS_MODE | 1)
> > #define V4L2_CID_MODE_FRAME_WIDTH           (V4L2_CID_MODE_CLASS_BASE+1)
> > #define V4L2_CID_MODE_FRAME_HEIGHT          (V4L2_CID_MODE_CLASS_BASE+2)
> > #define V4L2_CID_MODE_VISIBLE_WIDTH         (V4L2_CID_MODE_CLASS_BASE+3)
> > #define V4L2_CID_MODE_VISIBLE_HEIGHT        (V4L2_CID_MODE_CLASS_BASE+4)
> > #define V4L2_CID_MODE_PIXELCLOCK            (V4L2_CID_MODE_CLASS_BASE+5)
> > #define V4L2_CID_MODE_SENSITIVITY           (V4L2_CID_MODE_CLASS_BASE+6) 
---
> > 
> > The pixel clock is read-only but some of the others should likely be
> > changeable.
> 
> It is very similar to the VIDIOC_G/S_DV_TIMINGS ioctls. I think we should
> look into adding an e.g. V4L2_DV_SMIA_SENSOR type or something along those
> lines.

I'm not sure if sensivity would fit in there. The rest probably would.

> I'm no sensor expert, so I don't know what sort of timing information is
> needed for the various sensor types. But I'm sure there are other people
> who have this knowledge. It would be useful if someone can list the
> information that you need from the various sensor types. Based on that we
> can see if this ioctl is a good fit.

Another possibility could be to report the information using the media 
controller framework and an upcoming MEDIA_IOC_ENTITY_INFO ioctl.

-- 
Regards,

Laurent Pinchart

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

* Re: [Query] Is there a spec to request video sensor information?
  2010-09-16  9:40     ` Laurent Pinchart
@ 2010-09-16 10:36       ` Hans Verkuil
  2010-09-16 11:07         ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2010-09-16 10:36 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Sakari Ailus, Aguirre, Sergio, linux-media, Ivan Ivanov


> Hi Hans,
>
> On Monday 13 September 2010 19:06:20 Hans Verkuil wrote:
>> On Monday, September 13, 2010 17:27:52 Sakari Ailus wrote:
>> > Aguirre, Sergio wrote:
>> > > I was wondering if there exists a current standard way to query a
>> > > Imaging sensor driver for knowing things like the signal vert/horz
>> > > blanking time.
>> > >
>> > > In an old TI custom driver, we used to have a private IOCTL in the
>> > > sensor Driver we interfaced with the omap3 ISP, which was basically
>> > > reporting:
>> > >
>> > > - Active resolution (Actual image size)
>> > > - Full resolution (Above size + dummy pixel columns/rows
>> representing
>> > > blanking times)
>> > >
>> > > However I resist to keep importing that custom interface, since I
>> think
>> > > its Something that could be already part of an standard API.
>> >
>> > The N900 sensor drivers currently use private controls for this
>> purpose.
>> > That is an issue which should be resolved. I agree there should be a
>> > uniform, standard way to access this information.
>> >
>> > What we currently have is this, not in upstream:
>> >
>> > ---
>> > /* SMIA-type sensor information */
>> > #define V4L2_CID_MODE_CLASS_BASE            (V4L2_CTRL_CLASS_MODE |
>> 0x900)
>> > #define V4L2_CID_MODE_CLASS                 (V4L2_CTRL_CLASS_MODE | 1)
>> > #define V4L2_CID_MODE_FRAME_WIDTH
>> (V4L2_CID_MODE_CLASS_BASE+1)
>> > #define V4L2_CID_MODE_FRAME_HEIGHT
>> (V4L2_CID_MODE_CLASS_BASE+2)
>> > #define V4L2_CID_MODE_VISIBLE_WIDTH
>> (V4L2_CID_MODE_CLASS_BASE+3)
>> > #define V4L2_CID_MODE_VISIBLE_HEIGHT
>> (V4L2_CID_MODE_CLASS_BASE+4)
>> > #define V4L2_CID_MODE_PIXELCLOCK
>> (V4L2_CID_MODE_CLASS_BASE+5)
>> > #define V4L2_CID_MODE_SENSITIVITY
>> (V4L2_CID_MODE_CLASS_BASE+6)
> ---
>> >
>> > The pixel clock is read-only but some of the others should likely be
>> > changeable.
>>
>> It is very similar to the VIDIOC_G/S_DV_TIMINGS ioctls. I think we
>> should
>> look into adding an e.g. V4L2_DV_SMIA_SENSOR type or something along
>> those
>> lines.
>
> I'm not sure if sensivity would fit in there. The rest probably would.
>
>> I'm no sensor expert, so I don't know what sort of timing information is
>> needed for the various sensor types. But I'm sure there are other people
>> who have this knowledge. It would be useful if someone can list the
>> information that you need from the various sensor types. Based on that
>> we
>> can see if this ioctl is a good fit.
>
> Another possibility could be to report the information using the media
> controller framework and an upcoming MEDIA_IOC_ENTITY_INFO ioctl.

Are you talking about timing information? That doesn't belong in the media
framework. But I think I didn't quite understood what you meant here.

Regards,

         Hans

>
> --
> Regards,
>
> Laurent Pinchart
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco


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

* Re: [Query] Is there a spec to request video sensor information?
  2010-09-16 10:36       ` Hans Verkuil
@ 2010-09-16 11:07         ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2010-09-16 11:07 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Sakari Ailus, Aguirre, Sergio, linux-media, Ivan Ivanov

Hi Hans,

On Thursday 16 September 2010 12:36:34 Hans Verkuil wrote:
> > On Monday 13 September 2010 19:06:20 Hans Verkuil wrote:
> >> On Monday, September 13, 2010 17:27:52 Sakari Ailus wrote:

[snip]

> >> > What we currently have is this, not in upstream:
> >> > 
> >> > ---
> >> > /* SMIA-type sensor information */
> >> > #define V4L2_CID_MODE_CLASS_BASE         (V4L2_CTRL_CLASS_MODE | 0x900)
> >> > #define V4L2_CID_MODE_CLASS              (V4L2_CTRL_CLASS_MODE | 1)
> >> > #define V4L2_CID_MODE_FRAME_WIDTH        (V4L2_CID_MODE_CLASS_BASE+1)
> >> > #define V4L2_CID_MODE_FRAME_HEIGHT       (V4L2_CID_MODE_CLASS_BASE+2)
> >> > #define V4L2_CID_MODE_VISIBLE_WIDTH      (V4L2_CID_MODE_CLASS_BASE+3)
> >> > #define V4L2_CID_MODE_VISIBLE_HEIGHT     (V4L2_CID_MODE_CLASS_BASE+4)
> >> > #define V4L2_CID_MODE_PIXELCLOCK         (V4L2_CID_MODE_CLASS_BASE+5)
> >> > #define V4L2_CID_MODE_SENSITIVITY        (V4L2_CID_MODE_CLASS_BASE+6)
> > 
> > ---
> > 
> >> > The pixel clock is read-only but some of the others should likely be
> >> > changeable.
> >> 
> >> It is very similar to the VIDIOC_G/S_DV_TIMINGS ioctls. I think we should
> >> look into adding an e.g. V4L2_DV_SMIA_SENSOR type or something along
> >> those lines.
> > 
> > I'm not sure if sensivity would fit in there. The rest probably would.
> > 
> >> I'm no sensor expert, so I don't know what sort of timing information is
> >> needed for the various sensor types. But I'm sure there are other people
> >> who have this knowledge. It would be useful if someone can list the
> >> information that you need from the various sensor types. Based on that
> >> we can see if this ioctl is a good fit.
> > 
> > Another possibility could be to report the information using the media
> > controller framework and an upcoming MEDIA_IOC_ENTITY_INFO ioctl.
> 
> Are you talking about timing information? That doesn't belong in the media
> framework. But I think I didn't quite understood what you meant here.

Driver need to report driver-specific entity information (such as extension 
unit GUIDs for the UVC driver for instance). The idea was to add a media 
controller ioctl for that. Sensor information could be reported using the same 
mechanism.

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2010-09-16 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09 18:51 [Query] Is there a spec to request video sensor information? Aguirre, Sergio
2010-09-13 15:27 ` Sakari Ailus
2010-09-13 17:06   ` Hans Verkuil
2010-09-16  9:40     ` Laurent Pinchart
2010-09-16 10:36       ` Hans Verkuil
2010-09-16 11:07         ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.