vc4_hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET
authorDom Cobley <popcornmix@gmail.com>
Tue, 23 Jun 2020 17:37:01 +0000 (18:37 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:34:17 +0000 (16:34 +0100)
commitfeb585fae5d86b9e8e0a2be40e5e021e168579d2
treec6e741186b3e27885197b9a526e67a4b54907e93
parent04a00477f62f1e7d58d87c208e62a67d992892cd
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