alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [alsa-devel] [PATCH v2 12/15] ASoC: soc-core: add missing return value check for soc_link_init()
Date: Mon, 2 Dec 2019 11:20:03 -0600	[thread overview]
Message-ID: <dd007720-d517-c457-5000-be8f64d4fd5f@linux.intel.com> (raw)
In-Reply-To: <8736e93jd8.wl-kuninori.morimoto.gx@renesas.com>



On 11/27/19 12:48 AM, Kuninori Morimoto wrote:
> 
> Hi Pierre-Louis
> 
>>> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
>>> index 79a4753..bdae48e 100644
>>> --- a/sound/soc/soc-core.c
>>> +++ b/sound/soc/soc-core.c
>>> @@ -1983,8 +1983,11 @@ static int snd_soc_bind_card(struct snd_soc_card *card)
>>>    		goto probe_end;
>>>    	}
>>>    -	for_each_card_rtds(card, rtd)
>>> -		soc_link_init(card, rtd);
>>> +	for_each_card_rtds(card, rtd) {
>>> +		ret = soc_link_init(card, rtd);
>>> +		if (ret < 0)
>>> +			goto probe_end;
>>> +	}
>>
>> Morimoto-san, this patch proves very useful to avoid a kernel oops
>> when a dailink init fails, but I still see a warning when cleaning-up.
>>
>> I was experimenting with a topology file that wasn't complete and came
>> across the warning below, would you have any ideas/recommendations on
>> what might be missing? I am running out of time this week so thought I
>> would ask, in case this rings a bell.
>>
>> Thanks!
>>
>> [   21.098662] bytcr_rt5640 bytcr_rt5640: ASoC: no source widget found
>> for modem_out
>> [   21.098677] bytcr_rt5640 bytcr_rt5640: ASoC: Failed to add route
>> modem_out -> direct -> ssp0 Tx
>> [   21.098694] bytcr_rt5640 bytcr_rt5640: ASoC: no sink widget found
>> for modem_in
>> [   21.098703] bytcr_rt5640 bytcr_rt5640: ASoC: Failed to add route
>> ssp0 Rx -> direct -> modem_in
>> [   21.098732] bytcr_rt5640 bytcr_rt5640: ASoC: failed to init
>> SSP2-Codec: -19
> 
> Do you mean, it could save you from Oops, but you still have warning ?

Correct.

> 
> It seems soc-dapm::snd_soc_dapm_add_routes() failed.
> Your kernel is missing widget route/path ?
> Or, sound card driver has some issue ?
> 
> I have been faced this error many times.
> I don't remember detail, but, if my memory was correct,
> it was always card driver setup timing, or missing something, in my case.

In this case it's a bad topology that does not contain widgets that the 
machine driver uses. Still that should be handled gracefully without 
warnings.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-12-02 17:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25  0:42 [alsa-devel] [PATCH v2 00/15] ASoC: soc-core cleanup step6 Kuninori Morimoto
2019-11-25  0:43 ` [alsa-devel] [PATCH v2 01/15] ASoC: soc-core: remove dai_link_list Kuninori Morimoto
2019-11-25  0:43 ` [alsa-devel] [PATCH v2 02/15] ASoC: soc-core: remove snd_soc_disconnect_sync() Kuninori Morimoto
2019-11-25  0:43 ` [alsa-devel] [PATCH v2 03/15] ASoC: soc-core: remove snd_soc_get_dai_substream() Kuninori Morimoto
2019-11-25  0:43 ` [alsa-devel] [PATCH v2 04/15] ASoC: soc-core: move snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-25  0:44 ` [alsa-devel] [PATCH v2 05/15] ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-25  0:44 ` [alsa-devel] [PATCH v2 06/15] ASoC: soc-core: move snd_soc_find_dai_link() Kuninori Morimoto
2019-11-25  0:44 ` [alsa-devel] [PATCH v2 07/15] ASoC: soc-core: rename snd_soc_add_dai_link() to snd_soc_add_pcm_runtime() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 08/15] ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 09/15] ASoC: soc-core: move soc_link_dai_pcm_new() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 10/15] ASoC: soc-core: rename soc_link_dai_pcm_new() to soc_dai_pcm_new() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 11/15] ASoC: soc-core: move soc_link_init() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 12/15] ASoC: soc-core: add missing return value check for soc_link_init() Kuninori Morimoto
2019-11-27  2:56   ` Pierre-Louis Bossart
2019-11-27  6:48     ` Kuninori Morimoto
2019-12-02 17:20       ` Pierre-Louis Bossart [this message]
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 13/15] ASoC: soc-core: rename soc_link_init() to soc_init_pcm_runtime() Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 14/15] ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition Kuninori Morimoto
2019-11-25  0:45 ` [alsa-devel] [PATCH v2 15/15] ASoC: soc-core: soc_set_name_prefix(): get component device_node at out of loop Kuninori Morimoto
2019-11-25 15:29 ` [alsa-devel] [PATCH v2 00/15] ASoC: soc-core cleanup step6 Pierre-Louis Bossart

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=dd007720-d517-c457-5000-be8f64d4fd5f@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.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).