diff options
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0837-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0837-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0837-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch b/target/linux/bcm27xx/patches-5.4/950-0837-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch new file mode 100644 index 0000000000..859a560bba --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0837-vc4_hdmi-Set-HD_CTL_WHOLSMP-and-HD_CTL_CHALIGN_SET.patch @@ -0,0 +1,38 @@ +From c69a53be3b5f6f7cba0ac6a5461d4f342f7e9c41 Mon Sep 17 00:00:00 2001 +From: Dom Cobley <popcornmix@gmail.com> +Date: Tue, 23 Jun 2020 18:37:01 +0100 +Subject: [PATCH] vc4_hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET + +Symptom is random switching of speakers when using multichannel. + +Repeatedly running speakertest -c8 occasionally starts with +channels jumbled. This is fixed with HD_CTL_WHOLSMP. + +The other bit looks beneficial and apears harmless in testing so +I'd suggest adding it too. + +Documentation says: HD_CTL_WHILSMP_SET +Wait for whole sample. When this bit is set MAI transmit will start +only when there is at least one whole sample available in the fifo. + +Documentation says: HD_CTL_CHALIGN_SET +Channel Align When Overflow. This bit is used to realign the audio channels in case of an overflow. +If this bit is set, after the detection of an overflow, equal amount of dummy words to the missing +words will be written to fifo, filling up the broken sample and maintaining alignment. + +Signed-off-by: Dom Cobley <popcornmix@gmail.com> +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -1002,6 +1002,8 @@ static int vc4_hdmi_audio_trigger(struct + HDMI_WRITE(HDMI_MAI_CTL, + VC4_SET_FIELD(vc4_hdmi->audio.channels, + VC4_HD_MAI_CTL_CHNUM) | ++ VC4_HD_MAI_CTL_WHOLSMP | ++ VC4_HD_MAI_CTL_CHALIGN | + VC4_HD_MAI_CTL_ENABLE); + break; + case SNDRV_PCM_TRIGGER_STOP: |