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: [PATCH v2 09/21] ASoC: bcm: use snd_soc_xxx_active()
Date: 14 May 2020 17:41:13 +0900	[thread overview]
Message-ID: <87y2pu7vti.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87blmq9alx.wl-kuninori.morimoto.gx@renesas.com>


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

We have snd_soc_dai/dai_stream/component_active() macro
This patch uses it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
	- adjust to latest patch-set

 sound/soc/bcm/bcm2835-i2s.c | 6 +++---
 sound/soc/bcm/cygnus-ssp.c  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index e6a12e271b07..d80b570e950e 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -653,7 +653,7 @@ static void bcm2835_i2s_stop(struct bcm2835_i2s_dev *dev,
 			BCM2835_I2S_CS_A_REG, mask, 0);
 
 	/* Stop also the clock when not SND_SOC_DAIFMT_CONT */
-	if (!dai->active && !(dev->fmt & SND_SOC_DAIFMT_CONT))
+	if (!snd_soc_dai_active(dai) && !(dev->fmt & SND_SOC_DAIFMT_CONT))
 		bcm2835_i2s_stop_clock(dev);
 }
 
@@ -695,7 +695,7 @@ static int bcm2835_i2s_startup(struct snd_pcm_substream *substream,
 {
 	struct bcm2835_i2s_dev *dev = snd_soc_dai_get_drvdata(dai);
 
-	if (dai->active)
+	if (snd_soc_dai_active(dai))
 		return 0;
 
 	/* Should this still be running stop it */
@@ -723,7 +723,7 @@ static void bcm2835_i2s_shutdown(struct snd_pcm_substream *substream,
 	bcm2835_i2s_stop(dev, substream, dai);
 
 	/* If both streams are stopped, disable module and clock */
-	if (dai->active)
+	if (snd_soc_dai_active(dai))
 		return;
 
 	/* Disable the module */
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index 257f5048061e..6e634b448293 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -1056,7 +1056,7 @@ static int __cygnus_ssp_suspend(struct snd_soc_dai *cpu_dai)
 {
 	struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai);
 
-	if (!cpu_dai->active)
+	if (!snd_soc_dai_active(cpu_dai))
 		return 0;
 
 	if (!aio->is_slave) {
@@ -1097,7 +1097,7 @@ static int __cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
 	struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai);
 	int error;
 
-	if (!cpu_dai->active)
+	if (!snd_soc_dai_active(cpu_dai))
 		return 0;
 
 	if (!aio->is_slave) {
-- 
2.17.1


  parent reply	other threads:[~2020-05-14  8:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14  8:36 [PATCH v2 00/21] ASoC: cleanup DAI/Component activity Kuninori Morimoto
2020-05-14  8:37 ` [PATCH v2 01/21] ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro Kuninori Morimoto
2020-05-14 10:41   ` Mark Brown
2020-05-14 23:35     ` Kuninori Morimoto
2020-05-14  8:37 ` [PATCH v2 02/21] ASoC: soc-dai: add snd_soc_dai_action() Kuninori Morimoto
2020-05-14  8:38 ` [PATCH v2 03/21] ASoC: soc-dapm: use snd_soc_dai_activate()/deactivate() Kuninori Morimoto
2020-05-14  8:39 ` [PATCH v2 04/21] ASoC: soc-dai: add snd_soc_dai_active() Kuninori Morimoto
2020-05-14  8:39 ` [PATCH v2 05/21] ASoC: soc-component: add snd_soc_component_active() Kuninori Morimoto
2020-05-14  8:40 ` [PATCH v2 06/21] ASoC: soc-dai: add snd_soc_dai_stream_active() Kuninori Morimoto
2020-05-14  8:40 ` [PATCH v2 07/21] ASoC: use snd_soc_xxx_active() Kuninori Morimoto
2020-05-14  8:41 ` [PATCH v2 08/21] ASoC: atomel: " Kuninori Morimoto
2020-05-14  8:41 ` Kuninori Morimoto [this message]
2020-05-14  8:41 ` [PATCH v2 10/21] ASoC: cirrus: " Kuninori Morimoto
2020-05-14  8:41 ` [PATCH v2 11/21] ASoC: codecs: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 12/21] ASoC: fsl: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 13/21] ASoC: intel: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 14/21] ASoC: jz4740: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 15/21] ASoC: mediatek: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 16/21] ASoC: meson: " Kuninori Morimoto
2020-05-14  8:42 ` [PATCH v2 17/21] ASoC: pxa: " Kuninori Morimoto
2020-05-14  8:43 ` [PATCH v2 18/21] ASoC: ti: " Kuninori Morimoto
2020-05-14  9:08   ` Peter Ujfalusi
2020-05-14  8:43 ` [PATCH v2 19/21] ASoC: uniphier: " Kuninori Morimoto
2020-05-14  8:43 ` [PATCH v2 20/21] ASoC: dwc: " Kuninori Morimoto
2020-05-14  8:43 ` [PATCH v2 21/21] ASoC: cleanup dai / component active code Kuninori Morimoto
2020-05-14 17:26 ` [PATCH v2 00/21] ASoC: cleanup DAI/Component activity Ranjani Sridharan

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=87y2pu7vti.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.