summaryrefslogtreecommitdiff
path: root/firmware/sound.c
diff options
context:
space:
mode:
authorHristo Kovachev <bger@rockbox.org>2006-02-08 13:08:55 +0000
committerHristo Kovachev <bger@rockbox.org>2006-02-08 13:08:55 +0000
commitdb734b41d5004fabd7a0cb110040d7a05bd0adb4 (patch)
tree4da56be9128183f1d33a130435b1e1600f5eab42 /firmware/sound.c
parentdcc9a8a3d8171d1f7df22a405764f7b9c194c88f (diff)
downloadrockbox-db734b41d5004fabd7a0cb110040d7a05bd0adb4.tar.gz
rockbox-db734b41d5004fabd7a0cb110040d7a05bd0adb4.zip
Patch #1403437 by Peter D'Hoye & Martin Scarratt: Recording gain.
Changes: ***1. all platforms: 1.1 corrects gain display bug; 1.2 allows combined setting of stereo gain without an extra line on the display; 2. iRiver H1xx and H3xx specific: 2.1 correctly named the decimator variables, they were called 'gain'; 2.2 splitted decimator gain settings for mic and line-in so that they are saved separately; 2.3 added combined analog and decimator gain setting giving a smooth gain range with the best analog/decimator gain combination git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8627 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/sound.c')
-rw-r--r--firmware/sound.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/sound.c b/firmware/sound.c
index cee8c06294..110c2c91b8 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -97,8 +97,8 @@ static const struct sound_settings_info sound_settings_table[] = {
97 [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 8, 8, NULL}, 97 [SOUND_LEFT_GAIN] = {"dB", 1, 1, 0, 8, 8, NULL},
98 [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 8, 8, NULL}, 98 [SOUND_RIGHT_GAIN] = {"dB", 1, 1, 0, 8, 8, NULL},
99 [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 15, 2, NULL}, 99 [SOUND_MIC_GAIN] = {"dB", 1, 1, 0, 15, 2, NULL},
100 [SOUND_ADC_LEFT_GAIN] = {"dB", 1, 1,-128, 48, 0, NULL}, 100 [SOUND_DECIMATOR_LEFT_GAIN] = {"dB", 1, 1,-128, 48, 0, NULL},
101 [SOUND_ADC_RIGHT_GAIN]= {"dB", 1, 1,-128, 48, 0, NULL}, 101 [SOUND_DECIMATOR_RIGHT_GAIN]= {"dB", 1, 1,-128, 48, 0, NULL},
102#endif 102#endif
103}; 103};
104 104
@@ -762,8 +762,8 @@ int sound_val2phys(int setting, int value)
762 result = value * 20; /* (30/15) *10 */ 762 result = value * 20; /* (30/15) *10 */
763 break; 763 break;
764 764
765 case SOUND_ADC_LEFT_GAIN: 765 case SOUND_DECIMATOR_LEFT_GAIN:
766 case SOUND_ADC_RIGHT_GAIN: 766 case SOUND_DECIMATOR_RIGHT_GAIN:
767 result = value * 5; /* (1/2) *10 */ 767 result = value * 5; /* (1/2) *10 */
768 break; 768 break;
769 769