From 5c1432c9cf0c5b83637fa015b80f0f102ad54916 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 3 Jan 2010 13:34:29 +0000 Subject: Coldfire targets: Restore EMAC status after using the EMAC for bitmap resizing. Fixes FS #10412. The tone and EQ filter calculation relies on the proper EMAC mode. EQ filters were not affected because they're set from a different thread, hence FS #10412 only affected the iAudios (coldfire + albumart + software tone controls). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24164 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/resize.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/recorder/resize.c b/apps/recorder/resize.c index 49b8980ceb..0f227f8b09 100644 --- a/apps/recorder/resize.c +++ b/apps/recorder/resize.c @@ -921,6 +921,7 @@ int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, } #endif #ifdef CPU_COLDFIRE + unsigned old_macsr = coldfire_get_macsr(); coldfire_set_macsr(EMAC_UNSIGNED); #endif #ifdef HAVE_UPSCALER @@ -951,6 +952,11 @@ int resize_on_load(struct bitmap *bm, bool dither, struct dim *src, ret = scale_v_linear(rset, &ctx); } #endif +#ifdef CPU_COLDFIRE + /* Restore emac status; other modules like tone control filter + * calculation may rely on it. */ + coldfire_set_macsr(old_macsr); +#endif #ifdef HAVE_ADJUSTABLE_CPU_FREQ cpu_boost(false); #endif -- cgit v1.2.3