diff options
-rw-r--r-- | isp/omap3isp.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/isp/omap3isp.c b/isp/omap3isp.c index 75467e1..c41e514 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -482,24 +482,6 @@ struct omap3_isp_device *omap3_isp_open(const char *devname, goto error; } - /* Setup the viewfinder pipeline. */ - ret = setup_link(isp, isp->sensor, isp->ccdc, MEDIA_LNK_FL_ENABLED); - if (ret < 0) - goto error; - - ret = setup_link(isp, isp->ccdc, isp->preview, MEDIA_LNK_FL_ENABLED); - if (ret < 0) - goto error; - - ret = setup_link(isp, isp->preview, isp->resizer, MEDIA_LNK_FL_ENABLED); - if (ret < 0) - goto error; - - ret = setup_link(isp, isp->resizer, isp->viewfinder.output.node, - MEDIA_LNK_FL_ENABLED); - if (ret < 0) - goto error; - ret = omap3_isp_preview_setup(isp); if (ret < 0) { printf("error: unable to setup preview engine.\n"); @@ -533,6 +515,10 @@ static int omap3_isp_viewfinder_setup_pipeline(struct omap3_isp_device *isp, { int ret; + ret = omap3_isp_pipeline_activate(isp, &isp->viewfinder); + if (ret < 0) + return ret; + /* Configure the formats on the pipeline. */ ret = omap3_isp_pipeline_set_format(isp, ofmt, isp->viewfinder.output.scaler, V4L2_SUBDEV_FORMAT_ACTIVE); @@ -739,11 +725,6 @@ int omap3_isp_viewfinder_put_buffer(struct omap3_isp_device *isp, * omap3_isp_snapshot_setup() before starting the viewfinder. */ -static int omap3_isp_snapshot_restore_pipeline(struct omap3_isp_device *isp) -{ - return omap3_isp_pipeline_activate(isp, &isp->viewfinder); -} - static int omap3_isp_snapshot_setup_pipeline(struct omap3_isp_device *isp, struct v4l2_mbus_framefmt *ofmt) { @@ -885,10 +866,6 @@ static void omap3_isp_snapshot_event(void *priv) isp->ops->snapshot_ready(isp, &buffer); /* Resume the viewfinder. */ - ret = omap3_isp_snapshot_restore_pipeline(isp); - if (ret < 0) - return; - format = isp->viewfinder.output.format; ret = omap3_isp_viewfinder_setup_pipeline(isp, &format); if (ret < 0) |