From: Andrey Smirnov <andrey.smirnov-MC3rjLPHZ0ivD/XHwUtZZ+TW4wlIGRCZ@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] tegra_pcm DMA buffers allocation
Date: Thu, 19 Apr 2012 14:07:12 -0700 [thread overview]
Message-ID: <1334869632.13681.59.camel@marvin> (raw)
In-Reply-To: <4F90708F.8070504-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
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.
next prev parent reply other threads:[~2012-04-19 21:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 16:00 [RFC] tegra_pcm DMA buffers allocation Andrey Smirnov
2012-04-19 20:07 ` Stephen Warren
[not found] ` <4F90708F.8070504-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-19 21:07 ` Andrey Smirnov [this message]
2012-04-19 21:37 ` Stephen Warren
[not found] ` <4F90858D.4010206-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-19 23:30 ` Andrey Smirnov
2012-04-20 5:58 ` Thierry Reding
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=1334869632.13681.59.camel@marvin \
--to=andrey.smirnov-mc3rjlphz0ivd/xhwutzz+tw4wligrcz@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox