From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Olaya, Margarita" <magi.olaya@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCHv4 5/7] ASoC: TWL6030: Add restrictions for low-power playback mode
Date: Wed, 24 Feb 2010 13:53:38 +0000 [thread overview]
Message-ID: <20100224135338.GQ18896@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1889FA7136B567478A67D4B0F85B0CCE65DD1B17@dlee06.ent.ti.com>
On Tue, Feb 23, 2010 at 06:10:42PM -0600, Olaya, Margarita wrote:
> Currently, handsfree DAC and driver are the only components that can
> prevent codec to enter to low-power playback mode. Other components
> like earphone driver, vibrator driver or loopback (which are not yet
> supported in the driver) can cause the same effect.
Hrm, this vibrator is raising a red flag for me with the MFD patch - it
sounds like we'll need to have an equivalent of the twl4030-codec MFD
for the TWL6030 to support the vibrator since that doesn't fit within
the audio subsystem.
> In order to detect conflicting paths, CODEC driver supervises
> non-low-power widgets powered by DAPM mechanism, just at the point
> pcm trigger callback gets called.
> +static int twl6030_power_mode_event(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol, int event)
> +{
> + struct snd_soc_codec *codec = w->codec;
> + struct twl6030_data *priv = codec->private_data;
> +
> + if (SND_SOC_DAPM_EVENT_ON(event))
> + priv->non_lp++;
> + else
> + priv->non_lp--;
> +
> + return 0;
> +}
So what happens if we're already in low power mode and non_lp gets set
(or conversely but less seriously, if we get to the point where we can
enter low power mode)?
> + switch (cmd) {
> + case SNDRV_PCM_TRIGGER_START:
> + /*
> + * low-power playback mode is restricted
> + * for headset path only
> + */
> + if ((priv->sysclk == 17640000) && priv->non_lp) {
> + dev_err(codec->dev,
> + "some enabled paths aren't supported at %dHz\n",
> + priv->sysclk);
> + return -EPERM;
> + }
> + break;
Should probably do this for all the startup trigger sources - _RESUME
for example.
prev parent reply other threads:[~2010-02-24 13:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 0:10 [PATCHv4 5/7] ASoC: TWL6030: Add restrictions for low-power playback mode Olaya, Margarita
2010-02-24 13:53 ` Mark Brown [this message]
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=20100224135338.GQ18896@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=magi.olaya@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox