diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2008-04-28 22:15:52 +0000 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2008-04-28 22:15:52 +0000 |
commit | a6100fb5ee093ecc9b263c2c659c653d90eed585 (patch) | |
tree | def6575245c3563eb9c4c07375acd91827856517 | |
parent | 9c0abbf838d1d88c406dbf80c3b3f36fb7b76c39 (diff) | |
download | rockbox-a6100fb5ee093ecc9b263c2c659c653d90eed585.tar.gz rockbox-a6100fb5ee093ecc9b263c2c659c653d90eed585.zip |
undo some changes of my last patch... should fix wm8751 based targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17286 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/audio/wm8751.c | 2 | ||||
-rw-r--r-- | firmware/sound.c | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c index 26123456b6..831f16ab17 100644 --- a/firmware/drivers/audio/wm8751.c +++ b/firmware/drivers/audio/wm8751.c | |||
@@ -79,7 +79,7 @@ static int tone_tenthdb2hw(int value) | |||
79 | /* -6.0db..+0db..+9.0db step 1.5db - translate -60..+0..+90 step 15 | 79 | /* -6.0db..+0db..+9.0db step 1.5db - translate -60..+0..+90 step 15 |
80 | to 10..6..0 step -1. | 80 | to 10..6..0 step -1. |
81 | */ | 81 | */ |
82 | value = (10 - (value + 60) / 15) / 10; | 82 | value = 10 - (value + 60) / 15; |
83 | 83 | ||
84 | if (value == 6) | 84 | if (value == 6) |
85 | value = 0xf; /* 0db -> off */ | 85 | value = 0xf; /* 0db -> off */ |
diff --git a/firmware/sound.c b/firmware/sound.c index 325c42639a..97d4bc268c 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -35,6 +35,10 @@ | |||
35 | #endif | 35 | #endif |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* TODO | ||
39 | * find a nice way to handle 1.5db steps -> see wm8751 ifdef in sound_set_bass/treble | ||
40 | */ | ||
41 | |||
38 | #if !defined(VOLUME_MIN) && !defined(VOLUME_MAX) | 42 | #if !defined(VOLUME_MIN) && !defined(VOLUME_MAX) |
39 | #warning define for VOLUME_MIN and VOLUME_MAX is missing | 43 | #warning define for VOLUME_MIN and VOLUME_MAX is missing |
40 | #define VOLUME_MIN -400 | 44 | #define VOLUME_MIN -400 |
@@ -370,7 +374,11 @@ void sound_set_bass(int value) | |||
370 | #endif | 374 | #endif |
371 | 375 | ||
372 | #if (CONFIG_CODEC != MAS3587F) && (CONFIG_CODEC != MAS3539F) | 376 | #if (CONFIG_CODEC != MAS3587F) && (CONFIG_CODEC != MAS3539F) |
373 | current_bass = value * 10; | 377 | #if defined(HAVE_WM8751) |
378 | current_bass = value; | ||
379 | #else | ||
380 | current_bass = value * 10; | ||
381 | #endif | ||
374 | set_prescaled_volume(); | 382 | set_prescaled_volume(); |
375 | #endif | 383 | #endif |
376 | } | 384 | } |
@@ -387,7 +395,11 @@ void sound_set_treble(int value) | |||
387 | #endif | 395 | #endif |
388 | 396 | ||
389 | #if (CONFIG_CODEC != MAS3587F) && (CONFIG_CODEC != MAS3539F) | 397 | #if (CONFIG_CODEC != MAS3587F) && (CONFIG_CODEC != MAS3539F) |
390 | current_treble = value * 10; | 398 | #if defined(HAVE_WM8751) |
399 | current_treble = value; | ||
400 | #else | ||
401 | current_treble = value * 10; | ||
402 | #endif | ||
391 | set_prescaled_volume(); | 403 | set_prescaled_volume(); |
392 | #endif | 404 | #endif |
393 | } | 405 | } |