All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [alsa-devel] [PATCH 02/14] ASoC: soc-core: remove snd_soc_disconnect_sync()
Date: 22 Nov 2019 14:38:48 +0900	[thread overview]
Message-ID: <87o8x48o7r.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87r2208o9g.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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 <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/core.c |  2 --
 sound/soc/soc-core.c     | 12 ------------
 2 files changed, 14 deletions(-)

diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index fc32cbb..35a6592 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1808,8 +1808,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 19a2a89..1f659e8b 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)
 {
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-11-22  5:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22  5:37 [alsa-devel] [PATCH 00/14] ASoC: soc-core cleanup step6 Kuninori Morimoto
2019-11-22  5:38 ` [alsa-devel] [PATCH 01/14] ASoC: soc-core: remove dai_link_list Kuninori Morimoto
2019-11-22  5:38 ` Kuninori Morimoto [this message]
2019-11-22  5:38 ` [alsa-devel] [PATCH 03/14] ASoC: soc-core: remove snd_soc_get_dai_substream() Kuninori Morimoto
2019-11-22  5:39 ` [alsa-devel] [PATCH 04/14] ASoC: soc-core: move snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-22 16:22   ` Pierre-Louis Bossart
2019-11-22 16:45   ` Pierre-Louis Bossart
2019-11-22  5:39 ` [alsa-devel] [PATCH 05/14] ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime() Kuninori Morimoto
2019-11-22  5:39 ` [alsa-devel] [PATCH 06/14] ASoC: soc-core: move snd_soc_find_dai_link() Kuninori Morimoto
2019-11-22  5:40 ` [alsa-devel] [PATCH 07/14] ASoC: soc-core: rename snd_soc_add_dai_link() to snd_soc_add_pcm_runtime() Kuninori Morimoto
2019-11-22 16:43   ` Pierre-Louis Bossart
2019-11-22  5:41 ` [alsa-devel] [PATCH 08/14] ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 09/14] ASoC: soc-core: move soc_link_dai_pcm_new() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 10/14] ASoC: soc-core: rename soc_link_dai_pcm_new() to soc_dai_pcm_new() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 11/14] ASoC: soc-core: move soc_link_init() Kuninori Morimoto
2019-11-22  5:41 ` [alsa-devel] [PATCH 12/14] ASoC: soc-core: rename soc_link_init() to soc_init_pcm_runtime() Kuninori Morimoto
2019-11-22 16:41   ` Pierre-Louis Bossart
2019-11-22  5:42 ` [alsa-devel] [PATCH 13/14] ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition Kuninori Morimoto
2019-11-22  5:42 ` [alsa-devel] [PATCH 14/14] ASoC: soc-core: soc_set_name_prefix(): get component device_node at out of loop Kuninori Morimoto
2019-11-22 16:49 ` [alsa-devel] [PATCH 00/14] ASoC: soc-core cleanup step6 Pierre-Louis Bossart
2019-11-25  0:01   ` Kuninori Morimoto
2019-11-22 20:34 ` Sridharan, Ranjani
2019-11-25  0:01   ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8x48o7r.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.