[alsa-devel] [PATCH] ASoC: pcm: If pmdown_time is zero then shut down DAPM immediately

Liam Girdwood lrg at ti.com
Thu Feb 9 09:33:05 CET 2012


On Wed, 2012-02-08 at 20:11 +0000, Mark Brown wrote:
> Since we've already got logic to special case immediate teardown of the
> stream we may as well use it if the pmdown_time has been set to zero by
> the application layer instead of scheduling a work item with zero delay.
> 
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-pcm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index ef28dd5..d7bb268 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -369,7 +369,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
>  	cpu_dai->runtime = NULL;
>  
>  	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
> -		if (codec->ignore_pmdown_time ||
> +		if (!rtd->pmdown_time || codec->ignore_pmdown_time ||
>  		    rtd->dai_link->ignore_pmdown_time) {
>  			/* powered down playback stream now */
>  			snd_soc_dapm_stream_event(rtd,

Acked-by: Liam Girdwood <lrg at ti.com>



More information about the Alsa-devel mailing list