ASoC: soc-core: remove bus_control
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 20 Jan 2020 01:05:07 +0000 (10:05 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 21 Jan 2020 17:07:08 +0000 (17:07 +0000)
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>
12 files changed:
include/sound/soc-dai.h
sound/soc/au1x/ac97c.c
sound/soc/au1x/psc-ac97.c
sound/soc/cirrus/ep93xx-ac97.c
sound/soc/fsl/fsl_ssi.c
sound/soc/fsl/imx-ssi.c
sound/soc/fsl/mpc5200_psc_ac97.c
sound/soc/pxa/pxa2xx-ac97.c
sound/soc/sh/hac.c
sound/soc/soc-core.c
sound/soc/tegra/tegra20_ac97.c
sound/soc/txx9/txx9aclc-ac97.c

index 2ccecf3e03d547f9e58c82613613f0418cc86e7a..eaaeb00e9e84f6fabda300949e8425a93d9e9c0c 100644 (file)
@@ -302,7 +302,6 @@ struct snd_soc_dai_driver {
        unsigned int symmetric_rates:1;
        unsigned int symmetric_channels:1;
        unsigned int symmetric_samplebits:1;
-       unsigned int bus_control:1; /* DAI is also used for the control bus */
 
        /* probe ordering - for components with runtime dependencies */
        int probe_order;
index 0792c40e6cc10a5b25ab444bafacfe9585a64544..73c6a0edb3d8cdbcd937019512c6686931bbff98 100644 (file)
@@ -206,7 +206,6 @@ static int au1xac97c_dai_probe(struct snd_soc_dai *dai)
 
 static struct snd_soc_dai_driver au1xac97c_dai_driver = {
        .name                   = "alchemy-ac97c",
-       .bus_control            = true,
        .probe                  = au1xac97c_dai_probe,
        .playback = {
                .rates          = AC97_RATES,
index 08bc04e2da2a3f97d7da8688e6a0b7a833f95977..0227993c5da8abb15f943422ce75993e0344ceca 100644 (file)
@@ -339,7 +339,6 @@ static const struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = {
 };
 
 static const struct snd_soc_dai_driver au1xpsc_ac97_dai_template = {
-       .bus_control            = true,
        .probe                  = au1xpsc_ac97_probe,
        .playback = {
                .rates          = AC97_RATES,
index e21eaa1893d1efd10289fd41301ae0e9dcba6e86..1c45fb9ff9908607139300a6707ec99e373bce0a 100644 (file)
@@ -336,7 +336,6 @@ static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
 static struct snd_soc_dai_driver ep93xx_ac97_dai = {
        .name           = "ep93xx-ac97",
        .id             = 0,
-       .bus_control    = true,
        .probe          = ep93xx_ac97_dai_probe,
        .playback       = {
                .stream_name    = "AC97 Playback",
index 537dc69256f0e857835fd311266091c718c8e31c..5c97269be346045526474bdbf09dd38b44a6cc66 100644 (file)
@@ -1136,7 +1136,6 @@ static const struct snd_soc_component_driver fsl_ssi_component = {
 };
 
 static struct snd_soc_dai_driver fsl_ssi_ac97_dai = {
-       .bus_control = true,
        .symmetric_channels = 1,
        .probe = fsl_ssi_dai_probe,
        .playback = {
index 42031ba7da3172e500a47d06818992d3c3480be1..f8488e8f5f5b662258865255937051206244ca1b 100644 (file)
@@ -373,7 +373,6 @@ static struct snd_soc_dai_driver imx_ssi_dai = {
 
 static struct snd_soc_dai_driver imx_ac97_dai = {
        .probe = imx_ssi_dai_probe,
-       .bus_control = true,
        .playback = {
                .stream_name = "AC97 Playback",
                .channels_min = 2,
index e5b9c04d1565134ad546119d8139284e35760902..a082ae636a4fe4d65d5033afe892ba9f41285278 100644 (file)
@@ -233,7 +233,6 @@ static const struct snd_soc_dai_ops psc_ac97_digital_ops = {
 static struct snd_soc_dai_driver psc_ac97_dai[] = {
 {
        .name = "mpc5200-psc-ac97.0",
-       .bus_control = true,
        .probe  = psc_ac97_probe,
        .playback = {
                .stream_name    = "AC97 Playback",
@@ -253,7 +252,6 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
 },
 {
        .name = "mpc5200-psc-ac97.1",
-       .bus_control = true,
        .playback = {
                .stream_name    = "AC97 SPDIF",
                .channels_min   = 1,
index 22fe77955c2cfe8cf721980a0ffe246fbef1e181..4240fde6aae80dfc97cec7ce2cea2bda7b701a94 100644 (file)
@@ -157,7 +157,6 @@ static const struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = {
 static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
 {
        .name = "pxa2xx-ac97",
-       .bus_control = true,
        .playback = {
                .stream_name = "AC97 Playback",
                .channels_min = 2,
@@ -174,7 +173,6 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
 },
 {
        .name = "pxa2xx-ac97-aux",
-       .bus_control = true,
        .playback = {
                .stream_name = "AC97 Aux Playback",
                .channels_min = 1,
@@ -191,7 +189,6 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
 },
 {
        .name = "pxa2xx-ac97-mic",
-       .bus_control = true,
        .capture = {
                .stream_name = "AC97 Mic Capture",
                .channels_min = 1,
index 17622ceb98c0db6d70e81f84189378447261d9dc..475fc984f8c51d87a514dea3bd4ae10d5526328c 100644 (file)
@@ -270,7 +270,6 @@ static const struct snd_soc_dai_ops hac_dai_ops = {
 static struct snd_soc_dai_driver sh4_hac_dai[] = {
 {
        .name                   = "hac-dai.0",
-       .bus_control            = true,
        .playback = {
                .rates          = AC97_RATES,
                .formats        = AC97_FMTS,
index b0ec3233125aca843078bcc99daca6def3398742..f969a3b8c82ba4c217dc1433f3b3e271c3c0777d 100644 (file)
@@ -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;
 }
index 09c8516d7c4d42cdff837391aac4fa221f8a1685..06c728ae17edc91946eb62bb8ec3d4f4a0839f5b 100644 (file)
@@ -219,7 +219,6 @@ static int tegra20_ac97_probe(struct snd_soc_dai *dai)
 
 static struct snd_soc_dai_driver tegra20_ac97_dai = {
        .name = "tegra-ac97-pcm",
-       .bus_control = true,
        .probe = tegra20_ac97_probe,
        .playback = {
                .stream_name = "PCM Playback",
index bfaa9b3fda43e2e5225d9c45e9b5934e48c85f1f..b1d9615f23754b82d3d0dc09f729d44541f9bdb3 100644 (file)
@@ -148,7 +148,6 @@ static int txx9aclc_ac97_remove(struct snd_soc_dai *dai)
 }
 
 static struct snd_soc_dai_driver txx9aclc_ac97_dai = {
-       .bus_control            = true,
        .probe                  = txx9aclc_ac97_probe,
        .remove                 = txx9aclc_ac97_remove,
        .playback = {