summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/sdl.c
diff options
context:
space:
mode:
authorThomas Jarosch <tomj@simonv.com>2011-02-08 20:05:25 +0000
committerThomas Jarosch <tomj@simonv.com>2011-02-08 20:05:25 +0000
commit5f037ac015e6d76d030a163753db5ff58cdff49b (patch)
treef5eb7dcdc0e0c3e373227e45061c1d99a14a0819 /firmware/drivers/audio/sdl.c
parent4d129044390a087b6193b6ce63e035b2550b3ce4 (diff)
downloadrockbox-5f037ac015e6d76d030a163753db5ff58cdff49b.tar.gz
rockbox-5f037ac015e6d76d030a163753db5ff58cdff49b.zip
Initial maemo platform support
Adds Nokia N900, N810 and N800 support. Features: - Introduce maemo specific platform defines - Play audio in silent mode - Stop playback on incoming calls - Battery level readout - Bluetooth headset support - Save CPU by disabling screen updates if the display is off or the app doesn't have input focus - N900: GStreamer audio backend Kudos to kugel for the code review. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio/sdl.c')
-rw-r--r--firmware/drivers/audio/sdl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/drivers/audio/sdl.c b/firmware/drivers/audio/sdl.c
index 7d6d7452df..021a65b9f8 100644
--- a/firmware/drivers/audio/sdl.c
+++ b/firmware/drivers/audio/sdl.c
@@ -34,11 +34,15 @@ extern void pcm_set_mixer_volume(int);
34void audiohw_set_volume(int volume) 34void audiohw_set_volume(int volume)
35{ 35{
36#if CONFIG_CODEC == SWCODEC 36#if CONFIG_CODEC == SWCODEC
37#if (CONFIG_PLATFORM & PLATFORM_MAEMO5)
38 pcm_set_mixer_volume(volume);
39#else
37 pcm_set_mixer_volume( 40 pcm_set_mixer_volume(
38 SDL_MIX_MAXVOLUME * ((volume - VOLUME_MIN) / 10) / (VOLUME_RANGE / 10)); 41 SDL_MIX_MAXVOLUME * ((volume - VOLUME_MIN) / 10) / (VOLUME_RANGE / 10));
42#endif /* (CONFIG_PLATFORM & PLATFORM_MAEMO) */
39#else 43#else
40 (void)volume; 44 (void)volume;
41#endif 45#endif /* CONFIG_CODEC == SWCODEC */
42} 46}
43 47
44const struct sound_settings_info audiohw_settings[] = { 48const struct sound_settings_info audiohw_settings[] = {