Skip to content

Commit 4c5d146

Browse files
Sylwester Nawrockibroonie
authored andcommitted
ASoC: max98504: Add max98504 speaker amplifier driver
This patch adds driver for the MAX98504 speaker amplifier. The MAX98504 is a high efficiency mono class D amplifier that features an integrated boost converter with voltage and current sensing ADCs for Dynamic Speaker Management. This driver does not include support for the I2S DAI, as we wouldn't be able to test such code in a hardware configuration where the amplifier has only wired the analogue input. Signed-off-by: Inha Song <[email protected]> [k.kozlowski: rebased on 4.1] Signed-off-by: Krzysztof Kozlowski <[email protected]> [s.nawrocki: removed unused macro definitions, rewrote regulator supply related parts, rewrote regmap configuration code, added support for speaker enable and global chip enable through DAPM, rewritten as component driver, added PDM DAI definition and TDM callbacks for PDM channels configuration] Signed-off-by: Sylwester Nawrocki <[email protected]> -- Changes since v2: - added parsing of the VBAT brownout DT properties, - removed MAX98504_REG_SPEAKER_SOURCE_SELECT register initialization, - removed unused macro definitions. Changes since v1: - none. Changes since initial version: - added regulator supply handling, - added DAPM widges for speaker source selection, - added PDM DAI definition and TDM callbacks for setting up active PDM Tx channels and I/V sense ADC data mapping, - removed all optional DT properties, added regulator supply properties in the DT binding. Signed-off-by: Mark Brown <[email protected]>
1 parent 1a695a9 commit 4c5d146

File tree

4 files changed

+448
-0
lines changed

4 files changed

+448
-0
lines changed

sound/soc/codecs/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,10 @@ config SND_SOC_MAX98357A
535535
config SND_SOC_MAX98371
536536
tristate
537537

538+
config SND_SOC_MAX98504
539+
tristate "Maxim MAX98504 speaker amplifier"
540+
depends on I2C
541+
538542
config SND_SOC_MAX9867
539543
tristate
540544

sound/soc/codecs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ snd-soc-wm-hubs-objs := wm_hubs.o
208208

209209
# Amp
210210
snd-soc-max9877-objs := max9877.o
211+
snd-soc-max98504-objs := max98504.o
211212
snd-soc-tpa6130a2-objs := tpa6130a2.o
212213
snd-soc-tas2552-objs := tas2552.o
213214

@@ -419,4 +420,5 @@ obj-$(CONFIG_SND_SOC_WM_HUBS) += snd-soc-wm-hubs.o
419420

420421
# Amp
421422
obj-$(CONFIG_SND_SOC_MAX9877) += snd-soc-max9877.o
423+
obj-$(CONFIG_SND_SOC_MAX98504) += snd-soc-max98504.o
422424
obj-$(CONFIG_SND_SOC_TPA6130A2) += snd-soc-tpa6130a2.o

0 commit comments

Comments
 (0)