From: Philipp Zabel
Date: Wed, 18 Mar 2015 11:15:36 +0000 (-0300)
Subject: [media] coda: bitrate can only be set in kbps steps
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=92b042ecedea7aa3d47391be57411709dab52cd7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git
[media] coda: bitrate can only be set in kbps steps
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
Signed-off-by: Kamil Debski
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 329c2a4d86f6..ddbed9b4ae41 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -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,