ASoC: Add subsequence information to seq_notify callbacks
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 26 Jan 2011 21:41:28 +0000 (21:41 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 27 Jan 2011 11:59:14 +0000 (11:59 +0000)
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>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/soc-dapm.c

index 6a25e69938591369cc1c115c69b5940d36b2bd1c..979ed84e07d65a78fb24798a72e2bd3976d5ec10 100644 (file)
@@ -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 */
index 64856d656f15babfbea3be08f7699b9e80d69e85..7ecdaefd1b63c4aebb40673b8ec5a28dfe088798 100644 (file)
@@ -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 */
index 37b376f4c75d1837c911ec366e86151efe17a64e..0f94fd057f2907c4fafc7076603f613299b4889b 100644 (file)
@@ -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);
        }
 }