summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-13 15:05:46 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-13 15:05:46 +0000
commitabf41e34811adc426ac932d350abc3f1d151e449 (patch)
tree462b098eb879682e774a2a7b6fc0be91a4d37adf /firmware/target
parent93ff3c10812dfb352bff37730cebb7394fd8aea3 (diff)
downloadrockbox-abf41e34811adc426ac932d350abc3f1d151e449.tar.gz
rockbox-abf41e34811adc426ac932d350abc3f1d151e449.zip
H100 Series: Fix FS#6810 - Distortion on Bass/Treble usage. Coldfire PCM needed a refinement in the init sequence for the UDA1380 after audio init changes. Apparently it doesn't like its registers altered before the Coldfire I2S is properly initialized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12752 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 0662e289a0..b827887636 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -135,6 +135,10 @@ bool _pcm_apply_settings(bool clear_reset)
/* Reprogramming bits 15-12 requires FIFO to be in a reset
condition - Users Manual 17-8, Note 11 */
or_l(IIS_FIFO_RESET, &IIS_PLAY);
+ /* Important for TLV320 - this must happen in the correct order
+ or starting recording will sound absolutely awful once in
+ awhile - audiohw_set_frequency then coldfire_set_pllcr_audio_bits
+ */
audiohw_set_frequency(freq_ent[FPARM_FSEL]);
coldfire_set_pllcr_audio_bits(PLLCR_SET_AUDIO_BITS_DEFPARM);
did_reset = true;
@@ -252,14 +256,20 @@ void pcm_init(void)
/* Call pcm_close_recording to put in closed state */
pcm_close_recording();
+ /* Setup Coldfire I2S before initializing hardware or changing
+ other settings. */
+ or_l(IIS_FIFO_RESET, &IIS_PLAY);
+ pcm_set_frequency(HW_FREQ_DEFAULT);
+ audio_set_output_source(AUDIO_SRC_PLAYBACK);
+ SET_IIS_PLAY(IIS_FIFO_RESET | IIS_PLAY_DEFPARM);
+
/* Initialize default register values. */
audiohw_init();
- audio_set_output_source(AUDIO_SRC_PLAYBACK);
audio_set_source(AUDIO_SRC_PLAYBACK, SRCF_PLAYBACK);
- pcm_set_frequency(HW_FREQ_DEFAULT);
- _pcm_apply_settings(false);
+ audiohw_set_frequency(freq_ent[FPARM_FSEL]);
+ coldfire_set_pllcr_audio_bits(PLLCR_SET_AUDIO_BITS_DEFPARM);
#if defined(HAVE_SPDIF_IN) || defined(HAVE_SPDIF_OUT)
spdif_init();