diff options
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 15816eccad3..0ad8dcacd2f 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c | |||
@@ -307,9 +307,8 @@ static void close_delayed_work(struct work_struct *work) | |||
307 | /* are we waiting on this codec DAI stream */ | 307 | /* are we waiting on this codec DAI stream */ |
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, | 310 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK, |
311 | codec_dai->driver->playback.stream_name, | 311 | codec_dai, SND_SOC_DAPM_STREAM_STOP); |
312 | SND_SOC_DAPM_STREAM_STOP); | ||
313 | } | 312 | } |
314 | 313 | ||
315 | mutex_unlock(&rtd->pcm_mutex); | 314 | mutex_unlock(&rtd->pcm_mutex); |
@@ -373,8 +372,9 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) | |||
373 | rtd->dai_link->ignore_pmdown_time) { | 372 | rtd->dai_link->ignore_pmdown_time) { |
374 | /* powered down playback stream now */ | 373 | /* powered down playback stream now */ |
375 | snd_soc_dapm_stream_event(rtd, | 374 | snd_soc_dapm_stream_event(rtd, |
376 | codec_dai->driver->playback.stream_name, | 375 | SNDRV_PCM_STREAM_PLAYBACK, |
377 | SND_SOC_DAPM_STREAM_STOP); | 376 | codec_dai, |
377 | SND_SOC_DAPM_STREAM_STOP); | ||
378 | } else { | 378 | } else { |
379 | /* start delayed pop wq here for playback streams */ | 379 | /* start delayed pop wq here for playback streams */ |
380 | codec_dai->pop_wait = 1; | 380 | codec_dai->pop_wait = 1; |
@@ -383,9 +383,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream) | |||
383 | } | 383 | } |
384 | } else { | 384 | } else { |
385 | /* capture streams can be powered down now */ | 385 | /* capture streams can be powered down now */ |
386 | snd_soc_dapm_stream_event(rtd, | 386 | snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE, |
387 | codec_dai->driver->capture.stream_name, | 387 | codec_dai, SND_SOC_DAPM_STREAM_STOP); |
388 | SND_SOC_DAPM_STREAM_STOP); | ||
389 | } | 388 | } |
390 | 389 | ||
391 | mutex_unlock(&rtd->pcm_mutex); | 390 | mutex_unlock(&rtd->pcm_mutex); |
@@ -454,14 +453,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream) | |||
454 | cancel_delayed_work(&rtd->delayed_work); | 453 | cancel_delayed_work(&rtd->delayed_work); |
455 | } | 454 | } |
456 | 455 | ||
457 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 456 | snd_soc_dapm_stream_event(rtd, substream->stream, codec_dai, |
458 | snd_soc_dapm_stream_event(rtd, | 457 | SND_SOC_DAPM_STREAM_START); |
459 | codec_dai->driver->playback.stream_name, | ||
460 | SND_SOC_DAPM_STREAM_START); | ||
461 | else | ||
462 | snd_soc_dapm_stream_event(rtd, | ||
463 | codec_dai->driver->capture.stream_name, | ||
464 | SND_SOC_DAPM_STREAM_START); | ||
465 | 458 | ||
466 | snd_soc_dai_digital_mute(codec_dai, 0); | 459 | snd_soc_dai_digital_mute(codec_dai, 0); |
467 | 460 | ||