diff mbox

[1/2] ASoC: extend seq_notifier callback interface

Message ID 1438902946-49633-1-git-send-email-yang.a.fang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

yang.a.fang@intel.com Aug. 6, 2015, 11:15 p.m. UTC
From: "Fang, Yang A" <yang.a.fang@intel.com>

This is needed for some codec driver to know whether

it is power up/down sequence call from dapm

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
---
 include/sound/soc-dapm.h  |    2 +-
 include/sound/soc.h       |    2 +-
 sound/soc/codecs/wm5100.c |    2 +-
 sound/soc/codecs/wm8903.c |    2 +-
 sound/soc/codecs/wm8996.c |    2 +-
 sound/soc/soc-dapm.c      |    5 ++---
 6 files changed, 7 insertions(+), 8 deletions(-)

Comments

Mark Brown Aug. 7, 2015, 10:44 a.m. UTC | #1
On Thu, Aug 06, 2015 at 04:15:44PM -0700, yang.a.fang@intel.com wrote:
> From: "Fang, Yang A" <yang.a.fang@intel.com>
> 
> This is needed for some codec driver to know whether
> 
> it is power up/down sequence call from dapm

This isn't a good changelog - it's not enough to say what the change is,
you should (especially for a core change like this) be explaining why
the change is needed.  For example in this case why do CODEC drivers
need this information?

You've also got a random blank line in there.
diff mbox

Patch

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 37d95a8..1d017a3 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -607,7 +607,7 @@  struct snd_soc_dapm_context {
 	/* Go to BIAS_OFF in suspend if the DAPM context is idle */
 	unsigned int suspend_bias_off:1;
 	void (*seq_notifier)(struct snd_soc_dapm_context *,
-			     enum snd_soc_dapm_type, int);
+			     enum snd_soc_dapm_type, int, bool);
 
 	struct device *dev; /* from parent - for debug */
 	struct snd_soc_component *component; /* parent component */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index add5097..0072e21 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -875,7 +875,7 @@  struct snd_soc_codec_driver {
 	bool suspend_bias_off;
 
 	void (*seq_notifier)(struct snd_soc_dapm_context *,
-			     enum snd_soc_dapm_type, int);
+			     enum snd_soc_dapm_type, int, bool);
 
 	bool ignore_pmdown_time;  /* Doesn't benefit from pmdown delay */
 };
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 8120b0c..6f4e6c3 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -733,7 +733,7 @@  WM5100_MIXER_CONTROLS("LHPF4", WM5100_HPLP4MIX_INPUT_1_SOURCE),
 };
 
 static void wm5100_seq_notifier(struct snd_soc_dapm_context *dapm,
-				enum snd_soc_dapm_type event, int subseq)
+			enum snd_soc_dapm_type event, int subseq, bool power_up)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index b011253..12da3b1 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -280,7 +280,7 @@  static int wm8903_dcs_event(struct snd_soc_dapm_widget *w,
 #define WM8903_DCS_MODE_START_STOP 2
 
 static void wm8903_seq_notifier(struct snd_soc_dapm_context *dapm,
-				enum snd_soc_dapm_type event, int subseq)
+			enum snd_soc_dapm_type event, int subseq, bool power_up)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index 2a696db..f12a900 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -686,7 +686,7 @@  static void wait_for_dc_servo(struct snd_soc_codec *codec, u16 mask)
 }
 
 static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm,
-				enum snd_soc_dapm_type event, int subseq)
+			enum snd_soc_dapm_type event, int subseq, bool power_up)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 1992568..ebea2d3 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1528,8 +1528,7 @@  static void dapm_seq_run(struct snd_soc_card *card,
 				for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++)
 					if (sort[i] == cur_sort)
 						cur_dapm->seq_notifier(cur_dapm,
-								       i,
-								       cur_subseq);
+						i, cur_subseq, power_up);
 			}
 
 			if (cur_dapm && w->dapm != cur_dapm)
@@ -1591,7 +1590,7 @@  static void dapm_seq_run(struct snd_soc_card *card,
 		for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++)
 			if (sort[i] == cur_sort)
 				cur_dapm->seq_notifier(cur_dapm,
-						       i, cur_subseq);
+						       i, cur_subseq, power_up);
 	}
 
 	list_for_each_entry(d, &card->dapm_list, list) {