diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-01-23 13:51:21 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-02 10:01:39 -0200 |
commit | 5f9826e8a759426f6fd722a80a72008bd93132af (patch) | |
tree | b13f9d3ed7fb976a7538eba5fec46933e7a4255b /drivers/media/platform | |
parent | f77fd8a9b1a8151ae7a0e98a3b3baf8ab639d0e1 (diff) |
[media] coda: fix try_fmt_vid_out colorspace setting
v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/coda/coda-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 14953b4df58..ff7da3a5c4a 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -592,7 +592,11 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv, if (ret < 0) return ret; - if (!f->fmt.pix.colorspace) { + switch (f->fmt.pix.colorspace) { + case V4L2_COLORSPACE_REC709: + case V4L2_COLORSPACE_JPEG: + break; + default: if (f->fmt.pix.pixelformat == V4L2_PIX_FMT_JPEG) f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG; else |