public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/17] ASoC: Add support for GPIOs driven amplifiers
@ 2026-04-29  7:43 Herve Codina
  2026-04-29  7:43 ` [PATCH v2 01/17] of: Introduce of_property_read_s32_index() Herve Codina
                   ` (16 more replies)
  0 siblings, 17 replies; 20+ messages in thread
From: Herve Codina @ 2026-04-29  7:43 UTC (permalink / raw)
  To: Herve Codina, Bartosz Golaszewski, Linus Walleij, Liam Girdwood,
	Mark Brown, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Saravana Kannan, Jaroslav Kysela, Takashi Iwai
  Cc: linux-sound, linux-gpio, devicetree, linux-kernel,
	Christophe Leroy, Thomas Petazzoni

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.

Compared to previous iteration, this v2 series adds the gpio-ranges
device-tree property and removes no more needed properties. Also it
merges the previously proposed driver in the existing simple-amplifier
driver.

In order to ease the review, I choose to split modifications related
to the merge of the gpio-audio-amp part into the simple-amplfier driver
in several commits.

Best regards,
Hervé

Changes v1 -> v2
  v1: https://lore.kernel.org/all/20260330101610.57942-1-herve.codina@bootlin.com/

  Rebase on top of v7.1-rc1.

  Patch 1:
  - Add 'Acked-by: Rob Herring'

  Patch 2:
  - Use gpio-audio-amp-* instead of audio-gpio-amp
  - Introduce mono/stereo channel distinction with gpio-audio-amp-mono
    and gpio-audio-amp-stereo compatible strings (needed if the
    "simple-amplifier" compatible string is deprecated in the near
    future).
  - Reduce the maximum numbers of gpios used for gain setting to 16.
  - Use amplifier-N instead of amplifierN in examples
  - Introduce gpio-ranges property and remove the no more needed
    gpio-points and gpio-range properties

  Other patches (full rework):
  - Merge the new audio-gpio-amp driver provided in v1 into the
    existing simple-amplifier driver.
  - Slit modification in several commits.
  - Reduce the maximum number of gpios used for gain setting to 16.
  - Fix a memory leak in case of error in simple_amp_multi_add_kcontrol()
    (Reported by Shahiko).
  - Handle the new gpio-ranges property and drop the support for the no
    more needed properties (gpio-points and gpio-range).
  - Update author and copyright.

Herve Codina (17):
  of: Introduce of_property_read_s32_index()
  ASoC: dt-bindings: Add support for the GPIOs driven amplifier
  ASoC: simple-amplifier: Remove DRV_NAME defined value
  ASoC: simple-amplifier: Add missing headers
  ASoC: simple-amplifier: Remove CONFIG_OF flag and of_match_ptr()
  ASoC: simple-amplifier: Rename drv_event() function
  ASoC: simple-amplifier: Use 'simple_amp' variable name instead of
    'priv'
  ASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC
    component driver
  ASoC: simple-amplifier: Introduce support for gpio-audio-amp
  ASoC: simple-amplifier: gpio-audio-amp: Add support for extra power
    supplies
  ASoC: simple-amplifier: gpio-audio-amp: Add support for mute gpio
  ASoC: simple-amplifier: gpio-audio-amp: Add support for bypass gpio
  ASoC: simple-amplifier: gpio-audio-amp: Add support for basic gain
  ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-ranges
  ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-labels
  ASoC: simple-amplifier: Update author and copyright
  MAINTAINERS: Add the ASoC gpio audio amplifier entry

 .../bindings/sound/gpio-audio-amp.yaml        | 270 ++++++
 MAINTAINERS                                   |   7 +
 include/linux/of.h                            |   7 +
 sound/soc/codecs/simple-amplifier.c           | 907 +++++++++++++++++-
 4 files changed, 1165 insertions(+), 26 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/gpio-audio-amp.yaml

-- 
2.53.0


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

end of thread, other threads:[~2026-04-30  1:33 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29  7:43 [PATCH v2 00/17] ASoC: Add support for GPIOs driven amplifiers Herve Codina
2026-04-29  7:43 ` [PATCH v2 01/17] of: Introduce of_property_read_s32_index() Herve Codina
2026-04-29  7:43 ` [PATCH v2 02/17] ASoC: dt-bindings: Add support for the GPIOs driven amplifier Herve Codina
2026-04-29  7:43 ` [PATCH v2 03/17] ASoC: simple-amplifier: Remove DRV_NAME defined value Herve Codina
2026-04-29  7:43 ` [PATCH v2 04/17] ASoC: simple-amplifier: Add missing headers Herve Codina
2026-04-29  7:43 ` [PATCH v2 05/17] ASoC: simple-amplifier: Remove CONFIG_OF flag and of_match_ptr() Herve Codina
2026-04-29  7:43 ` [PATCH v2 06/17] ASoC: simple-amplifier: Rename drv_event() function Herve Codina
2026-04-29  7:43 ` [PATCH v2 07/17] ASoC: simple-amplifier: Use 'simple_amp' variable name instead of 'priv' Herve Codina
2026-04-29  7:43 ` [PATCH v2 08/17] ASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC component driver Herve Codina
2026-04-30  1:15   ` Mark Brown
2026-04-29  7:43 ` [PATCH v2 09/17] ASoC: simple-amplifier: Introduce support for gpio-audio-amp Herve Codina
2026-04-29  7:43 ` [PATCH v2 10/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for extra power supplies Herve Codina
2026-04-29  7:43 ` [PATCH v2 11/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for mute gpio Herve Codina
2026-04-29  7:43 ` [PATCH v2 12/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for bypass gpio Herve Codina
2026-04-29  7:43 ` [PATCH v2 13/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for basic gain Herve Codina
2026-04-29  7:43 ` [PATCH v2 14/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-ranges Herve Codina
2026-04-30  1:32   ` Mark Brown
2026-04-29  7:43 ` [PATCH v2 15/17] ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-labels Herve Codina
2026-04-29  7:43 ` [PATCH v2 16/17] ASoC: simple-amplifier: Update author and copyright Herve Codina
2026-04-29  7:43 ` [PATCH v2 17/17] MAINTAINERS: Add the ASoC gpio audio amplifier entry Herve Codina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox