aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc-dapm.h2
-rw-r--r--include/sound/soc.h6
-rw-r--r--sound/soc/soc-core.c2
-rw-r--r--sound/soc/soc-dapm.c4
4 files changed, 14 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e0583b7769cb..350b1b395cac 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -524,6 +524,8 @@ struct snd_soc_dapm_context {
524 enum snd_soc_bias_level target_bias_level; 524 enum snd_soc_bias_level target_bias_level;
525 struct list_head list; 525 struct list_head list;
526 526
527 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
528
527#ifdef CONFIG_DEBUG_FS 529#ifdef CONFIG_DEBUG_FS
528 struct dentry *debugfs_dapm; 530 struct dentry *debugfs_dapm;
529#endif 531#endif
diff --git a/include/sound/soc.h b/include/sound/soc.h
index aa19f5a32ba8..64a9dd5a69d6 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -634,6 +634,9 @@ struct snd_soc_codec_driver {
634 void (*seq_notifier)(struct snd_soc_dapm_context *, 634 void (*seq_notifier)(struct snd_soc_dapm_context *,
635 enum snd_soc_dapm_type, int); 635 enum snd_soc_dapm_type, int);
636 636
637 /* codec stream completion event */
638 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
639
637 /* probe ordering - for components with runtime dependencies */ 640 /* probe ordering - for components with runtime dependencies */
638 int probe_order; 641 int probe_order;
639 int remove_order; 642 int remove_order;
@@ -669,6 +672,9 @@ struct snd_soc_platform_driver {
669 /* platform stream ops */ 672 /* platform stream ops */
670 struct snd_pcm_ops *ops; 673 struct snd_pcm_ops *ops;
671 674
675 /* platform stream completion event */
676 int (*stream_event)(struct snd_soc_dapm_context *dapm, int event);
677
672 /* probe ordering - for components with runtime dependencies */ 678 /* probe ordering - for components with runtime dependencies */
673 int probe_order; 679 int probe_order;
674 int remove_order; 680 int remove_order;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 83ad8ca27490..9d3935bbbd0c 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3141,6 +3141,7 @@ int snd_soc_register_platform(struct device *dev,
3141 platform->driver = platform_drv; 3141 platform->driver = platform_drv;
3142 platform->dapm.dev = dev; 3142 platform->dapm.dev = dev;
3143 platform->dapm.platform = platform; 3143 platform->dapm.platform = platform;
3144 platform->dapm.stream_event = platform_drv->stream_event;
3144 3145
3145 mutex_lock(&client_mutex); 3146 mutex_lock(&client_mutex);
3146 list_add(&platform->list, &platform_list); 3147 list_add(&platform->list, &platform_list);
@@ -3253,6 +3254,7 @@ int snd_soc_register_codec(struct device *dev,
3253 codec->dapm.dev = dev; 3254 codec->dapm.dev = dev;
3254 codec->dapm.codec = codec; 3255 codec->dapm.codec = codec;
3255 codec->dapm.seq_notifier = codec_drv->seq_notifier; 3256 codec->dapm.seq_notifier = codec_drv->seq_notifier;
3257 codec->dapm.stream_event = codec_drv->stream_event;
3256 codec->dev = dev; 3258 codec->dev = dev;
3257 codec->driver = codec_drv; 3259 codec->driver = codec_drv;
3258 codec->num_dai = num_dai; 3260 codec->num_dai = num_dai;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7e15914b3633..612a2a28979a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2604,6 +2604,10 @@ static void soc_dapm_stream_event(struct snd_soc_dapm_context *dapm,
2604 } 2604 }
2605 2605
2606 dapm_power_widgets(dapm, event); 2606 dapm_power_widgets(dapm, event);
2607
2608 /* do we need to notify any clients that DAPM stream is complete */
2609 if (dapm->stream_event)
2610 dapm->stream_event(dapm, event);
2607} 2611}
2608 2612
2609/** 2613/**