From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ashish Chavan <ashish.chavan@kpitcummins.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
alsa-devel <alsa-devel@alsa-project.org>, lrg <lrg@ti.com>,
"kuninori.morimoto.gx" <kuninori.morimoto.gx@renesas.com>,
David Dajun Chen <david.chen@diasemi.com>
Subject: Re: [PATCH] ASoC: da7210: Add support for PLL and SRM
Date: Fri, 13 Apr 2012 10:30:12 +0100 [thread overview]
Message-ID: <20120413093012.GK3168@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1334122120.3991.13.camel@matrix>
[-- Attachment #1.1: Type: text/plain, Size: 1068 bytes --]
On Wed, Apr 11, 2012 at 10:58:40AM +0530, Ashish Chavan wrote:
> +/* PLL dividers table */
> +static const struct pll_div da7210_pll_div[] = {
> + /* for MASTER mode, fs = 44.1Khz */
> + { 12000000, 0xE8, 0x6C, 0x2, }, /* MCLK=12Mhz */
> + { 13000000, 0xDF, 0x28, 0xC, }, /* MCLK=13Mhz */
> + { 13500000, 0xDB, 0x0A, 0xD, }, /* MCLK=13.5Mhz */
> + { 14400000, 0xD4, 0x5A, 0x2, }, /* MCLK=14.4Mhz */
> + { 19200000, 0xBB, 0x43, 0x9, }, /* MCLK=19.2Mhz */
> + { 19680000, 0xB9, 0x6D, 0xA, }, /* MCLK=19.68Mhz */
> + { 19800000, 0xB8, 0xFB, 0xB, }, /* MCLK=19.8Mhz */
> + /* for MASTER mode, fs = 48Khz */
> + { 12000000, 0xF3, 0x12, 0x7, }, /* MCLK=12Mhz */
This *still* has magic number problems.
> + if (da7210->master) {
> + /* In PLL master mode, use master mode PLL dividers */
> + switch (fout) {
> + case 2822400:
> + row_idx = MASTER_2822400_DIV_OFFSET;
> + break;
> + case 3072000:
> + row_idx = MASTER_3072000_DIV_OFFSET;
> + break;
These defines now need to be kept in sync with the table and are going
to be *very* painful to review.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-04-13 9:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 5:28 [PATCH] ASoC: da7210: Add support for PLL and SRM Ashish Chavan
2012-04-13 9:30 ` Mark Brown [this message]
2012-04-16 12:23 ` Ashish Chavan
2012-04-16 12:59 ` Mark Brown
2012-04-16 13:42 ` Ashish Chavan
2012-04-16 14:07 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2012-01-12 12:24 Ashish Chavan
2012-01-12 18:52 ` Mark Brown
2012-01-18 13:26 ` Ashish Chavan
2012-01-18 13:17 ` 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=20120413093012.GK3168@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=ashish.chavan@kpitcummins.com \
--cc=david.chen@diasemi.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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;
as well as URLs for NNTP newsgroup(s).