* [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link
@ 2023-09-12 6:33 Chancel Liu
2023-09-13 1:58 ` Shengjiu Wang
0 siblings, 1 reply; 2+ messages in thread
From: Chancel Liu @ 2023-09-12 6:33 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel, alsa-devel,
linux-kernel, linuxppc-dev
Cc: Chancel Liu
i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled
by CPU DAI driver in hw_free(). Some codec requires MCLK present at
power up/down sequence. So need to set ignore_pmdown_time to power down
codec immediately before MCLK is turned off.
Take WM8962 as an example, if MCLK is disabled before DAPM power down
playback stream, FIFO error will arise in WM8962 which will have bad
impact on playback next.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
sound/soc/fsl/imx-rpmsg.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
index 3c7b95db2eac..d2ecd5e821b1 100644
--- a/sound/soc/fsl/imx-rpmsg.c
+++ b/sound/soc/fsl/imx-rpmsg.c
@@ -89,6 +89,13 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBC_CFC;
+ /* i.MX rpmsg sound cards work on codec slave mode. MCLK will be
+ * disabled by CPU DAI driver in hw_free(). Some codec requires MCLK
+ * present at power up/down sequence. So need to set ignore_pmdown_time
+ * to power down codec immediately before MCLK is turned off.
+ */
+ data->dai.ignore_pmdown_time = 1;
+
/* Optional codec node */
ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args);
if (ret) {
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link
2023-09-12 6:33 [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link Chancel Liu
@ 2023-09-13 1:58 ` Shengjiu Wang
0 siblings, 0 replies; 2+ messages in thread
From: Shengjiu Wang @ 2023-09-13 1:58 UTC (permalink / raw)
To: Chancel Liu
Cc: Xiubo.Lee, festevam, nicoleotsuka, lgirdwood, broonie, perex,
tiwai, shawnguo, s.hauer, kernel, alsa-devel, linux-kernel,
linuxppc-dev
On Tue, Sep 12, 2023 at 2:34 PM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled
> by CPU DAI driver in hw_free(). Some codec requires MCLK present at
> power up/down sequence. So need to set ignore_pmdown_time to power down
> codec immediately before MCLK is turned off.
>
> Take WM8962 as an example, if MCLK is disabled before DAPM power down
> playback stream, FIFO error will arise in WM8962 which will have bad
> impact on playback next.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
> sound/soc/fsl/imx-rpmsg.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
> index 3c7b95db2eac..d2ecd5e821b1 100644
> --- a/sound/soc/fsl/imx-rpmsg.c
> +++ b/sound/soc/fsl/imx-rpmsg.c
> @@ -89,6 +89,13 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
> SND_SOC_DAIFMT_NB_NF |
> SND_SOC_DAIFMT_CBC_CFC;
>
> + /* i.MX rpmsg sound cards work on codec slave mode. MCLK will be
Comments for multi line start from empty line with "/* "
Best regards
wang Shengjiu
> + * disabled by CPU DAI driver in hw_free(). Some codec requires MCLK
> + * present at power up/down sequence. So need to set ignore_pmdown_time
> + * to power down codec immediately before MCLK is turned off.
> + */
> + data->dai.ignore_pmdown_time = 1;
> +
> /* Optional codec node */
> ret = of_parse_phandle_with_fixed_args(np, "audio-codec", 0, 0, &args);
> if (ret) {
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-13 1:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-12 6:33 [PATCH] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link Chancel Liu
2023-09-13 1:58 ` Shengjiu Wang
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®