Re: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Laurent Pinchart
Hi Sergio,

On Wednesday 25 August 2010 22:15:36 Aguirre, Sergio wrote:
 Hi Laurent,
 
 I see that usually a sensor is powered up on attempting a VIDIOC_STREAMON
 at the capture endpoint of the pipeline, in which the sensor is linked.
 
 Now, what I don't understand quite well is, the Lens driver is a separate
 subdevice, BUT it's obviously not linked to the sensor, nor the pipeline.
 
 How would the lens driver know when to power up?

At the moment a userspace application needs to keep the lens subdev open to 
power-up the lens controller.

-- 
Regards,

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


RE: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Aguirre, Sergio
Hi Laurent,

 -Original Message-
 From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
 Sent: Thursday, August 26, 2010 2:31 AM
 To: Aguirre, Sergio
 Cc: linux-media@vger.kernel.org; Nataraju, Kiran
 Subject: Re: [omap3camera] How does a lens subdevice get powered up?
 
 Hi Sergio,
 
 On Wednesday 25 August 2010 22:15:36 Aguirre, Sergio wrote:
  Hi Laurent,
 
  I see that usually a sensor is powered up on attempting a
 VIDIOC_STREAMON
  at the capture endpoint of the pipeline, in which the sensor is linked.
 
  Now, what I don't understand quite well is, the Lens driver is a
 separate
  subdevice, BUT it's obviously not linked to the sensor, nor the
 pipeline.
 
  How would the lens driver know when to power up?
 
 At the moment a userspace application needs to keep the lens subdev open
 to
 power-up the lens controller.

I see... So in that case, does it make sense to consider it as a media entity?

I mean, there's no link, nor pad operations involved, so it doesn't really
add any value...

What do you think?

Regards,
Sergio

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


Re: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Laurent Pinchart
Hi Sergio,

On Thursday 26 August 2010 16:54:37 Aguirre, Sergio wrote:
 On Thursday, August 26, 2010 2:31 AM Laurent Pinchart wrote:
  On Wednesday 25 August 2010 22:15:36 Aguirre, Sergio wrote:
   
   I see that usually a sensor is powered up on attempting a
   VIDIOC_STREAMON at the capture endpoint of the pipeline, in which the
   sensor is linked.
   
   Now, what I don't understand quite well is, the Lens driver is a
   separate subdevice, BUT it's obviously not linked to the sensor, nor the
   pipeline.
  
   How would the lens driver know when to power up?
  
  At the moment a userspace application needs to keep the lens subdev open
  to power-up the lens controller.
 
 I see... So in that case, does it make sense to consider it as a media
 entity?
 
 I mean, there's no link, nor pad operations involved, so it doesn't really
 add any value...
 
 What do you think?

Even if not part of the image pipeline, the lens controller is still part of 
the media device. I think it makes sense to expose it as an entity and a V4L2 
subdevice.

-- 
Regards,

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


RE: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Aguirre, Sergio
Hi Laurent,

 -Original Message-
 From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
 Sent: Thursday, August 26, 2010 10:04 AM
 To: Aguirre, Sergio
 Cc: linux-media@vger.kernel.org; Nataraju, Kiran
 Subject: Re: [omap3camera] How does a lens subdevice get powered up?
 
 Hi Sergio,
 
 On Thursday 26 August 2010 16:54:37 Aguirre, Sergio wrote:
  On Thursday, August 26, 2010 2:31 AM Laurent Pinchart wrote:
   On Wednesday 25 August 2010 22:15:36 Aguirre, Sergio wrote:
   
I see that usually a sensor is powered up on attempting a
VIDIOC_STREAMON at the capture endpoint of the pipeline, in which
 the
sensor is linked.
   
Now, what I don't understand quite well is, the Lens driver is a
separate subdevice, BUT it's obviously not linked to the sensor, nor
 the
pipeline.
   
How would the lens driver know when to power up?
  
   At the moment a userspace application needs to keep the lens subdev
 open
   to power-up the lens controller.
 
  I see... So in that case, does it make sense to consider it as a media
  entity?
 
  I mean, there's no link, nor pad operations involved, so it doesn't
 really
  add any value...
 
  What do you think?
 
 Even if not part of the image pipeline, the lens controller is still part
 of
 the media device. I think it makes sense to expose it as an entity and a
 V4L2
 subdevice.

Hmm... I don't know what I was thinking... you're right. :)

Now that I rethink what I just said vs your answer, I think you have a point, 
so I'll drop that thought...

However, I think still there's something that could be done here...

Imagine a scenario in which you have 2 sensors, each one with a different
Coil motor driver to control each sensor's lens position.

Should we have a way to register some sort of association between
Sensor and lens subdevices? That way, by querying the media device, an app
can know which lens is associated with what sensor, without any hardcoding.

That would be very similar to the case in which you would want to associate
an audio capturing subdev with a video capturing subdev. They are not 
technically sharing the same data, but they are related.

Is this kind of association considered in the Media Controller framework
implementation currently?

Regards,
Sergio

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


Re: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Laurent Pinchart
Hi Sergio,

On Thursday 26 August 2010 17:33:28 Aguirre, Sergio wrote:
 On Thursday, August 26, 2010 10:04 AM Laurent Pinchart wrote:
 
  Even if not part of the image pipeline, the lens controller is still part
  of the media device. I think it makes sense to expose it as an entity and
  a V4L2 subdevice.
 
 Hmm... I don't know what I was thinking... you're right. :)
 
 Now that I rethink what I just said vs your answer, I think you have a
 point, so I'll drop that thought...
 
 However, I think still there's something that could be done here...
 
 Imagine a scenario in which you have 2 sensors, each one with a different
 Coil motor driver to control each sensor's lens position.
 
 Should we have a way to register some sort of association between
 Sensor and lens subdevices? That way, by querying the media device, an app
 can know which lens is associated with what sensor, without any hardcoding.
 
 That would be very similar to the case in which you would want to associate
 an audio capturing subdev with a video capturing subdev. They are not
 technically sharing the same data, but they are related.
 
 Is this kind of association considered in the Media Controller framework
 implementation currently?

It's implemented in the latest media controller RFC :-)

Entities now have a group ID that the driver can set to report associations 
such as sensor-coil-flash or video-audio.

-- 
Regards,

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


RE: [omap3camera] How does a lens subdevice get powered up?

2010-08-26 Thread Aguirre, Sergio
Hi Laurent,

 -Original Message-
 From: Laurent Pinchart [mailto:laurent.pinch...@ideasonboard.com]
 Sent: Thursday, August 26, 2010 10:36 AM
 To: Aguirre, Sergio
 Cc: linux-media@vger.kernel.org; Nataraju, Kiran
 Subject: Re: [omap3camera] How does a lens subdevice get powered up?
 
 Hi Sergio,
 
 On Thursday 26 August 2010 17:33:28 Aguirre, Sergio wrote:
  On Thursday, August 26, 2010 10:04 AM Laurent Pinchart wrote:
  
   Even if not part of the image pipeline, the lens controller is still
 part
   of the media device. I think it makes sense to expose it as an entity
 and
   a V4L2 subdevice.
 
  Hmm... I don't know what I was thinking... you're right. :)
 
  Now that I rethink what I just said vs your answer, I think you have a
  point, so I'll drop that thought...
 
  However, I think still there's something that could be done here...
 
  Imagine a scenario in which you have 2 sensors, each one with a
 different
  Coil motor driver to control each sensor's lens position.
 
  Should we have a way to register some sort of association between
  Sensor and lens subdevices? That way, by querying the media device, an
 app
  can know which lens is associated with what sensor, without any
 hardcoding.
 
  That would be very similar to the case in which you would want to
 associate
  an audio capturing subdev with a video capturing subdev. They are not
  technically sharing the same data, but they are related.
 
  Is this kind of association considered in the Media Controller framework
  implementation currently?
 
 It's implemented in the latest media controller RFC :-)
 
 Entities now have a group ID that the driver can set to report
 associations
 such as sensor-coil-flash or video-audio.

Oh ok, I see.

Perfect!

Thanks for clarifying that.

Regards,
Sergio

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


[RESEND][omap3camera] How does a lens subdevice get powered up?

2010-08-25 Thread Aguirre, Sergio
(Resending as plain text, as I sent it originally as HTML and
got rejected by ML security policies)

Hi Laurent,

I see that usually a sensor is powered up on attempting a
VIDIOC_STREAMON at the capture endpoint of the pipeline,
in which the sensor is linked.

Now, what I don't understand quite well is, the Lens driver
is a separate subdevice, BUT it's obviously not linked to the
sensor, nor the pipeline.

How would the lens driver know when to power up?

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