linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked
Date: Wed, 06 Feb 2019 11:18:01 +0100	[thread overview]
Message-ID: <a1f95900-caa6-0dbd-3c8e-88a2d802163d@samsung.com> (raw)
In-Reply-To: <20190206100549.GO3837@imbe.wolfsonmicro.main>

On 2/6/19 11:05, Charles Keepax wrote:
> DAIs linked to the dummy will not have an associated playback/capture
> widget, so we need to skip the update in that case.
> 
> Fixes: 078a85f2806f ("ASoC: dapm: Only power up active channels from a DAI")
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

> ---
> 
> Ok so that all makes sense, this patch is probably the best fix?

It seems so, everything works well with such change, thank you.
 
>  sound/soc/soc-dapm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 482ddb825fb59..5235d8828758a 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -2570,6 +2570,9 @@ static int dapm_update_dai_unlocked(struct snd_pcm_substream *substream,
>  	else
>  		w = dai->capture_widget;
>  
> +	if (!w)
> +		return 0;
> +
>  	dev_dbg(dai->dev, "Update DAI routes for %s %s\n", dai->name,
>  		dir == SNDRV_PCM_STREAM_PLAYBACK ? "playback" : "capture");
>  

  reply	other threads:[~2019-02-06 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20190205211638epcas3p409823d4acac8073473153d745151ea5f@epcas3p4.samsung.com>
2019-02-05 21:16 ` [BUG BISECT] NULL pointer after commit "ASoC: dapm: Only power up active channels from a DAI" Krzysztof Kozlowski
2019-02-06  9:46   ` Sylwester Nawrocki
2019-02-06 10:05     ` [PATCH] ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked Charles Keepax
2019-02-06 10:18       ` Sylwester Nawrocki [this message]
2019-02-06 10:22       ` Krzysztof Kozlowski
2019-02-06 10:59         ` Charles Keepax
2019-02-06 11:14           ` Krzysztof Kozlowski
2019-02-06 11:45             ` Charles Keepax
2019-02-06 15:47               ` Sylwester Nawrocki
2019-02-06 10:11     ` [BUG BISECT] NULL pointer after commit "ASoC: dapm: Only power up active channels from a DAI" Sylwester Nawrocki
2019-02-06 11:03       ` Charles Keepax
2019-02-06  9:58   ` Charles Keepax

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=a1f95900-caa6-0dbd-3c8e-88a2d802163d@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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).