FONT_UI is a placeholder when it gets assigned it isn't resolved
immediately
when its time to resolve the font it is processed with font_get(int font)
first it sets it to the last slot
and then decrements till it gets a valid font
I think this is intended to allow the largest
chance of getting a loaded font
instead if global_status->font_id has been set use that
similar to how the screen helper does
Change-Id: If97e504466265fafecbe07b7b72adb4808b67e6a
These files have been missing copyright headers since
they were added in comit d0b72e2590 ("GSoC/Buflib:
Add buflib memory alocator to the core.").
Thomas Martitz seems to be the original author, which
is documented in the commit metadata and backed up by
emails from the rockbox-dev archive, for example [1].
[1]: https://www.rockbox.org/mail/archive/rockbox-dev-archive-2011-08/0000.shtml
Change-Id: Id1a3abd4975674ffbc6f7e9123ee57d49bcaa38e
tapefiles return a leak handle error if it is quit before end of tape is
reached, ensure it always gets closed on exit
Change-Id: I0f6224c7164fd87c209166be9e10d62d6a644a50
If the list of plugins given to configure did not include
a subdir-based plugin, then all subdir-based plugins would
be built (since SELECTED_PLUGINS_SUBDIRS is empty then).
To prevent this issue use an explicit value ('DEFAULT') to
signal that we want to build the standard set of plugins.
Change-Id: I42d9dc8d754ed9ac1cd4b5c62c0a106ca3dfcd91
Check for USE_IRAM to determine if IRAM should be used.
SoCs that don't define USE_IRAM no longer need to define
IRAMSIZE to 0 either.
When IRAM is not used, any symbols bound for IRAM will
be discarded instead of linking them in DRAM. In theory
these symbols shouldn't exist, since nothing should be
placed into IRAM sections to begin with for !USE_IRAM.
If an IRAM section attribute leaks into the plugin/codec
anyway, it should now cause a link time error.
Change-Id: I55c1854cfe8beb5cb09b865336906f9945084b33
Move the definition of DRAMSIZE into the SoC-specific
ifdef block below. This keeps the memory map defines
for a SoC together in one place and as a result it is
much easier to understand.
Change-Id: Ie7293616a3c572b381cfeab3531751562c19a9c4
Move the rather large block of code that's been copied
in three separate linker scripts into the CPU header.
Change-Id: I9f38e4901fa4ff699f00d97064a9cdaf7cfd6aab
Move the definition of NOCACHE_BASE to the CPU headers
instead of having them copy-and-pasted in a few places.
Change-Id: Ibbab27a5a07906d46dbd4dd9065f2238bc885d6b
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
This matches the behavior of codecs, which define CODEC,
and is needed to get an accurate definition of USE_IRAM
out of config.h.
Change-Id: I84855ba88d01495bb63c609b3e4d67922b908440
The preprocess2file helper is mainly used to preprocess
linker scripts, but piping the preprocessor output to
'grep' masks the exit code of gcc, so if it fails (eg.
due to an #error directive) then it does not cause the
build to fail like it should.
In this particular case the grep commands don't seem to
be doing anything, since the "-P" option suppresses line
markers, which "grep -v ^$(_hash)" is probably meant to
filter out. The intent behind "grep -v ^$$" is unclear
since the preprocessor doesn't seem to output any line
beginning with '$', but in any event it seems unnecessary.
Change-Id: Ie23f5de1fe1bfb5890c7b2f3c7fa05401931d89f
The JZ47xx and S5L87xx processor families used their own
special defines (__ASSEMBLY__ and ASM respectively) in
their CPU headers to check if they were included from an
assembly source file.
For GCC the standard seems to be __ASSEMBLER__, so check
for that instead and remove the non-standard symbols.
Being more consistent across platforms makes it easier to
include cpu.h from cross-platform files (eg. plugin.lds).
Change-Id: I282930cad34e1a2ff18166f3b4338548b34f4a49
Remove now-unused stuff related to the PNX0101 processor,
which was missed during the removal of the IFP-7xx port.
Change-Id: I5ff248b3e83cb67a357743130c3e51ed84a720e5
If the specified key wasn't found, we would fall back to trying to launch
a plugin with the LANG_* key. This will fail, resulting in an error
that spells out the (inappropriate) LANG_* text.
Instead, fail out with a more appropriate error.
Change-Id: I046878f87a2ef2bc994d0b7d037359695a18d392
Try to use 11KHz if possible, if that's not an option, fall
back to 44KHz which is always available. Simulators always use
44KHz.
Change-Id: I7547e7c1bddf7ce4634f7fd7bc64d4a5c9b62c29
int zx_kbd_input(char* text/*, int buflen*/)
is supplied with a single char by all callers
thats fine till we get to here in the decode routine
while (*utf8)
since it just reads till it hits a 0 its probably fine
but Address Sanitizer caught it
make c a char array of 8 bytes to ensure a NULL
Change-Id: Iad3284df34cb7451422fc96ae0bb8e159ee440b0
These fields are defined by FAT32 itself, and are specified as 32-bit
values. So switch them from sector_t to simple uint32_t.
Change-Id: I98afecfbe1f8a1b83fbdd4ec3fea016b8e0b985d
According to the datasheet, the PLL fractional mode is
apparently not supported in the medium VCO range.
The LCD isn't picky about front/back porch settings so
modify these to get a dot clock close to 6 MHz (within
~0.1% error).
Change-Id: I51647534db8c2b261391864db9262a0b04548e6d
* pcm_play_data
* pcm_play_stop
* pcm_play_stop_int
* pcm_is_playing
* pcm_set_frequency
* pcm_get_frequency
* pcm_apply_settings
Now, the only user of these functions are the mixer and recording layers
that provide a higher-level API to plugins and the main [playback]
application.
Outside of the PCM core, pcm_apply_settings() was only used immediately
following a call to mixer_set_frequency(), so the latter function
now always calls the former.
Change-Id: I61c3144dc156b9de9b7963160b525c6d10c6ad4b
Playback is implemented using a target-specific PCM layer,
using the STM32H7 SAI & DMA registers directly. There are
a number of pop/click issues:
1. Slight click when powering up the amplifiers
2. Click when starting and stopping playback
3. Popping when changing playback frequency
4. Popping when shutting down
It should be possible to eliminate or at least mitigate
(2) to (4) in software, but (1) happens as a result of
powering on the amplifiers while everything is muted so
might be unavoidable.
Change-Id: I398b66596176fb2341beb7deba7bf6f4f3fb82b3
Toggling to the second card was allowed if HAVE_HOTSWAP
was defined, but on targets with a single hotswappable
SD card -- for example many JZ47xx/X1000 targets -- this
ends up calling card_get_info() on a non-existent drive.
A slightly better option is to check if NUM_DRIVES is
greater than 1. This is still just guessing the number
of SD/MMC slots, but it should be wrong in fewer cases.
Change-Id: Ifca29323f1c7091d9cce55c73147d0d1decae9a5
move target-specific pcm operations into builtin_pcm_sink.
in subsequent commits, another pcm_sink is added, and it becomes
possible to switch between them.
Change-Id: I8f8b9661e01d6e6472f34224ddc3760856778457