All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] ASoC: arizona: Disable AIF TX/RX before configuring it
Date: Mon, 21 Jul 2014 11:33:27 +0100	[thread overview]
Message-ID: <20140721103327.GA29141@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <s5hsilvnkuf.wl%tiwai@suse.de>

On Mon, Jul 21, 2014 at 11:04:56AM +0200, Takashi Iwai wrote:
> At Mon, 21 Jul 2014 10:01:22 +0100,
> Richard Fitzgerald wrote:
> > 
> > On Thu, Jul 17, 2014 at 08:42:15PM +0100, Mark Brown wrote:
> > > On Wed, Jul 16, 2014 at 01:10:39PM +0100, Richard Fitzgerald wrote:
> > > 
> > > > If we don't disable the AIF TX/RX then we may fall into a
> > > > situation where the new AIF settings are ignored by the device.
> > > > For example, this problem manifests when switching between
> > > > different sample rates.
> > > 
> > > So, what this does is momentarily disable the AIF when reconfiguring.
> > > That will glitch any running audio, making me wonder if the driver
> > > shouldn't be returning an error or at least complaining if it has to
> > > reconfigure instead.  What's the use case where this might get
> > > triggered?
> > 
> > The case being fixed is like this:
> > 
> > aplay 48kHz.wav; aplay 96kHz.wav
> > 
> > The second open happens before pmdown_time so the AIF is still enabled.
> > Writes to the AIF config registers only take effect if the AIF is disabled.
> > Without this patch, the 96kHz.wav will play at 48kHz
> 
> If the glitch really matters, the driver can minimize by checking the
> change of sample rate and doing temporary turn on/off only when
> required.
> 
> 
> Takashi

That's a fair point.

WARNING: multiple messages have this Message-ID (diff)
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Mark Brown <broonie@kernel.org>,
	perex@perex.cz, lgirdwood@gmail.com,
	patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: arizona: Disable AIF TX/RX before configuring it
Date: Mon, 21 Jul 2014 11:33:27 +0100	[thread overview]
Message-ID: <20140721103327.GA29141@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <s5hsilvnkuf.wl%tiwai@suse.de>

On Mon, Jul 21, 2014 at 11:04:56AM +0200, Takashi Iwai wrote:
> At Mon, 21 Jul 2014 10:01:22 +0100,
> Richard Fitzgerald wrote:
> > 
> > On Thu, Jul 17, 2014 at 08:42:15PM +0100, Mark Brown wrote:
> > > On Wed, Jul 16, 2014 at 01:10:39PM +0100, Richard Fitzgerald wrote:
> > > 
> > > > If we don't disable the AIF TX/RX then we may fall into a
> > > > situation where the new AIF settings are ignored by the device.
> > > > For example, this problem manifests when switching between
> > > > different sample rates.
> > > 
> > > So, what this does is momentarily disable the AIF when reconfiguring.
> > > That will glitch any running audio, making me wonder if the driver
> > > shouldn't be returning an error or at least complaining if it has to
> > > reconfigure instead.  What's the use case where this might get
> > > triggered?
> > 
> > The case being fixed is like this:
> > 
> > aplay 48kHz.wav; aplay 96kHz.wav
> > 
> > The second open happens before pmdown_time so the AIF is still enabled.
> > Writes to the AIF config registers only take effect if the AIF is disabled.
> > Without this patch, the 96kHz.wav will play at 48kHz
> 
> If the glitch really matters, the driver can minimize by checking the
> change of sample rate and doing temporary turn on/off only when
> required.
> 
> 
> Takashi

That's a fair point.

  reply	other threads:[~2014-07-21 10:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 12:10 [PATCH] ASoC: arizona: Disable AIF TX/RX before configuring it Richard Fitzgerald
2014-07-17 19:42 ` Mark Brown
2014-07-21  9:01   ` Richard Fitzgerald
2014-07-21  9:04     ` Takashi Iwai
2014-07-21 10:33       ` Richard Fitzgerald [this message]
2014-07-21 10:33         ` Richard Fitzgerald
2014-07-21 16:24         ` Mark Brown
2014-07-22 10:42 ` [PATCH v2] " Richard Fitzgerald
2014-07-22 22:22   ` Mark Brown
2014-07-22 22:22     ` 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=20140721103327.GA29141@opensource.wolfsonmicro.com \
    --to=rf@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    /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.