summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-12-25 18:23:10 +0000
committerThomas Martitz <kugel@rockbox.org>2011-12-25 18:23:10 +0000
commit1dcc834e5954cfd662e501565d265c3d0c8d9cae (patch)
treee5792fc03016b10d610dc37b030459901c53cadb
parente650992d204549ffa3f4b0507e81b5997bbaf889 (diff)
downloadrockbox-1dcc834e5954cfd662e501565d265c3d0c8d9cae.tar.gz
rockbox-1dcc834e5954cfd662e501565d265c3d0c8d9cae.zip
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
-rw-r--r--firmware/drivers/audio/as3514.c15
-rw-r--r--firmware/export/as3514.h5
2 files changed, 0 insertions, 20 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index a430afdf88..f07ee80d3c 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -284,14 +284,9 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
284#if CONFIG_CPU == AS3525v2 284#if CONFIG_CPU == AS3525v2
285#define MIXER_MAX_VOLUME 0x1b 285#define MIXER_MAX_VOLUME 0x1b
286#else /* lets leave the AS3514 alone until its better tested*/ 286#else /* lets leave the AS3514 alone until its better tested*/
287#ifdef SAMSUNG_YPR0
288#define MIXER_MAX_VOLUME 0x1a
289#else
290#define MIXER_MAX_VOLUME 0x16 287#define MIXER_MAX_VOLUME 0x16
291#endif 288#endif
292#endif
293 289
294#ifndef SAMSUNG_YPR0
295 if (vol_r <= MIXER_MAX_VOLUME) { 290 if (vol_r <= MIXER_MAX_VOLUME) {
296 mix_r = vol_r; 291 mix_r = vol_r;
297 hph_r = 0; 292 hph_r = 0;
@@ -307,16 +302,6 @@ void audiohw_set_master_vol(int vol_l, int vol_r)
307 mix_l = MIXER_MAX_VOLUME; 302 mix_l = MIXER_MAX_VOLUME;
308 hph_l = vol_l - MIXER_MAX_VOLUME; 303 hph_l = vol_l - MIXER_MAX_VOLUME;
309 } 304 }
310#else
311/* Okay. This is shit coded indeed. It is just a test.
312 Some considerations: Samsung keeps DAC constantly to 0x1a volume. It modifies only the headphone amp volume
313*/
314
315 mix_r = 0x1a;
316 mix_l = 0x1a;
317 hph_l = vol_l;
318 hph_r = vol_r;
319#endif
320 305
321 as3514_write_masked(AS3514_DAC_R, mix_r, AS3514_VOL_MASK); 306 as3514_write_masked(AS3514_DAC_R, mix_r, AS3514_VOL_MASK);
322 as3514_write_masked(AS3514_DAC_L, mix_l, AS3514_VOL_MASK); 307 as3514_write_masked(AS3514_DAC_L, mix_l, AS3514_VOL_MASK);
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index bcdb1a78c6..acf13444fa 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -131,14 +131,9 @@ extern void audiohw_set_sampr_dividers(int fsel);
131/* Headphone volume goes from -81.0 ... +6dB */ 131/* Headphone volume goes from -81.0 ... +6dB */
132#define VOLUME_MIN -810 132#define VOLUME_MIN -810
133#else 133#else
134#ifdef SAMSUNG_YPR0
135/* Headphone volume goes from -40.5 ... +6dB */
136#define VOLUME_MIN -405
137#else
138/* Headphone volume goes from -73.5 ... +6dB */ 134/* Headphone volume goes from -73.5 ... +6dB */
139#define VOLUME_MIN -735 135#define VOLUME_MIN -735
140#endif 136#endif
141#endif
142#define VOLUME_MAX 60 137#define VOLUME_MAX 60
143 138
144/*** Audio Registers ***/ 139/*** Audio Registers ***/