+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.