From: Timur Tabi <timur@freescale.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: ALSA development <alsa-devel@alsa-project.org>, lrg@ti.com
Subject: Re: Something broke in snd_soc_pcm_stream
Date: Tue, 7 Jun 2011 17:20:25 -0500 [thread overview]
Message-ID: <4DEEA429.6040605@freescale.com> (raw)
In-Reply-To: <20110607214442.GB7712@opensource.wolfsonmicro.com>
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:
soc_new_pcm:2132 codec_dai=e6998840
soc_new_pcm:2133 codec_dai->driver->playback.channels_min=2
soc_new_pcm:2134 codec_dai->driver->capture.channels_min=0
soc_new_pcm:2136 cpu_dai->driver->playback.channels_min=2
soc_new_pcm:2137 cpu_dai->driver->capture.channels_min=2
soc_new_pcm:2144 playback=1
soc_new_pcm:2145 capture=0
soc_new_pcm:2173 platform->driver->pcm_new=c0329fd0
soc_new_pcm:2176
fsl_dma_new:305 dai->driver->playback.channels_min=2
fsl_dma_new:306 dai->driver->capture.channels_min=2
fsl_dma_new:329 pcm=e69aae00
fsl_dma_new:330 pcm->streams[1].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().
--
Timur Tabi
Linux kernel developer at Freescale
next prev parent reply other threads:[~2011-06-07 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 21:31 Something broke in snd_soc_pcm_stream Timur Tabi
2011-06-07 21:44 ` Mark Brown
2011-06-07 22:20 ` Timur Tabi [this message]
2011-06-08 9:05 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DEEA429.6040605@freescale.com \
--to=timur@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.