All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org,
	Sven Neumann <s.neumann@raumfeld.com>,
	Michael Hirsch <m.hirsch@raumfeld.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
Date: Thu, 18 Mar 2010 19:28:13 +0100	[thread overview]
Message-ID: <20100318182813.GM30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <20100318182211.GH6142@rakim.wolfsonmicro.main>

On Thu, Mar 18, 2010 at 06:22:11PM +0000, Mark Brown wrote:
> On Thu, Mar 18, 2010 at 07:08:59PM +0100, Daniel Mack wrote:
> > This fixes a memory corruption when using ASoC devices are used in
> > full-duplex mode. Specifically for pxa-ssp code, where this pointer
> > is dynamically allocated for each direction and destroyed upon each
> > stream start.
> 
> > All other platforms are fixed blindly, I couldn't even compile-test
> > them. Sorry for any breakage I may have caused.
> 
> Looks good at first pass, though I think there's some more platforms
> have been missed?  I'm just about to leave for today, Liam and I will
> check properly tomorrow.  Thanks for diagnosing this!

This is all 'git grep' brought up. Other places should be easy to fix
though in case I missed any. Thanks for double-checking.


> > +static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
> > +					     const struct snd_pcm_substream *ss)
> > +{
> > +	return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
> > +		dai->playback.dma_data : dai->capture.dma_data;
> > +}
> > +
> > +static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai,
> > +					    const struct snd_pcm_substream *ss,
> > +					    void *data)
> > +{
> > +	if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)
> > +		dai->playback.dma_data = data;
> > +	else
> > +		dai->capture.dma_data = data;
> > +}
> 
> Make your mind up if you like the ternery operator :P

Well - I do, and I use it whereever I can. But in the 'set' case, I can't.
Or did I miss the joke? ;)

  reply	other threads:[~2010-03-18 18:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 16:17 Memory corruption in ASoC Daniel Mack
2010-03-18 16:43 ` Mark Brown
2010-03-18 16:48   ` Daniel Mack
2010-03-18 17:07     ` Mark Brown
2010-03-18 17:35       ` Liam Girdwood
2010-03-18 18:08         ` [PATCH] ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream Daniel Mack
2010-03-18 18:11           ` Daniel Mack
2010-03-18 18:22           ` Mark Brown
2010-03-18 18:28             ` Daniel Mack [this message]
2010-03-18 19:23             ` Daniel Mack
2010-03-19  6:56               ` Peter Ujfalusi
2010-03-19  7:08                 ` Daniel Mack
2010-03-19 15:14                   ` Mark Brown
2010-03-19 18:39                     ` Daniel Mack
2010-03-19 19:54                       ` Mark Brown
2010-03-20 14:54                         ` Daniel Mack
2010-03-20 15:30                           ` Mark Brown
2010-03-20 15:39                             ` Daniel Mack
2010-03-20 16:14                               ` Mark Brown
2010-03-22  9:10                                 ` Daniel Mack
2010-03-22  9:11                                 ` Daniel Mack
2010-04-01 17:18                                 ` Daniel Mack
2010-03-20 15:43                             ` Daniel Mack
2010-03-19  9:14                 ` Jarkko Nikula
2010-03-19  8:50               ` Liam Girdwood

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=20100318182813.GM30801@buzzloop.caiaq.de \
    --to=daniel@caiaq.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=m.hirsch@raumfeld.com \
    --cc=s.neumann@raumfeld.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.