Re: [PATCH] ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please ignore this patch.

On Thu, May 30, 2019 at 3:32 PM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 2d3520fca613..82ff384753c7 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -2072,6 +2072,15 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
>         mutex_lock(&client_mutex);
>         mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_INIT);
>
> +       for_each_card_prelinks(card, i, dai_link) {
> +               ret = soc_init_dai_link(card, dai_link);
> +               if (ret) {
> +                       dev_err(card->dev, "ASoC: failed to init link %s: %d\n",
> +                               dai_link->name, ret);
> +                       goto probe_end;
> +               }
> +       }
> +
>         card->dapm.bias_level = SND_SOC_BIAS_OFF;
>         card->dapm.dev = card->dev;
>         card->dapm.card = card;
> @@ -2241,7 +2250,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
>         snd_soc_dapm_sync(&card->dapm);
>
>  probe_end:
> -       if (ret < 0)
> +       if (ret < 0 && ret != -EPROBE_DEFER)
>                 soc_cleanup_card_resources(card);
Should not call soc_cleanup_card_resources() if soc_init_dai_link()
returns fail.  Some context has not initialized yet in the case.

>
>         mutex_unlock(&card->mutex);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux