summaryrefslogtreecommitdiff
path: root/isp/omap3isp.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-08-24 10:51:06 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-09-04 15:39:51 +0200
commit9cdb623c6ee2d4937729def042b433648d964315 (patch)
treeb564d012c938d841a9b254ab3ab197bbfcfe582c /isp/omap3isp.c
parentb4508a3a582baabd35038e1439ba8b566bd61357 (diff)
omap3isp: Use ":SENSOR" to refer to the sensor when building pipelines
This removes dependencies on the specific sensor. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'isp/omap3isp.c')
-rw-r--r--isp/omap3isp.c13
1 files changed, 8 insertions, 5 deletions
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;
}