|
@@ -450,19 +450,6 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
|
|
codec_dai->active--;
|
|
codec_dai->active--;
|
|
codec->active--;
|
|
codec->active--;
|
|
|
|
|
|
- /* clear the corresponding DAIs rate when inactive */
|
|
|
|
- if (!cpu_dai->active) {
|
|
|
|
- cpu_dai->rate = 0;
|
|
|
|
- cpu_dai->channels = 0;
|
|
|
|
- cpu_dai->sample_bits = 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!codec_dai->active) {
|
|
|
|
- codec_dai->rate = 0;
|
|
|
|
- codec_dai->channels = 0;
|
|
|
|
- codec_dai->sample_bits = 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* Muting the DAC suppresses artifacts caused during digital
|
|
/* Muting the DAC suppresses artifacts caused during digital
|
|
* shutdown, for example from stopping clocks.
|
|
* shutdown, for example from stopping clocks.
|
|
*/
|
|
*/
|
|
@@ -682,6 +669,19 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
|
|
|
|
|
|
mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
|
|
|
|
|
|
|
|
+ /* clear the corresponding DAIs parameters when going to be inactive */
|
|
|
|
+ if (cpu_dai->active == 1) {
|
|
|
|
+ cpu_dai->rate = 0;
|
|
|
|
+ cpu_dai->channels = 0;
|
|
|
|
+ cpu_dai->sample_bits = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (codec_dai->active == 1) {
|
|
|
|
+ codec_dai->rate = 0;
|
|
|
|
+ codec_dai->channels = 0;
|
|
|
|
+ codec_dai->sample_bits = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
/* apply codec digital mute */
|
|
/* apply codec digital mute */
|
|
if (!codec->active)
|
|
if (!codec->active)
|
|
snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
|
|
snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
|