summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-01-20 04:05:07 +0300
committerMark Brown <broonie@kernel.org>2020-01-21 20:07:08 +0300
commit250a15cf575a655097151ad887cea02dd0977136 (patch)
tree6ab270c396e077a8512b0a306db2fb803fe8d996 /sound/soc/soc-core.c
parent450312b640f9c6caeeaf4bd8d4130f86ea27f456 (diff)
downloadlinux-250a15cf575a655097151ad887cea02dd0977136.tar.xz
ASoC: soc-core: remove bus_control
Now, snd_soc_dai_driver::bus_control is used for how to resume. But, no driver which has bus_control has DAI driver suspend/resume support. This patch removes pointless bus_control from ALSA SoC. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pnffx7i4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index b0ec3233125a..f969a3b8c82b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -712,8 +712,6 @@ static void soc_resume_deferred(struct work_struct *work)
int snd_soc_resume(struct device *dev)
{
struct snd_soc_card *card = dev_get_drvdata(dev);
- bool bus_control = false;
- struct snd_soc_pcm_runtime *rtd;
struct snd_soc_component *component;
/* If the card is not initialized yet there is nothing to do */
@@ -725,25 +723,9 @@ int snd_soc_resume(struct device *dev)
if (component->active)
pinctrl_pm_select_default_state(component->dev);
- /*
- * DAIs that also act as the control bus master might have other drivers
- * hanging off them so need to resume immediately. Other drivers don't
- * have that problem and may take a substantial amount of time to resume
- * due to I/O costs and anti-pop so handle them out of line.
- */
- for_each_card_rtds(card, rtd) {
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-
- bus_control |= cpu_dai->driver->bus_control;
- }
- if (bus_control) {
- dev_dbg(dev, "ASoC: Resuming control bus master immediately\n");
- soc_resume_deferred(&card->deferred_resume_work);
- } else {
- dev_dbg(dev, "ASoC: Scheduling resume work\n");
- if (!schedule_work(&card->deferred_resume_work))
- dev_err(dev, "ASoC: resume work item may be lost\n");
- }
+ dev_dbg(dev, "ASoC: Scheduling resume work\n");
+ if (!schedule_work(&card->deferred_resume_work))
+ dev_err(dev, "ASoC: resume work item may be lost\n");
return 0;
}