All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Timur Tabi <timur@freescale.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 22:44:43 +0100	[thread overview]
Message-ID: <20110607214442.GB7712@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4DEE98C8.2010706@freescale.com>

On Tue, Jun 07, 2011 at 04:31:52PM -0500, Timur Tabi wrote:

> I can change my code to do this:

> if (pcm->streams[1].substream) {

instead of checking for channels_min.

> 	ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev,
> 		fsl_dma_hardware.buffer_bytes_max,
> 		&pcm->streams[1].substream->dma_buffer);
> 	if (ret) {
> 		dev_err(card->dev, "can't alloc capture dma buffer\n");
> 		snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer);
> 		return ret;
> 	}
> }

> But before I do that, I'd like to know if this is a bug in ASoC, or just a new
> behavior that I need to handle.

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.

  reply	other threads:[~2011-06-07 21:44 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 [this message]
2011-06-07 22:20   ` Timur Tabi
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=20110607214442.GB7712@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=timur@freescale.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.