summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-06-24 11:52:17 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-06-24 11:52:17 +0000
commit66fee3eb55ee1238bd19b2813a36350e082ece2c (patch)
tree7f22e4642dfa00a30fdda0a0cd0d6d71b10fbb44 /apps
parent6472bcde6537ff2cb623b664201d51f805719184 (diff)
downloadrockbox-66fee3eb55ee1238bd19b2813a36350e082ece2c.tar.gz
rockbox-66fee3eb55ee1238bd19b2813a36350e082ece2c.zip
Backport r30063 to the v3.9 branch. SPC Codec: Restore correct FIR buffer alignment when an address mask is used. It must be FIR_BUF_ALIGN. Fix Coldfire assembly constraint where an input parameter was also being written.
git-svn-id: svn://svn.rockbox.org/rockbox/branches/v3_9@30064 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libspc/spc_dsp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/codecs/libspc/spc_dsp.c b/apps/codecs/libspc/spc_dsp.c
index c5833e21d6..0017b2a0a0 100644
--- a/apps/codecs/libspc/spc_dsp.c
+++ b/apps/codecs/libspc/spc_dsp.c
@@ -28,7 +28,8 @@
28#include "spc_profiler.h" 28#include "spc_profiler.h"
29 29
30#if defined(CPU_COLDFIRE) || defined (CPU_ARM) 30#if defined(CPU_COLDFIRE) || defined (CPU_ARM)
31int32_t fir_buf[FIR_BUF_CNT] IBSS_ATTR_SPC MEM_ALIGN_ATTR; 31int32_t fir_buf[FIR_BUF_CNT] IBSS_ATTR_SPC
32 __attribute__((aligned(FIR_BUF_ALIGN*1)));
32#endif 33#endif
33#if SPC_BRRCACHE 34#if SPC_BRRCACHE
34/* a little extra for samples that go past end */ 35/* a little extra for samples that go past end */
@@ -1276,6 +1277,8 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
1276 /* Feedback into echo buffer */ 1277 /* Feedback into echo buffer */
1277 if ( !(this->r.g.flags & 0x20) ) 1278 if ( !(this->r.g.flags & 0x20) )
1278 { 1279 {
1280 int sh = 1 << 9;
1281
1279 asm volatile ( 1282 asm volatile (
1280 /* scale echo voices; saturate if overflow */ 1283 /* scale echo voices; saturate if overflow */
1281 "mac.l %[sh], %[e1] , %%acc1 \r\n" 1284 "mac.l %[sh], %[e1] , %%acc1 \r\n"
@@ -1298,11 +1301,10 @@ void DSP_run_( struct Spc_Dsp* this, long count, int32_t* out_buf )
1298 "or.l %[sh], %[e0] \r\n" 1301 "or.l %[sh], %[e0] \r\n"
1299 /* save final feedback into echo buffer */ 1302 /* save final feedback into echo buffer */
1300 "move.l %[e0], (%[echo_ptr]) \r\n" 1303 "move.l %[e0], (%[echo_ptr]) \r\n"
1301 : [e0]"+d"(echo_0), [e1]"+d"(echo_1) 1304 : [e0]"+d"(echo_0), [e1]"+d"(echo_1), [sh]"+d"(sh)
1302 : [out_0]"r"(out_0), [out_1]"r"(out_1), 1305 : [out_0]"r"(out_0), [out_1]"r"(out_1),
1303 [ef]"r"((int)this->r.g.echo_feedback), 1306 [ef]"r"((int)this->r.g.echo_feedback),
1304 [echo_ptr]"a"((int32_t *)echo_ptr), 1307 [echo_ptr]"a"((int32_t *)echo_ptr)
1305 [sh]"d"(1 << 9)
1306 ); 1308 );
1307 } 1309 }
1308 1310