[alsa-devel] [PATCH 6/6] ASoC: soc-core: add snd_soc_stream_stop()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Dec 17 04:54:02 CET 2019


Hi Pierre-Louis

Thank you for your review

> > +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);
> 
> I am not a big fan of naming conventions for the new helper. We don't
> have any other snd_soc_stream function, but we have a concept of
> stream for SoundWire. we also have snd_soc_dapm_stream_ functions..
> 
> snd_soc_dapm_stream_stop() maybe?

Ahh, make sense !
I will post v2 tomorrow

Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list