All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: nau8822: export right speaker inversion
@ 2022-02-07 15:32 Francesco Dolcini
  2022-02-07 16:02 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Francesco Dolcini @ 2022-02-07 15:32 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
  Cc: Francesco Dolcini, alsa-devel, Max Krummenacher

From: Max Krummenacher <max.krummenacher@toradex.com>

This control inverts the signal fed to the right amplifier.
This allows to connect one loudspeaker to the two speaker amplifiers
in a bridge-tied load configuration getting higher output power.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
 sound/soc/codecs/nau8822.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/nau8822.c b/sound/soc/codecs/nau8822.c
index 58123390c7a3..bf1155903421 100644
--- a/sound/soc/codecs/nau8822.c
+++ b/sound/soc/codecs/nau8822.c
@@ -351,6 +351,8 @@ static const struct snd_kcontrol_new nau8822_snd_controls[] = {
 		NAU8822_REG_LHP_VOLUME,
 		NAU8822_REG_RHP_VOLUME,	0, 63, 0, spk_tlv),
 
+	SOC_SINGLE("Speaker RInversion Switch",
+		NAU8822_REG_RIGHT_SPEAKER_CONTROL, 4, 1, 0),
 	SOC_DOUBLE_R("Speaker ZC Switch",
 		NAU8822_REG_LSPKOUT_VOLUME,
 		NAU8822_REG_RSPKOUT_VOLUME, 7, 1, 0),
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] ASoC: nau8822: export right speaker inversion
  2022-02-07 15:32 [PATCH v1] ASoC: nau8822: export right speaker inversion Francesco Dolcini
@ 2022-02-07 16:02 ` Mark Brown
  2022-02-07 17:03   ` Francesco Dolcini
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2022-02-07 16:02 UTC (permalink / raw)
  To: Francesco Dolcini
  Cc: alsa-devel, Takashi Iwai, Liam Girdwood, Max Krummenacher

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

On Mon, Feb 07, 2022 at 04:32:29PM +0100, Francesco Dolcini wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
> 
> This control inverts the signal fed to the right amplifier.
> This allows to connect one loudspeaker to the two speaker amplifiers
> in a bridge-tied load configuration getting higher output power.

Is the value chosen for this not going to be a property of how the board
is wired up, in which case it should be handled as a DT property rather
than varied at runtime?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] ASoC: nau8822: export right speaker inversion
  2022-02-07 16:02 ` Mark Brown
@ 2022-02-07 17:03   ` Francesco Dolcini
  2022-02-07 18:07     ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Francesco Dolcini @ 2022-02-07 17:03 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Takashi Iwai, Liam Girdwood, Max Krummenacher,
	Francesco Dolcini

Hello Mark,

On Mon, Feb 07, 2022 at 04:02:29PM +0000, Mark Brown wrote:
> On Mon, Feb 07, 2022 at 04:32:29PM +0100, Francesco Dolcini wrote:
> > From: Max Krummenacher <max.krummenacher@toradex.com>
> > 
> > This control inverts the signal fed to the right amplifier.
> > This allows to connect one loudspeaker to the two speaker amplifiers
> > in a bridge-tied load configuration getting higher output power.
> 
> Is the value chosen for this not going to be a property of how the board
> is wired up, in which case it should be handled as a DT property rather
> than varied at runtime?

Not really, in our board we do have a L/R loudspeaker connector and the
end user either connects a mono speaker to the left and right channel
and enable this control to get more power out of it. Or you can just
connect a stereo speaker.

Enabling this control to me does not depend on the board.

Francesco


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] ASoC: nau8822: export right speaker inversion
  2022-02-07 17:03   ` Francesco Dolcini
@ 2022-02-07 18:07     ` Mark Brown
  2022-02-08  8:21       ` Francesco Dolcini
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2022-02-07 18:07 UTC (permalink / raw)
  To: Francesco Dolcini
  Cc: alsa-devel, Takashi Iwai, Liam Girdwood, Max Krummenacher

[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]

On Mon, Feb 07, 2022 at 06:03:51PM +0100, Francesco Dolcini wrote:
> On Mon, Feb 07, 2022 at 04:02:29PM +0000, Mark Brown wrote:
> > On Mon, Feb 07, 2022 at 04:32:29PM +0100, Francesco Dolcini wrote:

> > > This control inverts the signal fed to the right amplifier.
> > > This allows to connect one loudspeaker to the two speaker amplifiers
> > > in a bridge-tied load configuration getting higher output power.

> > Is the value chosen for this not going to be a property of how the board
> > is wired up, in which case it should be handled as a DT property rather
> > than varied at runtime?

> Not really, in our board we do have a L/R loudspeaker connector and the
> end user either connects a mono speaker to the left and right channel
> and enable this control to get more power out of it. Or you can just
> connect a stereo speaker.

> Enabling this control to me does not depend on the board.

What do the physical connections for the speakers look like in this
system, and more generally what sort of system is this?  Most systems
either have the speakers enclosed in the plastics with the rest of the
system (which is obviously system specific) or have jacks/binding posts
for connecting speaker which are labelled fairly clearly for one
intended use.  If this is some sort of raw/development board that's
something where it's expected that people should be willing to configure
DT for changes at the level of wiring tihngs up.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] ASoC: nau8822: export right speaker inversion
  2022-02-07 18:07     ` Mark Brown
@ 2022-02-08  8:21       ` Francesco Dolcini
  2022-02-08 12:34         ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Francesco Dolcini @ 2022-02-08  8:21 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Takashi Iwai, Liam Girdwood, Max Krummenacher,
	Francesco Dolcini

On Mon, Feb 07, 2022 at 06:07:34PM +0000, Mark Brown wrote:
> On Mon, Feb 07, 2022 at 06:03:51PM +0100, Francesco Dolcini wrote:
> > On Mon, Feb 07, 2022 at 04:02:29PM +0000, Mark Brown wrote:
> > > On Mon, Feb 07, 2022 at 04:32:29PM +0100, Francesco Dolcini wrote:
> 
> > > > This control inverts the signal fed to the right amplifier.
> > > > This allows to connect one loudspeaker to the two speaker amplifiers
> > > > in a bridge-tied load configuration getting higher output power.
> 
> > > Is the value chosen for this not going to be a property of how the board
> > > is wired up, in which case it should be handled as a DT property rather
> > > than varied at runtime?
> 
> > Not really, in our board we do have a L/R loudspeaker connector and the
> > end user either connects a mono speaker to the left and right channel
> > and enable this control to get more power out of it. Or you can just
> > connect a stereo speaker.
> 
> > Enabling this control to me does not depend on the board.
> 
> What do the physical connections for the speakers look like in this
> system, and more generally what sort of system is this?  Most systems
> either have the speakers enclosed in the plastics with the rest of the
> system (which is obviously system specific) or have jacks/binding posts
> for connecting speaker which are labelled fairly clearly for one
> intended use.  If this is some sort of raw/development board that's
> something where it's expected that people should be willing to configure
> DT for changes at the level of wiring tihngs up.

For the speaker output we have either a 2 pole screw-less terminal block
connector (for BTL mono output) or 2.54mm pin headers (including ground,
in this case) for a stereo loudspeaker.

In addition to that we have the usual 3.5mm jack for the other
audio inputs/output, but they are not relevant for this discussion.

In general it is a development board, Toradex Verdin Development Board
V1.1 [1] (the picture on the website unfortunately is from a previous hw
revision in which we had a different audio configuration, anyway if you
are curious the schematics are available), but we do try to make the end
user experience the most smooth as possible, so what you propose is not
really appealing to me.

Said that, if the only viable solution for you is to have a device tree
property would be acceptable to not have any in-tree dts file using it?
We might decide to have it enabled with an out-of-tree dts overlay.

Francesco

[1] https://developer.toradex.com/products/verdin-development-board#tab-design-resources



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1] ASoC: nau8822: export right speaker inversion
  2022-02-08  8:21       ` Francesco Dolcini
@ 2022-02-08 12:34         ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2022-02-08 12:34 UTC (permalink / raw)
  To: Francesco Dolcini
  Cc: alsa-devel, Takashi Iwai, Liam Girdwood, Max Krummenacher

[-- Attachment #1: Type: text/plain, Size: 833 bytes --]

On Tue, Feb 08, 2022 at 09:21:09AM +0100, Francesco Dolcini wrote:

> In general it is a development board, Toradex Verdin Development Board
> V1.1 [1] (the picture on the website unfortunately is from a previous hw
> revision in which we had a different audio configuration, anyway if you
> are curious the schematics are available), but we do try to make the end
> user experience the most smooth as possible, so what you propose is not
> really appealing to me.

I suspect that by the time anyone builds a practical system based on the
development board they'll want the value fixed.

> Said that, if the only viable solution for you is to have a device tree
> property would be acceptable to not have any in-tree dts file using it?
> We might decide to have it enabled with an out-of-tree dts overlay.

Yes, that's totally fine.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-08 12:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 15:32 [PATCH v1] ASoC: nau8822: export right speaker inversion Francesco Dolcini
2022-02-07 16:02 ` Mark Brown
2022-02-07 17:03   ` Francesco Dolcini
2022-02-07 18:07     ` Mark Brown
2022-02-08  8:21       ` Francesco Dolcini
2022-02-08 12:34         ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.