rockbox/lib/rbcodec/codecs
Aidan MacDonald 7eeb4e4302 firmware: refactor CACHEALIGN_BITS/SIZE defines
Mostly motivated by PP needing CACHEALIGN_SIZE in linker
scripts, which can't include system.h, so move these to
cpu.h instead. Also gets rid of the default 32 byte line
size that was used if the target didn't define alignment
itself. RK24xx, DM320, and JZ4740 were missing this but
have been confirmed (from datasheets) to use 32-byte cache
lines.

Add checks to make sure the macros are appropriately
(un)defined based on the HAVE_CPU_CACHE_ALIGN define,
and make sure their values are consistent when they
are defined.

Disable HAVE_CPU_CACHE_ALIGN for hosted targets since it
arguably doesn't matter if there's a cache, if we aren't
responsible for cache maintenance.

A few files in rbcodec use CACHEALIGN_SIZE, but these
can be converted to MEM_ALIGN_SIZE, which is identical
to CACHEALIGN_SIZE if the latter is defined. On other
targets, it aligns to at least sizeof(intptr_t).

Change-Id: If8cf8f6ec327dc3732f4cd5022a858546b9e63d6
2026-03-06 14:49:00 +00:00
..
cRSID Revert "[BugFix] Enums are only 2 bytes on some Devices" 2024-11-24 11:38:16 -05:00
demac arm: enable unified assembly syntax in more files 2025-04-18 10:26:02 -04:00
lib firmware: refactor CACHEALIGN_BITS/SIZE defines 2026-03-06 14:49:00 +00:00
liba52 Document intentional fallthroughs + fix harmless unintended ones 2021-08-04 18:59:46 +00:00
libalac fixed alac_set_info() issues. 2019-07-25 18:16:48 -04:00
libasap Fix codecs in simulator builds on Windows 2017-01-15 21:46:19 +01:00
libasf Support MP3 audiostreams embedded in ASF containers. 2021-02-28 16:11:54 +00:00
libatrac arm: enable unified assembly syntax in more files 2025-04-18 10:26:02 -04:00
libayumi misc: Fix more build warnings uncovered with GCC15 and -Wunused-const-variable 2025-04-21 21:55:03 -04:00
libcook iPod Classic: disable IRAM1 2018-07-30 18:50:27 -04:00
libfaad arm: workaround to build Cortex-M7 targets with GCC 4.9 2025-04-19 13:16:36 -04:00
libffmpegFLAC flac: Fix build on Cowon D2. 2025-09-09 08:09:45 -04:00
libgme Convert non-ASCII characters to UTF-8 2024-12-15 21:16:12 -05:00
libm4a Codecs: mp4: Fix possible glitch at the end of song 2025-04-20 13:43:15 +03:00
libmad codecs: disable incompatible ARM assembly for Cortex-M 2025-04-19 13:00:17 -04:00
libmusepack libmusepack: add ARMv7-M version of MPC_MULTIPLY_EX 2025-04-19 12:26:47 -04:00
libopus misc: Fix more build warnings uncovered with GCC15 and -Wunused-const-variable 2025-04-21 21:55:03 -04:00
libpcm libpcm: Get unbranded structure tag out of my way. 2017-11-06 20:06:08 -05:00
librm Third attempt to shut up the warble build printf() warning. 2018-12-28 07:57:23 -05:00
libspc libspc: Temporarily disable problematic armv4 asm optimization 2025-09-21 15:39:35 -04:00
libspeex misc: Clean up a pile of -Wunused-const-variable warnings 2025-04-21 21:13:59 -04:00
libtremor firmware: refactor CACHEALIGN_BITS/SIZE defines 2026-03-06 14:49:00 +00:00
libtta codecs: disable incompatible ARM assembly for Cortex-M 2025-04-19 13:00:17 -04:00
libwavpack codecs: disable incompatible ARM assembly for Cortex-M 2025-04-19 13:00:17 -04:00
libwma cleanup: Get rid of erroneous execututable bit on various source files 2026-02-19 07:54:35 -05:00
libwmapro cleanup: Get rid of erroneous execututable bit on various source files 2026-02-19 07:54:35 -05:00
libwmavoice arm: Profile/variation detection improvements 2025-12-04 20:43:30 -05:00
a52.c Improved seeking in a52 codec 2018-12-22 19:54:40 -05:00
a52_rm.c Realmedia related codecs fixes and enhancements 2018-12-22 20:12:10 -05:00
aac.c Codecs: mp4: Re-Fix loading tracks with metadata at the end of file 2024-01-12 18:30:30 +02:00
aac_bsf.c Fix logf warnings in more codecs 2020-07-03 03:43:47 +00:00
adx.c fix warnings on some systems / format specifier mismatch 2024-12-07 11:07:44 -05:00
aiff.c Revert "[BugFix] Enums are only 2 bytes on some Devices" 2024-11-24 11:38:16 -05:00
aiff_enc.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
alac.c Codecs: mp4: Fix seek to end of track 2023-10-03 18:36:22 +03:00
ape.c codecs: Fix elapsed time calculation for large files 2018-10-29 19:50:34 +01:00
asap.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
atrac3_oma.c Remove ATRAC3 specific fields (channels, extradata_size) from mp3entry 2024-02-02 09:36:53 -05:00
atrac3_rm.c Remove ATRAC3 specific fields (channels, extradata_size) from mp3entry 2024-02-02 09:36:53 -05:00
au.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
ay.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
codec_crt0.c 3ds: 3ds port sources. First set of two 2025-10-23 20:09:09 -04:00
codecs.h apps: cleanly disable codec buffering when not supported 2026-01-05 13:15:49 -05:00
codecs.make make: allow building flat binary plugins on USE_ELF targets (attempt 2) 2026-02-04 16:45:25 +00:00
cook.c Realmedia related codecs fixes and enhancements 2018-12-22 20:12:10 -05:00
flac.c flac: 7th channel decode buffer may not fit into IRAM. 2024-10-14 13:43:54 -04:00
gbs.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
hes.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
kss.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
mod.c misc: Fix up a few warnings uncovered by LTO 2021-07-15 18:37:42 +00:00
mp3_enc.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
mpa.c Codecs: mp3: Move strip tags to codec 2025-05-26 10:59:56 -04:00
mpc.c codecs: Fix elapsed time calculation for large files 2018-10-29 19:50:34 +01:00
nsf.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
opus.c Don't force gcc as host compiler + fix clang warnings 2024-12-20 05:29:18 +01:00
raac.c Realmedia related codecs fixes and enhancements 2018-12-22 20:12:10 -05:00
sgc.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
shorten.c codecs: Fix elapsed time calculation for large files 2018-10-29 19:50:34 +01:00
sid.c SID: Don't uselessly upconvert from 16bpp mono to 28bpp stereo 2025-09-02 20:19:22 -04:00
smaf.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
SOURCES SID: Disable SID on 2MB targets, as cRSID needs a lot of RAM. 2023-02-07 11:25:02 -05:00
spc.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
speex.c Don't force gcc as host compiler + fix clang warnings 2024-12-20 05:29:18 +01:00
tta.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
vgm.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
vorbis.c Clean up places that use #if defined(CPU_ARM | CPU_COLDFIRE | CPU_MIPS) 2021-03-04 14:14:33 +00:00
vox.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
vtx.c codecs: Add support for the 'VTX' ZX Spectrum chiptunes format. 2020-10-09 11:39:25 -04:00
wav.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wav64.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wav_enc.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wavpack.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wavpack_enc.c As3525 wavpack_enc document some intentional switch fall through 2021-08-08 09:27:27 -04:00
wma.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wmapro.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00
wmavoice.c Remove explicit 'enum codec_command_action' in codec API 2017-12-07 14:41:59 -05:00