summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/m5mols/m5mols_capture.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-09-18 06:18:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-05 21:28:06 -0300
commitab7ef22419927910e563170db41f0a428d20b0a2 (patch)
tree2602b6202d14880c5c4726603703470cd015d0bd /drivers/media/i2c/m5mols/m5mols_capture.c
parent14783d253625618744c200945c29769b3cbcc896 (diff)
downloadtalos-obmc-linux-ab7ef22419927910e563170db41f0a428d20b0a2.tar.gz
talos-obmc-linux-ab7ef22419927910e563170db41f0a428d20b0a2.zip
[media] m5mols: Implement .get_frame_desc subdev callback
.get_frame_desc can be used by host interface driver to query properties of captured frames, e.g. required memory buffer size. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c/m5mols/m5mols_capture.c')
-rw-r--r--drivers/media/i2c/m5mols/m5mols_capture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/i2c/m5mols/m5mols_capture.c b/drivers/media/i2c/m5mols/m5mols_capture.c
index cb243bd278ce..ab34ccedf31e 100644
--- a/drivers/media/i2c/m5mols/m5mols_capture.c
+++ b/drivers/media/i2c/m5mols/m5mols_capture.c
@@ -105,6 +105,7 @@ static int m5mols_capture_info(struct m5mols_info *info)
int m5mols_start_capture(struct m5mols_info *info)
{
+ unsigned int framesize = info->cap.buf_size - M5MOLS_JPEG_TAGS_SIZE;
struct v4l2_subdev *sd = &info->sd;
int ret;
@@ -121,6 +122,8 @@ int m5mols_start_capture(struct m5mols_info *info)
if (!ret)
ret = m5mols_write(sd, CAPP_MAIN_IMAGE_SIZE, info->resolution);
if (!ret)
+ ret = m5mols_write(sd, CAPP_JPEG_SIZE_MAX, framesize);
+ if (!ret)
ret = m5mols_set_mode(info, REG_CAPTURE);
if (!ret)
/* Wait until a frame is captured to ISP internal memory */
OpenPOWER on IntegriCloud