Re: [RFC] tegra_pcm DMA buffers allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-04-19 at 16:07 -0400, Stephen Warren wrote:
> On 04/19/2012 10:00 AM, Andrey Smirnov wrote:
> > Hello,
> > 
> > I'm working with a Harmony-based custom Tegra2 board and I'm writing a
> > driver for a sound capturing I2S device. At this point, for all intents
> > and purposes the code I use is almost indistinguishable from the similar
> > code for WM8782(digital microphone) which means that the the structure
> > describing the DAI has only .capture data and .playback field is left
> > untouched. This set up, using the tegra-l4t-r15-alpha kernel* results in
> > the crash because of NULL pointer dereference in
> > tegra_pcm_preallocate_dma_buffer().
> 
> This mailing list is generally considered to be solely for discussing
> the mainline kernel, rather than NVIDIA's downstream/product kernels.
> I'm afraid we don't have a good story for external contributions to our
> downstream kernels through channels other than OEM product engagements
> though.
> 
> That said, I think if you replace the following code that you say is in
> our L4T kernels:
> 
> 	if (dai->driver->playback.channels_min) {
> 
> with the upstream variant:
> 
> 	if (pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream) {
> 
> I hope you'll find your problem is solved. If not, then there is
> probably a bug in the mainline code that we could continue to discuss here.

Oh, I apologize I think I mixed the two code bases, for some reason I
thought that was the way it was handled in upstream too, that's why I
brought the issue here. I saw the same code used in PXA pcm code(the one
example using capture only drivers I found). And it worked like a charm,
thank your for suggestion.

> 
> BTW, did you try running the mainline code on your board. If it's
> derived from Harmony, it should be easy to get it going.

Last time we did there was no support for Tegra's NAND and display
controllers(I was very excited to read about those DRM DC patches the
other day), but to switch to upstream code is definitely the plan.

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux