lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nvyjnmd242h3muahzkyii7o7yssrb3h4gbqdvpjytu57nfu46h@s2fdz3tnq3f7>
Date: Tue, 21 Oct 2025 15:43:34 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Jianfeng Liu <liujianfeng1994@...il.com>, linux-arm-msm@...r.kernel.org,
        Xilin Wu <sophon@...xa.com>, Abhinav Kumar <quic_abhinavk@...cinc.com>,
        David Airlie <airlied@...il.com>, Dmitry Baryshkov <lumag@...nel.org>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Mark Brown <broonie@...nel.org>, Maxime Ripard <mripard@...nel.org>,
        Simona Vetter <simona@...ll.ch>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] drm/display: add hw_params callback function to
 drm_connector_hdmi_audio_ops

On Tue, Oct 21, 2025 at 03:34:26PM +0300, Dmitry Baryshkov wrote:
> On Tue, Oct 21, 2025 at 01:12:14PM +0200, Krzysztof Kozlowski wrote:
> > On 21/10/2025 13:04, Krzysztof Kozlowski wrote:
> > > On 25/09/2025 06:05, 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:
> > >>
> > >> 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.
> > >>
> > > 
> > > 
> > > Missing Cc stable.
> > > 
> > >> Fixes: 98a8920e7b07 ("drm/msm/dp: reuse generic HDMI codec implementation")
> > >> Signed-off-by: Jianfeng Liu <liujianfeng1994@...il.com>
> > >> ---
> > > 
> > > I confirm this fixes the audio over DP/HDMI on X1E laptops. Please apply
> > > this for fixes.
> > 
> > Forgot:
> > 
> > Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
> 
> I'm still waiting for the response from Srini (since Oct 3rd). If you
> want it to be applied quicklier, let's resolve the question if it is a
> correct fix or not.

In other words: from my opinion, the correct fix should be to make sure
that DP part is ready after .audio_enable, rather than depending on
.hw_params vs .prepare behaviour. Otherwise after some changes in ASoC
or qcom soundcards we might end up in a situation when DSP's .hw_prepare
is called before DP's .hw_prepare, ending up with the same issue.

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ