mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
@ 2025-09-24  8:57 Jianfeng Liu
  2025-09-24 20:17 ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jianfeng Liu @ 2025-09-24  8:57 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:

[ 784.904566] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[ 784.912185] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[ 784.918927] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[ 784.929947] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0

msm_dp_audio_prepare is not called because hdmi-codec driver only checks
and runs hw_params. This commit will add hw_params callback function
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>
---

 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	[flat|nested] 8+ messages in thread

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-24  8:57 [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops Jianfeng Liu
@ 2025-09-24 20:17 ` Dmitry Baryshkov
  2025-09-25  1:51   ` Jianfeng Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-09-24 20:17 UTC (permalink / raw)
  To: Jianfeng Liu
  Cc: linux-arm-msm, Xilin Wu, Abhinav Kumar, David Airlie,
	Dmitry Baryshkov, Maarten Lankhorst, Mark Brown, Maxime Ripard,
	Simona Vetter, Thomas Zimmermann, dri-devel, linux-kernel

On Wed, Sep 24, 2025 at 04:57:43PM +0800, Jianfeng Liu wrote:
> 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:
> 
> [ 784.904566] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
> [ 784.912185] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
> [ 784.918927] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
> [ 784.929947] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
> 
> msm_dp_audio_prepare is not called because hdmi-codec driver only checks
> and runs hw_params. This commit will add hw_params callback function
> same as drm_connector_hdmi_audio_prepare, so that hdmi-codec driver can
> work with userspace alsa.

I think something is wrong here. The prepare callback also should be
called. Is it that the prepare callback is called too late?

> 
> Tested with Radxa Dragon Q6A.
> 
> Fixes: 98a8920e7b07 ("drm/msm/dp: reuse generic HDMI codec implementation")
> 
> Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
> ---
> 
>  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
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-24 20:17 ` Dmitry Baryshkov
@ 2025-09-25  1:51   ` Jianfeng Liu
  2025-09-25  2:18     ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jianfeng Liu @ 2025-09-25  1:51 UTC (permalink / raw)
  To: dmitry.baryshkov
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel,
	liujianfeng1994, lumag, maarten.lankhorst, mripard,
	quic_abhinavk, simona, sophon, tzimmermann

Hi,

On 2025-09-24 20:17 UTC, Dmitry Baryshkov wrote:
>> msm_dp_audio_prepare is not called because hdmi-codec driver only checks
>> and runs hw_params. This commit will add hw_params callback function
>> same as drm_connector_hdmi_audio_prepare, so that hdmi-codec driver can
>> work with userspace alsa.
>
>I think something is wrong here. The prepare callback also should be
>called. Is it that the prepare callback is called too late?

I have added debug log to hdmi_codec_hw_params() and hdmi_codec_prepare(),
but only logs from hdmi_codec_hw_params() are printed without this patch.
After applying this patch, hdmi_codec_prepare() is called after
hdmi_codec_hw_params():

[   14.218445] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   14.223004] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
[   14.534614] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/a660_gmu.bin from new location
[   14.535750] [drm] Loaded GMU firmware v3.1.10
[   15.727443] rfkill: input handler disabled
[   42.647157] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   42.656774] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started

Best regards,
Jianfeng

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-25  1:51   ` Jianfeng Liu
@ 2025-09-25  2:18     ` Dmitry Baryshkov
  2025-09-25  2:57       ` Jianfeng Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-09-25  2:18 UTC (permalink / raw)
  To: Jianfeng Liu
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel, lumag,
	maarten.lankhorst, mripard, quic_abhinavk, simona, sophon,
	tzimmermann

On Thu, Sep 25, 2025 at 09:51:12AM +0800, Jianfeng Liu wrote:
> Hi,
> 
> On 2025-09-24 20:17 UTC, Dmitry Baryshkov wrote:
> >> msm_dp_audio_prepare is not called because hdmi-codec driver only checks
> >> and runs hw_params. This commit will add hw_params callback function
> >> same as drm_connector_hdmi_audio_prepare, so that hdmi-codec driver can
> >> work with userspace alsa.
> >
> >I think something is wrong here. The prepare callback also should be
> >called. Is it that the prepare callback is called too late?
> 
> I have added debug log to hdmi_codec_hw_params() and hdmi_codec_prepare(),
> but only logs from hdmi_codec_hw_params() are printed without this patch.
> After applying this patch, hdmi_codec_prepare() is called after
> hdmi_codec_hw_params():

When does q6apm_lpass_dai_prepare() happen?

> 
> [   14.218445] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> [   14.223004] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
> [   14.534614] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/a660_gmu.bin from new location
> [   14.535750] [drm] Loaded GMU firmware v3.1.10
> [   15.727443] rfkill: input handler disabled
> [   42.647157] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> [   42.656774] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
> 
> Best regards,
> Jianfeng

-- 
With best wishes
Dmitry

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-25  2:18     ` Dmitry Baryshkov
@ 2025-09-25  2:57       ` Jianfeng Liu
  2025-09-25  3:08         ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jianfeng Liu @ 2025-09-25  2:57 UTC (permalink / raw)
  To: dmitry.baryshkov
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel,
	liujianfeng1994, lumag, maarten.lankhorst, mripard,
	quic_abhinavk, simona, sophon, tzimmermann

Hi,

On 2025-09-25  2:18 UTC, Dmitry Baryshkov wrote:
>When does q6apm_lpass_dai_prepare() happen?

q6apm_lpass_dai_prepare() happens both before and after hw_params/prepare
of hdmi-codec:

[   14.055198] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.067225] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.089925] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.105988] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   14.106027] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.122707] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
[   14.132017] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.197843] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.633992] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/a660_gmu.bin from new location
[   14.635452] [drm] Loaded GMU firmware v3.1.10
[   15.929293] rfkill: input handler disabled
[   19.406507] qcom-soundwire 3210000.soundwire: qcom_swrm_irq_handler: SWR Port collision detected
[   19.415672] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.465864] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.581446] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.693965] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   19.694012] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.706621] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
[   19.722543] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.775071] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started

Best regards,
Jianfeng

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-25  2:57       ` Jianfeng Liu
@ 2025-09-25  3:08         ` Dmitry Baryshkov
  2025-09-25  3:23           ` Jianfeng Liu
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-09-25  3:08 UTC (permalink / raw)
  To: Jianfeng Liu
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel, lumag,
	maarten.lankhorst, mripard, quic_abhinavk, simona, sophon,
	tzimmermann

On Thu, Sep 25, 2025 at 10:57:14AM +0800, Jianfeng Liu wrote:
> Hi,
> 
> On 2025-09-25  2:18 UTC, Dmitry Baryshkov wrote:
> >When does q6apm_lpass_dai_prepare() happen?
> 
> q6apm_lpass_dai_prepare() happens both before and after hw_params/prepare
> of hdmi-codec:
> 
> [   14.055198] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.067225] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.089925] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.105988] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> [   14.106027] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.122707] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started

From this log I don't see, why the function would fail in the way you've
described. Could you please post (for comparison) a trace log without
your patch?

> [   14.132017] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.197843] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.633992] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/a660_gmu.bin from new location
> [   14.635452] [drm] Loaded GMU firmware v3.1.10
> [   15.929293] rfkill: input handler disabled
> [   19.406507] qcom-soundwire 3210000.soundwire: qcom_swrm_irq_handler: SWR Port collision detected
> [   19.415672] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   19.465864] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   19.581446] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   19.693965] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> [   19.694012] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   19.706621] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
> [   19.722543] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   19.775071] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> 
> Best regards,
> Jianfeng

-- 
With best wishes
Dmitry

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-25  3:08         ` Dmitry Baryshkov
@ 2025-09-25  3:23           ` Jianfeng Liu
  2025-09-25  3:43             ` Dmitry Baryshkov
  0 siblings, 1 reply; 8+ messages in thread
From: Jianfeng Liu @ 2025-09-25  3:23 UTC (permalink / raw)
  To: dmitry.baryshkov
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel,
	liujianfeng1994, lumag, maarten.lankhorst, mripard,
	quic_abhinavk, simona, sophon, tzimmermann

Hi,

On Thu, 25 Sep 2025 06:08:58 +0300, Dmitry Baryshkov wrote:
>> [   14.055198] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
>> [   14.067225] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
>> [   14.089925] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
>> [   14.105988] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
>> [   14.106027] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
>> [   14.122707] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
>
>From this log I don't see, why the function would fail in the way you've
>described. Could you please post (for comparison) a trace log without
>your patch?

Here is the trace log without mu patch:

[   14.093437] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.105285] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.127546] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.144819] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   14.144855] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.652233] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   14.659556] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   14.666326] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   14.677484] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   14.690897]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   14.699779] msm_dpu ae01000.display-controller: [drm:adreno_request_fw] loaded qcom/a660_gmu.bin from new location
[   14.702160] [drm] Loaded GMU firmware v3.1.10
[   14.714573] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   14.721910] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   14.721923] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   15.231216] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   15.238577] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   15.245323] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   15.256528] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   15.269943]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   15.279988] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   15.279997] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   15.785610] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   15.792908] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   15.799687] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   15.811261] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   15.825865]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   15.843283] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   15.843300] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   15.991449] rfkill: input handler disabled
[   16.349109] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   16.356529] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   16.363279] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   16.374539] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   16.388835]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   16.399355] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   16.399371] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   16.905665] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   16.913032] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   16.919837] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   16.931141] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   16.946106]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   16.958230] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   16.958242] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   17.464922] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   17.472219] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   17.478985] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   17.490126] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   17.503539]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   17.513599] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   17.513606] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   18.019162] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   18.026682] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   18.033427] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   18.044729] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   18.058144]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   18.068168] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   18.068176] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   18.574028] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   18.581321] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   18.588086] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   18.599667] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   18.613127]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   18.646419] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   18.646443] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.152583] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   19.160139] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   19.166909] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   19.178407] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   19.191821]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   19.222661] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   19.222678] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.730557] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   19.738156] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   19.744933] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   19.756633] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   19.770042]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   19.789888] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   19.799242] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   19.799252] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   20.308857] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   20.316540] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   20.323280] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   20.334923] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   20.348392]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   20.358449] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   20.358456] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   20.865298] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   20.873431] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   20.880197] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   20.891777] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   20.905293]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback
[   20.924421] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
[   20.924455] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
[   21.431143] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
[   21.439239] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
[   21.445985] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
[   21.457877] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
[   21.471375]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback

Best regards,
Jianfeng

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

* Re: [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops
  2025-09-25  3:23           ` Jianfeng Liu
@ 2025-09-25  3:43             ` Dmitry Baryshkov
  0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Baryshkov @ 2025-09-25  3:43 UTC (permalink / raw)
  To: Jianfeng Liu
  Cc: airlied, broonie, dri-devel, linux-arm-msm, linux-kernel, lumag,
	maarten.lankhorst, mripard, quic_abhinavk, simona, sophon,
	tzimmermann

On Thu, Sep 25, 2025 at 11:23:38AM +0800, Jianfeng Liu wrote:
> Hi,
> 
> On Thu, 25 Sep 2025 06:08:58 +0300, Dmitry Baryshkov wrote:
> >> [   14.055198] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> >> [   14.067225] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> >> [   14.089925] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> >> [   14.105988] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> >> [   14.106027] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> >> [   14.122707] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_prepare() started
> >
> >From this log I don't see, why the function would fail in the way you've
> >described. Could you please post (for comparison) a trace log without
> >your patch?
> 
> Here is the trace log without mu patch:
> 
> [   14.093437] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.105285] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.127546] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.144819] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_hw_params() started
> [   14.144855] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: q6apm_lpass_dai_prepare() started
> [   14.652233] qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
> [   14.659556] qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
> [   14.666326] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: Failed to start APM port 104
> [   14.677484] q6apm-lpass-dais 3700000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC error (-22): at snd_soc_dai_prepare() on DISPLAY_PORT_RX_0
> [   14.690897]  MultiMedia2 Playback: ASoC error (-22): at dpcm_run_update_startup() on MultiMedia2 Playback

Please include these call traces (up to this point, the rest is not
necessary) into the commit message. You can drop the timestamps to save
space.

Also please drop the empty line between Fixex and SoB.


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2025-09-25  3:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-24  8:57 [PATCH] drm/display: add hw_params callback function to drm_connector_hdmi_audio_ops Jianfeng Liu
2025-09-24 20:17 ` Dmitry Baryshkov
2025-09-25  1:51   ` Jianfeng Liu
2025-09-25  2:18     ` Dmitry Baryshkov
2025-09-25  2:57       ` Jianfeng Liu
2025-09-25  3:08         ` Dmitry Baryshkov
2025-09-25  3:23           ` Jianfeng Liu
2025-09-25  3:43             ` Dmitry Baryshkov

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

all inboxes | Powered by JetHome®