media: coda: set MPEG-4 encoder class register
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 7 Jul 2017 09:58:30 +0000 (05:58 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Jul 2017 19:21:02 +0000 (15:21 -0400)
Explicitly set MPEG-4 encoder class register instead of relying on the
default value of 0.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/coda/coda-bit.c
drivers/media/platform/coda/coda_regs.h

index 2f31c672aba04e1c9946425413e5ec8a73f96409..2a8e13c53f2e1f671cd51546b09a39ef1fe69ac1 100644 (file)
@@ -1655,6 +1655,10 @@ static int __coda_start_decoding(struct coda_ctx *ctx)
                ctx->params.codec_mode_aux = CODA_MP4_AUX_MPEG4;
        else
                ctx->params.codec_mode_aux = 0;
+       if (src_fourcc == V4L2_PIX_FMT_MPEG4) {
+               coda_write(dev, CODA_MP4_CLASS_MPEG4,
+                          CODA_CMD_DEC_SEQ_MP4_ASP_CLASS);
+       }
        if (src_fourcc == V4L2_PIX_FMT_H264) {
                if (dev->devtype->product == CODA_7541) {
                        coda_write(dev, ctx->psbuf.paddr,
index 77ee46a934272d8503a1d292d857249603712017..38df5fd9a2fa7270427104b709e726ce575dce4b 100644 (file)
 #define CODA_CMD_DEC_SEQ_PS_BB_START           0x194
 #define CODA_CMD_DEC_SEQ_PS_BB_SIZE            0x198
 #define CODA_CMD_DEC_SEQ_MP4_ASP_CLASS         0x19c
+#define                CODA_MP4_CLASS_MPEG4                    0
 #define CODA_CMD_DEC_SEQ_X264_MV_EN            0x19c
 #define CODA_CMD_DEC_SEQ_SPP_CHUNK_SIZE                0x1a0