diff mbox series

[09/17] ASoC: intel: use snd_soc_dai/component_activity()

Message ID 87sgg7814z.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show
Series ASoC: cleanup DAI/Component activity | expand

Commit Message

Kuninori Morimoto May 11, 2020, 5:57 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/intel/atom/sst-mfld-platform-pcm.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index 2e9222ed9daa..6ad096392d2d 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_activity(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_activity(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_activity(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_activity(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_activity(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_activity(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_activity(dai)) {
 			sst_handle_vb_timer(dai, true);
 			send_ssp_cmd(dai, dai->name, 1);
 		}