aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index cf191e6aebbe..73bb8eefa491 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -383,8 +383,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
383 /* Muting the DAC suppresses artifacts caused during digital 383 /* Muting the DAC suppresses artifacts caused during digital
384 * shutdown, for example from stopping clocks. 384 * shutdown, for example from stopping clocks.
385 */ 385 */
386 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 386 snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
387 snd_soc_dai_digital_mute(codec_dai, 1);
388 387
389 if (cpu_dai->driver->ops->shutdown) 388 if (cpu_dai->driver->ops->shutdown)
390 cpu_dai->driver->ops->shutdown(substream, cpu_dai); 389 cpu_dai->driver->ops->shutdown(substream, cpu_dai);
@@ -488,7 +487,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
488 snd_soc_dapm_stream_event(rtd, substream->stream, 487 snd_soc_dapm_stream_event(rtd, substream->stream,
489 SND_SOC_DAPM_STREAM_START); 488 SND_SOC_DAPM_STREAM_START);
490 489
491 snd_soc_dai_digital_mute(codec_dai, 0); 490 snd_soc_dai_digital_mute(codec_dai, 0, substream->stream);
492 491
493out: 492out:
494 mutex_unlock(&rtd->pcm_mutex); 493 mutex_unlock(&rtd->pcm_mutex);
@@ -586,7 +585,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
586 585
587 /* apply codec digital mute */ 586 /* apply codec digital mute */
588 if (!codec->active) 587 if (!codec->active)
589 snd_soc_dai_digital_mute(codec_dai, 1); 588 snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
590 589
591 /* free any machine hw params */ 590 /* free any machine hw params */
592 if (rtd->dai_link->ops && rtd->dai_link->ops->hw_free) 591 if (rtd->dai_link->ops && rtd->dai_link->ops->hw_free)
@@ -1729,20 +1728,16 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
1729 1728
1730 /* startup must always be called for new BEs */ 1729 /* startup must always be called for new BEs */
1731 ret = dpcm_be_dai_startup(fe, stream); 1730 ret = dpcm_be_dai_startup(fe, stream);
1732 if (ret < 0) { 1731 if (ret < 0)
1733 goto disconnect; 1732 goto disconnect;
1734 return ret;
1735 }
1736 1733
1737 /* keep going if FE state is > open */ 1734 /* keep going if FE state is > open */
1738 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN) 1735 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_OPEN)
1739 return 0; 1736 return 0;
1740 1737
1741 ret = dpcm_be_dai_hw_params(fe, stream); 1738 ret = dpcm_be_dai_hw_params(fe, stream);
1742 if (ret < 0) { 1739 if (ret < 0)
1743 goto close; 1740 goto close;
1744 return ret;
1745 }
1746 1741
1747 /* keep going if FE state is > hw_params */ 1742 /* keep going if FE state is > hw_params */
1748 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS) 1743 if (fe->dpcm[stream].state == SND_SOC_DPCM_STATE_HW_PARAMS)
@@ -1750,10 +1745,8 @@ static int dpcm_run_update_startup(struct snd_soc_pcm_runtime *fe, int stream)
1750 1745
1751 1746
1752 ret = dpcm_be_dai_prepare(fe, stream); 1747 ret = dpcm_be_dai_prepare(fe, stream);
1753 if (ret < 0) { 1748 if (ret < 0)
1754 goto hw_free; 1749 goto hw_free;
1755 return ret;
1756 }
1757 1750
1758 /* run the stream event for each BE */ 1751 /* run the stream event for each BE */
1759 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP); 1752 dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_NOP);