Index: firmware/export/as3514.h =================================================================== --- firmware/export/as3514.h (revision 26869) +++ firmware/export/as3514.h (working copy) @@ -120,7 +120,7 @@ #define AS3514_UID_0 0x30 /* Headphone volume goes from -73.5 ... +6dB */ -#define VOLUME_MIN -735 +#define VOLUME_MIN -810 #define VOLUME_MAX 60 /*** Audio Registers ***/ Index: firmware/drivers/audio/as3514.c =================================================================== --- firmware/drivers/audio/as3514.c (revision 26869) +++ firmware/drivers/audio/as3514.c (working copy) @@ -117,8 +117,8 @@ /* +6 to -73.5dB in 1.5dB steps == 53 levels */ if (db < VOLUME_MIN) { return 0x0; - } else if (db >= VOLUME_MAX) { - return 0x35; + } else if (db > VOLUME_MAX) { + return 0x4a; } else { return((db-VOLUME_MIN)/15); /* VOLUME_MIN is negative */ } @@ -252,6 +252,25 @@ /* We combine the mixer channel volume range with the headphone volume range - keep first stage as loud as possible */ + +#if CONFIG_CPU == AS3525v2 /*AS3543 mixer can go a little louder*/ + + if (vol_r <= 0x1b) { + mix_r = vol_r; + hph_r = 0; + } else { + mix_r = 0x1b; + hph_r = vol_r - 0x1b; + } + + if (vol_l <= 0x1b) { + mix_l = vol_l; + hph_l = 0; + } else { + mix_l = 0x1b; + hph_l = vol_l - 0x1b; + } +#else /* lets leave the AS3514 alone*/ if (vol_r <= 0x16) { mix_r = vol_r; hph_r = 0; @@ -266,7 +285,8 @@ } else { mix_l = 0x16; hph_l = vol_l - 0x16; - } + } +#endif as3514_write_masked(AS3514_DAC_R, mix_r, AS3514_VOL_MASK); as3514_write_masked(AS3514_DAC_L, mix_l, AS3514_VOL_MASK);