[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA+D8ANDcxY_SZ0qNax7LvkJj_yaY5syzEc6RoOmxjYEut0NOw@mail.gmail.com>
Date: Thu, 14 Sep 2023 12:16:08 +0800
From: Shengjiu Wang <shengjiu.wang@...il.com>
To: Chancel Liu <chancel.liu@....com>
Cc: Xiubo.Lee@...il.com, festevam@...il.com, nicoleotsuka@...il.com,
lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
tiwai@...e.com, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link
On Wed, Sep 13, 2023 at 6:27 PM Chancel Liu <chancel.liu@....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@....com>
Acked-by: Shengjiu Wang <shengjiu.wang@...il.com>
Best regards
Wang Shengjiu
> ---
> sound/soc/fsl/imx-rpmsg.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c
> index 3c7b95db2eac..b578f9a32d7f 100644
> --- a/sound/soc/fsl/imx-rpmsg.c
> +++ b/sound/soc/fsl/imx-rpmsg.c
> @@ -89,6 +89,14 @@ 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
>
Powered by blists - more mailing lists