All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Andrey Danin <danindrey@mail.ru>, Leon Romanovsky <leon@leon.nu>,
	"lrg@ti.com" <lrg@ti.com>
Subject: Re: [PATCH] ASoC: Tegra: Add support of tegra boards based	on ALC5632 codec
Date: Wed, 23 Nov 2011 21:58:44 +0000	[thread overview]
Message-ID: <20111123215844.GB32201@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF174F08C817@HQMAIL01.nvidia.com>

On Wed, Nov 23, 2011 at 01:50:39PM -0800, Stephen Warren wrote:
> Leon Romanovsky wrote at Monday, November 21, 2011 1:08 PM:

> > +	switch (srate) {
> > +	case 64000:
> > +	case 88200:
> > +	case 96000:
> > +		mclk = 128 * srate;
> > +		break;
> > +	default:
> > +		mclk = 512 * srate;
> > +		break;
> > +	}
> > +	/* FIXME: Codec only requires >= 3MHz if OSR==0 */
> > +	while (mclk < 6000000)
> > +		mclk *= 2;

> That is identical to the code in tegra_wm8903. Are you sure it's correct
> for the ALC5632? At the very least, I think the comment is wrong; OSR is
> a WM8903 register field, which I doubt exists on the ALC5632.

I wouldn't be surprised if it were actually - the requirements for
CODECs are generally much of a muchness, there's good sensible DSP and
electrical engineering requirmenents for them.

> Mark Brown wrote here:
> > These should use the .dai_fmt member in the dai_link struct.

> Mark, I guess you mean that we should remove those two snd_soc_dai_set_fmt
> calls, and just set .dai_fmt to a constant value? If so, that should be
> applied to the other two Tegra machine drivers too.

Yes.

> That said, while these values are constant right now, I think they won't
> always be; I think we'll need to switch between DSP mode for mono and
> I2S mode for stereo here; at least I /think/ that's what I remember our
> downstream drivers doing...

That would be a surprising restriction for your hardware to have.  From
the CODEC point of view it really doesn't care at all, all the interface
formats are interchangable.

> > +static struct snd_soc_jack_gpio tegra_alc5632_hs_jack_gpios[] = {
> > +	{

...

> Do you need to call something in the ALC5632 codec driver here to start
> mic detection? The tegra_wm8903 driver calls wm8903_mic_detect() here.

It's not using the CODEC for detection, it's using a simple GPIO for tip
detect.

> > +MODULE_LICENSE("GPL");

> The comment at the top would imply "GPL v2", since no "or later" is
> mentioned there. Yes, the existing Tegra code is probably wrong here too.

GPL v2 is the standard interpretation for GPL within the kernel given
that that is the license of the kernel itself.  I'd only bother saying
anything different if the license were different but it won't do any
harm.

  reply	other threads:[~2011-11-23 21:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 20:08 [PATCH] ASoC: Tegra: Add support of tegra boards based on ALC5632 codec Leon Romanovsky
     [not found] ` <1321906088-29964-1-git-send-email-leon-2ukJVAZIZ/Y@public.gmane.org>
2011-11-22 13:30   ` [alsa-devel] [PATCH] ASoC: Tegra: Add support of tegra boards basedon " Marc Dietrich
2011-11-23  8:04     ` Leon Romanovsky
     [not found]       ` <CALq1K=Ka0JYut22FwovAyAcZSbqcQssjUPrk6rUU0Fq2iOZG_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-23 17:37         ` [alsa-devel] " Stephen Warren
     [not found]           ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C6FF-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-27  8:37             ` Leon Romanovsky
2011-11-23 15:38 ` [PATCH] ASoC: Tegra: Add support of tegra boards based on " Mark Brown
2011-11-23 21:50 ` Stephen Warren
2011-11-23 21:58   ` Mark Brown [this message]
2011-11-23 22:30     ` Stephen Warren
2011-11-23 22:46       ` Mark Brown
2011-11-23 23:31         ` Stephen Warren
2011-11-27  8:48   ` Leon Romanovsky
2011-11-28 16:52     ` Stephen Warren
2011-11-29  5:35       ` Leon Romanovsky

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=20111123215844.GB32201@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=danindrey@mail.ru \
    --cc=leon@leon.nu \
    --cc=lrg@ti.com \
    --cc=swarren@nvidia.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.