diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-02-06 12:13:59 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-06 16:42:27 +0100 |
commit | cf17a5ffd27234371d10748bf1c716ef172877f3 (patch) | |
tree | 0a27d57f7d98d346b7c28c9f65d08e7b7d31639a | |
parent | ASoC: ak4118: fix missing header (diff) | |
download | linux-cf17a5ffd27234371d10748bf1c716ef172877f3.tar.xz linux-cf17a5ffd27234371d10748bf1c716ef172877f3.zip |
ASoC: dapm: Check for NULL widget in dapm_update_dai_unlocked
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")
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-dapm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 5b74dffc9c11..111a23a9708a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -2580,6 +2580,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"); |