|
@@ -307,9 +307,8 @@ static void close_delayed_work(struct work_struct *work)
|
|
/* are we waiting on this codec DAI stream */
|
|
/* are we waiting on this codec DAI stream */
|
|
if (codec_dai->pop_wait == 1) {
|
|
if (codec_dai->pop_wait == 1) {
|
|
codec_dai->pop_wait = 0;
|
|
codec_dai->pop_wait = 0;
|
|
- snd_soc_dapm_stream_event(rtd,
|
|
|
|
- codec_dai->driver->playback.stream_name,
|
|
|
|
- SND_SOC_DAPM_STREAM_STOP);
|
|
|
|
|
|
+ snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_PLAYBACK,
|
|
|
|
+ codec_dai, SND_SOC_DAPM_STREAM_STOP);
|
|
}
|
|
}
|
|
|
|
|
|
mutex_unlock(&rtd->pcm_mutex);
|
|
mutex_unlock(&rtd->pcm_mutex);
|
|
@@ -373,8 +372,9 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
|
|
rtd->dai_link->ignore_pmdown_time) {
|
|
rtd->dai_link->ignore_pmdown_time) {
|
|
/* powered down playback stream now */
|
|
/* powered down playback stream now */
|
|
snd_soc_dapm_stream_event(rtd,
|
|
snd_soc_dapm_stream_event(rtd,
|
|
- codec_dai->driver->playback.stream_name,
|
|
|
|
- SND_SOC_DAPM_STREAM_STOP);
|
|
|
|
|
|
+ SNDRV_PCM_STREAM_PLAYBACK,
|
|
|
|
+ codec_dai,
|
|
|
|
+ SND_SOC_DAPM_STREAM_STOP);
|
|
} else {
|
|
} else {
|
|
/* start delayed pop wq here for playback streams */
|
|
/* start delayed pop wq here for playback streams */
|
|
codec_dai->pop_wait = 1;
|
|
codec_dai->pop_wait = 1;
|
|
@@ -383,9 +383,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
/* capture streams can be powered down now */
|
|
/* capture streams can be powered down now */
|
|
- snd_soc_dapm_stream_event(rtd,
|
|
|
|
- codec_dai->driver->capture.stream_name,
|
|
|
|
- SND_SOC_DAPM_STREAM_STOP);
|
|
|
|
|
|
+ snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
|
|
|
|
+ codec_dai, SND_SOC_DAPM_STREAM_STOP);
|
|
}
|
|
}
|
|
|
|
|
|
mutex_unlock(&rtd->pcm_mutex);
|
|
mutex_unlock(&rtd->pcm_mutex);
|
|
@@ -454,14 +453,8 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
|
|
cancel_delayed_work(&rtd->delayed_work);
|
|
cancel_delayed_work(&rtd->delayed_work);
|
|
}
|
|
}
|
|
|
|
|
|
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
|
|
|
- snd_soc_dapm_stream_event(rtd,
|
|
|
|
- codec_dai->driver->playback.stream_name,
|
|
|
|
- SND_SOC_DAPM_STREAM_START);
|
|
|
|
- else
|
|
|
|
- snd_soc_dapm_stream_event(rtd,
|
|
|
|
- codec_dai->driver->capture.stream_name,
|
|
|
|
- SND_SOC_DAPM_STREAM_START);
|
|
|
|
|
|
+ snd_soc_dapm_stream_event(rtd, substream->stream, codec_dai,
|
|
|
|
+ SND_SOC_DAPM_STREAM_START);
|
|
|
|
|
|
snd_soc_dai_digital_mute(codec_dai, 0);
|
|
snd_soc_dai_digital_mute(codec_dai, 0);
|
|
|
|
|