From ebe0752469021dfb09f2fb2b0752e192833e9f23 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 14 Feb 2003 01:49:50 +0000 Subject: Correct saving of channel config (patch by Remo Hofer) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3252 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/mpeg.h | 2 +- firmware/mpeg.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'firmware') diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h index 75ec710..9b7388c 100644 --- a/firmware/export/mpeg.h +++ b/firmware/export/mpeg.h @@ -56,7 +56,7 @@ struct mpeg_debug }; void mpeg_init(int volume, int bass, int treble, int balance, - int loudness, int bass_boost, int avc); + int loudness, int bass_boost, int avc, int channel_config); void mpeg_play(int offset); void mpeg_stop(void); void mpeg_pause(void); diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 5335c3d..d86b51f 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -2809,10 +2809,12 @@ static void mpeg_thread(void) } #endif -void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int bass_boost, int avc) +void mpeg_init(int volume, int bass, int treble, int balance, int loudness, + int bass_boost, int avc, int channel_config) { #ifdef SIMULATOR - volume = bass = treble = balance = loudness = bass_boost = avc; + volume = bass = treble = balance = loudness + = bass_boost = avc = channel_config; create_thread(mpeg_thread, mpeg_stack, sizeof(mpeg_stack), mpeg_thread_name); #else @@ -2893,7 +2895,7 @@ void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int mas_writereg(MAS_REG_KPRESCALE, 0xe9400); dac_config(0x04); /* DAC on, all else off */ - mpeg_sound_channel_config(MPEG_SOUND_STEREO); + mpeg_sound_channel_config(channel_config); #endif #ifdef HAVE_MAS3587F @@ -2910,6 +2912,7 @@ void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int mpeg_sound_set(SOUND_VOLUME, volume); #ifdef HAVE_MAS3587F + mpeg_sound_channel_config(channel_config); mpeg_sound_set(SOUND_LOUDNESS, loudness); mpeg_sound_set(SOUND_SUPERBASS, bass_boost); mpeg_sound_set(SOUND_AVC, avc); -- cgit v1.1