support either TAS2764 or TAS2780 from TI-yaml
PATCH v2 1/2 support either TAS2764 or TAS2780 from TI-yaml
---
.../sound/{tas2764.yaml => tas27xx.yaml} | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
rename Documentation/devicetree/bindings/sound/{tas2764.yaml => tas27xx.yaml} (72%)Documentation/devicetree/bindings/sound/tas27xx.yaml renamed from Documentation/devicetree/bindings/sound/tas2764.yaml +10 -8
@@ -1,25 +1,27 @@ # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -# Copyright (C) 2020 Texas Instruments Incorporated +# Copyright (C) 2020-2022 Texas Instruments Incorporated %YAML 1.2 --- -$id: "http://devicetree.org/schemas/sound/tas2764.yaml#" +$id: "http://devicetree.org/schemas/sound/tas27xx.yaml#" $schema: "http://devicetree.org/meta-schemas/core.yaml#" -title: Texas Instruments TAS2764 Smart PA +title: Texas Instruments TAS2764/TAS2780 Smart PA maintainers: - - Dan Murphy <[email protected]> + - Shenghao Ding <[email protected]> description: | - The TAS2764 is a mono, digital input Class-D audio amplifier optimized for - efficiently driving high peak power into small loudspeakers. - Integrated speaker voltage and current sense provides for - real time monitoring of loudspeaker behavior. + The TAS2764/TAS2780 is a mono, digital input Class-D audio amplifier + optimized for efficiently driving high peak power into small + loudspeakers. Integrated speaker voltage and current sense provides + for real time monitoring of loudspeaker behavior. properties: compatible: enum: - ti,tas2764 + or + - ti,tas2780 reg: maxItems: 1
Signature · 1 line
2.35.1
PATCH v2 2/2 support either TAS2764 or TAS2780 device from TI
---
sound/soc/codecs/Kconfig | 13 +-
sound/soc/codecs/Makefile | 4 +-
sound/soc/codecs/tas2764.c | 688 -----------------
sound/soc/codecs/tas27xx.c | 861 ++++++++++++++++++++++
sound/soc/codecs/{tas2764.h => tas27xx.h} | 27 +-
5 files changed, 890 insertions(+), 703 deletions(-)
delete mode 100644 sound/soc/codecs/tas2764.c
create mode 100644 sound/soc/codecs/tas27xx.c
rename sound/soc/codecs/{tas2764.h => tas27xx.h} (81%)sound/soc/codecs/Kconfig +8 -5
@@ -212,8 +212,8 @@ config SND_SOC_ALL_CODECS imply SND_SOC_STI_SAS imply SND_SOC_TAS2552 imply SND_SOC_TAS2562 - imply SND_SOC_TAS2764 imply SND_SOC_TAS2770 + imply SND_SOC_TAS27XX imply SND_SOC_TAS5086 imply SND_SOC_TAS571X imply SND_SOC_TAS5720
@@ -1459,14 +1459,17 @@ config SND_SOC_TAS2562 tristate "Texas Instruments TAS2562 Mono Audio amplifier" depends on I2C -config SND_SOC_TAS2764 - tristate "Texas Instruments TAS2764 Mono Audio amplifier" - depends on I2C - config SND_SOC_TAS2770 tristate "Texas Instruments TAS2770 speaker amplifier" depends on I2C +config SND_SOC_TAS27XX + tristate "Texas Instruments TAS27xx speaker amplifier" + depends on I2C + help + Enable support for Texas Instruments TAS2764 and TAS2780 + power amplifiers + config SND_SOC_TAS5086 tristate "Texas Instruments TAS5086 speaker amplifier" depends on I2C
sound/soc/codecs/Makefile +2 -2
@@ -334,7 +334,7 @@ snd-soc-simple-amplifier-objs := simple-amplifier.o snd-soc-tpa6130a2-objs := tpa6130a2.o snd-soc-tas2552-objs := tas2552.o snd-soc-tas2562-objs := tas2562.o -snd-soc-tas2764-objs := tas2764.o +snd-soc-tas27xx-objs := tas27xx.o # Mux snd-soc-simple-mux-objs := simple-mux.o
@@ -570,7 +570,7 @@ obj-$(CONFIG_SND_SOC_STAC9766) += snd-soc-stac9766.o obj-$(CONFIG_SND_SOC_STI_SAS) += snd-soc-sti-sas.o 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_TAS27XX) += snd-soc-tas27xx.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
sound/soc/codecs/tas2764.c deleted +0 -688
688 lines not on this page · raw message
sound/soc/codecs/tas27xx.c new file +861 -0
861 lines not on this page · raw message
sound/soc/codecs/tas27xx.h renamed from sound/soc/codecs/tas2764.h +19 -8
@@ -1,18 +1,20 @@/* SPDX-License-Identifier: GPL-2.0-only */ /* -* tas2764.h - ALSA SoC Texas Instruments TAS2764 Mono Audio Amplifier +* tas27xx.h - ALSA SoC Texas Instruments TAS2764/TAS2780 +* Mono Audio Amplifier * -* Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com +* Copyright (C) 2022 Texas Instruments Incorporated - +* https://www.ti.com * -* Author: Dan Murphy <[email protected]> +* Author: */ -#ifndef __TAS2764__ -#define __TAS2764__ +#ifndef __TAS27XX__H_ +#define __TAS27XX__H_/* Book Control Register */ -#define TAS2764_BOOKCTL_PAGE 0 -#define TAS2764_BOOKCTL_REG 127 +#define TAS27XX_BOOKCTL_PAGE 0 +#define TAS27XX_BOOKCTL_REG 127#define TAS2764_REG (page, reg) ((page * 128) + reg)/* Page */
@@ -77,6 +79,10 @@#define TAS2764_TDM_CFG3_RXS_SHIFT 0x4#define TAS2764_TDM_CFG3_MASK GENMASK(3, 0) +/* TDM Configuration Reg4 */ +#define TAS2764_TDM_CFG4 TAS2764_REG(0X0, 0x0d) +#define TAS2764_TDM_CFG4_TX_OFFSET_MASK GENMASK(3, 1) +/* TDM Configuration Reg5 */ #define TAS2764_TDM_CFG5 TAS2764_REG(0X0, 0x0e)#define TAS2764_TDM_CFG5_VSNS_MASK BIT(6)
@@ -89,4 +95,9 @@#define TAS2764_TDM_CFG6_ISNS_ENABLE BIT(6)#define TAS2764_TDM_CFG6_50_MASK GENMASK(5, 0) -#endif /* __TAS2764__ */ +/* INT&CLK CFG */ +#define TAS27XX_CLK_CFG TAS2764_REG(0X0, 0x5c) +#define TAS27XX_CLK_CFG_MASK GENMASK(7, 6) +#define TAS27XX_CLK_CFG_ENABLE (BIT(7) | BIT(6)) + +#endif /* __TAS27XX__H_ */
Signature · 1 line
2.35.1
Mark Brown
maintainerRe: [PATCH v2 2/2] support either TAS2764 or TAS2780 device from TI
Quoted 8 lines · Raphael-Xu
Signed-off-by Raphael-Xu <[email protected]>--- sound/soc/codecs/Kconfig | 13 +- sound/soc/codecs/Makefile | 4 +- sound/soc/codecs/tas2764.c | 688 ----------------- sound/soc/codecs/tas27xx.c | 861 ++++++++++++++++++++++ sound/soc/codecs/{tas2764.h => tas27xx.h} | 27 +- 5 files changed, 890 insertions(+), 703 deletions(-)
Can you please respin this with a separate patch *just* doing the file renames? git format-patch noticed that the header was a rename but it didn't manage to figure that out for the main driver file which makes it much harder to review what's actually changed underneath the rename.
RE: [EXTERNAL] Re: [PATCH v2 2/2] support either TAS2764 or TAS2780 device from TI
Hi Mark,
Just submit new patch which only rename the files as your suggestion.Please check the new patchs,thanks.
Regards
Raphael
-----Original Message-----
From: Mark Brown <[email protected]>
Sent: Monday, March 21, 2022 8:40 PM
To: Raphael-Xu <[email protected]>
Cc: [email protected]; Xu, Yang <[email protected]>; Ding, Shenghao <[email protected]>; Navada Kanyana, Mukund <[email protected]>
Subject: [EXTERNAL] Re: [PATCH v2 2/2] support either TAS2764 or TAS2780 device from TI
Quoted 8 lines · Raphael-Xu
Signed-off-by Raphael-Xu <[email protected]>--- sound/soc/codecs/Kconfig | 13 +- sound/soc/codecs/Makefile | 4 +- sound/soc/codecs/tas2764.c | 688 ----------------- sound/soc/codecs/tas27xx.c | 861 ++++++++++++++++++++++ sound/soc/codecs/{tas2764.h => tas27xx.h} | 27 +- 5 files changed, 890 insertions(+), 703 deletions(-)
Can you please respin this with a separate patch *just* doing the file renames? git format-patch noticed that the header was a rename but it didn't manage to figure that out for the main driver file which makes it much harder to review what's actually changed underneath the rename.