All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org,
	Alexander Sverdlin <subaparts@yandex.ru>,
	lrg@ti.com
Subject: Re: [PATCH 3/3] ALSA: ASoC: cs4271: add optional soft reset workaround
Date: Wed, 05 Dec 2012 14:59:37 +0100	[thread overview]
Message-ID: <50BF5349.2040901@gmail.com> (raw)
In-Reply-To: <20121202040200.GI17981@opensource.wolfsonmicro.com>

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

  reply	other threads:[~2012-12-05 13:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30 10:28 [PATCH 1/3] ALSA: ASoC: cs4271: fix sparse warning Daniel Mack
2012-11-30 10:28 ` [PATCH 2/3] ALSA: ASoC: cs4271: fix property check Daniel Mack
2012-12-02  4:02   ` Mark Brown
2012-11-30 10:28 ` [PATCH 3/3] ALSA: ASoC: cs4271: add optional soft reset workaround Daniel Mack
2012-12-02  4:02   ` Mark Brown
2012-12-05 13:59     ` Daniel Mack [this message]
2012-12-02  4:02 ` [PATCH 1/3] ALSA: ASoC: cs4271: fix sparse warning Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50BF5349.2040901@gmail.com \
    --to=zonque@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=subaparts@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.