From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date: Wed, 26 Jan 2011 21:41:28 +0000 (+0000)
Subject: ASoC: Add subsequence information to seq_notify callbacks
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f85a9e0d260905f98d4ca6b66f0e64f63a729dba;p=linux.git

ASoC: Add subsequence information to seq_notify callbacks

Allows drivers to distinguish which subsequence is being notified when
they get called back.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
---

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 6a25e69938591..979ed84e07d65 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -501,7 +501,7 @@ struct snd_soc_dapm_context {
 	struct snd_soc_dapm_update *update;
 
 	void (*seq_notifier)(struct snd_soc_dapm_context *,
-			     enum snd_soc_dapm_type);
+			     enum snd_soc_dapm_type, int);
 
 	struct device *dev; /* from parent - for debug */
 	struct snd_soc_codec *codec; /* parent codec */
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 64856d656f15b..7ecdaefd1b63c 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -553,7 +553,7 @@ struct snd_soc_codec_driver {
 			      enum snd_soc_bias_level level);
 
 	void (*seq_notifier)(struct snd_soc_dapm_context *,
-			     enum snd_soc_dapm_type);
+			     enum snd_soc_dapm_type, int);
 };
 
 /* SoC platform interface */
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 37b376f4c75d1..0f94fd057f290 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -899,7 +899,8 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm,
 				for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++)
 					if (sort[i] == cur_sort)
 						cur_dapm->seq_notifier(cur_dapm,
-								       i);
+								       i,
+								       cur_subseq);
 			}
 
 			INIT_LIST_HEAD(&pending);
@@ -968,7 +969,7 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm,
 		for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++)
 			if (sort[i] == cur_sort)
 				cur_dapm->seq_notifier(cur_dapm,
-						       i);
+						       i, cur_subseq);
 	}
 }