From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: core - Fix dai usage in pcm_new() platform handlers
Date: Wed, 22 Jun 2011 19:10:23 +0100 [thread overview]
Message-ID: <20110622181023.GA18574@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1308765929-14482-1-git-send-email-zonque@gmail.com>
On Wed, Jun 22, 2011 at 08:05:29PM +0200, Daniel Mack wrote:
> Commit 552d1ef ("ASoC: core - Optimise and refactor pcm_new() to pass
> only rtd") refactored the ASoC internal core to only pass a pointer
> to a runtime as argument to individual pcm_new() functions. However, the
> new code that was added to the handlers to get access to the dai now
> uses rtd->cpu_dai, while before this patch, rtd->codec_dai was used.
Which is a problem because...
> diff --git a/sound/soc/atmel/atmel-pcm.c b/sound/soc/atmel/atmel-pcm.c
> index f81d4c3..d1140c1 100644
> --- a/sound/soc/atmel/atmel-pcm.c
> +++ b/sound/soc/atmel/atmel-pcm.c
> @@ -367,7 +367,7 @@ static u64 atmel_pcm_dmamask = 0xffffffff;
> static int atmel_pcm_new(struct snd_soc_pcm_runtime *rtd)
> {
> struct snd_card *card = rtd->card->snd_card;
> - struct snd_soc_dai *dai = rtd->cpu_dai;
> + struct snd_soc_dai *dai = rtd->codec_dai;
> struct snd_pcm *pcm = rtd->pcm;
> int ret = 0;
>
The original code doesn't look obviously wrong while if the CPU driver
is peering at the CODEC driver that smells very bad. What's the actual
problem here?
next prev parent reply other threads:[~2011-06-22 18:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 18:05 [PATCH] ASoC: core - Fix dai usage in pcm_new() platform handlers Daniel Mack
2011-06-22 18:10 ` Mark Brown [this message]
2011-06-22 18:21 ` Daniel Mack
2011-06-22 18:36 ` Daniel Mack
2011-06-22 18:36 ` Mark Brown
2011-06-22 18:45 ` Daniel Mack
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=20110622181023.GA18574@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=zonque@gmail.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.