diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2006-11-06 18:07:30 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2006-11-06 18:07:30 +0000 |
| commit | 0f5cb94aa4a334366a746fcbb22f3335ca413265 (patch) | |
| tree | 8f89a96628c1810d51ee9816daf78edb8c76fcd4 /firmware/target/coldfire/system-target.h | |
| parent | 0b22795e26ee09de14f6ac23219adeda12f2fd5b (diff) | |
| download | rockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.zip rockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.tar.gz rockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.tar.bz2 rockbox-0f5cb94aa4a334366a746fcbb22f3335ca413265.tar.xz | |
Big Patch adds primarily: Samplerate and format selection to recording for SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/system-target.h')
| -rw-r--r-- | firmware/target/coldfire/system-target.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h index 0385211..24e3fb87 100644 --- a/firmware/target/coldfire/system-target.h +++ b/firmware/target/coldfire/system-target.h @@ -110,6 +110,28 @@ static inline unsigned long swap32(unsigned long value) return value; } +static inline unsigned long swap_odd_even32(unsigned long value) +{ + /* + result[31..24],[15.. 8] = value[23..16],[ 7.. 0] + result[23..16],[ 7.. 0] = value[31..24],[15.. 8] + */ + unsigned long mask = 0x00FF00FF; + + asm ( /* val = ABCD */ + "and.l %[val],%[mask] \n" /* mask = .B.D */ + "eor.l %[mask],%[val] \n" /* val = A.C. */ + "lsl.l #8,%[mask] \n" /* mask = B.D. */ + "lsr.l #8,%[val] \n" /* val = .A.C */ + "or.l %[mask],%[val] \n" /* val = BADC */ + : /* outputs */ + [val] "+d"(value), + [mask]"+d"(mask) + ); + + return value; +} + static inline void invalidate_icache(void) { asm volatile ("move.l #0x01000000,%d0\n" @@ -118,6 +140,13 @@ static inline void invalidate_icache(void) "movec.l %d0,%cacr"); } +#ifdef IAUDIO_X5 +#define DEFAULT_PLLCR_AUDIO_BITS 0x10400000 +#else +#define DEFAULT_PLLCR_AUDIO_BITS 0x10c00000 +#endif +void coldfire_set_pllcr_audio_bits(long bits); + /* 11.2896 MHz */ #define CPUFREQ_DEFAULT_MULT 1 #define CPUFREQ_DEFAULT (CPUFREQ_DEFAULT_MULT * CPU_FREQ) |