From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jerome Brunet <jbrunet@baylibre.com>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Kevin Hilman <khilman@baylibre.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH 1/2] ASoC: soc-core: defer card registration if codec component is missing
Date: Wed, 26 Jun 2019 23:20:22 +0200 [thread overview]
Message-ID: <8b4822f7-6671-1c23-572d-37f7e94ea8cc@linux.intel.com> (raw)
In-Reply-To: <20190626133617.25959-2-jbrunet@baylibre.com>
On 6/26/19 3:36 PM, Jerome Brunet wrote:
> Like cpus and platforms, defer sound card initialization if the codec
> component is missing when initializing the dai_link
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
> sound/soc/soc-core.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 358f1fbf9a30..002ddbf4e5a3 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -1064,12 +1064,20 @@ static int soc_init_dai_link(struct snd_soc_card *card,
> link->name);
> return -EINVAL;
> }
> +
> /* Codec DAI name must be specified */
> if (!codec->dai_name) {
> dev_err(card->dev, "ASoC: codec_dai_name not set for %s\n",
> link->name);
> return -EINVAL;
> }
> +
> + /*
> + * Defer card registartion if codec component is not added to
registration
> + * component list.
> + */
> + if (!soc_find_component(codec))
> + return -EPROBE_DEFER;
> }
>
> /*
>
next prev parent reply other threads:[~2019-06-26 21:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-26 13:36 [PATCH 0/2] ASoC: soc-core: update dai_link init Jerome Brunet
2019-06-26 13:36 ` [PATCH 1/2] ASoC: soc-core: defer card registration if codec component is missing Jerome Brunet
2019-06-26 21:20 ` Pierre-Louis Bossart [this message]
2019-06-26 13:36 ` [PATCH 2/2] ASoC: soc-core: support dai_link with platforms_num != 1 Jerome Brunet
2019-06-26 23:44 ` Kuninori Morimoto
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=8b4822f7-6671-1c23-572d-37f7e94ea8cc@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/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).