From 9cdb623c6ee2d4937729def042b433648d964315 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 24 Aug 2011 10:51:06 +0200 Subject: omap3isp: Use ":SENSOR" to refer to the sensor when building pipelines This removes dependencies on the specific sensor. Signed-off-by: Laurent Pinchart --- isp/omap3isp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'isp/omap3isp.c') diff --git a/isp/omap3isp.c b/isp/omap3isp.c index 03b0f68..5dea91a 100644 --- a/isp/omap3isp.c +++ b/isp/omap3isp.c @@ -32,7 +32,6 @@ #include "omap3isp.h" #include "subdev.h" -#define ENTITY_SENSOR "mt9t001 3-005d" #define ENTITY_CCDC "OMAP3 ISP CCDC" #define ENTITY_CCDC_OUTPUT "OMAP3 ISP CCDC output" #define ENTITY_PREVIEW "OMAP3 ISP preview" @@ -365,7 +364,11 @@ omap3_isp_pipeline_create_entity(struct omap3_isp_device *isp, struct omap3_isp_video *video; struct media_entity *ment; - ment = media_get_entity_by_name(isp->mdev, name); + if (strncmp(name, ":SENSOR", 7) == 0) + ment = isp->sensor; + else + ment = media_get_entity_by_name(isp->mdev, name); + if (ment == NULL) return NULL; @@ -819,7 +822,7 @@ 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, ENTITY_SENSOR, + ret = omap3_isp_pipeline_build(isp, &isp->viewfinder, ":SENSOR", ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, ENTITY_RESIZER_OUTPUT, NULL); if (ret < 0) { @@ -1022,12 +1025,12 @@ int omap3_isp_snapshot_setup(struct omap3_isp_device *isp, switch (ofmt->code) { case V4L2_MBUS_FMT_UYVY8_1X16: case V4L2_MBUS_FMT_YUYV8_1X16: - ret = omap3_isp_pipeline_build(isp, &isp->snapshot, ENTITY_SENSOR, + ret = omap3_isp_pipeline_build(isp, &isp->snapshot, ":SENSOR", ENTITY_CCDC, ENTITY_PREVIEW, ENTITY_RESIZER, ENTITY_RESIZER_OUTPUT, NULL); break; default: - ret = omap3_isp_pipeline_build(isp, &isp->snapshot, ENTITY_SENSOR, + ret = omap3_isp_pipeline_build(isp, &isp->snapshot, ":SENSOR", ENTITY_CCDC, ENTITY_CCDC_OUTPUT, NULL); break; } -- cgit v1.2.3