* identifying camera sensor
@ 2009-03-04 14:12 Tuukka.O Toivonen
2009-03-04 14:43 ` [Camera] " ribrishimov
2009-03-05 0:42 ` DongSoo(Nathaniel) Kim
0 siblings, 2 replies; 4+ messages in thread
From: Tuukka.O Toivonen @ 2009-03-04 14:12 UTC (permalink / raw)
To: ext Hans Verkuil
Cc: linux-media@vger.kernel.org, Sakari Ailus,
camera@ok.research.nokia.com
Hi,
I am writing a generic driver for SMIA-compatible sensors.
SMIA-sensors have registers containing:
u16 model_id
u16 revision_number
u8 manufacturer_id
which could be used to detect the sensor.
However, since the driver is generic, it is not interested
of these values.
Nevertheless, in some cases user space applications want
to know the exact chip. For example, to get the highest
possible image quality, user space application might capture
an image and postprocess it using sensor-specific filtering
algorithms (which don't belong into kernel driver).
I am planning to export the chip identification information
to user space using VIDIOC_DBG_G_CHIP_IDENT.
Here's a sketch:
#define V4L2_IDENT_SMIA_BASE (0x53 << 24)
then in sensor driver's VIDIOC_DBG_G_CHIP_IDENT ioctl handler:
struct v4l2_dbg_chip_ident id;
id.ident = V4L2_IDENT_SMIA_BASE | (manufacturer_id << 16) | model_id;
id.revision = revision_number;
Do you think this is acceptable?
Alternatively, VIDIOC_QUERYCAP could be used to identify the sensor.
Would it make more sense if it would return something like
capability.card: `omap3/smia-sensor-12-1234-5678//'
where 12 would be manufacturer_id, 1234 model_id, and
5678 revision_number?
I'll start writing a patch as soon as you let me know
which would be the best alternative. Thanks!
- Tuukka
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Camera] identifying camera sensor
2009-03-04 14:12 identifying camera sensor Tuukka.O Toivonen
@ 2009-03-04 14:43 ` ribrishimov
2009-03-04 23:00 ` Trent Piepho
2009-03-05 0:42 ` DongSoo(Nathaniel) Kim
1 sibling, 1 reply; 4+ messages in thread
From: ribrishimov @ 2009-03-04 14:43 UTC (permalink / raw)
To: 'Tuukka.O Toivonen'
Cc: camera, linux-media, 'ext Hans Verkuil'
Hi,
Some sensor ID is definitely needed at least for Camera daemon and iCapture
to load the appropriate tuning data.
Ivan can comment which the preferable approach.
Best regards,
RADO
-----Original Message-----
From: camera-bounces@ok.research.nokia.com
[mailto:camera-bounces@ok.research.nokia.com] On Behalf Of Tuukka.O Toivonen
Sent: Wednesday, March 04, 2009 4:13 PM
To: ext Hans Verkuil
Cc: camera@ok.research.nokia.com; linux-media@vger.kernel.org
Subject: [Camera] identifying camera sensor
Hi,
I am writing a generic driver for SMIA-compatible sensors.
SMIA-sensors have registers containing:
u16 model_id
u16 revision_number
u8 manufacturer_id
which could be used to detect the sensor.
However, since the driver is generic, it is not interested
of these values.
Nevertheless, in some cases user space applications want
to know the exact chip. For example, to get the highest
possible image quality, user space application might capture
an image and postprocess it using sensor-specific filtering
algorithms (which don't belong into kernel driver).
I am planning to export the chip identification information
to user space using VIDIOC_DBG_G_CHIP_IDENT.
Here's a sketch:
#define V4L2_IDENT_SMIA_BASE (0x53 << 24)
then in sensor driver's VIDIOC_DBG_G_CHIP_IDENT ioctl handler:
struct v4l2_dbg_chip_ident id;
id.ident = V4L2_IDENT_SMIA_BASE | (manufacturer_id << 16) | model_id;
id.revision = revision_number;
Do you think this is acceptable?
Alternatively, VIDIOC_QUERYCAP could be used to identify the sensor.
Would it make more sense if it would return something like
capability.card: `omap3/smia-sensor-12-1234-5678//'
where 12 would be manufacturer_id, 1234 model_id, and
5678 revision_number?
I'll start writing a patch as soon as you let me know
which would be the best alternative. Thanks!
- Tuukka
_______________________________________________
Camera mailing list
Camera@ok.research.nokia.com
http://ok.research.nokia.com/cgi-bin/mailman/listinfo/camera
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Camera] identifying camera sensor
2009-03-04 14:43 ` [Camera] " ribrishimov
@ 2009-03-04 23:00 ` Trent Piepho
0 siblings, 0 replies; 4+ messages in thread
From: Trent Piepho @ 2009-03-04 23:00 UTC (permalink / raw)
To: ribrishimov
Cc: 'Tuukka.O Toivonen', camera, linux-media,
'ext Hans Verkuil'
On Wed, 4 Mar 2009, ribrishimov wrote:
> I am planning to export the chip identification information
> to user space using VIDIOC_DBG_G_CHIP_IDENT.
> Here's a sketch:
> #define V4L2_IDENT_SMIA_BASE (0x53 << 24)
> then in sensor driver's VIDIOC_DBG_G_CHIP_IDENT ioctl handler:
> struct v4l2_dbg_chip_ident id;
> id.ident = V4L2_IDENT_SMIA_BASE | (manufacturer_id << 16) | model_id;
> id.revision = revision_number;
>
> Do you think this is acceptable?
This is only meant for debugging and shouldn't be used by normal
software.
> Alternatively, VIDIOC_QUERYCAP could be used to identify the sensor.
> Would it make more sense if it would return something like
> capability.card: `omap3/smia-sensor-12-1234-5678//'
> where 12 would be manufacturer_id, 1234 model_id, and
> 5678 revision_number?
You could always try to decode the manufacturer name and maybe even the
model name. After all, pretty much every other driver does this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: identifying camera sensor
2009-03-04 14:12 identifying camera sensor Tuukka.O Toivonen
2009-03-04 14:43 ` [Camera] " ribrishimov
@ 2009-03-05 0:42 ` DongSoo(Nathaniel) Kim
1 sibling, 0 replies; 4+ messages in thread
From: DongSoo(Nathaniel) Kim @ 2009-03-05 0:42 UTC (permalink / raw)
To: Tuukka.O Toivonen
Cc: ext Hans Verkuil, linux-media@vger.kernel.org, Sakari Ailus,
camera@ok.research.nokia.com
Hi tuukka,
Chip identification could be used for many other camera devices. Not
only for SMIA compatible sensors.
It could be used for generic camera devices I guess for any other
reasons, like checking chip version on factory assembly line in mass
production.
Something like G_CHIP_IDENT (as Hans mentioned) should be cool.
Cheers,
Nate
On Wed, Mar 4, 2009 at 11:12 PM, Tuukka.O Toivonen
<tuukka.o.toivonen@nokia.com> wrote:
> Hi,
>
> I am writing a generic driver for SMIA-compatible sensors.
> SMIA-sensors have registers containing:
> u16 model_id
> u16 revision_number
> u8 manufacturer_id
> which could be used to detect the sensor.
> However, since the driver is generic, it is not interested
> of these values.
>
> Nevertheless, in some cases user space applications want
> to know the exact chip. For example, to get the highest
> possible image quality, user space application might capture
> an image and postprocess it using sensor-specific filtering
> algorithms (which don't belong into kernel driver).
>
> I am planning to export the chip identification information
> to user space using VIDIOC_DBG_G_CHIP_IDENT.
> Here's a sketch:
> #define V4L2_IDENT_SMIA_BASE (0x53 << 24)
> then in sensor driver's VIDIOC_DBG_G_CHIP_IDENT ioctl handler:
> struct v4l2_dbg_chip_ident id;
> id.ident = V4L2_IDENT_SMIA_BASE | (manufacturer_id << 16) | model_id;
> id.revision = revision_number;
>
> Do you think this is acceptable?
>
> Alternatively, VIDIOC_QUERYCAP could be used to identify the sensor.
> Would it make more sense if it would return something like
> capability.card: `omap3/smia-sensor-12-1234-5678//'
> where 12 would be manufacturer_id, 1234 model_id, and
> 5678 revision_number?
>
> I'll start writing a patch as soon as you let me know
> which would be the best alternative. Thanks!
>
> - Tuukka
> --
> 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
>
--
========================================================
DongSoo(Nathaniel), Kim
Engineer
Mobile S/W Platform Lab. S/W centre
Telecommunication R&D Centre
Samsung Electronics CO., LTD.
e-mail : dongsoo.kim@gmail.com
dongsoo45.kim@samsung.com
========================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-05 0:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04 14:12 identifying camera sensor Tuukka.O Toivonen
2009-03-04 14:43 ` [Camera] " ribrishimov
2009-03-04 23:00 ` Trent Piepho
2009-03-05 0:42 ` DongSoo(Nathaniel) Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox