forked from len0rd/rockbox
Correct saving of channel config (patch by Remo Hofer)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3252 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cc9b62f6b2
commit
ebe0752469
4 changed files with 13 additions and 7 deletions
|
|
@ -169,7 +169,8 @@ void init(void)
|
||||||
global_settings.balance,
|
global_settings.balance,
|
||||||
global_settings.loudness,
|
global_settings.loudness,
|
||||||
global_settings.bass_boost,
|
global_settings.bass_boost,
|
||||||
global_settings.avc );
|
global_settings.avc,
|
||||||
|
global_settings.channel_config );
|
||||||
|
|
||||||
status_init();
|
status_init();
|
||||||
usb_start_monitoring();
|
usb_start_monitoring();
|
||||||
|
|
|
||||||
|
|
@ -320,8 +320,9 @@ int settings_save( void )
|
||||||
config_block[0x10] = (unsigned char)
|
config_block[0x10] = (unsigned char)
|
||||||
((global_settings.ff_rewind_min_step & 15) << 4 |
|
((global_settings.ff_rewind_min_step & 15) << 4 |
|
||||||
(global_settings.ff_rewind_accel & 15));
|
(global_settings.ff_rewind_accel & 15));
|
||||||
config_block[0x11] = (unsigned char)(global_settings.avc ||
|
config_block[0x11] = (unsigned char)
|
||||||
global_settings.channel_config << 2);
|
((global_settings.avc & 0x03) |
|
||||||
|
((global_settings.channel_config & 0x03) << 2));
|
||||||
|
|
||||||
memcpy(&config_block[0x12], &global_settings.resume_index, 4);
|
memcpy(&config_block[0x12], &global_settings.resume_index, 4);
|
||||||
memcpy(&config_block[0x16], &global_settings.resume_offset, 4);
|
memcpy(&config_block[0x16], &global_settings.resume_offset, 4);
|
||||||
|
|
@ -448,6 +449,7 @@ void settings_apply(void)
|
||||||
mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
|
mpeg_sound_set(SOUND_TREBLE, global_settings.treble);
|
||||||
mpeg_sound_set(SOUND_BALANCE, global_settings.balance);
|
mpeg_sound_set(SOUND_BALANCE, global_settings.balance);
|
||||||
mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
|
mpeg_sound_set(SOUND_VOLUME, global_settings.volume);
|
||||||
|
mpeg_sound_set(SOUND_CHANNELS, global_settings.channel_config);
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness);
|
mpeg_sound_set(SOUND_LOUDNESS, global_settings.loudness);
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ struct mpeg_debug
|
||||||
};
|
};
|
||||||
|
|
||||||
void mpeg_init(int volume, int bass, int treble, int balance,
|
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_play(int offset);
|
||||||
void mpeg_stop(void);
|
void mpeg_stop(void);
|
||||||
void mpeg_pause(void);
|
void mpeg_pause(void);
|
||||||
|
|
|
||||||
|
|
@ -2809,10 +2809,12 @@ static void mpeg_thread(void)
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
#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,
|
create_thread(mpeg_thread, mpeg_stack,
|
||||||
sizeof(mpeg_stack), mpeg_thread_name);
|
sizeof(mpeg_stack), mpeg_thread_name);
|
||||||
#else
|
#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);
|
mas_writereg(MAS_REG_KPRESCALE, 0xe9400);
|
||||||
dac_config(0x04); /* DAC on, all else off */
|
dac_config(0x04); /* DAC on, all else off */
|
||||||
|
|
||||||
mpeg_sound_channel_config(MPEG_SOUND_STEREO);
|
mpeg_sound_channel_config(channel_config);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
#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);
|
mpeg_sound_set(SOUND_VOLUME, volume);
|
||||||
|
|
||||||
#ifdef HAVE_MAS3587F
|
#ifdef HAVE_MAS3587F
|
||||||
|
mpeg_sound_channel_config(channel_config);
|
||||||
mpeg_sound_set(SOUND_LOUDNESS, loudness);
|
mpeg_sound_set(SOUND_LOUDNESS, loudness);
|
||||||
mpeg_sound_set(SOUND_SUPERBASS, bass_boost);
|
mpeg_sound_set(SOUND_SUPERBASS, bass_boost);
|
||||||
mpeg_sound_set(SOUND_AVC, avc);
|
mpeg_sound_set(SOUND_AVC, avc);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue