|
|
Log in / Subscribe / Register

ASoC: Add support for GPIOs driven amplifiers

From:  Herve Codina <herve.codina-AT-bootlin.com>
To:  Herve Codina <herve.codina-AT-bootlin.com>, Liam Girdwood <lgirdwood-AT-gmail.com>, Mark Brown <broonie-AT-kernel.org>, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Saravana Kannan <saravanak-AT-kernel.org>, Jaroslav Kysela <perex-AT-perex.cz>, Takashi Iwai <tiwai-AT-suse.com>
Subject:  [PATCH 0/4] ASoC: Add support for GPIOs driven amplifiers
Date:  Mon, 30 Mar 2026 12:16:04 +0200
Message-ID:  <20260330101610.57942-1-herve.codina@bootlin.com>
Cc:  linux-sound-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Christophe Leroy <christophe.leroy-AT-csgroup.eu>, Thomas Petazzoni <thomas.petazzoni-AT-bootlin.com>
Archive-link:  Article

On some embedded system boards, audio amplifiers are designed using
discrete components such as op-amp, several resistors and switches to
either adjust the gain (switching resistors) or fully switch the
audio signal path (mute and/or bypass features).

Those switches are usually driven by simple GPIOs.

This kind of amplifiers are not handled in ASoC and the fallback is to
let the user-space handle those GPIOs out of the ALSA world.

In order to have those kind of amplifiers fully integrated in the audio
stack, this series introduces the audio-gpio-amp to handle them.

This new ASoC component allows to have the amplifiers seen as ASoC
auxiliarty devices and so it allows to control them through audio mixer
controls.

Best regards,
Hervé

Herve Codina (4):
  of: Introduce of_property_read_s32_index()
  ASoC: dt-bindings: Add support for the GPIOs driven amplifier
  ASoC: codecs: Add support for the GPIOs driven amplifier
  MAINTAINERS: Add the ASoC gpio amplifier entry

 .../bindings/sound/audio-gpio-amp.yaml        | 309 +++++++
 MAINTAINERS                                   |   7 +
 include/linux/of.h                            |   7 +
 sound/soc/codecs/Kconfig                      |  12 +
 sound/soc/codecs/Makefile                     |   2 +
 sound/soc/codecs/audio-gpio-amp.c             | 765 ++++++++++++++++++
 6 files changed, 1102 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-gpio-amp.yaml
 create mode 100644 sound/soc/codecs/audio-gpio-amp.c

-- 
2.53.0




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds