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 v3 17/21] ASoC: pxa: use snd_soc_xxx_active()
Date: 15 May 2020 09:47:41 +0900	[thread overview]
Message-ID: <87o8qq58ia.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87d0766n64.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>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/pxa/pxa-ssp.c    | 8 ++++----
 sound/soc/pxa/pxa2xx-i2s.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index e615acaa0199..6a72cc1665b7 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -94,7 +94,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
 	struct snd_dmaengine_dai_dma_data *dma;
 	int ret = 0;
 
-	if (!cpu_dai->active) {
+	if (!snd_soc_dai_active(cpu_dai)) {
 		clk_prepare_enable(ssp->clk);
 		pxa_ssp_disable(ssp);
 	}
@@ -119,7 +119,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream,
 	struct ssp_priv *priv = snd_soc_dai_get_drvdata(cpu_dai);
 	struct ssp_device *ssp = priv->ssp;
 
-	if (!cpu_dai->active) {
+	if (!snd_soc_dai_active(cpu_dai)) {
 		pxa_ssp_disable(ssp);
 		clk_disable_unprepare(ssp->clk);
 	}
@@ -138,7 +138,7 @@ static int pxa_ssp_suspend(struct snd_soc_component *component)
 	struct ssp_priv *priv = snd_soc_component_get_drvdata(component);
 	struct ssp_device *ssp = priv->ssp;
 
-	if (!component->active)
+	if (!snd_soc_component_active(component))
 		clk_prepare_enable(ssp->clk);
 
 	priv->cr0 = __raw_readl(ssp->mmio_base + SSCR0);
@@ -165,7 +165,7 @@ static int pxa_ssp_resume(struct snd_soc_component *component)
 	__raw_writel(priv->to,  ssp->mmio_base + SSTO);
 	__raw_writel(priv->psp, ssp->mmio_base + SSPSP);
 
-	if (component->active)
+	if (snd_soc_component_active(component))
 		pxa_ssp_enable(ssp);
 	else
 		clk_disable_unprepare(ssp->clk);
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 9a32bf72127a..03102e938ba1 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -101,7 +101,7 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream,
 	if (IS_ERR(clk_i2s))
 		return PTR_ERR(clk_i2s);
 
-	if (!cpu_dai->active)
+	if (!snd_soc_dai_active(cpu_dai))
 		SACR0 = 0;
 
 	return 0;
-- 
2.17.1


  parent reply	other threads:[~2020-05-15  0:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  0:45 [PATCH v3 00/21] ASoC: cleanup DAI/Component activity Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 01/21] ASoC: soc-pcm: replace snd_soc_runtime_activate()/deactivate() to macro Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 02/21] ASoC: soc-dai: add snd_soc_dai_action() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 03/21] ASoC: soc-dapm: use snd_soc_dai_activate()/deactivate() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 04/21] ASoC: soc-dai: add snd_soc_dai_active() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 05/21] ASoC: soc-component: add snd_soc_component_active() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 06/21] ASoC: soc-dai: add snd_soc_dai_stream_active() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 07/21] ASoC: use snd_soc_xxx_active() Kuninori Morimoto
2020-05-15  0:46 ` [PATCH v3 08/21] ASoC: atomel: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 09/21] ASoC: bcm: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 10/21] ASoC: cirrus: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 11/21] ASoC: codecs: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 12/21] ASoC: fsl: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 13/21] ASoC: intel: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 14/21] ASoC: jz4740: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 15/21] ASoC: mediatek: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 16/21] ASoC: meson: " Kuninori Morimoto
2020-05-15  0:47 ` Kuninori Morimoto [this message]
2020-05-15  0:47 ` [PATCH v3 18/21] ASoC: ti: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 19/21] ASoC: uniphier: " Kuninori Morimoto
2020-05-15  0:47 ` [PATCH v3 20/21] ASoC: dwc: " Kuninori Morimoto
2020-05-15  0:48 ` [PATCH v3 21/21] ASoC: cleanup dai / component active code Kuninori Morimoto
2020-05-18 16:41 ` [PATCH v3 00/21] ASoC: cleanup DAI/Component activity Mark Brown

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