[PATCH v1] ASoC: nau8822: export right speaker inversion
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),
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?
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
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.
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-r...
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.
participants (2)
-
Francesco Dolcini
-
Mark Brown