[PATCH v2 06/21] ASoC: soc-dai: add snd_soc_dai_stream_active()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
v1 -> v2
	- new patch
	- not update dai->active via macro

 include/sound/soc-dai.h | 1 +
 sound/soc/soc-dai.c     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index e651c62636ab..d55dd0474096 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -166,6 +166,7 @@ void snd_soc_dai_action(struct snd_soc_dai *dai,
 #define snd_soc_dai_activate(dai, stream)   snd_soc_dai_action(dai, stream,  1)
 #define snd_soc_dai_deactivate(dai, stream) snd_soc_dai_action(dai, stream, -1)
 int snd_soc_dai_active(struct snd_soc_dai *dai);
+#define snd_soc_dai_stream_active(dai, stream) ((dai)->stream_active[stream])
 
 int snd_soc_pcm_dai_probe(struct snd_soc_pcm_runtime *rtd, int order);
 int snd_soc_pcm_dai_remove(struct snd_soc_pcm_runtime *rtd, int order);
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index bb771302fd6f..8172ff42d796 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -391,6 +391,7 @@ bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir)
 void snd_soc_dai_action(struct snd_soc_dai *dai,
 			int stream, int action)
 {
+	/* see snd_soc_dai_stream_active() */
 	dai->stream_active[stream]	+= action;
 	dai->active			+= action;
 	/* see snd_soc_component_active() */
-- 
2.17.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux