From: Mark Brown <broonie@sirena.org.uk>
To: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: "ext sakoman@gmail.com" <sakoman@gmail.com>,
alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
Steve Sakoman <steve@sakoman.com>
Subject: Re: [alsa-devel] [PATCH 3/5] SOUND: SOC: CODECS: Add support for the TWL4030 audio codec
Date: Thu, 4 Sep 2008 13:25:42 +0100 [thread overview]
Message-ID: <20080904122542.GC21663@sirena.org.uk> (raw)
In-Reply-To: <20080904132632.e64c3ce2.jarkko.nikula@nokia.com>
On Thu, Sep 04, 2008 at 01:26:32PM +0300, Jarkko Nikula wrote:
> > +static void twl4030_dump_registers(void)
> > +{
> This is not needed since there is already nice function
> for it: sound/soc/soc-core.c: codec_reg_show.
It's doing something slighly different and dumping the chip registers
rather than the register cache (the read() operation for this chip is
_read_reg_cache()) but yes, should be sensible to drop it.
> > +static void twl4030_power_down(struct snd_soc_codec *codec)
> > +{
> ...
> > + udelay(10);
> > +}
> REVISIT comment for these kind of magic delays if doesn't work without.
Alternatively, if writes to CODECPDZ are always supposed to have delays
after them according to the datasheet perhaps a function to wrap up the
write plus delay would be a good idea?
> > +static int twl4030_set_dai_sysclk(struct snd_soc_dai *codec_dai,
> > + int clk_id, unsigned int freq, int dir)
> > +{
> ...
> > +
> > + infreq |= APLL_EN;
> > + twl4030_write(codec, REG_APLL_CTL, infreq);
> > +
> > + return 0;
> > +}
> If this actually place for set_pll callback if one wants to manage PLL
> (APLL_EN bit) dynamically?
Might be nice, yes. That said, how much flexibility is there regarding
the PLL on this part? If the configuration is determined very strongly
by the audio configuration and it's likely that the configuration is
entirely determined by the current audio status then it may not be worth
exposing the decision making to the user, at least for a first pass.
The impression I got from the code was that it was very fixed purpose.
If you do do this then make sure it interacts well with power_up() and
power_down().
next prev parent reply other threads:[~2008-09-04 12:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-04 5:01 [PATCH 0/4] ARM: OMAP2: Add support for Gumstix Overo (resubmission) sakoman
2008-09-04 5:01 ` [PATCH 1/5] ARM: OMAP2: Add support for the Gumstix Overo board sakoman
2008-09-04 5:01 ` [PATCH 2/5] ARM: OMAP2: Add video driver " sakoman
2008-09-04 5:01 ` [PATCH 3/5] SOUND: SOC: CODECS: Add support for the TWL4030 audio codec sakoman
2008-09-04 5:01 ` [PATCH 4/5] SOUND: SOC: OMAP: Add support for Gumstix Overo sakoman
2008-09-04 5:02 ` [PATCH 5/5] ARM: OMAP2: defconfig for the Gumstix Overo board sakoman
2008-09-04 10:40 ` [PATCH 4/5] SOUND: SOC: OMAP: Add support for Gumstix Overo Jarkko Nikula
2008-09-04 13:12 ` Steve Sakoman
2008-09-04 12:27 ` [alsa-devel] " Mark Brown
2008-09-04 10:26 ` [PATCH 3/5] SOUND: SOC: CODECS: Add support for the TWL4030 audio codec Jarkko Nikula
2008-09-04 12:25 ` Mark Brown [this message]
2008-09-04 12:40 ` REGISTER 2 PCM FOR SAME DEVICE dinesh
2008-09-04 14:32 ` [PATCH 3/5] SOUND: SOC: CODECS: Add support for the TWL4030 audio codec Steve Sakoman
2008-09-05 10:30 ` [alsa-devel] " Mark Brown
2008-09-05 14:25 ` Steve Sakoman
2008-09-04 12:04 ` Mark Brown
2008-09-04 14:48 ` [alsa-devel] " Steve Sakoman
2008-09-05 10:06 ` Mark Brown
2008-09-05 14:16 ` Steve Sakoman
2008-09-05 14:34 ` Steve Sakoman
2008-09-05 14:48 ` Mark Brown
2008-09-05 15:08 ` Steve Sakoman
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=20080904122542.GC21663@sirena.org.uk \
--to=broonie@sirena.org.uk \
--cc=alsa-devel@alsa-project.org \
--cc=jarkko.nikula@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=sakoman@gmail.com \
--cc=steve@sakoman.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox