summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShenghao Ding <shenghao-ding@ti.com>2025-05-18 21:24:51 +0800
committerMark Brown <broonie@kernel.org>2025-05-19 11:41:34 +0100
commite4dca67b2463e6abe775876c9cb049ea5b1c8e0d (patch)
tree96c9e360f7647dea91685727bd6faf89efe92f49
parent152c773fb4d200985705218e0314fbd7875a3292 (diff)
ASoC: tas2781: Header file cleanup and Move the macro definitions to fwlib
Drop the I2C in one comment, for these registers are also used in SPI driver; Move the macro definition of TASDEVICE_CMD_XXX from tas2781.h to tas2781_fmwlib.c, because the macros are only referenced in only fwlib. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250518132451.707-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/tas2781.h7
-rw-r--r--sound/soc/codecs/tas2781-fmwlib.c5
2 files changed, 6 insertions, 6 deletions
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 07ea38fba03b..2b3acd2fdff0 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -47,7 +47,7 @@
#define TASDEVICE_REG_SWRESET TASDEVICE_REG(0x0, 0x0, 0x01)
#define TASDEVICE_REG_SWRESET_RESET BIT(0)
-/* I2C Checksum */
+/* Checksum */
#define TASDEVICE_CHECKSUM_REG TASDEVICE_REG(0x0, 0x0, 0x7e)
/* XM_340 */
@@ -103,11 +103,6 @@
#define TAS2781_RUNTIME_RE_REG_TF TASDEVICE_REG(0x64, 0x62, 0x48)
#define TAS2781_RUNTIME_RE_REG TASDEVICE_REG(0x64, 0x63, 0x44)
-#define TASDEVICE_CMD_SING_W 0x1
-#define TASDEVICE_CMD_BURST 0x2
-#define TASDEVICE_CMD_DELAY 0x3
-#define TASDEVICE_CMD_FIELD_W 0x4
-
enum audio_device {
TAS2563,
TAS2781,
diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index 684d23e5905e..e0c095bc6b8a 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -50,6 +50,11 @@
#define TAS2781_YRAM5_START_REG TAS2781_YRAM3_START_REG
#define TAS2781_YRAM5_END_REG TAS2781_YRAM3_END_REG
+#define TASDEVICE_CMD_SING_W 0x1
+#define TASDEVICE_CMD_BURST 0x2
+#define TASDEVICE_CMD_DELAY 0x3
+#define TASDEVICE_CMD_FIELD_W 0x4
+
#define TASDEVICE_MAXPROGRAM_NUM_KERNEL 5
#define TASDEVICE_MAXCONFIG_NUM_KERNEL_MULTIPLE_AMPS 64
#define TASDEVICE_MAXCONFIG_NUM_KERNEL 10