From 7831a23376d2316b09e74d9da3c8ab52deaa0024 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Fri, 7 May 2010 20:58:43 +0000 Subject: as3525v2: make sure volume is normal by writing Audioset2 register If the bit 6 is set volume is much lower, without writing it explicitely it is undefined. According to linux sources this bit is related to mixer. Initialize Audioset2 with low power 'hph' (probably headphones) quality, as I couldn't make a difference with 'high quality' setting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25890 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/as3514.c | 4 +++- firmware/export/as3514.h | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index f9e5fd333f..64fa7ac13c 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c @@ -173,7 +173,9 @@ void audiohw_preinit(void) /* Turn on SUM, DAC */ as3514_write(AS3514_AUDIOSET1, AUDIOSET1_DAC_on | AUDIOSET1_SUM_on); -#ifndef HAVE_AS3543 +#ifdef HAVE_AS3543 + as3514_write(AS3514_AUDIOSET2, AUDIOSET2_HPH_QUALITY_LOW_POWER); +#else /* Set BIAS on, DITH off, AGC off, IBR_DAC max reduction, LSP_LP on, IBR_LSP max reduction (50%), taken from c200v2 OF */ diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h index fac43c7b90..60f0e4c6d2 100644 --- a/firmware/export/as3514.h +++ b/firmware/export/as3514.h @@ -245,6 +245,10 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r); AUDIOSET1_LIN1_on | AUDIOSET1_LIN2_on /* AUDIOSET2 (15h) */ +#ifdef HAVE_AS3543 +#define AUDIOSET2_HPH_QUALITY_LOW_POWER (0x0 << 4) +#define AUDIOSET2_HPH_QUALITY_HIGH (0x1 << 4) +#else #define AUDIOSET2_BIAS_off (0x1 << 7) #define AUDIOSET2_DITH_off (0x1 << 6) #define AUDIOSET2_AGC_off (0x1 << 5) @@ -259,6 +263,7 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r); #define AUDIOSET2_IBR_LSP_17 (0x1 << 0) #define AUDIOSET2_IBR_LSP_34 (0x2 << 0) #define AUDIOSET2_IBR_LSP_50 (0x3 << 0) +#endif /* AUDIOSET3 (16h) */ #define AUDIOSET3_ZCU_off (0x1 << 2) -- cgit v1.2.3