From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Mark Brown <broonie@kernel.org>
Cc: Rafael Diniz <rafael@riseup.net>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
patches@opensource.cirrus.com, linux-sound@vger.kernel.org
Subject: Re: [PATCH v3 1/2] ASoC: wm8731: activate the interface after the converters, before the outputs
Date: Mon, 30 Nov 2026 17:14:32 +0000 [thread overview]
Message-ID: <aw2u+KhmKu9nAALH@opensource.cirrus.com> (raw)
In-Reply-To: <179605768224.253439.5326941105161680687.b4-review@b4>
On Mon, Nov 30, 2026 at 04:54:42PM +0000, Mark Brown wrote:
> > The datasheet's power-up sequence powers everything but the outputs,
> > sets the other registers, activates the digital audio interface and
> > clears OUTPD last. The driver has ACTIVE as a supply widget of its own,
> > which DAPM powers ahead of the ADC and DAC, so every stream start powers
> > a converter up under an active interface.
>
> > Power the ADC and DAC from one supply, with the interface inactive, and
> > set ACTIVE from the same supply's POST_PMU event once they are up; clear
>
>
> > +#define WM8731_PWR_CONVERTERS (WM8731_PWR_ADCPD | WM8731_PWR_DACPD)
>
> > +static int wm8731_converters_event(struct snd_soc_dapm_widget *w,
> > + struct snd_kcontrol *kcontrol, int event)
> > +{
> > + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
> > +
> > + switch (event) {
> > + case SND_SOC_DAPM_PRE_PMU:
> > + snd_soc_component_update_bits(component, WM8731_PWR,
> > + WM8731_PWR_CONVERTERS, 0);
> > + break;
>
> ...
>
> > + case SND_SOC_DAPM_POST_PMD:
> > + snd_soc_component_update_bits(component, WM8731_PWR,
> > + WM8731_PWR_CONVERTERS,
> > + WM8731_PWR_CONVERTERS);
> > + break;
> > + }
> > + return 0;
> > +}
>
> This means we'll always power both the ADC and DAC, even if only one is
> in use. I'm not sure any of the users of this device are likely to be
> super power sensitive, but it's possible.
Can we do better than that though? From user-space they are
separate capture and playback files, so whatever one is opened
second will find the hardware in an already powered state.
Assuming the problem is as described the only other alternative
would be to glitch the already open stream whilst the other
powers up, which seems worse than increased power draw.
Thanks,
Charles
next prev parent reply other threads:[~2026-11-30 17:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 9:23 [PATCH v3 0/2] ASoC: wm8731: interface activation order Rafael Diniz
2026-11-28 9:23 ` [PATCH v3 1/2] ASoC: wm8731: activate the interface after the converters, before the outputs Rafael Diniz
2026-11-30 10:28 ` Charles Keepax
2026-11-30 16:54 ` Mark Brown
2026-11-30 17:14 ` Charles Keepax [this message]
2026-11-30 17:26 ` Mark Brown
2026-11-30 17:37 ` Charles Keepax
2026-11-28 9:23 ` [PATCH v3 2/2] ASoC: wm8731: use one sample width for both directions Rafael Diniz
2026-11-30 10:03 ` Charles Keepax
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=aw2u+KhmKu9nAALH@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rafael@riseup.net \
--cc=tiwai@suse.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