313ca377383e39645c0e3c782464d9aa009c41f2
[openwrt/staging/xback.git] /
1 From 9f4002165439d02a63760e68948246e3af764318 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 11 Oct 2023 15:05:38 +0100
4 Subject: [PATCH] vc04_services: bcm2835-codec: Correct alignment requirements
5 for YUYV
6
7 The firmware wants the YUYV format stride alignment to be to a multiple
8 of 32pixels / 64 bytes. The kernel driver was configuring it to a multiple
9 of 16 pixels / 32 bytes, which then failed when it tried starting to
10 stream.
11
12 Correct the alignment requirements.
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 8 ++++----
17 1 file changed, 4 insertions(+), 4 deletions(-)
18
19 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
20 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
21 @@ -206,28 +206,28 @@ static const struct bcm2835_codec_fmt su
22 }, {
23 .fourcc = V4L2_PIX_FMT_YUYV,
24 .depth = 16,
25 - .bytesperline_align = { 32, 32, 32, 32, 32 },
26 + .bytesperline_align = { 64, 64, 64, 64, 64 },
27 .flags = 0,
28 .mmal_fmt = MMAL_ENCODING_YUYV,
29 .size_multiplier_x2 = 2,
30 }, {
31 .fourcc = V4L2_PIX_FMT_UYVY,
32 .depth = 16,
33 - .bytesperline_align = { 32, 32, 32, 32, 32 },
34 + .bytesperline_align = { 64, 64, 64, 64, 64 },
35 .flags = 0,
36 .mmal_fmt = MMAL_ENCODING_UYVY,
37 .size_multiplier_x2 = 2,
38 }, {
39 .fourcc = V4L2_PIX_FMT_YVYU,
40 .depth = 16,
41 - .bytesperline_align = { 32, 32, 32, 32, 32 },
42 + .bytesperline_align = { 64, 64, 64, 64, 64 },
43 .flags = 0,
44 .mmal_fmt = MMAL_ENCODING_YVYU,
45 .size_multiplier_x2 = 2,
46 }, {
47 .fourcc = V4L2_PIX_FMT_VYUY,
48 .depth = 16,
49 - .bytesperline_align = { 32, 32, 32, 32, 32 },
50 + .bytesperline_align = { 64, 64, 64, 64, 64 },
51 .flags = 0,
52 .mmal_fmt = MMAL_ENCODING_VYUY,
53 .size_multiplier_x2 = 2,