[alsa-devel] Something broke in snd_soc_pcm_stream

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jun 7 23:44:43 CEST 2011


On Tue, Jun 07, 2011 at 04:31:52PM -0500, Timur Tabi wrote:

> I can change my code to do this:

> if (pcm->streams[1].substream) {

instead of checking for channels_min.

> 	ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
> 		fsl_dma_hardware.buffer_bytes_max,
> 		&pcm->streams[1].substream->dma_buffer);
> 	if (ret) {
> 		dev_err(card->dev, "can't alloc capture dma buffer\n");
> 		snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer);
> 		return ret;
> 	}
> }

> But before I do that, I'd like to know if this is a bug in ASoC, or just a new
> behavior that I need to handle.

I don't think this is a bug in the core, relying on the having things
partially initialised in a particular order seems overly fragile -
better to check for the thing you're actually looking for.  There wasn't
a deliberate change I can think of here, though.


More information about the Alsa-devel mailing list