Properly handle .init section in rom build and accomodate
the change in crt0.S introduced in b31c856
Change-Id: Icbf26a87162165da149232de264dc3671ca8ae96
In b31c856 startup code section was renamed but boot.lds
linker scripts were not updated accordingly.
Change-Id: I9c9893ec2e199ac2555007a1d23e109ca0daea28
This reclaims ~6kB of ram.
Change-Id: Iafdc661b1cf4445669c08c79205043792b8d14c3
Reviewed-on: http://gerrit.rockbox.org/718
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
This should catch the case of buffer misuse which results
in corrupted cookie of next allocation. The check is performed
on move_block() so it may be a bit late.
There is buflib_check_valid() provided which checks the
integrity of all cookies for given context.
On DEBUG build with --sdl-thread this check is carried out
for core_ctx on every context switch to catch problems earlier.
Change-Id: I999d4576084592394e3dbd3bdf0f32935ff5f601
Reviewed-on: http://gerrit.rockbox.org/711
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
The font engine can now perform cache lookups even if the font file is
closed, if the font was disabled with the new font_disable_all() function.
It is highly probable that the lookup succeeds but in the cache-miss case
a blank, full-width glyph will be returned.
Change-Id: I3c97e747d2a0ba30c7b495c6118c9f029d265b56
The only true difference in this platform is the amount of iram
between MCF5249 and MCF5250. Instead of duplicating the file
simply use one with proper ifdefs.
Change-Id: Ifd56ebd2666813633502e3b5d83669424659c039
Reviewed-on: http://gerrit.rockbox.org/713
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Since commit 706b920 a timeout of TIMEOUT_BLOCK (-1) will cause
queue_event_w_tmo() block indefinitely (previously it behaved as
TIMEOUT_NOBLOCK). scroll_process_message() can be called with negative
timeouts, with luck also -1.
To fix this convert all negative timeouts to TIMEOUT_NOBLOCK explicitely.
Change-Id: I1fc20d93acbba50d713c8364f635365930b38cbf
With the new lcd_putsxy_scroll_func() code can register custom scroll functions
(put_line() makes use of that). In order for the custom scroller to be able
to properly manage its userdata pointer (set via struct scrollinfo::userdata)
the scroll engine must inform the scroller about start and stop of scrolling.
To inform about start the lcd_scroll_* functions now return true when
the line will scroll. To inform about stop the scroll engine calls into the
scroller one last time, with the text set to NULL.
put_line() can use this to release the userdata registered per scrolling line
so that it can be recycled.
This fixes that some scrolling lines became glitchy after some time because
the userdata was recycled too early.
Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
usb_storage needs a fairly reasonable amount of memory. Allocating
what we need and no more allows other (future) USB drivers to get
something too, and is much cleaner in general.
Change-Id: Iec9573c0f251f02400f92d92727cbf2969785de0
This is used by lcd_puts_scroll_worker() to render the line immediately
instead of waiting for the next scroll tick when only the text was updated.
Previously lcd_puts_scroll_worker() did not render anything in this case
which could lead to visible blinking.
This fixes blinking scrolling lines with dynamic text in the skin engine.
Change-Id: I475bde8c8eb7c92f505e3c5ecf4d32bb90690536
If logf is enabled, panic() will print the last lines. On small
screens this is more or less useless, but on large screens it
can be very useful for debugging.
Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3
Reviewed-on: http://gerrit.rockbox.org/709
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Tested: Frank Gevaerts <frank@gevaerts.be>
1) The 9-segment images need not be multiple of 3 pixels anymore. If it
isn't the inner segments will be smaller than the corners.
2) If the desired actual images is not a multiple of the segment sizes the
function drawed more than the desired rectangle. This is fixed by
drawing the last segment only partially.
Change-Id: Ic918facd8734fa4a4aa72536f0b67de82d81651e
Greylib performed a horrible hack and stored fg and bg patterns in other
struct viewport fields. One of them was just removed. So instead of
this hack simply enable the *_pattern fields for mono targets as well,
so that greylib can use them normally.
Change-Id: Ib0842ebcc97f5bf9d9382b4471903afa2f96f39f
These where used for line styling during scrolling, which is now done in apps/,
The viewport struct doesn't need to record these anymore.
Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
This logic is moved into apps (put_line()) which can better handle line
decorations with respect to scrolling, mulitline and other complications.
Firmware doesn't need this. The remaining drawing function know only one style,
that is foreground on background/backdrop (changing drawmode is still supported).
Change-Id: I707060edc388a7d723a7d09b0cf5cbda6ec56708
This main (and only) purpose for it was to adjust the pixel position of the text
in otherwise linebased (scrolling) functions. With pixel-based scrolling
this isnt necessary anymore.
Change-Id: I2a45b8ca6a3f8f50aa2f6630201b30ce9ddfe043
Since scrolling is now pixel-based this is not necessary anymore. custom line
height is handled by put_line() but can also possible to implement with
lcd_puts_scroll_func().
Change-Id: Iee9b12bf99afac93d95d2a1a6f5d5b4db237b21c
With this functions removed there is no exported function in firmware left
that draws line decorations. Also no function supports specifying an y-offset
anymore (was used for pixel accurate positioning of otherwise strictly line-based
API calls).
Both should be handled in apps/ now.
Change-Id: Iba4b28ccc6e686c7db63e34b51ad4badae983fce
It is similar to lcd_gradient_fillrect(), except that it only draws a part
of the complete gradient. This can be used to draw only the bottom half
of a full gradient.
Change-Id: Ib47cc5237f6966e35ba07988bddbb00fd97adf96
This function supports installing a custom scroll callback. This will be
called when the scrollengine redraws the line. It allows to draw extended
styles (or anything your can possible imagine) along with the text.
It is also strictly pixel-based, the first pixel-based function that supports
scrolling.
Change-Id: I57f81ac7b3d08b877aea4cb8afa882f175ebcdfc
disconnect() needs to be called exactly once per call to init_connection().
In case of bus resets, disconnect() was not called, which led to leaking
alloc_maximum() allocated buflib handles, which led to buflib running out
of memory to allocate.
Change-Id: I03025da578dc54e48b6de6bd3e3f40feae7220a6
Some seldomly used drawmode combinations did not work in conjunction with
alpha bitmaps and backdrops. Now all should work (see comment added) by using
more bits.
Change-Id: I2bc96ecf471fa8c1a608a321a235b9c8527b3dc5
bpb_is_sane() used to effectively multiplying the sector size (relative
to 512 bytes) twice, which meant that filesystems with e.g. 2K sectors and
32 sectors per cluster were rejected because while this adds up to 64K
clusters (i.e. the upper limit), the calculation wrongly came to 256K.
This bug tends to affect 5.5G ipods when formatted using dosfstools.
Change-Id: Ia3f1e1303b2af953f497ccdbf23cd49c3d72e46a
This fixes the radioart crash that was the result of buffering.c working
on a freed buffer at the same time as buflib (radioart uses buffering.c for the
images). With this change the buffer is owned by buflib exclusively so this
cannot happen.
As a result, audio_get_buffer() doesn't exist anymore. Callers should call
core_alloc_maximum() directly. This buffer needs to be protected as usual
against movement if necessary (previously it was not protected at all which
cased the radioart crash), To get most of it they can adjust the willingness of
the talk engine to give its buffer away (at the expense of disabling voice
interface) with the new talk_buffer_set_policy() function.
Change-Id: I52123012208d04967876a304451d634e2bef3a33
This function relocates a buflib back buffer, updating pointers in struct
buflib_context. It does not move any data by itself.
The intended use-case is buflib-on-buflib, where a buflib back buffer is
allocated with buflib and attempted to be moved. The move_callback() can call
this and return BUFLIB_CB_OK on success. No move_callback() is called for the
subordinate buflib buffer, therefore it must not contain non-movable
allocations. The caller is generally responsible moving the data and all its
implications.
Change-Id: I869219f9cff786a172c9e917a5f34470073892e6
This function will now ask shrinkable allocations to give up all of their
memory. With future support of playback.c this can be used as a safe
replacement for audio_get_buffer().
Change-Id: I290a51d2c75254e66baf5698c41dc444dea6247a
Much of the scrolling work is moved from lcd-bitmap-common to lcd-scroll.c,
a small scroll callback routine remains. This callback can potentially be
overridden by more extensive scrollers.
The callback also gets fed with pixel-based scrolling information, which
finally removes the strict line-based nature of the scroll engine. Along with
this is the change from scroll_stop_viewport_line() to scroll_stop_viewport_rect()
which works on a pixel-based rectangle instead of lines.
The ultimate goal is to move most of the scroll work to apps, which can
much better decide which line decorations to apply etc. This work is laying
the ground work.
Change-Id: I3b2885cf7d8696ddd9253d5a9a73318d3d42831a
This allows to draw lines without destroying styles that were drawn manually
(e.g. from apps/) beforehand.
Change-Id: I0de290c9343061efb115e1b76da5b76395c2b2af
Uses a similar technique as lcd_*.c files of #including a common .c file, so
that a unified implementation can be reused for both displays.
Change-Id: I21f6de76df757b093e1a1dff0a4caf96a44fe77e
The port uses the imx233 soc, it's a STMP3650 based Samsung player
Change-Id: I50b6d7e77fd292fab5ed26de87853cd5aaf9eaa4
Reviewed-on: http://gerrit.rockbox.org/490
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This reverts commit 462adf2a0f.
Leaving the card in TRAN results in a huge power consumption because some cards
and internal bridges do not automatically enter power saving mode in TRAN state.
Change-Id: If79efe8cf99b24174889b3a5ebbcb51b07085f58
The ZEN/ZEN-XFi seem to be very picky about the lcd. And they do not like
standby mode so I'm going to drop it, the OF doesn't use it anyway. I still
don't know what this "power" pin is about, obviously it's not real power but
the OF toggle it. Let's hope the lcd will finally become more stable with
fix: the driver now does full power on/off on enable/disable.
Change-Id: I1c465ee4f2462bc3d9507e5f575f0a181af60214
The code was trying to probe for volume presence by calling drive layer
with volume index. It is a miracle it get unnoticed so far. Introduce
proper volume probing using the vol->drive map in the disk layer.
Change-Id: I463a5bcc8170f007cad049536094207d2ba3c6fc
Reviewed-on: http://gerrit.rockbox.org/669
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Tested on iPod Mini 1G.
Change-Id: I67ac9b7ed84c34533107136d0aa72e5ce3bcc5bc
Reviewed-on: http://gerrit.rockbox.org/668
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Choices are limited for those: i2c is either generic software or imx233
hardware and power is either none or with a gpio. So factor ever possible
combination in a single common file and use fmradio-target.h to supply the
required parameters. This will remove a bunch of duplicate code.
Change-Id: If12faeb2e371631cd39cc18a4c1d859812007934
The old code allowed each target to specify its adc targets but this proved
useless since the target rely directly on imx233/lradc for input method and
generic adc is mostly used for battery and debug. Remove all target specific
files and provide a generic implemenation. The targets can still specify a
battery temperature channel in powermgmt-target.h
Change-Id: I68cf2e3e46379d174ac6d774ffb237bb15a19ae3
Although there is no difference in the cost of a full or partial update,
it is preferable that the semantic of lcd_update_rect() be correct.
Change-Id: I8a168388b98e0dbd7237729b7fd8a62fa1885be1
Originally written and uploaded by Lalufu (Ralf Ertzinger) in Feb 2012.
They have been condensed into a single patch and some further additions
by Andy Potter.
Currently includes Authentication V2 support from iPod to Accessory,
RF/BlueTooth transmitter support, selecting a playlist and selecting a
track from the current playlist. Does not support uploading Album Art
or podcasts. Has been tested on the following iPods,
4th Gen Grayscale, 4th Gen Color/Photo, Mini 2nd Gen, Nano 1st Gen and
Video 5.5Gen.
Change-Id: Ie8fc098361844132f0228ecbe3c48da948726f5e
Co-Authored by: Andy Potter <liveboxandy@gmail.com>
Reviewed-on: http://gerrit.rockbox.org/533
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
HiFi E.T. MA8 is almost the same as MA9 except
another DAC(pcm1792 in ma8, df1704 in ma9).
MA8 has ILI9342 lcd, MA8C has ILI9342C lcd.
Change-Id: If2ac04f5a3382590b2a392c46286559f54b2ed6a
The only difference between this target and HiFi E.T. MA9
is display driver (ILI9342 in MA9 and ILI9342c in MA9C)
Change-Id: Icc3d2490f850902a653175360f12283f3708bbb7
button_read_device() could be called before pca9555_read_thread
intializes pca9555_in_ports variable, and return incorrect value.
Change-Id: I960bff72fe230c9d0256b20e92d0a75e67266038
The previous code disabled the irq when there were fired. This seems
unreliable for some mysterious reason. Instead simply disable them
before enabling the irq.
Change-Id: I7ee1aa25dbc41c7dd53aa7c7744aa5e4d70ff2d8
Reviewed-on: http://gerrit.rockbox.org/640
Reviewed-by: benjamin brown <foolshperson@gmail.com>
Tested-by: benjamin brown <foolshperson@gmail.com>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
The code was broken in two ways:
- it called storage_read_sectors with a wrong drive number
- calling storage_read_sectors too early at boot time will fail because
we are in the init function, so the drive is not yet registered.
To fix this, use a user provided read callback instead of storage read
functions.
Change-Id: I5ab79d48391fae619d5f8ae09c3d499fc43854c8
Actually 0x20 is the right address, the 0x22 applies to the meizu which
probably use a Chinese clone with a non-spec compliant address.
Change-Id: I65b9ab6477c07a2293226536db3e696d34d3bc2c
The setting is currently unused but it provides some documentation and basic
support for a more comprehensive implementation of read-only support.
Change-Id: I353c33ef765ef6e6c09d59e943da6654a311ad84
The exact combination on which recording is needed is too complicated, so
just always cancel the unused warning, the compiler will optimise it away.
Change-Id: I0946586e4b01769c98babc4616f893c38f44c05f
The new code can select among several types of window (user, system, ...).
Furthermore, the type of partitions to use is selectable in config file.
Currently, two types are support: Freescale style MBR and Creative MBLK
Change-Id: I969d60a3d08f2c9448fb4b9c440051b7801b94cd
Currently we only support the BGA169 but if by chance Rockbox was to run on
a lqfp package for example, some pins may becomes unavailable or different.
Change-Id: I5c0d8d57ae31604572af37e0c2edd0bd7bda73a3
The old was doing register read/writes without calling tuner_power(), this
is broken for target with real tuner power management.
Change-Id: I5e60234697a8b91de6189daf6a10e871d5119b65
They share most of registers (except test and some extra bits), since our
driver is very basic, it is safe to relax the manufacurer & chip id check.
Change-Id: If54e8b9e0d852cd9128d5e28ff59bd2c7a55d98d
When bootloader is too intelligent, like on Creative devices, it might leave
some unexpected IRQs sources on, this is problematic when those sources share
the same IRQ line.
Change-Id: Ie9333918eb1048b1f2de4ea738cddf556aa75ee2
The STMP3700 has unreliable vbusvalid irq so we need to use
vdd5gtvddio. Therefore, using the vbusvalid bit produces
inconsistent results between events and detect. Fix that
by making power handle all the usb detect stuff.
Change-Id: Ic521b2f6677602e184fe46352c5359f4b4ba8d56
These functions are mostly used by the radio drivers and any blocking
call could potentially block the entire UI, which is pretty bad.
Since any request is expected to finish within a few us, having a 10ms
timeout doesn't seem unreasonable.
Change-Id: I03b19729511547e5bbdeb3476d020e5d87d0d7e1
On targets like stmp3700, resetting the dma channel on "soft" timeout
drives the whole block crazy unless it goes through complete reset.
Change-Id: I830b252279989bf9f9cd9c138240a6ea9b003527
Disabling these two settings makes the image small enough to build again.
This build has been broken for long enough without any better solution
actually being worked on, so I think this is much better than nothing.
Change-Id: I77c34c1e714fb6e132ed0ce39f0917779efe1125
Enable simulator for the target ypr0 to
be built and used.
Change-Id: I1b080f07ab90f5c4856881d08ad70e1053bbb0c0
Reviewed-on: http://gerrit.rockbox.org/618
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
This adds the support for hosted or other
particular platforms, where the "root" ("home")
path is NOT "/" (or "").
The change affects screendump in particular.
Change-Id: I4c218d102fe12cc782aedb99d456e9f72679ea07
Reviewed-on: http://gerrit.rockbox.org/613
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
The driver can now handle HOLD in several ways, including using a GPIO.
Also add a debug routine to read the raw value of the adc.
Change-Id: Ide2cb1ac58e759b4bc464e606b432f2c150ee36f
Many imx233 targets boot in a very low performance mode, typically cpu and
dram at 24MHz. This results in very slow boots and very unstable USB
bootloader mode. Since cpu frequency scaling is disabled in bootloader in
rockbox, always make the frequency scaling code available and boost at boot
time.
Change-Id: Ie96623c00f7c4cd9a377b84dcb14b772558cfa4d
Even with volume at minimal fuze+ was still playing sound pretty loud.
this fix it.
Change-Id: I5b18e9c39ced240eebb0457c433b0ca150668860
Reviewed-on: http://gerrit.rockbox.org/621
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This one is a bit strange: our codebase just don't use it if there is both
SD and MMC, so this missing function got unnoticed so far.
Change-Id: Ifea4bb5140477b7637d033737594259cc44fb10e
The i2c core has some bugs: it locks up when the slave doesn't NAK and
prevent the dma channel from being resetted. Specifically handle this
situation by setting CLR_GOT_A_NAK (workaround) and then reset dma and i2c
block.
Change-Id: I0e09d38d4301a0ad42dfad785cc934b43f2c4485