[PATCH v2] ASoC: nau8822: add spk boost and spk btl options

Mark Brown broonie at kernel.org
Fri Oct 14 13:57:03 CEST 2022


On Fri, Oct 14, 2022 at 10:52:54AM +0200, Benjamin Marty wrote:

> The Speaker Boost flag is explained in the Datasheet on page 80.
> The Speaker BTL flag is explained in the Datasheet on page 78.

Not according to 

   https://www.nuvoton.com/resource-files/NAU8822LDataSheetRev1.9.pdf 

where the page numbers changed.  It's better to actually describe things
directly...  In any case, as Francesco said things that depend on the
physical design of the board should be in firmware description not user
controllable, users can't meaningfully change them at runtime and there
is only ever one correct setting for a given system.

> +	SOC_SINGLE("Speaker Gain Boost Control",
> +		NAU8822_REG_OUTPUT_CONTROL, 2, 1, 0),

This looks on the edge of what could be user controllable since while
the datasheet does recommend settings based on supply voltage it looks
like it's just a gain control so you could reasonably use it at runtime
in spite of what the datasheet recommends.  However if it is being
exposed it should end in Volume as per control-names.rst and ideally
have TLV information.

> +	SOC_SINGLE("Speaker BTL Configuration",
> +		NAU8822_REG_RIGHT_SPEAKER_CONTROL, 4, 1, 0),

Like Francesco says this should be done in firmware configuration since
especially in the case where there is a BTL speaker there really only is
one correct setting for the system.  I guess you might for some reason
want to invert the signal on a non-BTL system but it's hard to see what
the use case might be.
-------------- 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/20221014/fc8aa1f1/attachment.sig>


More information about the Alsa-devel mailing list