15 Dec
2011
15 Dec
'11
9:32 p.m.
On 12/15/2011 2:16 AM, Mark Brown wrote:
On Wed, Dec 14, 2011 at 06:40:43PM -0500, Michael Williamson wrote:
[...]
+static int dsd1791_set_sysclk(struct snd_soc_dai *codec_dai,
int clk_id, unsigned int freq, int dir)
+{
- struct snd_soc_codec *codec = codec_dai->codec;
- struct dsd1791 *dsd1791 = snd_soc_codec_get_drvdata(codec);
- dsd1791->mclk = freq;
- return 0;
+}
Implement this as a CODEC wide operation, it's simpler.
Not sure I follow you here. Are you meaning to create something to replace these lines (which are in many of the routines) with a local inline?
- struct snd_soc_codec *codec = codec_dai->codec;
- struct dsd1791 *dsd1791 = snd_soc_codec_get_drvdata(codec);
Or are you talking about the entire function? I think I will remove this entire function. The mclk is not yet used, but could be if support for some additional features of the chip is added. If I get that far I'll put it back in.
I understand all your other comments and will incorporate. Thanks for your review time.
-Mike