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
This commit is contained in:
Rafaël Carré 2010-05-07 20:58:43 +00:00
parent 7a994c1e7d
commit 7831a23376
2 changed files with 8 additions and 1 deletions

View file

@ -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
*/

View file

@ -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)