Skip to contentSkip to conversation

sound/soc: adds TAS5754M digital input amplifier component driver

PATCH Superseded [email protected] 2 participants 3 messages Oct 20, 2021 – Nov 7, 2021

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sound/soc: adds TAS5754M digital input amplifier component driver

From: Joerg Schambacher <[email protected]>

Adds a minimum component driver to run the amplifier in I2S master mode only from standard audio clocks. Therefore, it only allows 44.1, 88.2, 176.4, 48, 96 and 192ksps with 16, 20, 24 and 32 bits sample size. Digital volume control and the -6dB switch are supported.

---
 sound/soc/codecs/Kconfig    |   8 +
 sound/soc/codecs/Makefile   |   2 +
 sound/soc/codecs/tas5754m.c | 547 ++++++++++++++++++++++++++++++++++++
 sound/soc/codecs/tas5754m.h | 259 +++++++++++++++++
 4 files changed, 816 insertions(+)
 create mode 100644 sound/soc/codecs/tas5754m.c
 create mode 100644 sound/soc/codecs/tas5754m.h
sound/soc/codecs/Kconfig +8 -0
index 82ee233a269d..cf0584948fcf 100644
@@ -210,6 +210,7 @@ config SND_SOC_ALL_CODECS
 	imply SND_SOC_TAS5086
 	imply SND_SOC_TAS571X
 	imply SND_SOC_TAS5720
+	imply SND_SOC_TAS5754M
 	imply SND_SOC_TAS6424
 	imply SND_SOC_TDA7419
 	imply SND_SOC_TFA9879
@@ -1419,6 +1420,13 @@ config SND_SOC_TAS5720
 	  Enable support for Texas Instruments TAS5720L/M high-efficiency mono
 	  Class-D audio power amplifiers.
 
+config SND_SOC_TAS5754M
+	tristate "Texas Instruments TAS5754M Digital Input Audio amplifier"
+	depends on I2C
+	help
+	  Enable support for Texas Instruments TAS5754M digital input
+	  Class-D audio power amplifiers.
+
 config SND_SOC_TAS6424
 	tristate "Texas Instruments TAS6424 Quad-Channel Audio amplifier"
 	depends on I2C
sound/soc/codecs/Makefile +2 -0
index 8dcea2c4604a..39984900258a 100644
@@ -227,6 +227,7 @@ snd-soc-sti-sas-objs := sti-sas.o
 snd-soc-tas5086-objs := tas5086.o
 snd-soc-tas571x-objs := tas571x.o
 snd-soc-tas5720-objs := tas5720.o
+snd-soc-tas5754m-objs := tas5754m.o
 snd-soc-tas6424-objs := tas6424.o
 snd-soc-tda7419-objs := tda7419.o
 snd-soc-tas2770-objs := tas2770.o
@@ -555,6 +556,7 @@ obj-$(CONFIG_SND_SOC_TAS2764)	+= snd-soc-tas2764.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
+obj-$(CONFIG_SND_SOC_TAS5754M)	+= snd-soc-tas5754m.o
 obj-$(CONFIG_SND_SOC_TAS6424)	+= snd-soc-tas6424.o
 obj-$(CONFIG_SND_SOC_TDA7419)	+= snd-soc-tda7419.o
 obj-$(CONFIG_SND_SOC_TAS2770) += snd-soc-tas2770.o
sound/soc/codecs/tas5754m.c new file +547 -0

547 lines not on this page · raw message

sound/soc/codecs/tas5754m.h new file +259 -0

259 lines not on this page · raw message

Signature · 1 line
2.17.1
#1 lore raw
Thank you for the patch! Yet something to improve:

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next v5.15-rc7 next-20211026] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/joerg-hifiberry-com/sound-soc-adds-TAS5754M-digital-input-amplifier-component-driver/20211021-005304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: m68k-randconfig-r036-20211027 (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/b3b4cb09f53dfc0304e043665301b5c2f468a946
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review joerg-hifiberry-com/sound-soc-adds-TAS5754M-digital-input-amplifier-component-driver/20211021-005304 git checkout b3b4cb09f53dfc0304e043665301b5c2f468a946
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash sound/soc/codecs/

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> sound/soc/codecs/tas5754m.c:539:35: error: 'tas5754m_of_match' undeclared here (not in a function); did you mean 'tas5754m_mute'?
     539 |                 .of_match_table = tas5754m_of_match,
         |                                   ^~~~~~~~~~~~~~~~~
         |                                   tas5754m_mute

vim +539 sound/soc/codecs/tas5754m.c

532
533 static struct i2c_driver tas5754m_i2c_driver = {
534 .probe = tas5754m_i2c_probe,
535 .remove = tas5754m_i2c_remove,
536 .id_table = tas5754m_i2c_id,
537 .driver = {
538 .name = "tas5754m",

 > 539			.of_match_table = tas5754m_of_match,

540 },
541 };
542

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#2 lore raw
In reply to [email protected]
Thank you for the patch! Yet something to improve:

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on broonie-sound/for-next]
[also build test ERROR on tiwai-sound/for-next v5.15 next-20211106] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/joerg-hifiberry-com/sound-soc-adds-TAS5754M-digital-input-amplifier-component-driver/20211021-005304
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-randconfig-c001-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)

reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/b3b4cb09f53dfc0304e043665301b5c2f468a946
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review joerg-hifiberry-com/sound-soc-adds-TAS5754M-digital-input-amplifier-component-driver/20211021-005304 git checkout b3b4cb09f53dfc0304e043665301b5c2f468a946
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> sound/soc/codecs/tas5754m.c:539:21: error: use of undeclared identifier 'tas5754m_of_match'
                   .of_match_table = tas5754m_of_match,
                                     ^

1 error generated.

vim +/tas5754m_of_match +539 sound/soc/codecs/tas5754m.c

532
533 static struct i2c_driver tas5754m_i2c_driver = {
534 .probe = tas5754m_i2c_probe,
535 .remove = tas5754m_i2c_remove,
536 .id_table = tas5754m_i2c_id,
537 .driver = {
538 .name = "tas5754m",

 > 539			.of_match_table = tas5754m_of_match,

540 },
541 };
542

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org