mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
a2d4b5711a
Removed upstreamed: pending-5.10/841-USB-serial-option-add-ZTE-MF286D-modem.patch[1] bcm27xx/950-0592-drm-vc4-Allow-DBLCLK-modes-even-if-horz-timing-is-od.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=7113440a36c741efd7c76e3d70b3634100120cdb 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=21c890ca8eaecea06cabb92be2a53a6f26f56383 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From 3c398513990aa0edc5b9ebfbdd2395623562c6e4 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Thu, 25 Jun 2020 18:48:40 +0100
|
|
Subject: [PATCH] vc4_hdmi: Remove firmware logic for MAI threshold
|
|
setting
|
|
|
|
This was a workaround for bugs in hardware on earlier Pi models
|
|
and wasn't totally successful.
|
|
|
|
It makes audio quality worse on a Pi4 at the higher sample rates
|
|
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 22 ++++++----------------
|
|
1 file changed, 6 insertions(+), 16 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -1086,22 +1086,12 @@ static int vc4_hdmi_audio_prepare(struct
|
|
audio_packet_config |= VC4_SET_FIELD(channel_mask,
|
|
VC4_HDMI_AUDIO_PACKET_CEA_MASK);
|
|
|
|
- /* Set the MAI threshold. This logic mimics the firmware's. */
|
|
- if (vc4_hdmi->audio.samplerate > 96000) {
|
|
- HDMI_WRITE(HDMI_MAI_THR,
|
|
- VC4_SET_FIELD(0x12, VC4_HD_MAI_THR_DREQHIGH) |
|
|
- VC4_SET_FIELD(0x12, VC4_HD_MAI_THR_DREQLOW));
|
|
- } else if (vc4_hdmi->audio.samplerate > 48000) {
|
|
- HDMI_WRITE(HDMI_MAI_THR,
|
|
- VC4_SET_FIELD(0x14, VC4_HD_MAI_THR_DREQHIGH) |
|
|
- VC4_SET_FIELD(0x12, VC4_HD_MAI_THR_DREQLOW));
|
|
- } else {
|
|
- HDMI_WRITE(HDMI_MAI_THR,
|
|
- VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) |
|
|
- VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) |
|
|
- VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQHIGH) |
|
|
- VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQLOW));
|
|
- }
|
|
+ /* Set the MAI threshold */
|
|
+ HDMI_WRITE(HDMI_MAI_THR,
|
|
+ VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) |
|
|
+ VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) |
|
|
+ VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQHIGH) |
|
|
+ VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQLOW));
|
|
|
|
HDMI_WRITE(HDMI_MAI_CONFIG,
|
|
VC4_HDMI_MAI_CONFIG_BIT_REVERSE |
|