[alsa-devel] Something broke in snd_soc_pcm_stream
timur at freescale.com
Wed Jun 8 00:20:25 CEST 2011
Mark Brown wrote:
> 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.
I think it's because you test the codec_dai in soc_new_pcm(), which seems weird.
I put some printks in this function, and this is what I got:
fsl_dma_new:330 pcm->streams.substream= (null)
It just so happens that on the the P1022, the CPU does support both directions
in its DAI, but the codec (WM8776) supports only one direction per DAI. So I
suspect that you shouldn't be testing codec_dai either, because it assumes that
the codec is the only arbiter on which direction a given dai-group supports.
Anyway, I changed my driver to test for the actual pointer, and it works. You
might want to consider doing the same in soc_pcm_new().
Linux kernel developer at Freescale
More information about the Alsa-devel