devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/5] ASoC: wm8904: Add DMIC and DRC support
@ 2025-02-06 16:31 Francesco Dolcini
  2025-02-06 16:31 ` [PATCH v1 1/5] of: Add of_property_read_u16_index Francesco Dolcini
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Francesco Dolcini @ 2025-02-06 16:31 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Saravana Kannan, Jaroslav Kysela, Takashi Iwai,
	patches
  Cc: Francesco Dolcini, linux-sound, devicetree, linux-kernel

From: Francesco Dolcini <francesco.dolcini@toradex.com>

This patch series adds DMIC and DRC support to the WM8904 driver, a new
of_ helper is added to simplify the driver code.

DRC functionality is added in the same patch series to provide the
necessary dynamic range control to make DMIC support useful.

The WM8904 supports digital microphones on two of its inputs:
IN1L/DMICDAT1 and IN1R/DMICDAT2. These two inputs can either be
connected to an ADC or to the DMIC system. There is an ADC for each
line, and only one DMIC block. This DMIC block is either connected to
DMICDAT1 or to DMICDAT2. One DMIC data line supports two digital
microphones via time multiplexing.

The pin's functionality is decided during hardware design (IN1L vs
DMICDAT1 and IN1R vs DMICDAT2). This is reflected in the Device Tree.

If one line is analog and one is DMIC, we need to be able to switch
between ADC and DMIC at runtime. The DMIC source is known from the
Device Tree. If both are DMIC inputs, we need to be able to switch the
DMIC source. There is no need to switch between ADC and DMIC at runtime.

Therefore, kcontrols are dynamically added by the driver depending on
its Device Tree configuration.

This is a heavy rework of a previous patch series provided by Alifer
Moraes and Pierluigi Passaro,
https://lore.kernel.org/lkml/20220307141041.27538-1-alifer.m@variscite.com.

Ernest Van Hoecke (5):
  of: Add of_property_read_u16_index
  ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF
  ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support
  ASoC: wm8904: get platform data from DT
  ASoC: wm8904: add DMIC support

 .../devicetree/bindings/sound/wlf,wm8904.yaml |  88 ++++++
 drivers/of/property.c                         |  33 +++
 include/linux/of.h                            |   9 +
 include/sound/wm8904.h                        |   3 +
 sound/soc/codecs/wm8904.c                     | 274 +++++++++++++++++-
 5 files changed, 403 insertions(+), 4 deletions(-)

-- 
2.39.5


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

end of thread, other threads:[~2025-02-17 10:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 16:31 [PATCH v1 0/5] ASoC: wm8904: Add DMIC and DRC support Francesco Dolcini
2025-02-06 16:31 ` [PATCH v1 1/5] of: Add of_property_read_u16_index Francesco Dolcini
2025-02-11 22:08   ` Rob Herring (Arm)
2025-02-17  9:55   ` Charles Keepax
2025-02-06 16:31 ` [PATCH v1 2/5] ASoC: wm8904: Don't touch GPIO configs set to 0xFFFF Francesco Dolcini
2025-02-17  9:57   ` Charles Keepax
2025-02-06 16:31 ` [PATCH v1 3/5] ASoC: dt-bindings: wm8904: Add DMIC, GPIO, MIC and EQ support Francesco Dolcini
2025-02-11 22:19   ` Rob Herring
2025-02-11 22:31     ` Mark Brown
2025-02-17 10:05   ` Charles Keepax
2025-02-06 16:31 ` [PATCH v1 4/5] ASoC: wm8904: get platform data from DT Francesco Dolcini
2025-02-17 10:07   ` Charles Keepax
2025-02-06 16:31 ` [PATCH v1 5/5] ASoC: wm8904: add DMIC support Francesco Dolcini
2025-02-17 10:44   ` Charles Keepax

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).