diff options
author | 2018-09-03 07:05:11 +0000 | |
---|---|---|
committer | 2018-09-03 14:37:11 +0100 | |
commit | b5c088689847372794500f83b65673aaa8ca4d8d (patch) | |
tree | 3ed919e45230ff1a5de24798bc82b51b885f307d /sound | |
parent | ASoC: tlv320aic31xx: Add short circuit detection support (diff) | |
download | linux-b5c088689847372794500f83b65673aaa8ca4d8d.tar.gz linux-b5c088689847372794500f83b65673aaa8ca4d8d.tar.bz2 linux-b5c088689847372794500f83b65673aaa8ca4d8d.zip |
ASoC: rsnd: add warning message to rsnd_kctrl_accept_runtime()
Add warning message to rsnd_kctrl_accept_runtime(), when kctrl
update is rejected due to corresponding dai-link is idle.
So that user can notice the reason of kctrl update failure.
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
[kuninori: adjust to upstream]
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sh/rcar/core.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index f8425d8b44d2..ab7e317bbed8 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1263,8 +1263,15 @@ int rsnd_kctrl_accept_anytime(struct rsnd_dai_stream *io) int rsnd_kctrl_accept_runtime(struct rsnd_dai_stream *io) { struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); + struct rsnd_priv *priv = rsnd_io_to_priv(io); + struct device *dev = rsnd_priv_to_dev(priv); + + if (!runtime) { + dev_warn(dev, "Can't update kctrl when idle\n"); + return 0; + } - return !!runtime; + return 1; } struct rsnd_kctrl_cfg *rsnd_kctrl_init_m(struct rsnd_kctrl_cfg_m *cfg) |