summaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-06-16 18:13:08 +0200
committerMark Brown <broonie@linaro.org>2014-06-21 21:34:15 +0100
commit14e8bdebfbc1d5c8804b3520233b2d4e516056bc (patch)
tree90e394978404a1c5ec420295ffe749aed80e356f /include/sound/soc.h
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/sound/soc.h')
-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 84ebc079c92..9a5b4f6fe84 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -677,6 +677,9 @@ struct snd_soc_component_driver {
int (*of_xlate_dai_name)(struct snd_soc_component *component,
struct of_phandle_args *args,
const char **dai_name);
+ void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
+ int subseq);
+ int (*stream_event)(struct snd_soc_component *, int event);
};
struct snd_soc_component {
@@ -792,9 +795,6 @@ struct snd_soc_codec_driver {
void (*seq_notifier)(struct snd_soc_dapm_context *,
enum snd_soc_dapm_type, int);
- /* codec stream completion event */
- int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
-
bool ignore_pmdown_time; /* Doesn't benefit from pmdown delay */
/* probe ordering - for components with runtime dependencies */
@@ -836,9 +836,6 @@ struct snd_soc_platform_driver {
/* platform stream compress ops */
const struct snd_compr_ops *compr_ops;
- /* platform stream completion event */
- int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
-
/* probe ordering - for components with runtime dependencies */
int probe_order;
int remove_order;