From 49df1e3925824cf44e590daac635974270185841 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 2 Dec 2019 16:58:34 +0100 Subject: ASoC: rsnd: Calculate DALIGN inversion at run-time There is no need to store the inverted DALIGN values in the table, as they can easily be calculated at run-time. This also protects against the introduction of inconsistencies between normal and inverted values by a future table modification. Reorder the two subexpressions in the AND check, to perform the least expensive check first. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191202155834.22582-1-geert+renesas@glider.be Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 399dc6e9bde5..d20f03dfdee6 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -376,20 +376,15 @@ u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io) */ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io) { - static const u32 dalign_values[8][2] = { - {0x76543210, 0x67452301}, - {0x00000032, 0x00000023}, - {0x00007654, 0x00006745}, - {0x00000076, 0x00000067}, - {0xfedcba98, 0xefcdab89}, - {0x000000ba, 0x000000ab}, - {0x0000fedc, 0x0000efcd}, - {0x000000fe, 0x000000ef}, + static const u32 dalign_values[8] = { + 0x76543210, 0x00000032, 0x00007654, 0x00000076, + 0xfedcba98, 0x000000ba, 0x0000fedc, 0x000000fe, }; - int id = 0, inv; + int id = 0; struct rsnd_mod *ssiu = rsnd_io_to_mod_ssiu(io); struct rsnd_mod *target; struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); + u32 dalign; /* * *Hardware* L/R and *Software* L/R are inverted for 16bit data. @@ -425,15 +420,15 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io) if (mod == ssiu) id = rsnd_mod_id_sub(mod); - /* Non target mod or non 16bit needs normal DALIGN */ - if ((snd_pcm_format_width(runtime->format) != 16) || - (mod != target)) - inv = 0; - /* Target mod needs inverted DALIGN when 16bit */ - else - inv = 1; + dalign = dalign_values[id]; + + if (mod == target && snd_pcm_format_width(runtime->format) == 16) { + /* Target mod needs inverted DALIGN when 16bit */ + dalign = (dalign & 0xf0f0f0f0) >> 4 | + (dalign & 0x0f0f0f0f) << 4; + } - return dalign_values[id][inv]; + return dalign; } u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod) -- cgit v1.2.3 From b553bd238da23041bf39110e58ee80f8efe034e0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 10 Dec 2019 09:33:50 +0900 Subject: ASoC: soc-core: remove snd_soc_disconnect_sync() Sound card disconnecting operation was needed when "sound driver" was unbinded without unbinding "sound card". In such case, sound driver should be stopped even though it was playbacking/capturing. Otherwise clock open/close counter mismatch happen. One headache was that we can't skip unbind in error case because unbind operation doesn't check return value from each drivers. snd_soc_disconnect_sync() was added for these purpose, and Renesas sound card only is used it. But now, ALSA SoC automatically disconnect sound card when sound driver was unbinded. Thus, snd_soc_disconnect_sync() is no longer needed. This patch removes it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87eexdyq6p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 2 -- sound/soc/soc-core.c | 12 ------------ 2 files changed, 14 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index d20f03dfdee6..6aac25095218 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1819,8 +1819,6 @@ static int rsnd_remove(struct platform_device *pdev) }; int ret = 0, i; - snd_soc_disconnect_sync(&pdev->dev); - pm_runtime_disable(&pdev->dev); for_each_rsnd_dai(rdai, priv, i) { diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9483bfe17260..0d436a2560e4 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1444,18 +1444,6 @@ static int soc_probe_link_components(struct snd_soc_card *card) return 0; } -void snd_soc_disconnect_sync(struct device *dev) -{ - struct snd_soc_component *component = - snd_soc_lookup_component(dev, NULL); - - if (!component || !component->card) - return; - - snd_card_disconnect_sync(component->card->snd_card); -} -EXPORT_SYMBOL_GPL(snd_soc_disconnect_sync); - static int soc_link_dai_pcm_new(struct snd_soc_dai **dais, int num_dais, struct snd_soc_pcm_runtime *rtd) { -- cgit v1.2.3 From d23a16584b4f4cc7226c75793d1797e5505a193b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Dec 2019 15:25:57 +0100 Subject: ASoC: dma-sh7760: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-7-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/sh/dma-sh7760.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 2b0eca02a8b9..4d0f2f738ffa 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -179,11 +179,6 @@ static int camelot_hw_params(struct snd_soc_component *component, int recv = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0:1; int ret; - ret = snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); - if (ret < 0) - return ret; - if (recv) { cam->rx_period_size = params_period_bytes(hw_params); cam->rx_period = 0; @@ -194,12 +189,6 @@ static int camelot_hw_params(struct snd_soc_component *component, return 0; } -static int camelot_hw_free(struct snd_soc_component *component, - struct snd_pcm_substream *substream) -{ - return snd_pcm_lib_free_pages(substream); -} - static int camelot_prepare(struct snd_soc_component *component, struct snd_pcm_substream *substream) { @@ -307,7 +296,7 @@ static int camelot_pcm_new(struct snd_soc_component *component, /* dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel * in MMAP mode (i.e. aplay -M) */ - snd_pcm_lib_preallocate_pages_for_all(pcm, + snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, NULL, DMABRG_PREALLOC_BUFFER, DMABRG_PREALLOC_BUFFER_MAX); @@ -320,7 +309,6 @@ static const struct snd_soc_component_driver sh7760_soc_component = { .close = camelot_pcm_close, .ioctl = snd_soc_pcm_lib_ioctl, .hw_params = camelot_hw_params, - .hw_free = camelot_hw_free, .prepare = camelot_prepare, .trigger = camelot_trigger, .pointer = camelot_pos, -- cgit v1.2.3 From e494dbcd9be743f41cf842f94ffbc7c56b6b072a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Dec 2019 15:25:59 +0100 Subject: ASoC: rcar: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-9-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 6aac25095218..3dfc02092f76 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1218,10 +1218,10 @@ static int rsnd_preallocate_pages(struct snd_soc_pcm_runtime *rtd, for (substream = rtd->pcm->streams[stream].substream; substream; substream = substream->next) { - snd_pcm_lib_preallocate_pages(substream, - SNDRV_DMA_TYPE_DEV, - dev, - PREALLOC_BUFFER, PREALLOC_BUFFER_MAX); + snd_pcm_set_managed_buffer(substream, + SNDRV_DMA_TYPE_DEV, + dev, + PREALLOC_BUFFER, PREALLOC_BUFFER_MAX); } return 0; @@ -1400,7 +1400,6 @@ static int rsnd_hw_params(struct snd_soc_component *component, struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); struct snd_soc_pcm_runtime *fe = substream->private_data; - int ret; /* * rsnd assumes that it might be used under DPCM if user want to use @@ -1433,12 +1432,7 @@ static int rsnd_hw_params(struct snd_soc_component *component, dev_dbg(dev, "convert rate = %d\n", io->converted_rate); } - ret = rsnd_dai_call(hw_params, io, substream, hw_params); - if (ret) - return ret; - - return snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); + return rsnd_dai_call(hw_params, io, substream, hw_params); } static int rsnd_hw_free(struct snd_soc_component *component, @@ -1447,13 +1441,8 @@ static int rsnd_hw_free(struct snd_soc_component *component, struct snd_soc_dai *dai = rsnd_substream_to_dai(substream); struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream); - int ret; - - ret = rsnd_dai_call(hw_free, io, substream); - if (ret) - return ret; - return snd_pcm_lib_free_pages(substream); + return rsnd_dai_call(hw_free, io, substream); } static snd_pcm_uframes_t rsnd_pointer(struct snd_soc_component *component, -- cgit v1.2.3 From 55df47f2300e7cdb2bb3ca1209ec0b938459fc8f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Dec 2019 15:25:58 +0100 Subject: ASoC: fsi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-8-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/sh/fsi.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index e384fdc8d60e..1cebddd76d12 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1732,20 +1732,6 @@ static int fsi_pcm_open(struct snd_soc_component *component, return ret; } -static int fsi_hw_params(struct snd_soc_component *component, - struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *hw_params) -{ - return snd_pcm_lib_malloc_pages(substream, - params_buffer_bytes(hw_params)); -} - -static int fsi_hw_free(struct snd_soc_component *component, - struct snd_pcm_substream *substream) -{ - return snd_pcm_lib_free_pages(substream); -} - static snd_pcm_uframes_t fsi_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream) { @@ -1765,7 +1751,7 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_soc_component *component, static int fsi_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd) { - snd_pcm_lib_preallocate_pages_for_all( + snd_pcm_set_managed_buffer_all( rtd->pcm, SNDRV_DMA_TYPE_DEV, rtd->card->snd_card->dev, @@ -1816,8 +1802,6 @@ static const struct snd_soc_component_driver fsi_soc_component = { .name = "fsi", .open = fsi_pcm_open, .ioctl = snd_soc_pcm_lib_ioctl, - .hw_params = fsi_hw_params, - .hw_free = fsi_hw_free, .pointer = fsi_pointer, .pcm_construct = fsi_pcm_new, }; -- cgit v1.2.3 From 2c7c9630db45129838ed09f0ada718b0ac222377 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Dec 2019 15:26:00 +0100 Subject: ASoC: siu_pcm: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous (the rest were only debug prints) and got dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-10-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/sh/siu_pcm.c | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index a5e21e554da2..65637ad93630 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -281,41 +281,6 @@ static int siu_pcm_stmread_stop(struct siu_port *port_info) return 0; } -static int siu_pcm_hw_params(struct snd_soc_component *component, - struct snd_pcm_substream *ss, - struct snd_pcm_hw_params *hw_params) -{ - struct siu_info *info = siu_i2s_data; - struct device *dev = ss->pcm->card->dev; - int ret; - - dev_dbg(dev, "%s: port=%d\n", __func__, info->port_id); - - ret = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw_params)); - if (ret < 0) - dev_err(dev, "snd_pcm_lib_malloc_pages() failed\n"); - - return ret; -} - -static int siu_pcm_hw_free(struct snd_soc_component *component, - struct snd_pcm_substream *ss) -{ - struct siu_info *info = siu_i2s_data; - struct siu_port *port_info = siu_port_info(ss); - struct device *dev = ss->pcm->card->dev; - struct siu_stream *siu_stream; - - if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) - siu_stream = &port_info->playback; - else - siu_stream = &port_info->capture; - - dev_dbg(dev, "%s: port=%d\n", __func__, info->port_id); - - return snd_pcm_lib_free_pages(ss); -} - static bool filter(struct dma_chan *chan, void *slave) { struct sh_dmae_slave *param = slave; @@ -548,7 +513,7 @@ static int siu_pcm_new(struct snd_soc_component *component, if (ret < 0) return ret; - snd_pcm_lib_preallocate_pages_for_all(pcm, + snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, card->dev, SIU_BUFFER_BYTES_MAX, SIU_BUFFER_BYTES_MAX); @@ -584,8 +549,6 @@ struct const snd_soc_component_driver siu_component = { .open = siu_pcm_open, .close = siu_pcm_close, .ioctl = snd_soc_pcm_lib_ioctl, - .hw_params = siu_pcm_hw_params, - .hw_free = siu_pcm_hw_free, .prepare = siu_pcm_prepare, .trigger = siu_pcm_trigger, .pointer = siu_pcm_pointer_dma, -- cgit v1.2.3 From e91f134c83b1b3319db4c14bb5d9d23dc567b283 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 10 Dec 2019 15:53:57 +0100 Subject: ASoC: sh: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-15-tiwai@suse.de Signed-off-by: Mark Brown --- sound/soc/sh/dma-sh7760.c | 1 - sound/soc/sh/fsi.c | 1 - sound/soc/sh/rcar/core.c | 1 - sound/soc/sh/siu_pcm.c | 1 - 4 files changed, 4 deletions(-) (limited to 'sound/soc/sh') diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c index 4d0f2f738ffa..eee1a1e994cb 100644 --- a/sound/soc/sh/dma-sh7760.c +++ b/sound/soc/sh/dma-sh7760.c @@ -307,7 +307,6 @@ static int camelot_pcm_new(struct snd_soc_component *component, static const struct snd_soc_component_driver sh7760_soc_component = { .open = camelot_pcm_open, .close = camelot_pcm_close, - .ioctl = snd_soc_pcm_lib_ioctl, .hw_params = camelot_hw_params, .prepare = camelot_prepare, .trigger = camelot_trigger, diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 1cebddd76d12..89119acfa911 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1801,7 +1801,6 @@ static struct snd_soc_dai_driver fsi_soc_dai[] = { static const struct snd_soc_component_driver fsi_soc_component = { .name = "fsi", .open = fsi_pcm_open, - .ioctl = snd_soc_pcm_lib_ioctl, .pointer = fsi_pointer, .pcm_construct = fsi_pcm_new, }; diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 3dfc02092f76..0bfcb77e5f65 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1652,7 +1652,6 @@ int rsnd_kctrl_new(struct rsnd_mod *mod, */ static const struct snd_soc_component_driver rsnd_soc_component = { .name = "rsnd", - .ioctl = snd_soc_pcm_lib_ioctl, .hw_params = rsnd_hw_params, .hw_free = rsnd_hw_free, .pointer = rsnd_pointer, diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index 65637ad93630..6a6ffd6d3192 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c @@ -548,7 +548,6 @@ struct const snd_soc_component_driver siu_component = { .name = DRV_NAME, .open = siu_pcm_open, .close = siu_pcm_close, - .ioctl = snd_soc_pcm_lib_ioctl, .prepare = siu_pcm_prepare, .trigger = siu_pcm_trigger, .pointer = siu_pcm_pointer_dma, -- cgit v1.2.3 From 250a15cf575a655097151ad887cea02dd0977136 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 20 Jan 2020 10:05:07 +0900 Subject: 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 Link: https://lore.kernel.org/r/87pnffx7i4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 1 - sound/soc/au1x/ac97c.c | 1 - sound/soc/au1x/psc-ac97.c | 1 - sound/soc/cirrus/ep93xx-ac97.c | 1 - sound/soc/fsl/fsl_ssi.c | 1 - sound/soc/fsl/imx-ssi.c | 1 - sound/soc/fsl/mpc5200_psc_ac97.c | 2 -- sound/soc/pxa/pxa2xx-ac97.c | 3 --- sound/soc/sh/hac.c | 1 - sound/soc/soc-core.c | 24 +++--------------------- sound/soc/tegra/tegra20_ac97.c | 1 - sound/soc/txx9/txx9aclc-ac97.c | 1 - 12 files changed, 3 insertions(+), 35 deletions(-) (limited to 'sound/soc/sh') diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 2ccecf3e03d5..eaaeb00e9e84 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -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; diff --git a/sound/soc/au1x/ac97c.c b/sound/soc/au1x/ac97c.c index 0792c40e6cc1..73c6a0edb3d8 100644 --- a/sound/soc/au1x/ac97c.c +++ b/sound/soc/au1x/ac97c.c @@ -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, diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c index 08bc04e2da2a..0227993c5da8 100644 --- a/sound/soc/au1x/psc-ac97.c +++ b/sound/soc/au1x/psc-ac97.c @@ -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, diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index e21eaa1893d1..1c45fb9ff990 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -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", diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 537dc69256f0..5c97269be346 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -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 = { diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c index 42031ba7da31..f8488e8f5f5b 100644 --- a/sound/soc/fsl/imx-ssi.c +++ b/sound/soc/fsl/imx-ssi.c @@ -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, diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c index e5b9c04d1565..a082ae636a4f 100644 --- a/sound/soc/fsl/mpc5200_psc_ac97.c +++ b/sound/soc/fsl/mpc5200_psc_ac97.c @@ -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, diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 22fe77955c2c..4240fde6aae8 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c @@ -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, diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c index 17622ceb98c0..475fc984f8c5 100644 --- a/sound/soc/sh/hac.c +++ b/sound/soc/sh/hac.c @@ -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, 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; } diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 09c8516d7c4d..06c728ae17ed 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -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", diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c index bfaa9b3fda43..b1d9615f2375 100644 --- a/sound/soc/txx9/txx9aclc-ac97.c +++ b/sound/soc/txx9/txx9aclc-ac97.c @@ -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 = { -- cgit v1.2.3