summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-12-18 15:53:51 +0100
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-12-18 15:53:51 +0100
commit2d2a08f8d286aa67875536b82adb44119b446960 (patch)
tree6ddd352e6fb04e3e6ba53775def7102433ec7efa /linux
parent07f7d043ce9816eb9222877c9bcad522a485b3f3 (diff)
downloadmediapointer-dvb-s2-2d2a08f8d286aa67875536b82adb44119b446960.tar.gz
mediapointer-dvb-s2-2d2a08f8d286aa67875536b82adb44119b446960.tar.bz2
pxa-camera: call try_fmt() camera device method with correct pixel format
From: Guennadi Liakhovetski <lg@denx.de> With the introduction of the format conversion support in soc-camera, we now also have to take care to pass the correct pixel format to the camera driver when calling its try_fmt() method. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> --- drivers/media/video/pxa_camera.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/pxa_camera.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/linux/drivers/media/video/pxa_camera.c b/linux/drivers/media/video/pxa_camera.c
index 54801a527..cec1a5a21 100644
--- a/linux/drivers/media/video/pxa_camera.c
+++ b/linux/drivers/media/video/pxa_camera.c
@@ -1223,6 +1223,7 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
const struct soc_camera_format_xlate *xlate;
struct v4l2_pix_format *pix = &f->fmt.pix;
__u32 pixfmt = pix->pixelformat;
+ int ret;
xlate = soc_camera_xlate_by_fourcc(icd, pixfmt);
if (!xlate) {
@@ -1245,8 +1246,13 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd,
DIV_ROUND_UP(xlate->host_fmt->depth, 8);
pix->sizeimage = pix->height * pix->bytesperline;
+ /* camera has to see its format, but the user the original one */
+ pix->pixelformat = xlate->cam_fmt->fourcc;
/* limit to sensor capabilities */
- return icd->ops->try_fmt(icd, f);
+ ret = icd->ops->try_fmt(icd, f);
+ pix->pixelformat = xlate->host_fmt->fourcc;
+
+ return ret;
}
static int pxa_camera_reqbufs(struct soc_camera_file *icf,