summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libmad/synth.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
committerThom Johansen <thomj@rockbox.org>2005-09-07 00:24:27 +0000
commit735208a541df024f1cd3b9624054b6ed9724ad1e (patch)
tree01b8b91e8f473207553e2c94a5f6f00a6f60f3b4 /apps/codecs/libmad/synth.c
parent4cd06c41f62c217681ec91557e89dc4461bab6d3 (diff)
downloadrockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.tar.gz
rockbox-735208a541df024f1cd3b9624054b6ed9724ad1e.zip
Adapted codecs and DSP system to having MACSR saved in thread context.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad/synth.c')
-rw-r--r--apps/codecs/libmad/synth.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c
index bdec4258fb..4315e239e8 100644
--- a/apps/codecs/libmad/synth.c
+++ b/apps/codecs/libmad/synth.c
@@ -42,6 +42,11 @@ void mad_synth_init(struct mad_synth *synth)
synth->pcm.samplerate = 0;
synth->pcm.channels = 0;
synth->pcm.length = 0;
+ #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ /* init the emac unit here, since this function should always be called
+ before using libmad */
+ coldfire_set_macsr(EMAC_FRACTIONAL | EMAC_SATURATE | EMAC_ROUND);
+ #endif
}
/*
@@ -582,8 +587,6 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame,
mad_fixed_t const (*Dptr)[32];
mad_fixed64hi_t hi;
- asm volatile("move.l #0x20, %macsr"); /* fractional mode */
-
for (ch = 0; ch < nch; ++ch) {
sbsample = &frame->sbsample[ch];
filter = &synth->filter[ch];