[alsa-devel] [PATCH v2 04/16] ASoC: twl6040: Set default gains to minimun value
From: Jorge Eduardo Candelaria jorge.candelaria@ti.com
Updated default values to improve power consumption.
Signed-off-by: Jorge Eduardo Candelaria jorge.candelaria@ti.com Signed-off-by: Margarita Olaya Cabrera magi.olaya@ti.com --- sound/soc/codecs/twl6040.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index b575fd3..27d6d53 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -86,19 +86,19 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = { 0x1B, /* TWL6040_LINEGAIN 0x0F */ 0x00, /* TWL6040_HSLCTL 0x10 */ 0x00, /* TWL6040_HSRCTL 0x11 */ - 0x00, /* TWL6040_HSGAIN 0x12 */ - 0x00, /* TWL6040_EARCTL 0x13 */ + 0xFF, /* TWL6040_HSGAIN 0x12 */ + 0x1E, /* TWL6040_EARCTL 0x13 */ 0x00, /* TWL6040_HFLCTL 0x14 */ - 0x00, /* TWL6040_HFLGAIN 0x15 */ + 0x1D, /* TWL6040_HFLGAIN 0x15 */ 0x00, /* TWL6040_HFRCTL 0x16 */ - 0x00, /* TWL6040_HFRGAIN 0x17 */ + 0x1D, /* TWL6040_HFRGAIN 0x17 */ 0x00, /* TWL6040_VIBCTLL 0x18 */ 0x00, /* TWL6040_VIBDATL 0x19 */ 0x00, /* TWL6040_VIBCTLR 0x1A */ 0x00, /* TWL6040_VIBDATR 0x1B */ 0x00, /* TWL6040_HKCTL1 0x1C */ 0x00, /* TWL6040_HKCTL2 0x1D */ - 0x00, /* TWL6040_GPOCTL 0x1E */ + 0x02, /* TWL6040_GPOCTL 0x1E */ 0x00, /* TWL6040_ALB 0x1F */ 0x00, /* TWL6040_DLB 0x20 */ 0x00, /* not used 0x21 */
On Fri, Dec 10, 2010 at 09:05:35PM -0600, Olaya, Margarita wrote:
From: Jorge Eduardo Candelaria jorge.candelaria@ti.com
Updated default values to improve power consumption.
Signed-off-by: Jorge Eduardo Candelaria jorge.candelaria@ti.com Signed-off-by: Margarita Olaya Cabrera magi.olaya@ti.com
It'd be much more idiomatic to do this by having writes in the driver startup path and adding comments to explain why the defaults are being changed. Altering the table with no explanation in the code means that someone could quite easily come along later and correct the values back to the actual chip defaults, and means that someone could get surprised if they write code which assumes these are the actual chip defaults later on.
participants (2)
-
Mark Brown
-
Olaya, Margarita