1
0
Fork 0
forked from len0rd/rockbox

ypr0: Remove last #ifdef in as3514.

It's now using completely the same driver as Sansa daps.
This also increases the volume range.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31428 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-12-25 18:23:10 +00:00
parent e650992d20
commit 1dcc834e59
2 changed files with 0 additions and 20 deletions

View file

@ -284,14 +284,9 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
#if CONFIG_CPU == AS3525v2 #if CONFIG_CPU == AS3525v2
#define MIXER_MAX_VOLUME 0x1b #define MIXER_MAX_VOLUME 0x1b
#else /* lets leave the AS3514 alone until its better tested*/ #else /* lets leave the AS3514 alone until its better tested*/
#ifdef SAMSUNG_YPR0
#define MIXER_MAX_VOLUME 0x1a
#else
#define MIXER_MAX_VOLUME 0x16 #define MIXER_MAX_VOLUME 0x16
#endif #endif
#endif
#ifndef SAMSUNG_YPR0
if (vol_r <= MIXER_MAX_VOLUME) { if (vol_r <= MIXER_MAX_VOLUME) {
mix_r = vol_r; mix_r = vol_r;
hph_r = 0; hph_r = 0;
@ -307,16 +302,6 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
mix_l = MIXER_MAX_VOLUME; mix_l = MIXER_MAX_VOLUME;
hph_l = vol_l - MIXER_MAX_VOLUME; hph_l = vol_l - MIXER_MAX_VOLUME;
} }
#else
/* Okay. This is shit coded indeed. It is just a test.
Some considerations: Samsung keeps DAC constantly to 0x1a volume. It modifies only the headphone amp volume
*/
mix_r = 0x1a;
mix_l = 0x1a;
hph_l = vol_l;
hph_r = vol_r;
#endif
as3514_write_masked(AS3514_DAC_R, mix_r, AS3514_VOL_MASK); as3514_write_masked(AS3514_DAC_R, mix_r, AS3514_VOL_MASK);
as3514_write_masked(AS3514_DAC_L, mix_l, AS3514_VOL_MASK); as3514_write_masked(AS3514_DAC_L, mix_l, AS3514_VOL_MASK);

View file

@ -131,14 +131,9 @@ extern void audiohw_set_sampr_dividers(int fsel);
/* Headphone volume goes from -81.0 ... +6dB */ /* Headphone volume goes from -81.0 ... +6dB */
#define VOLUME_MIN -810 #define VOLUME_MIN -810
#else #else
#ifdef SAMSUNG_YPR0
/* Headphone volume goes from -40.5 ... +6dB */
#define VOLUME_MIN -405
#else
/* Headphone volume goes from -73.5 ... +6dB */ /* Headphone volume goes from -73.5 ... +6dB */
#define VOLUME_MIN -735 #define VOLUME_MIN -735
#endif #endif
#endif
#define VOLUME_MAX 60 #define VOLUME_MAX 60
/*** Audio Registers ***/ /*** Audio Registers ***/