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 13/21] ASoC: intel: use snd_soc_xxx_active()
Date: 15 May 2020 09:47:22 +0900	[thread overview]
Message-ID: <87tv0i58it.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/intel/atom/sst-mfld-platform-pcm.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 2e9222ed9daa..8817eaae6bb7 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -392,7 +392,7 @@ static int sst_enable_ssp(struct snd_pcm_substream *substream,
 {
 	int ret = 0;
 
-	if (!dai->active) {
+	if (!snd_soc_dai_active(dai)) {
 		ret = sst_handle_vb_timer(dai, true);
 		sst_fill_ssp_defaults(dai);
 	}
@@ -405,7 +405,7 @@ static int sst_be_hw_params(struct snd_pcm_substream *substream,
 {
 	int ret = 0;
 
-	if (dai->active == 1)
+	if (snd_soc_dai_active(dai) == 1)
 		ret = send_ssp_cmd(dai, dai->name, 1);
 	return ret;
 }
@@ -414,7 +414,7 @@ static int sst_set_format(struct snd_soc_dai *dai, unsigned int fmt)
 {
 	int ret = 0;
 
-	if (!dai->active)
+	if (!snd_soc_dai_active(dai))
 		return 0;
 
 	ret = sst_fill_ssp_config(dai, fmt);
@@ -429,7 +429,7 @@ static int sst_platform_set_ssp_slot(struct snd_soc_dai *dai,
 			int slots, int slot_width) {
 	int ret = 0;
 
-	if (!dai->active)
+	if (!snd_soc_dai_active(dai))
 		return ret;
 
 	ret = sst_fill_ssp_slot(dai, tx_mask, rx_mask, slots, slot_width);
@@ -442,7 +442,7 @@ static int sst_platform_set_ssp_slot(struct snd_soc_dai *dai,
 static void sst_disable_ssp(struct snd_pcm_substream *substream,
 			struct snd_soc_dai *dai)
 {
-	if (!dai->active) {
+	if (!snd_soc_dai_active(dai)) {
 		send_ssp_cmd(dai, dai->name, 0);
 		sst_handle_vb_timer(dai, false);
 	}
@@ -743,7 +743,7 @@ static int sst_soc_prepare(struct device *dev)
 	for_each_card_rtds(drv->soc_card, rtd) {
 		struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0);
 
-		if (dai->active) {
+		if (snd_soc_dai_active(dai)) {
 			send_ssp_cmd(dai, dai->name, 0);
 			sst_handle_vb_timer(dai, false);
 		}
@@ -764,7 +764,7 @@ static void sst_soc_complete(struct device *dev)
 	for_each_card_rtds(drv->soc_card, rtd) {
 		struct snd_soc_dai *dai = asoc_rtd_to_cpu(rtd, 0);
 
-		if (dai->active) {
+		if (snd_soc_dai_active(dai)) {
 			sst_handle_vb_timer(dai, true);
 			send_ssp_cmd(dai, dai->name, 1);
 		}
-- 
2.17.1


  parent reply	other threads:[~2020-05-15  0:52 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 ` Kuninori Morimoto [this message]
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 ` [PATCH v3 17/21] ASoC: pxa: " Kuninori Morimoto
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=87tv0i58it.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.