From: Ashish Chavan <ashish.chavan@kpitcummins.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel <alsa-devel@alsa-project.org>, lrg <lrg@ti.com>,
"kuninori.morimoto.gx" <kuninori.morimoto.gx@renesas.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: da7210: Add support for PLL and SRM
Date: Wed, 18 Jan 2012 18:56:18 +0530 [thread overview]
Message-ID: <1326893178.16299.10.camel@matrix> (raw)
In-Reply-To: <20120112185257.GB9661@sirena.org.uk>
> > +static int da7210_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
> > + int div_id, int div)
>
> Why does the driver need the machine driver to manually configure clock
> dividers?
Do you mean that the input mclk value should be passed via platform data
and driver should use it from there during initialization?
> This isn't great, you're indexing into a table of divisors using raw
> numeric constants in a totally separate part of the code. Worse, these
> constants aren't even directly used but have a calculation applied to
> them apparently because this is really a multi dimensional array. This
> isn't great for either legibility or robustness.
>
> Fix this to remove the use of magic numbers, for example by putting
> fout and fref into the table and searching for them.
>
OK, will take care of that.
next prev parent reply other threads:[~2012-01-18 13:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 12:24 [PATCH] ASoC: da7210: Add support for PLL and SRM Ashish Chavan
2012-01-12 18:52 ` Mark Brown
2012-01-18 13:26 ` Ashish Chavan [this message]
2012-01-18 13:17 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2012-04-11 5:28 Ashish Chavan
2012-04-13 9:30 ` Mark Brown
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
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=1326893178.16299.10.camel@matrix \
--to=ashish.chavan@kpitcummins.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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).