vc04_services: bcm2835-codec: Correct alignment requirements for YUYV
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 11 Oct 2023 14:05:38 +0000 (15:05 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:05 +0000 (11:35 +0000)
The firmware wants the YUYV format stride alignment to be to a multiple
of 32pixels / 64 bytes. The kernel driver was configuring it to a multiple
of 16 pixels / 32 bytes, which then failed when it tried starting to
stream.

Correct the alignment requirements.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

index e21112b..b9640f7 100644 (file)
@@ -206,28 +206,28 @@ static const struct bcm2835_codec_fmt supported_formats[] = {
        }, {
                .fourcc                 = V4L2_PIX_FMT_YUYV,
                .depth                  = 16,
-               .bytesperline_align     = { 32, 32, 32, 32, 32 },
+               .bytesperline_align     = { 64, 64, 64, 64, 64 },
                .flags                  = 0,
                .mmal_fmt               = MMAL_ENCODING_YUYV,
                .size_multiplier_x2     = 2,
        }, {
                .fourcc                 = V4L2_PIX_FMT_UYVY,
                .depth                  = 16,
-               .bytesperline_align     = { 32, 32, 32, 32, 32 },
+               .bytesperline_align     = { 64, 64, 64, 64, 64 },
                .flags                  = 0,
                .mmal_fmt               = MMAL_ENCODING_UYVY,
                .size_multiplier_x2     = 2,
        }, {
                .fourcc                 = V4L2_PIX_FMT_YVYU,
                .depth                  = 16,
-               .bytesperline_align     = { 32, 32, 32, 32, 32 },
+               .bytesperline_align     = { 64, 64, 64, 64, 64 },
                .flags                  = 0,
                .mmal_fmt               = MMAL_ENCODING_YVYU,
                .size_multiplier_x2     = 2,
        }, {
                .fourcc                 = V4L2_PIX_FMT_VYUY,
                .depth                  = 16,
-               .bytesperline_align     = { 32, 32, 32, 32, 32 },
+               .bytesperline_align     = { 64, 64, 64, 64, 64 },
                .flags                  = 0,
                .mmal_fmt               = MMAL_ENCODING_VYUY,
                .size_multiplier_x2     = 2,