All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
@ 2025-09-25  4:05 Jianfeng Liu
  2025-09-25  4:28 ` Dmitry Baryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: Jianfeng Liu @ 2025-09-25  4:05 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Xilin Wu, Jianfeng Liu, Abhinav Kumar, David Airlie,
	Dmitry Baryshkov, Maarten Lankhorst, Mark Brown, Maxime Ripard,
	Simona Vetter, Thomas Zimmermann, dri-devel, linux-kernel

After reusing drm_hdmi_audio_* helpers and drm_bridge_connector
integration in drm/msm/dp, we have dropped msm_dp_audio_hw_params and
use msm_dp_audio_prepare instead. While userspace is still calling
hw_params to do audio initialization, and we get the following errors:

q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback

msm_dp_audio_prepare is not called because hdmi-codec driver only checks
and runs hw_params before q6apm_lpass_dai_prepare(). This commit will
add hw_params callback same as drm_connector_hdmi_audio_prepare, so that
hdmi-codec driver can work with userspace alsa.

Tested with Radxa Dragon Q6A.

Fixes: 98a8920e7b07 ("drm/msm/dp: reuse generic HDMI codec implementation")
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
---

Changes in v2:
- Link to v1: https://lore.kernel.org/linux-arm-msm/20250924085804.34183-1-liujianfeng1994@gmail.com/
- Use more detailed trace log in commit message.
- Drop the empty line between Fixex and SoB.

 drivers/gpu/drm/display/drm_hdmi_audio_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
index 7d78b02c1446..6ca1c7ad0632 100644
--- a/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_audio_helper.c
@@ -130,6 +130,7 @@ EXPORT_SYMBOL(drm_connector_hdmi_audio_plugged_notify);
 
 static const struct hdmi_codec_ops drm_connector_hdmi_audio_ops = {
 	.audio_startup = drm_connector_hdmi_audio_startup,
+	.hw_params = drm_connector_hdmi_audio_prepare,
 	.prepare = drm_connector_hdmi_audio_prepare,
 	.audio_shutdown = drm_connector_hdmi_audio_shutdown,
 	.mute_stream = drm_connector_hdmi_audio_mute_stream,
-- 
2.43.0


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

end of thread, other threads:[~2026-04-14 18:14 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25  4:05 [PATCH v2] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops Jianfeng Liu
2025-09-25  4:28 ` Dmitry Baryshkov
2025-09-26 10:30   ` Srinivas Kandagatla
2025-09-26 15:09     ` Dmitry Baryshkov
2025-10-03 15:31       ` Dmitry Baryshkov
2025-10-03 16:35       ` Srinivas Kandagatla
2025-10-03 17:02         ` Dmitry Baryshkov
2025-10-04 13:16           ` Srinivas Kandagatla
2025-10-05 15:29             ` Dmitry Baryshkov
2025-10-23 11:43               ` Dmitry Baryshkov
2025-10-23 11:48                 ` Srinivas Kandagatla
2025-10-23 12:24                   ` Dmitry Baryshkov
2025-10-23 12:47                     ` Srinivas Kandagatla
2025-10-23 13:21                       ` Dmitry Baryshkov
2025-10-03 14:42 ` Luca Weiss
2026-04-14 10:18   ` Luca Weiss
2026-04-14 18:13     ` Dmitry Baryshkov
2025-10-21 11:04 ` Krzysztof Kozlowski
2025-10-21 11:12   ` Krzysztof Kozlowski
2025-10-21 12:34     ` Dmitry Baryshkov
2025-10-21 12:43       ` Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.