Hi
+void snd_soc_stream_stop(struct snd_soc_pcm_runtime *rtd, int stream) +{
- if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
if (snd_soc_runtime_ignore_pmdown_time(rtd)) {
/* powered down playback stream now */
snd_soc_dapm_stream_event(rtd,
SNDRV_PCM_STREAM_PLAYBACK,
SND_SOC_DAPM_STREAM_STOP);
} else {
/* start delayed pop wq here for playback streams */
rtd->pop_wait = 1;
queue_delayed_work(system_power_efficient_wq,
&rtd->delayed_work,
msecs_to_jiffies(rtd->pmdown_time));
}
- } else {
/* capture streams can be powered down now */
snd_soc_dapm_stream_event(rtd, SNDRV_PCM_STREAM_CAPTURE,
SND_SOC_DAPM_STREAM_STOP);
- }
+} +EXPORT_SYMBOL_GPL(snd_soc_stream_stop);
Hmm... I noticed that soc_compr_free_fe(), dpcm_fe_dai_shutdown() are directly calling SND_SOC_DAPM_STREAM_STOP without caring pmdown time / delayed work. Can we use snd_soc_dapm_stream_stop() for these, too ?
static int dpcm_fe_dai_shutdown(struct snd_pcm_substream *substream) { ... /* run the stream event for each BE */ => dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); ... }
static int soc_compr_free_fe(struct snd_compr_stream *cstream) { ... => dpcm_dapm_stream_event(fe, stream, SND_SOC_DAPM_STREAM_STOP); ... }
Thank you for your help !! Best regards --- Kuninori Morimoto