[alsa-devel] [PATCH] ASoC: da7210: Add support for PLL and SRM
Ashish Chavan
ashish.chavan at kpitcummins.com
Wed Jan 18 14:26:18 CET 2012
> > +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.
More information about the Alsa-devel
mailing list