1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From 9f4002165439d02a63760e68948246e3af764318 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Wed, 11 Oct 2023 15:05:38 +0100
Subject: [PATCH] vc04_services: bcm2835-codec: Correct alignment requirements
for YUYV
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>
---
.../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
+++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
@@ -206,28 +206,28 @@ static const struct bcm2835_codec_fmt su
}, {
.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,
|