Commit b553bd23 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87eexdyq6p.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cc733900
...@@ -1819,8 +1819,6 @@ static int rsnd_remove(struct platform_device *pdev) ...@@ -1819,8 +1819,6 @@ static int rsnd_remove(struct platform_device *pdev)
}; };
int ret = 0, i; int ret = 0, i;
snd_soc_disconnect_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
for_each_rsnd_dai(rdai, priv, i) { for_each_rsnd_dai(rdai, priv, i) {
......
...@@ -1444,18 +1444,6 @@ static int soc_probe_link_components(struct snd_soc_card *card) ...@@ -1444,18 +1444,6 @@ static int soc_probe_link_components(struct snd_soc_card *card)
return 0; 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, static int soc_link_dai_pcm_new(struct snd_soc_dai **dais, int num_dais,
struct snd_soc_pcm_runtime *rtd) struct snd_soc_pcm_runtime *rtd)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment