[alsa-devel] [RFC PATCH 1/1] ASoC: dsd1791: Introduce driver for TI DSD1791 stereo codec
Michael Williamson
michael.williamson at criticallink.com
Thu Dec 15 21:32:22 CET 2011
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
More information about the Alsa-devel
mailing list