4827f960231604b676bc0f557655d8d1356ec72a
[openwrt/staging/nbd.git] /
1 From 1cf3e20f13378430cd1fc929548bca9f5e517afe Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 25 Mar 2020 18:03:42 +0000
4 Subject: [PATCH] drm/vc4: Set the b-frame marker to the match ALSA's
5 default.
6
7 ALSA's iec958 plugin by default sets the block start preamble
8 to 8, whilst this driver was programming the hardware to expect
9 0xF.
10 Amend the hardware config to match ALSA.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 ---
14 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
18 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
19 @@ -885,10 +885,11 @@ static int vc4_hdmi_audio_hw_params(stru
20
21 vc4_hdmi_audio_set_mai_clock(vc4_hdmi);
22
23 + /* The B frame identifier should match the value used by alsa-lib (8) */
24 audio_packet_config =
25 VC4_HDMI_AUDIO_PACKET_ZERO_DATA_ON_SAMPLE_FLAT |
26 VC4_HDMI_AUDIO_PACKET_ZERO_DATA_ON_INACTIVE_CHANNELS |
27 - VC4_SET_FIELD(0xf, VC4_HDMI_AUDIO_PACKET_B_FRAME_IDENTIFIER);
28 + VC4_SET_FIELD(0x8, VC4_HDMI_AUDIO_PACKET_B_FRAME_IDENTIFIER);
29
30 channel_mask = GENMASK(vc4_hdmi->audio.channels - 1, 0);
31 audio_packet_config |= VC4_SET_FIELD(channel_mask,