]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: wm8904: add DMIC support
authorErnest Van Hoecke <ernest.vanhoecke@toradex.com>
Wed, 19 Mar 2025 14:20:59 +0000 (15:20 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 20 Mar 2025 12:42:30 +0000 (12:42 +0000)
commitb6612c8fc3a2c279196050ecc13c77a7863d83eb
treeb481442f713ebc75dbf929e7a217209a163edaf9
parentafe66ef965317381fd2894c2eba144b38b791910
ASoC: wm8904: add DMIC support

The WM8904 codec supports both ADC and DMIC inputs.

Get input pin functionality from the platform data and add the necessary
controls depending on the possible additional routing.

The ADC and DMIC share the IN1L/DMICDAT1 and IN1R/DMICDAT2 pins.

This leads to a few scenarios requiring different DAPM routing:
- When both are connected to an analog input, only the ADC is used.
- When one line is a DMIC and the other an analog input, the DMIC source
  is set from the platform data and a mux is added to select whether to
  use the ADC or DMIC.
- When both are connected to a DMIC, another mux is added to this to
  select the DMIC source. Note that we still need to be able to select
  the ADC system for use with the IN2L, IN2R, IN3L and IN3R pins.

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250319142059.46692-6-francesco@dolcini.it
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8904.c