Skip to contentSkip to conversation

ASoC: max98396: add amplifier driver

PATCH Superseded Ryan Lee 3 participants 4 messages Apr 23, 2022 – Apr 26, 2022

Subsystems (2)
lore
Share & tools
lore

Ryan Lee

author
#0 lore raw

PATCH v3 2/2 ASoC: max98396: add amplifier driver

This series of patches adds support for Analog Devices MAX98396 mono amplifier with IV sense. The device provides a PCM interface for audio data and a standard I2C interface for control data communication. This driver also supports MAX98397 which is a variant of MAX98396 with wide input supply range.

---
Changes from v1:
: Fixed DAI format configuration issue. BCLK/FRSYNC polarity configuration was inappropriate.
: max98396_mux_put function return 1 if the value changed. Otherwise the function return 0 or -EINVAL;
: Modified wrong amp POR(Power On Register) value in max98396_reg.
Changes from v2:
: Fixed build warnings reported by kernel test robot.
uninitialized variable 'update' was used.

 sound/soc/codecs/Kconfig    |   10 +
 sound/soc/codecs/Makefile   |    2 +
 sound/soc/codecs/max98396.c | 1636 +++++++++++++++++++++++++++++++++++
 sound/soc/codecs/max98396.h |  305 +++++++
 4 files changed, 1953 insertions(+)
 create mode 100644 sound/soc/codecs/max98396.c
 create mode 100644 sound/soc/codecs/max98396.h
sound/soc/codecs/Kconfig +10 -0
index f46a22660103..7881e6120dea 100644
@@ -127,6 +127,7 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_MAX98373_I2C
 	imply SND_SOC_MAX98373_SDW
 	imply SND_SOC_MAX98390
+	imply SND_SOC_MAX98396
 	imply SND_SOC_MAX9850
 	imply SND_SOC_MAX9860
 	imply SND_SOC_MAX9759
@@ -1015,6 +1016,15 @@ config SND_SOC_MAX98390
 	tristate "Maxim Integrated MAX98390 Speaker Amplifier"
 	depends on I2C
 
+config SND_SOC_MAX98396
+	tristate "Analog Devices MAX98396 Speaker Amplifier"
+	depends on I2C
+	help
+	  Enable support for Analog Devices MAX98396 audio
+	  amplifier. The device provides a PCM interface for
+	  audio data and a standard I2C interface for control
+	  data communication.
+
 config SND_SOC_MAX9850
 	tristate
 	depends on I2C
sound/soc/codecs/Makefile +2 -0
index 8637e9e869e3..8bfe32cbcb06 100644
@@ -135,6 +135,7 @@ snd-soc-max98373-objs := max98373.o
 snd-soc-max98373-i2c-objs := max98373-i2c.o
 snd-soc-max98373-sdw-objs := max98373-sdw.o
 snd-soc-max98390-objs := max98390.o
+snd-soc-max98396-objs := max98396.o
 snd-soc-max9850-objs := max9850.o
 snd-soc-max9860-objs := max9860.o
 snd-soc-mc13783-objs := mc13783.o
@@ -474,6 +475,7 @@ obj-$(CONFIG_SND_SOC_MAX98373)	+= snd-soc-max98373.o
 obj-$(CONFIG_SND_SOC_MAX98373_I2C)   += snd-soc-max98373-i2c.o
 obj-$(CONFIG_SND_SOC_MAX98373_SDW)   += snd-soc-max98373-sdw.o
 obj-$(CONFIG_SND_SOC_MAX98390)	+= snd-soc-max98390.o
+obj-$(CONFIG_SND_SOC_MAX98396)	+= snd-soc-max98396.o
 obj-$(CONFIG_SND_SOC_MAX9850)	+= snd-soc-max9850.o
 obj-$(CONFIG_SND_SOC_MAX9860)	+= snd-soc-max9860.o
 obj-$(CONFIG_SND_SOC_MC13783)	+= snd-soc-mc13783.o
sound/soc/codecs/max98396.c new file +1636 -0

1,636 lines not on this page · raw message

sound/soc/codecs/max98396.h new file +305 -0

305 lines not on this page · raw message

Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 5 lines · Ryan Lee

This series of patches adds support for Analog Devices MAX98396 mono amplifier with IV sense. The device provides a PCM interface for audio data and a standard I2C interface for control data communication. This driver also supports MAX98397 which is a variant of MAX98396 with wide input supply range.

I'm missing patch 1 with the DT bindings?

#2 lore raw
Quoted 21 lines

-----Original Message-----
From: Mark Brown <[email protected]>
Sent: Monday, April 25, 2022 5:31 AM
To: Ryan Lee <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Lee, RyanS <[email protected]>; kernel test robot <[email protected]>
Subject: Re: [PATCH V3 2/2] ASoC: max98396: add amplifier driver

[External]

Quoted 1 line · Ryan Lee

This series of patches adds support for Analog Devices MAX98396

mono

Quoted 1 line

amplifier with IV sense. The device provides a PCM interface for

Quoted 8 lines

audio

Quoted 1 line

data and a standard I2C interface for control data communication.

This

Quoted 1 line

driver also supports MAX98397 which is a variant of MAX98396 with

wide

Quoted 1 line

input supply range.

I'm missing patch 1 with the DT bindings?

My apology. The patch 1 about the DT bindings was not sent. Sending the patch 1. Thank you.

maintainer
#3 lore raw
In reply to Ryan Lee
Quoted 8 lines · Ryan Lee

This series of patches adds support for Analog Devices MAX98396 mono amplifier with IV sense. The device provides a PCM interface for audio data and a standard I2C interface for control data communication. This driver also supports MAX98397 which is a variant of MAX98396 with wide input supply range.

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[2/2] ASoC: max98396: add amplifier driver

      commit: b58581136770569d2ee4300b10c7c0d76bb86250

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark