Commit Graph

9 Commits (93e562141ac58452bcea48718af92cc62a20669d)

Author SHA1 Message Date
Javier Martin de03277d6a [media] ov7670: remove legacy ctrl callbacks
via-camera and mcam-core were the only bridge drivers that used ov7670.
Since now they have been moved to use the ctrl framework, the old
legacy callbacks in the ov7670 can be removed.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:44:09 -02:00
Javier Martin 492959c77f [media] ov7670: use the control framework
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:37:02 -02:00
Javier Martin ee95258ed3 [media] media: ov7670: Add possibility to disable pixclk during hblank
Some bridge drivers capture pixels during blanking periods if
pixclk is enabled. In order to avoid capturing bogus data we need to
disable pixclk in the sensor during those blanking periods.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:35:06 -02:00
Javier Martin 04ee6d9204 [media] media: ov7670: add possibility to bypass pll for ov7675
For a frame rate of 30 fps a pixclk of 24MHz is needed. For those
cases where the ov7670 has a clean 24MHz input (xvclk) the PLL
can be bypassed.
This will result in a value of clkrc of 1, which means that in practice
pixclk = xvclk (input clock)

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:30:48 -02:00
Javier Martin f6dd927f34 [media] media: ov7670: calculate framerate properly for ov7675
According to the datasheet ov7675 uses a formula to achieve
the desired framerate that is different from the operations
done in the current code.
In fact, this formula should apply to ov7670 too. This would
mean that current code is wrong but, in order to preserve
compatibility, the new formula will be used for ov7675 only.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:27:48 -02:00
Javier Martin f748cd3ec8 [media] media: ov7670: make try_fmt() consistent with 'min_height' and 'min_width'
'min_height' and 'min_width' are variables that allow to specify the minimum
resolution that the sensor will achieve. This patch make v4l2 fmt callbacks
consider this parameters in order to return valid data to user space.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:24:53 -02:00
Javier Martin d058e23704 [media] media: ov7670: add support for ov7675
ov7675 and ov7670 share the same registers but there is no way
to distinguish them at runtime. However, they require different
tweaks to achieve the desired resolution. For this reason this
patch adds a new ov7675 entry to the ov7670_id table.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 14:23:32 -02:00
Javier Martin c01b7429e2 [media] media: ov7670: Allow 32x maximum gain for yuv422
4x gain ceiling is not enough to capture a decent image in conditions
of total darkness and only a LED light source. Allow a maximum gain
of 32x instead.
This doesn't have any drawback since the image quality in 'normal'
light conditions is the same.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-21 18:25:09 -02:00
Mauro Carvalho Chehab cb7a01ac32 [media] move i2c files into drivers/media/i2c
Move ancillary I2C drivers into drivers/media/i2c, in order to
better organize them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15 16:42:14 -03:00