From b2da4996582313c07f63922f634c9f4fdc3bd342 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 23 Oct 2012 04:08:15 +0200 Subject: isp: Support raw viewfinder formats Capture at the CCDC output if the requested viewfinder format is not a YUV format, and at the resizer output otherwise. Signed-off-by: Laurent Pinchart --- isp/omap3isp.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/isp/omap3isp.c b/isp/omap3isp.c index ef6350a..7da0bf2 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -1125,9 +1125,21 @@ int omap3_isp_viewfinder_setup(struct omap3_isp_device *isp, struct omap3_isp_pool *pool; int ret; - ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", - ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, - ENTITY_RESIZER_OUTPUT, NULL); + /* Build the pipeline. Capture on the CCDC output for raw formats and on + * on the resizer output for YUV formats. + */ + switch (ofmt->code) { + case V4L2_MBUS_FMT_UYVY8_1X16: + case V4L2_MBUS_FMT_YUYV8_1X16: + ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", + ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, + ENTITY_RESIZER_OUTPUT, NULL); + break; + default: + ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", + ENTITY_CCDC, ENTITY_CCDC_OUTPUT, NULL); + break; + } if (ret < 0) { printf("error: unable to build viewfinder pipeline (%d)\n", ret); return ret; -- cgit v1.2.3