summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-03-07 11:32:59 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-01 06:28:22 -0400
commitd9b0951b96e4ee0d22fae0a30f0b53354ca541cd (patch)
treee6419322fa31dc3700ec5dbb69985b0be821ddde /sound/soc/soc-pcm.c
parentbe09ad90e17b79fdb0d513a31e814ff4d42e3dff (diff)
ASoC: dapm: Add platform stream event support
Currently stream events are only perfomed on codec stream widgets only. There is now a need to be able to perform stream events on platform widgets too. e.g. we have the ABE platform driver with several DAI links to dummy codecs. We need to be able to perform stream events on any of the dummy codec DAI links. This patch also removes the snd_soc_dai * parameter since it's already contained within the rtd * parameter. Finally makle stream event return void since no one checks it anyway. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 0ad8dcacd2f3..26a60b4061cf 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -308,7 +308,7 @@ static void close_delayed_work(struct work_struct *work)
308 if (codec_dai->pop_wait == 1) { 308 if (codec_dai->pop_wait == 1) {
309 codec_dai->pop_wait = 0; 309 codec_dai->pop_wait = 0;
310 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, 310 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
311 codec_dai, SND_SOC_DAPM_STREAM_STOP); 311 SND_SOC_DAPM_STREAM_STOP);
312 } 312 }
313 313
314 mutex_unlock(&rtd->pcm_mutex); 314 mutex_unlock(&rtd->pcm_mutex);
@@ -373,7 +373,6 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
373 /* powered down playback stream now */ 373 /* powered down playback stream now */
374 snd_soc_dapm_stream_event(rtd, 374 snd_soc_dapm_stream_event(rtd,
375 SNDRV_PCM_STREAM_PLAYBACK, 375 SNDRV_PCM_STREAM_PLAYBACK,
376 codec_dai,
377 SND_SOC_DAPM_STREAM_STOP); 376 SND_SOC_DAPM_STREAM_STOP);
378 } else { 377 } else {
379 /* start delayed pop wq here for playback streams */ 378 /* start delayed pop wq here for playback streams */
@@ -384,7 +383,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
384 } else { 383 } else {
385 /* capture streams can be powered down now */ 384 /* capture streams can be powered down now */
386 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE, 385 snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
387 codec_dai, SND_SOC_DAPM_STREAM_STOP); 386 SND_SOC_DAPM_STREAM_STOP);
388 } 387 }
389 388
390 mutex_unlock(&rtd->pcm_mutex); 389 mutex_unlock(&rtd->pcm_mutex);
@@ -453,8 +452,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
453 cancel_delayed_work(&rtd->delayed_work); 452 cancel_delayed_work(&rtd->delayed_work);
454 } 453 }
455 454
456 snd_soc_dapm_stream_event(rtd, substream->stream, codec_dai, 455 snd_soc_dapm_stream_event(rtd, substream->stream,
457 SND_SOC_DAPM_STREAM_START); 456 SND_SOC_DAPM_STREAM_START);
458 457
459 snd_soc_dai_digital_mute(codec_dai, 0); 458 snd_soc_dai_digital_mute(codec_dai, 0);
460 459