diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-05-15 21:02:47 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-15 21:02:47 +0000 |
commit | 3d0cee8abbaf764958743e8a7851eee94e60a913 (patch) | |
tree | a96b1ec825003a71643a7da4707c300f64824f82 /firmware/sound.c | |
parent | dcf442e61f21fb2aef5ce7de0547f733557b156e (diff) | |
download | rockbox-3d0cee8abbaf764958743e8a7851eee94e60a913.tar.gz rockbox-3d0cee8abbaf764958743e8a7851eee94e60a913.zip |
- Move uisimulator/sdl/*.[ch] into the target tree, under firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c.
- Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization).
This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/sound.c')
-rw-r--r-- | firmware/sound.c | 85 |
1 files changed, 1 insertions, 84 deletions
diff --git a/firmware/sound.c b/firmware/sound.c index fb2f353d71..dccca12264 100644 --- a/firmware/sound.c +++ b/firmware/sound.c | |||
@@ -43,89 +43,6 @@ | |||
43 | 43 | ||
44 | extern bool audio_is_initialized; | 44 | extern bool audio_is_initialized; |
45 | 45 | ||
46 | #ifdef SIMULATOR | ||
47 | extern void audiohw_set_volume(int value); | ||
48 | /* dummy for sim */ | ||
49 | const struct sound_settings_info audiohw_settings[] = { | ||
50 | [SOUND_VOLUME] = {"dB", 0, 1, VOLUME_MIN / 10, VOLUME_MAX / 10, -25}, | ||
51 | /* Bass and treble tone controls */ | ||
52 | #ifdef AUDIOHW_HAVE_BASS | ||
53 | [SOUND_BASS] = {"dB", 0, 1, -24, 24, 0}, | ||
54 | #endif | ||
55 | #ifdef AUDIOHW_HAVE_TREBLE | ||
56 | [SOUND_TREBLE] = {"dB", 0, 1, -24, 24, 0}, | ||
57 | #endif | ||
58 | [SOUND_BALANCE] = {"%", 0, 1,-100, 100, 0}, | ||
59 | [SOUND_CHANNELS] = {"", 0, 1, 0, 5, 0}, | ||
60 | [SOUND_STEREO_WIDTH] = {"%", 0, 5, 0, 250, 100}, | ||
61 | #if defined(HAVE_RECORDING) | ||
62 | [SOUND_LEFT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | ||
63 | [SOUND_RIGHT_GAIN] = {"dB", 1, 1,-128, 96, 0}, | ||
64 | [SOUND_MIC_GAIN] = {"dB", 1, 1,-128, 108, 16}, | ||
65 | #endif | ||
66 | #if defined(AUDIOHW_HAVE_BASS_CUTOFF) | ||
67 | [SOUND_BASS_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
68 | #endif | ||
69 | #if defined(AUDIOHW_HAVE_TREBLE_CUTOFF) | ||
70 | [SOUND_TREBLE_CUTOFF] = {"", 0, 1, 1, 4, 1}, | ||
71 | #endif | ||
72 | #if defined(AUDIOHW_HAVE_DEPTH_3D) | ||
73 | [SOUND_DEPTH_3D] = {"%", 0, 1, 0, 15, 0}, | ||
74 | #endif | ||
75 | /* Hardware EQ tone controls */ | ||
76 | #if defined(AUDIOHW_HAVE_EQ_BAND1) | ||
77 | [SOUND_EQ_BAND1_GAIN] = {"dB", 0, 1, -12, 12, 0}, | ||
78 | #endif | ||
79 | #if defined(AUDIOHW_HAVE_EQ_BAND2) | ||
80 | [SOUND_EQ_BAND2_GAIN] = {"dB", 0, 1, -12, 12, 0}, | ||
81 | #endif | ||
82 | #if defined(AUDIOHW_HAVE_EQ_BAND3) | ||
83 | [SOUND_EQ_BAND3_GAIN] = {"dB", 0, 1, -12, 12, 0}, | ||
84 | #endif | ||
85 | #if defined(AUDIOHW_HAVE_EQ_BAND4) | ||
86 | [SOUND_EQ_BAND4_GAIN] = {"dB", 0, 1, -12, 12, 0}, | ||
87 | #endif | ||
88 | #if defined(AUDIOHW_HAVE_EQ_BAND5) | ||
89 | [SOUND_EQ_BAND5_GAIN] = {"dB", 0, 1, -12, 12, 0}, | ||
90 | #endif | ||
91 | #if defined(AUDIOHW_HAVE_EQ_BAND1_FREQUENCY) | ||
92 | [SOUND_EQ_BAND1_FREQUENCY] = {"", 0, 1, 1, 4, 1}, | ||
93 | #endif | ||
94 | #if defined(AUDIOHW_HAVE_EQ_BAND2_FREQUENCY) | ||
95 | [SOUND_EQ_BAND2_FREQUENCY] = {"", 0, 1, 1, 4, 1}, | ||
96 | #endif | ||
97 | #if defined(AUDIOHW_HAVE_EQ_BAND3_FREQUENCY) | ||
98 | [SOUND_EQ_BAND3_FREQUENCY] = {"", 0, 1, 1, 4, 1}, | ||
99 | #endif | ||
100 | #if defined(AUDIOHW_HAVE_EQ_BAND4_FREQUENCY) | ||
101 | [SOUND_EQ_BAND4_FREQUENCY] = {"", 0, 1, 1, 4, 1}, | ||
102 | #endif | ||
103 | #if defined(AUDIOHW_HAVE_EQ_BAND5_FREQUENCY) | ||
104 | [SOUND_EQ_BAND5_FREQUENCY] = {"", 0, 1, 1, 4, 1}, | ||
105 | #endif | ||
106 | #if defined(AUDIOHW_HAVE_EQ_BAND2_WIDTH) | ||
107 | [SOUND_EQ_BAND2_WIDTH] = {"", 0, 1, 0, 1, 0}, | ||
108 | #endif | ||
109 | #if defined(AUDIOHW_HAVE_EQ_BAND3_WIDTH) | ||
110 | [SOUND_EQ_BAND3_WIDTH] = {"", 0, 1, 0, 1, 0}, | ||
111 | #endif | ||
112 | #if defined(AUDIOHW_HAVE_EQ_BAND4_WIDTH) | ||
113 | [SOUND_EQ_BAND4_WIDTH] = {"", 0, 1, 0, 1, 0}, | ||
114 | #endif | ||
115 | |||
116 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | ||
117 | [SOUND_LOUDNESS] = {"dB", 0, 1, 0, 17, 0}, | ||
118 | [SOUND_AVC] = {"", 0, 1, -1, 4, 0}, | ||
119 | [SOUND_MDB_STRENGTH] = {"dB", 0, 1, 0, 127, 48}, | ||
120 | [SOUND_MDB_HARMONICS] = {"%", 0, 1, 0, 100, 50}, | ||
121 | [SOUND_MDB_CENTER] = {"Hz", 0, 10, 20, 300, 60}, | ||
122 | [SOUND_MDB_SHAPE] = {"Hz", 0, 10, 50, 300, 90}, | ||
123 | [SOUND_MDB_ENABLE] = {"", 0, 1, 0, 1, 0}, | ||
124 | [SOUND_SUPERBASS] = {"", 0, 1, 0, 1, 0}, | ||
125 | #endif /* (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */ | ||
126 | }; | ||
127 | #endif | ||
128 | |||
129 | const char *sound_unit(int setting) | 46 | const char *sound_unit(int setting) |
130 | { | 47 | { |
131 | return audiohw_settings[setting].unit; | 48 | return audiohw_settings[setting].unit; |
@@ -356,7 +273,7 @@ static void set_prescaled_volume(void) | |||
356 | 273 | ||
357 | #elif defined(HAVE_TLV320) || defined(HAVE_WM8978) || defined(HAVE_WM8985) | 274 | #elif defined(HAVE_TLV320) || defined(HAVE_WM8978) || defined(HAVE_WM8985) |
358 | audiohw_set_headphone_vol(tenthdb2master(l), tenthdb2master(r)); | 275 | audiohw_set_headphone_vol(tenthdb2master(l), tenthdb2master(r)); |
359 | #elif defined(HAVE_JZ4740_CODEC) | 276 | #elif defined(HAVE_JZ4740_CODEC) || defined(HAVE_SDL_AUDIO) |
360 | audiohw_set_volume(current_volume); | 277 | audiohw_set_volume(current_volume); |
361 | #endif | 278 | #endif |
362 | #else /* SIMULATOR */ | 279 | #else /* SIMULATOR */ |