[media] coda: bitrate can only be set in kbps steps
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 18 Mar 2015 11:15:36 +0000 (08:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 10 Apr 2015 13:02:28 +0000 (10:02 -0300)
We divide the bitrate by 1000 before writing it to the register.
Communicate to userspace that the bitrate granularity is kbps.

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>
drivers/media/platform/coda/coda-common.c

index 329c2a4d86f62eb0e96fefc7d0e0f96f4c1ad9d1..ddbed9b4ae410c079ade954dfd78773c0f79a32e 100644 (file)
@@ -1457,7 +1457,7 @@ static const struct v4l2_ctrl_ops coda_ctrl_ops = {
 static void coda_encode_ctrls(struct coda_ctx *ctx)
 {
        v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops,
-               V4L2_CID_MPEG_VIDEO_BITRATE, 0, 32767000, 1, 0);
+               V4L2_CID_MPEG_VIDEO_BITRATE, 0, 32767000, 1000, 0);
        v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops,
                V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 60, 1, 16);
        v4l2_ctrl_new_std(&ctx->ctrls, &coda_ctrl_ops,