Hi Shenghao,
On Sun, Mar 26, 2023 at 10:34:19PM +0800, Shenghao Ding wrote:
+config SND_SOC_TAS2781
- tristate "Texas Instruments TAS2781 speaker amplifier"
- depends on I2C
- select REGMAP_I2C
- select CRC8
- help
Enable support for Texas Instruments TAS2781 Smart Amplifier
Digital input mono Class-D and DSP-inside audio power amplifiers.
Note the TAS2781 driver implements a flexible and configurable
algo coff setting, for one, two, even multiple TAS2781 chips.
You changed coff->coefficient below as suggested by Pierre-Louis Bossart but you forgot to change it here, and this will surely perplex people when configuring the kernel.
config SND_SOC_TAS5086 tristate "Texas Instruments TAS5086 speaker amplifier" depends on I2C diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index f1ca18f7946c..5559b9e9cc17 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile @@ -262,6 +262,7 @@ snd-soc-tas5805m-objs := tas5805m.o snd-soc-tas6424-objs := tas6424.o snd-soc-tda7419-objs := tda7419.o snd-soc-tas2770-objs := tas2770.o +snd-soc-tas2781-objs := tas2781-i2c.o tas2781-dsp.o snd-soc-tfa9879-objs := tfa9879.o snd-soc-tfa989x-objs := tfa989x.o snd-soc-tlv320adc3xxx-objs := tlv320adc3xxx.o @@ -619,6 +620,7 @@ obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.o obj-$(CONFIG_SND_SOC_TAS2562) += snd-soc-tas2562.o obj-$(CONFIG_SND_SOC_TAS2764) += snd-soc-tas2764.o obj-$(CONFIG_SND_SOC_TAS2780) += snd-soc-tas2780.o +obj-$(CONFIG_SND_SOC_TAS2781) += snd-soc-tas2781.o obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o diff --git a/sound/soc/codecs/tas2781-dsp.c b/sound/soc/codecs/tas2781-dsp.c new file mode 100644 index 000000000000..6a0e9fb5e20f --- /dev/null +++ b/sound/soc/codecs/tas2781-dsp.c @@ -0,0 +1,2232 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier +// +// Copyright (C) 2022 - 2023 Texas Instruments Incorporated +// https://www.ti.com +// +// The TAS2781 driver implements a flexible and configurable +// algo coefficient setting for one, two, or even multiple +// TAS2781 chips.
Here it is OK.
Thanks, Geraldo Nascimento