[PATCH] ASoC: tas571x: use symbolic register offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



convert the numeric register offsets in tas5711_reg_defaults to the defined constants TAS571X_* from tas571x.h
Tested with a tas5713 chip for which the driver works, too.

Signed-off-by: Hermann Lauer <Hermann.Lauer@xxxxxxxxxxxxxxxxxxxxx>

diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c
--- a/sound/soc/codecs/tas571x.c
+++ b/sound/soc/codecs/tas571x.c
@@ -424,13 +424,13 @@
 };
 
 static const struct reg_default tas5711_reg_defaults[] = {
-	{ 0x04, 0x05 },
-	{ 0x05, 0x40 },
-	{ 0x06, 0x00 },
-	{ 0x07, 0xff },
-	{ 0x08, 0x30 },
-	{ 0x09, 0x30 },
-	{ 0x1b, 0x82 },
+	{ TAS571X_SDI_REG,		0x05 },
+	{ TAS571X_SYS_CTRL_2_REG,	0x40 },
+	{ TAS571X_SOFT_MUTE_REG,	0x00 },
+	{ TAS571X_MVOL_REG,		0xff },
+	{ TAS571X_CH1_VOL_REG,		0x30 },
+	{ TAS571X_CH2_VOL_REG,		0x30 },
+	{ TAS571X_OSC_TRIM_REG,		0x82 },
 };
 
 static const struct regmap_config tas5711_regmap_config = {





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux