Message ID | 20221014085253.73733-1-info@benjaminmarty.ch |
---|---|
State | New |
Headers | show |
Series | [v2] ASoC: nau8822: add spk boost and spk btl options | expand |
On Fri, Oct 14, 2022 at 10:52:54AM +0200, Benjamin Marty wrote: > diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c > index 1aef281a9972..812b8254f9a0 100644 > --- a/sound/soc/codecs/nau8822.c > +++ b/sound/soc/codecs/nau8822.c > @@ -379,6 +379,12 @@ static const struct snd_kcontrol_new nau8822_snd_controls[] = { > NAU8822_REG_DAC_CONTROL, 5, 1, 0), > SOC_SINGLE("ADC 128x Oversampling Switch", > NAU8822_REG_ADC_CONTROL, 5, 1, 0), <snip> > + SOC_SINGLE("Speaker BTL Configuration", > + NAU8822_REG_RIGHT_SPEAKER_CONTROL, 4, 1, 0), We proposed the exact same change and it was not considered fine [1], this is considered a system property and should be configured from something like a device tree. I would appreciate if you could add me in cc on any follow-up patch on that, thanks. Francesco [1] https://lore.kernel.org/all/20220207153229.1285574-1-francesco.dolcini@toradex.com/
diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c index 1aef281a9972..812b8254f9a0 100644 --- a/sound/soc/codecs/nau8822.c +++ b/sound/soc/codecs/nau8822.c @@ -379,6 +379,12 @@ static const struct snd_kcontrol_new nau8822_snd_controls[] = { NAU8822_REG_DAC_CONTROL, 5, 1, 0), SOC_SINGLE("ADC 128x Oversampling Switch", NAU8822_REG_ADC_CONTROL, 5, 1, 0), + + SOC_SINGLE("Speaker Gain Boost Control", + NAU8822_REG_OUTPUT_CONTROL, 2, 1, 0), + + SOC_SINGLE("Speaker BTL Configuration", + NAU8822_REG_RIGHT_SPEAKER_CONTROL, 4, 1, 0), }; /* LMAIN and RMAIN Mixer */
These two options are required to use the Speaker output on this codec to its full potential, when wiring up the Speaker in an BTL configuration. The Speaker Boost flag is explained in the Datasheet on page 80. The Speaker BTL flag is explained in the Datasheet on page 78. Signed-off-by: Benjamin Marty <info@benjaminmarty.ch> --- sound/soc/codecs/nau8822.c | 6 ++++++ 1 file changed, 6 insertions(+)