[alsa-devel] [PATCH] ASoC: nau8825: Add Class G function options

Mark Brown broonie at kernel.org
Mon Jan 9 20:30:13 CET 2017


On Thu, Dec 15, 2016 at 09:05:52PM -0800, Ben Zhang wrote:
> On Wed, Dec 14, 2016 at 6:57 AM, Mark Brown <broonie at kernel.org> wrote:

> > This doesn't affect audio routing so why is it being done with a DAPM
> > mux?

> When user wants the switching voltages, the Class G register bit needs
> to be toggled at a specific time in the widget power up/down sequences
> on the playback route. It helps reduce pop and is consistent with
> existing behavior. DAPM_MUX achieves this by taking DAPM_PGA_S in and

Sure, but a more normal way of doing that would be to use an event on
the widget for the amplifier that looks at the value a regular control
has set in a variable rather than having a mux...

> John has sent me a patch which uses a separate SOC_ENUM_EXT kcontrol
> in snd_soc_codec_driver.controls to set a flag, then has DAPM_PGA_S PM
> event callbacks selectively setting the register bit based on the
> flag. But it feels cleaner to implement this with a DAPM_MUX: The
> DAPM_PGA_S widget power status correctly reflects the actual register
> bit. User can experiment with the setting during playback.

...which is what it sounds like John's patch did.  It is more idiomatic,
it ensures that the DAPM routing represents the actual audio routing in
the chip which means we keep everything in the abstractions that the
system is using and avoid the potential for breakage resulting from
things getting confused later on (eg, if we start exporting the routing
to userspace).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170109/1bf10c24/attachment.sig>


More information about the Alsa-devel mailing list