[alsa-devel] [PATCH 3/5] ASoC: Blackfin: tweak how we initialize the SPORT

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Jun 3 12:29:18 CEST 2009

On Tue, Jun 02, 2009 at 12:18:55AM -0400, Mike Frysinger wrote:

> @@ -199,7 +190,7 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream,
>  			       struct snd_soc_dai *dai)
>  {
>  	pr_debug("%s enter\n", __func__);
> -	bf5xx_i2s.counter--;
> +	bf5xx_i2s.configured = 0;
>  }

Are you sure this works properly with simultaneous record and playback?
If one stops while the other is running then the configured flag will be
cleared, meaning that the stopped stream can be restarted and used to
reconfigure the DAI which appears to be what the code is trying to

This should be using constraints to stop applications trying to
reconfigure active streams - for the sample rate you just need to set
symmetric_rates in the DAI.

More information about the Alsa-devel mailing list