From: Shengjiu Wang <shengjiu.wang@gmail.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: alsa-devel@alsa-project.org, Xiubo Li <Xiubo.Lee@gmail.com>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Mark Brown <broonie@kernel.org>,
Sascha Hauer <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>
Subject: Re: [PATCH 3/3] ASoC: fsl_sai: add error message in case of missing imx-pcm-dma support
Date: Mon, 6 Jun 2022 11:20:16 +0800 [thread overview]
Message-ID: <CAA+D8APDR7w3T5ek5q-mvNsrp-u7sAXCzdT+OCYEr7GkH3L2QA@mail.gmail.com> (raw)
In-Reply-To: <20220601092342.3328644-3-m.felsch@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]
On Wed, Jun 1, 2022 at 5:23 PM Marco Felsch <m.felsch@pengutronix.de> wrote:
> If the imx-pcm-dma is required we need to have the module enabled. For
> all NXP/FSL sound cards using the ASoC architecture this is the case but
> in case of using the simple-audio-card sound card this isn't the case.
>
> In such case the driver probe fails silently and the card isn't
> available. It took a while to find the missing Kconfig. Make this easier
> for others by printing a error if this the module isn't available but
> required by the HW.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Best regards
Wang Shengjiu
> ---
> sound/soc/fsl/fsl_sai.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
> index 3e54f1f71c1e..2371da814b09 100644
> --- a/sound/soc/fsl/fsl_sai.c
> +++ b/sound/soc/fsl/fsl_sai.c
> @@ -1152,8 +1152,11 @@ static int fsl_sai_probe(struct platform_device
> *pdev)
> */
> if (sai->soc_data->use_imx_pcm) {
> ret = imx_pcm_dma_init(pdev);
> - if (ret)
> + if (ret) {
> + if (!IS_ENABLED(CONFIG_SND_SOC_IMX_PCM_DMA))
> + dev_err(dev, "Error: You must enable the
> imx-pcm-dma support!\n");
> goto err_pm_get_sync;
> + }
> } else {
> ret = devm_snd_dmaengine_pcm_register(dev, NULL, 0);
> if (ret)
> --
> 2.30.2
>
>
[-- Attachment #2: Type: text/html, Size: 2414 bytes --]
next prev parent reply other threads:[~2022-06-06 8:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 9:23 [PATCH 1/3] ASoC: fsl_sai: use local device pointer Marco Felsch
2022-06-01 9:23 ` [PATCH 2/3] ASoC: fsl_sai: convert to dev_err_probe Marco Felsch
2022-06-06 2:48 ` Shengjiu Wang
2022-06-01 9:23 ` [PATCH 3/3] ASoC: fsl_sai: add error message in case of missing imx-pcm-dma support Marco Felsch
2022-06-06 3:20 ` Shengjiu Wang [this message]
2022-06-06 3:18 ` [PATCH 1/3] ASoC: fsl_sai: use local device pointer Shengjiu Wang
2022-06-07 10:46 ` (subset) " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA+D8APDR7w3T5ek5q-mvNsrp-u7sAXCzdT+OCYEr7GkH3L2QA@mail.gmail.com \
--to=shengjiu.wang@gmail.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=m.felsch@pengutronix.de \
--cc=nicoleotsuka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).