6277667da6951c8c6f5ab690b07d242ce2d0ad7a
[openwrt/staging/neocturne.git] /
1 From 3b5412d506f5b7f2d947346ccdda8b67c9902576 Mon Sep 17 00:00:00 2001
2 From: Hristo Venev <hristo@venev.name>
3 Date: Fri, 5 Jun 2020 09:22:49 +0000
4 Subject: [PATCH] snd_bcm2835: disable HDMI audio when vc4 is used
5 (#3640)
6
7 Things don't work too well when both the vc4 driver and the firmware
8 driver are trying to control the same audio output:
9
10 [ 763.569406] bcm2835_audio bcm2835_audio: vchi message timeout, msg=5
11
12 Hence, when the vc4 HDMI driver is used, let it control audio. This is done
13 by introducing a new device tree property to the audio node, and
14 extending the vc4-kms-v3d overlays to set it appropriately.
15
16 Signed-off-by: Hristo Venev <hristo@venev.name>
17 ---
18 drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 4 +++-
19 1 file changed, 3 insertions(+), 1 deletion(-)
20
21 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
22 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
23 @@ -381,7 +381,9 @@ static int snd_bcm2835_alsa_probe(struct
24 }
25
26 if (!enable_compat_alsa) {
27 - set_hdmi_enables(dev);
28 + if (!of_property_read_bool(dev->of_node, "brcm,disable-hdmi"))
29 + set_hdmi_enables(dev);
30 +
31 // In this mode, always enable analog output
32 enable_headphones = true;
33 } else {