summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-04-15 14:38:22 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-04-15 14:38:22 +0000
commit947eb50d6486f65db824d833b90801f9eabe6492 (patch)
tree422bd5a786164e2713ee290f1e12f136d6d639a0 /firmware
parent8a5ecc8eb4f97dcdb274f96de3364e9e9bf49f60 (diff)
downloadrockbox-947eb50d6486f65db824d833b90801f9eabe6492.tar.gz
rockbox-947eb50d6486f65db824d833b90801f9eabe6492.tar.bz2
rockbox-947eb50d6486f65db824d833b90801f9eabe6492.zip
adapt some values
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13167 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/as3514.c10
-rw-r--r--firmware/export/as3514.h6
-rw-r--r--firmware/sound.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/firmware/drivers/as3514.c b/firmware/drivers/as3514.c
index 455c2f3320..7b6704e630 100644
--- a/firmware/drivers/as3514.c
+++ b/firmware/drivers/as3514.c
@@ -47,11 +47,11 @@ static void as3514_write(int reg, int value)
/* convert tenth of dB volume to master volume register value */
int tenthdb2master(int db)
{
- /* +1..07 to -45.43dB in 1.5dB steps == 32 levels = 5 bits */
- /* 11111 == +1.07dB (0x1f) = 31) */
- /* 11110 == -0.43dB (0x1e) = 30) */
- /* 00001 == -43.93dB (0x01) */
- /* 00000 == -45.43dB (0x00) */
+ /* +6 to -45.43dB in 1.5dB steps == 32 levels = 5 bits */
+ /* 11111 == +6dB (0x1f) = 31) */
+ /* 11110 == -4.5dB (0x1e) = 30) */
+ /* 00001 == -39dB (0x01) */
+ /* 00000 == -40.5dB (0x00) */
if (db < VOLUME_MIN) {
return 0x0;
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index 14208bc414..e90a8f47ef 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -69,9 +69,9 @@ extern void audiohw_set_monitor(int enable);
#define ADC_0 0x2e
#define ADC_1 0x2f
-/* Headphone volume goes from -45.43 - 1.07dB */
-#define VOLUME_MIN -454
-#define VOLUME_MAX 10
+/* Headphone volume goes from -40.5 - 6dB */
+#define VOLUME_MIN -405
+#define VOLUME_MAX 60
#ifdef SANSA_E200
#define AS3514_I2C_ADDR 0x46
diff --git a/firmware/sound.c b/firmware/sound.c
index cb83927439..9835711b54 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -77,7 +77,7 @@ static const struct sound_settings_info sound_settings_table[] = {
#elif (CONFIG_CPU == PNX0101)
[SOUND_VOLUME] = {"dB", 0, 1, -48, 15, 0, sound_set_volume},
#elif defined(HAVE_AS3514)
- [SOUND_VOLUME] = {"dB", 0, 1, -45, 1, -25, sound_set_volume},
+ [SOUND_VOLUME] = {"dB", 0, 1, -40, 6, -25, sound_set_volume},
#else /* MAS3507D */
[SOUND_VOLUME] = {"dB", 0, 1, -78, 18, -18, sound_set_volume},
[SOUND_BASS] = {"dB", 0, 1, -15, 15, 7, sound_set_bass},