dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.10 001/176] drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET
@ 2021-09-09 11:48 Sasha Levin
  2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 002/176] drm/amdgpu: Fix amdgpu_ras_eeprom_init() Sasha Levin
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: Sasha Levin @ 2021-09-09 11:48 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Dom Cobley, Maxime Ripard, Nicolas Saenz Julienne, Sasha Levin,
	dri-devel

From: Dom Cobley <popcornmix@gmail.com>

[ Upstream commit 1698ecb218eb82587dbfc71a2e26ded66e5ecf59 ]

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>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210525132354.297468-7-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index c58b8840090a..ee293f061f0a 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1074,7 +1074,9 @@ static int vc4_hdmi_audio_trigger(struct snd_pcm_substream *substream, int cmd,
 		HDMI_WRITE(HDMI_MAI_CTL,
 			   VC4_SET_FIELD(vc4_hdmi->audio.channels,
 					 VC4_HD_MAI_CTL_CHNUM) |
-			   VC4_HD_MAI_CTL_ENABLE);
+					 VC4_HD_MAI_CTL_WHOLSMP |
+					 VC4_HD_MAI_CTL_CHALIGN |
+					 VC4_HD_MAI_CTL_ENABLE);
 		break;
 	case SNDRV_PCM_TRIGGER_STOP:
 		HDMI_WRITE(HDMI_MAI_CTL,
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-09-09 11:54 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-09 11:48 [PATCH AUTOSEL 5.10 001/176] drm/vc4: hdmi: Set HD_CTL_WHOLSMP and HD_CTL_CHALIGN_SET Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 002/176] drm/amdgpu: Fix amdgpu_ras_eeprom_init() Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 015/176] video: fbdev: kyro: fix a DoS bug by restricting user input Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 018/176] drm: avoid blocking in drm_clients_info's rcu section Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 019/176] drm: serialize drm_file.master with a new spinlock Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 020/176] drm: protect drm_master pointers in drm_lease.c Sasha Levin
2021-09-09 11:48 ` [PATCH AUTOSEL 5.10 032/176] drm/amd/display: Fix timer_per_pixel unit error Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 040/176] drm/amdgpu: Fix a printing message Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 041/176] drm/amd/amdgpu: Update debugfs link_settings output link_rate field in hex Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 044/176] drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 046/176] video: fbdev: asiliantfb: Error out if 'pixclock' equals zero Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 047/176] video: fbdev: kyro: " Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 048/176] video: fbdev: riva: " Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 092/176] drm/msm: mdp4: drop vblank get/put from prepare/complete_commit Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 093/176] drm/msm/dsi: Fix DSI and DSI PHY regulator config from SDM660 Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 094/176] drm: xlnx: zynqmp_dpsub: Call pm_runtime_get_sync before setting pixel clock Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 095/176] drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers Sasha Levin
2021-09-09 11:49 ` [PATCH AUTOSEL 5.10 097/176] drm/amd/display: fix missing writeback disablement if plane is removed Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 098/176] drm/amd/display: fix incorrect CM/TF programming sequence in dwb Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 100/176] drm/vmwgfx: fix potential UAF in vmwgfx_surface.c Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 103/176] drm/msm/dp: return correct edid checksum after corrupted edid checksum read Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 105/176] gpu: drm: amd: amdgpu: amdgpu_i2c: fix possible uninitialized-variable access in amdgpu_i2c_router_select_ddc_port() Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 106/176] drm/display: fix possible null-pointer dereference in dcn10_set_clock() Sasha Levin
2021-09-09 11:50 ` [PATCH AUTOSEL 5.10 130/176] drm/exynos: Always initialize mapping in exynos_drm_register_dma() Sasha Levin
2021-09-09 11:51 ` [PATCH AUTOSEL 5.10 158/176] drm/amdkfd: Account for SH/SE count when setting up cu masks Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox