Skip to content

Commit abe4239

Browse files
committed
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>
1 parent c915cba commit abe4239

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_hdmi.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,8 @@ static int vc4_hdmi_audio_trigger(struct snd_pcm_substream *substream, int cmd,
991991
HDMI_WRITE(HDMI_MAI_CTL,
992992
VC4_SET_FIELD(vc4_hdmi->audio.channels,
993993
VC4_HD_MAI_CTL_CHNUM) |
994+
VC4_HD_MAI_CTL_WHOLSMP |
995+
VC4_HD_MAI_CTL_CHALIGN |
994996
VC4_HD_MAI_CTL_ENABLE);
995997
break;
996998
case SNDRV_PCM_TRIGGER_STOP:

0 commit comments

Comments
 (0)