aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-06-16 12:13:08 -0400
committerMark Brown <broonie@linaro.org>2014-06-21 16:34:15 -0400
commit14e8bdebfbc1d5c8804b3520233b2d4e516056bc (patch)
tree90e394978404a1c5ec420295ffe749aed80e356f /include
parentbc9af9fa9b89cb74eed020066d882abf238fad69 (diff)
ASoC: Add component level stream_event() and seq_notifier() support
This patch adds stream_event() and seq_notifier() callbacks similar to those found in the snd_soc_codec_driver and snd_soc_platform driver struct to the snd_soc_component_driver struct. This is meant to unify the handling of these callbacks across different types of components and will eventually allow their removal from the CODEC and platfrom driver structs. The new callbacks are slightly different from the old ones in that they take a snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was done since otherwise casting from the DAPM context to the component would typically be the first thing to do in the callback. And the interface becomes slightly cleaner by passing a snd_soc_component to all callbacks in the snd_soc_component_driver struct. The patch also already removes the stream_event() callback from the snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently unused. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 84ebc079c92f..9a5b4f6fe847 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -677,6 +677,9 @@ struct snd_soc_component_driver {
677 int (*of_xlate_dai_name)(struct snd_soc_component *component, 677 int (*of_xlate_dai_name)(struct snd_soc_component *component,
678 struct of_phandle_args *args, 678 struct of_phandle_args *args,
679 const char **dai_name); 679 const char **dai_name);
680 void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
681 int subseq);
682 int (*stream_event)(struct snd_soc_component *, int event);
680}; 683};
681 684
682struct snd_soc_component { 685struct snd_soc_component {
@@ -792,9 +795,6 @@ struct snd_soc_codec_driver {
792 void (*seq_notifier)(struct snd_soc_dapm_context *, 795 void (*seq_notifier)(struct snd_soc_dapm_context *,
793 enum snd_soc_dapm_type, int); 796 enum snd_soc_dapm_type, int);
794 797
795 /* codec stream completion event */
796 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
797
798 bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */ 798 bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */
799 799
800 /* probe ordering - for components with runtime dependencies */ 800 /* probe ordering - for components with runtime dependencies */
@@ -836,9 +836,6 @@ struct snd_soc_platform_driver {
836 /* platform stream compress ops */ 836 /* platform stream compress ops */
837 const struct snd_compr_ops *compr_ops; 837 const struct snd_compr_ops *compr_ops;
838 838
839 /* platform stream completion event */
840 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
841
842 /* probe ordering - for components with runtime dependencies */ 839 /* probe ordering - for components with runtime dependencies */
843 int probe_order; 840 int probe_order;
844 int remove_order; 841 int remove_order;