5 Dec
2012
5 Dec
'12
2:59 p.m.
On 02.12.2012 05:02, Mark Brown wrote:
On Fri, Nov 30, 2012 at 11:28:57AM +0100, Daniel Mack wrote:
- Note that this is not needed in case the clocks are stable
- throughout the entire runtime of the codec.
That's really quite rare for embeded systems, though - normally at least the LRCLK is going to be enabled only when there's audio.
I agree, but I don't know which system the original driver was written for. As it seems to work there, I didn't want to unconditionally introduce this new reset command.
+static int cs4271_startup(struct snd_pcm_substream *subs,
struct snd_soc_dai *codec_dai)
+{
- int ret;
- struct snd_soc_codec *codec = codec_dai->codec;
- struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
- if (!cs4271->enable_soft_reset)
return 0;
- /*
* Put the codec in soft reset and back again in case it's not
* currently streaming data. This way of bringing the codec in
* sync to the current clocks is not explicitly documented in
* the data sheet, but it seems to work fine.
*/
Since startup() is called before hw_params() you might well find even an active LRCLK is going to change underneath the driver here...
Hmm ok, so you're saying this quirk should go in hwparams() then?
Thanks, Daniel