Commit graph

10082 commits

Author SHA1 Message Date
Marcin Bukat
cc64d9eb3b fix player rom build
Change-Id: I3acc5ff3b6868c7ebbfda99368e4eafc8e368668
2014-01-18 23:34:39 +01:00
Marcin Bukat
21d026d1d6 coldfire: fix rom build
Properly handle .init section in rom build and accomodate
the change in crt0.S introduced in b31c856

Change-Id: Icbf26a87162165da149232de264dc3671ca8ae96
2014-01-18 23:13:28 +01:00
Marcin Bukat
1e7febe940 coldfire: fix bootloader builds
In b31c856 startup code section was renamed but boot.lds
linker scripts were not updated accordingly.

Change-Id: I9c9893ec2e199ac2555007a1d23e109ca0daea28
2014-01-18 22:21:00 +01:00
Marcin Bukat
b31c856b84 coldfire: Implement HAVE_INIT_ATTR magic
This reclaims ~6kB of ram.

Change-Id: Iafdc661b1cf4445669c08c79205043792b8d14c3
Reviewed-on: http://gerrit.rockbox.org/718
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2014-01-17 19:03:06 +01:00
Thomas Martitz
d55e5698e5 Some libc files are not needed on mingw anymore so don't compile them (unless HAVE_ROCKBOX_C_LIBRARY is set).
Change-Id: I0b9948d0dbc07aaa8a1e2da8b3857e96fc3f9b48
2014-01-17 11:22:20 +01:00
Thomas Martitz
08d9b7fca5 Fix red. Screw those last-minute changes :\
Change-Id: I12666e98114e490a13023af7149fc37147d4e864
2014-01-16 10:31:15 +01:00
Thomas Martitz
01b28ea725 font: Fix crash due to uninitialized field.
Change-Id: If2fafb15a9998eebb2936e819507758e003abe30
2014-01-16 10:21:18 +01:00
Marcin Bukat
7ab237b025 buflib: Add crc field protecting buflib cookie integrity
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>
2014-01-16 10:17:39 +01:00
Thomas Martitz
c23ce62829 fonts: Do not unload completely on USB.
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
2014-01-15 23:37:39 +01:00
Marcin Bukat
a02f863eef coldfire: Use single app.lds script for all coldfires.
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>
2014-01-15 21:15:14 +01:00
Szymon Dziok
a43cce24b3 HDD1630: enable headphones detection.
Change-Id: I329b12a8e90b4721b644ac326dfe75e52ce6c2b8
2014-01-14 00:45:34 +01:00
Szymon Dziok
518d9ecb35 HDD1630: implement lcd_enable (display on/off).
Change-Id: I8b72a9c333d8a9dbcb62c366a9af298f1dd9b2f7
2014-01-13 23:50:40 +01:00
Szymon Dziok
b25cd9792f HDD1630: a proper way to enable and disable backlight.
Change-Id: Ic08a8a3ec4bcd6320ba07cb9bda1c95257ef14c9
2014-01-13 23:04:21 +01:00
Thomas Martitz
eafc7012da scroll_engine: Fix FS#12894: Text scrolling stops working after a few seconds/minutes
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
2014-01-12 21:29:55 +01:00
Thomas Martitz
0a0d61e777 Fix remote warnings and charcell reds, and remove minor left-over tuff.
Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
2014-01-12 01:50:21 +01:00
Thomas Martitz
488a1b983e put_line/scrolling: Make the scroll engine inform custom scrollers about start/stop of scrolling.
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
2014-01-12 01:34:06 +01:00
Frank Gevaerts
656261bde1 Don't use core_alloc_maximum() in usb_storage.
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
2014-01-11 19:22:49 +01:00
Thomas Martitz
26b317e094 scroll engine: Factor out renderer function so it can be called by lcd code.
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
2014-01-11 19:17:58 +01:00
Frank Gevaerts
25e50ed8f1 Print `last logf lines on panic().
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>
2014-01-11 11:37:18 +01:00
Marcin Bukat
9cd3444e27 rk27xx: Implement HAVE_INIT_ATTR magic
This reclaims over 7kB of ram.

Change-Id: I4a89c9a673ada7959311f320900060f6db303c07
2014-01-10 09:01:08 +01:00
Frank Gevaerts
837cad0d38 bidi.c: Check buffer sizes.
This could cause a crash with certain themes and long filenames.

Change-Id: I0a48c91bb089b122a56c4e126ba4d7a175399fa2
2014-01-09 23:30:32 +01:00
Thomas Martitz
fde92de224 lcd_nine_segment_bmp: Fixes for non-ideal image dimensions.
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
2014-01-09 00:43:46 +01:00
Thomas Martitz
81be2016bb Fix Player red and icons on mono displays.
Change-Id: Ib8adcb4c70f2dd3ddd25da8f0606f48926dfd89e
2014-01-07 23:39:37 +01:00
Thomas Martitz
444d2e508a Add missing kernel.h include (hopefully the last one, really), take #4.
Change-Id: I167e988868b53203ea926540699d587e115635e8
2014-01-07 22:41:26 +01:00
Thomas Martitz
d146970ca1 lcd/grey: Enable viewport fg_pattern and bg_pattern for all bitmap targets.
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
2014-01-07 22:14:41 +01:00
Thomas Martitz
e1c7b3b8f7 lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz
deb6ac3693 lcd-16bit: Move lcd_gradient_fillrect/_part() to lcd-16bit-common.c.
Change-Id: I6b2d2ba73464610556cfd9ecec52fc62adb007c7
2014-01-07 14:13:48 +01:00
Thomas Martitz
36e469db8b lcd-common: Remove direct style (line decorations) from lcd-puts* functions.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz
ad0985ea1c lcd-common: Remove support for specifying y_offset from lcd_puts* functions.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz
4978094480 lcd-common: Remove support for custom line heights from viewport.
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
2014-01-07 14:13:48 +01:00
Thomas Martitz
9a4686b563 lcd-common/scroll_engine: Remove unused functions lcd_puts_style_xyoffset() and lcd_puts_scroll_style_xyoffset().
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
2014-01-07 14:13:48 +01:00
Thomas Martitz
775ebe4ff6 lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_style().
Change-Id: Ia4f943b3738ab6e66b0e3f1507c629b36d7eba94
2014-01-07 14:13:48 +01:00
Thomas Martitz
7cd07290e6 lcd-common: Remove unused function lcd_puts_style_offset().
Change-Id: I24da23d132f933fe647416dc58e8f50879715423
2014-01-07 14:13:48 +01:00
Thomas Martitz
1e324aac36 lcd-common: Remove unused function lcd_puts_style().
Change-Id: Id2c64c116f79b8e61a7af49b9072b3e884ffb455
2014-01-07 14:13:48 +01:00
Thomas Martitz
8f64625888 lcd-common: Remove unused function lcd_puts_offset().
Change-Id: I39749bf3db915e5a8ddb6e6f25eb201ea0aaf981
2014-01-07 14:13:48 +01:00
Thomas Martitz
a422604435 lcd-common/scroll_engine: Remove unused functions lcd_puts_scroll_offset() and lcd_puts_scroll_style_offset().
Change-Id: Ia84ae88020d06a1cb634942ab5e635fd5d10ac66
2014-01-07 14:13:48 +01:00
Thomas Martitz
77836e5736 lcd-16bit: Introduce lcd_gradient_fillrect_part().
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
2014-01-07 11:36:00 +01:00
Thomas Martitz
6630958533 lcd-common/scroll_engine: Introduce lcd_putsxy_scroll_func().
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
2014-01-07 11:36:00 +01:00
Thomas Martitz
b8505222c0 scroll_engine: Change header inclusion
Change-Id: I033db3d3a838f0a950ce7707de6a0cd4b2595d93
2014-01-07 11:36:00 +01:00
Frank Gevaerts
204668db89 Make sure usb class driver disconnect() functions are called properly.
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
2014-01-05 22:57:04 +01:00
Frank Gevaerts
2a63502c09 Check that core_alloc_maximum() returned something useful, and panic if not
Change-Id: I7ae40db0f81d1d51742501936b13b387f94a25e5
2014-01-05 20:56:55 +01:00
Thomas Martitz
463d343102 Add missing kernel.h includes (hopefully all of them), take #3.
Change-Id: I68ed0e914239f0caf83082a41c2480a01b69285a
2014-01-05 20:51:25 +01:00
Thomas Martitz
22b33d6eb8 Add missing kernel.h includes (hopefully all of them), take #2.
Change-Id: I62cedf992bb096987050621cfc34f0432e9da170
2014-01-05 20:42:48 +01:00
Thomas Martitz
22a28f9caa Add missing kernel.h includes (hopefully all of them).
Change-Id: I9c1825296a788587b8d494d8514b3314847b0ff0
2014-01-05 20:32:09 +01:00
Thomas Martitz
281d1fadb3 Do not include kernel.h in system.h.
system.h doesn't need it on its own and this change makes it less
dependant on Rockbox internals.

Change-Id: I4e1e4108a52a7b599627a829204eb82b392fc6d6
2014-01-05 19:35:23 +01:00
Thomas Martitz
a17a7038c2 lcd: Fix certain drawmode combinations.
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
2014-01-05 19:35:23 +01:00
Frank Gevaerts
646edc594f Fix bpb_is_sane() cluster size calculation for non-512 byte sectors.
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
2014-01-04 21:28:26 +01:00
Frank Gevaerts
da94b6303e Make fat test tool build again, and make its sector size configurable.
Change-Id: Icfe7c4bb880c2f10918a7809f0f1f1c3838f6f48
2014-01-03 23:57:32 +01:00
Andrew Ryabinin
9dbdec14f0 creativezenv: change target_id & MODEL_NUMBER.
85 is already used by HIFI E.T. MA8C.

Change-Id: I7f30d6b1acbebd6152d11fa46ec87d95e6a809e7
Reviewed-on: http://gerrit.rockbox.org/703
Reviewed-by: Purling Nayuki <cyq.yzfl@gmail.com>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2014-01-02 13:35:05 +01:00
Amaury Pouly
40fae1d718 zenxfi2: remove unused function
Change-Id: I98acfc9394ac83a45985364fdfad85af2f7d1773
2013-12-24 12:39:58 +01:00
Thomas Martitz
d2ae832eef lcd: Fix scrolling.
Change-Id: I1f8d3d67b224c1c531438b94e3aab640b76770be
2013-12-23 20:25:34 +01:00
Thomas Martitz
22e802e800 playback,talk: Share audiobuffer via core_alloc_maximum().
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
2013-12-23 12:17:38 +01:00
Thomas Martitz
64b9e1fa7b buflib: Add buflib_context_relocate().
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
2013-12-22 23:11:32 +01:00
Thomas Martitz
d25a512caf buflib: Try harder in buflib_alloc_maximum().
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
2013-12-22 23:11:32 +01:00
Szymon Dziok
e7499ba981 Fix audio on m:robe 100.
Tested on different revisions and it works reliably.

Change-Id: Ic710236247a17f516c8561429f2da5c9684341b9
2013-12-17 20:20:00 +01:00
Andrew Ryabinin
5b5f0755d6 Introduce IHIFI760/960 targets.
Change-Id: Ie36e48742c0ed9aa3fd6f49aa034a11d2492327c
2013-12-16 00:45:18 +04:00
Andrew Ryabinin
04c59b8a15 rk27xx: Fix ifdef for DEBUG_CANCEL button.
Change-Id: Iebbe518dcaf5c9e1573309b3fee17b52998d941c
2013-12-16 00:18:58 +04:00
Thomas Martitz
ed5b853c18 Fix more reds.
Change-Id: Ie62386a8f3e9986381f96eb83abb69bfc42b42e1
2013-12-15 00:47:21 +01:00
Thomas Martitz
c72b454286 Fix reds. Also apply the new scrolling to lcd charcell (this even uncovered an
error).

Change-Id: I29243bb36b6cec1471bd6c0afc64e00547a68c50
2013-12-15 00:38:48 +01:00
Thomas Martitz
50eb528bc1 scroll_engine: Major rework to support pixel-based scrolling and scroll callbacks.
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
2013-12-14 23:11:31 +01:00
Thomas Martitz
26801b3bd8 scroll_engine: Add STYLE_NONE to allow for drawing lines without styling.
This allows to draw lines without destroying styles that were drawn manually
(e.g. from apps/) beforehand.

Change-Id: I0de290c9343061efb115e1b76da5b76395c2b2af
2013-12-14 23:11:31 +01:00
Thomas Martitz
b094d80dab scroll_engine: Split out common main and remote lcd functions.
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
2013-12-14 23:11:30 +01:00
Thomas Martitz
1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
Thomas Martitz
47c8d3c14d lcd-*: Merge common viewport operations into lcd-bitmap-common.c
Change-Id: Ibec2d039ac0ba1214c9bd1b667bc8a9538a0d3d7
2013-12-14 23:11:30 +01:00
Amaury Pouly
01d8cc6f39 Fix yellow
Change-Id: I60cd312c501f2f0fe0c12489c86c856eeb8e1aa8
2013-12-08 11:30:13 +01:00
Amaury Pouly
b163fb9eac rmi/fuze+: add product info in the debug screen
Change-Id: Id06dbe0909e37587a45a2ebf5b0beab93cd44f61
2013-12-08 11:12:39 +01:00
Amaury Pouly
2bf192ee6e imx233: regenerate registers headers
Change-Id: I546177a247646d7a9864d1ec2796ef0708e50667
2013-12-06 02:04:37 +01:00
Amaury Pouly
c945fb6e94 imx233: fix storage code to work for non-MD builds
Change-Id: Ic326e59385aff3be1ada52b482e94051c512323d
2013-12-06 01:55:37 +01:00
Amaury Pouly
065910663a storage: fix MD vs MV confusion
Change-Id: If0e4b0ac8b24413b77f1d67293c652c6a0e01bbd
2013-12-06 01:55:21 +01:00
Amaury Pouly
d8cbe4e4fb fuze+: remove unused, duplicate code in config file
Change-Id: Ia8116528ca65844322177531f14b2f6bbfb56719
2013-12-06 01:54:34 +01:00
Lorenzo Miori
1deab73980 Initial commit for the YP-Z5 port
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>
2013-12-02 20:48:21 +01:00
Amaury Pouly
23c6421f38 imx233: don't compile fm tuner code in bootloader
Change-Id: Icd36e6b03965272eb169a19630b720f38bac6d9e
2013-12-02 20:09:56 +01:00
Amaury Pouly
9dab30adf0 imx233: fix red on stmp3600
Change-Id: I56527f2d643cb3c453e08cd1f759b80ce10ceb66
2013-12-02 19:59:16 +01:00
Amaury Pouly
3f55f01e92 imx233: rework power management for work on stmp3700
Change-Id: Ia1f7e8b633dfe6ef8dc840b3eb22eaf79c53ce6b
2013-12-01 22:37:36 +00:00
Amaury Pouly
2ce484c658 Revert "imx233: always keep cards in TRAN mode"
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
2013-11-30 16:15:35 +00:00
Amaury Pouly
cbed7ecafe zen: rework lcd enable
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
2013-11-26 15:57:13 +00:00
Lorenzo Miori
75c791dabf imx233: add the possibility to choose audio output coupling mode
via target-defined option

Change-Id: I1bffbc7f17a11cf690a771057c2e4a7ba6a5faaa
Reviewed-on: http://gerrit.rockbox.org/678
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-25 20:17:12 +01:00
Marcin Bukat
71f0b884bc rk27xx: small cleanup of crt0.S
Change-Id: I5f40efd03b133acab86315d36580fcad68834f78
2013-11-23 22:42:33 +01:00
Lorenzo Miori
adc503302c tea5767: properly power up the tuner during detect
Change-Id: I5ca5c3ae28db1427e2528cb1740a9199180b9b38
Reviewed-on: http://gerrit.rockbox.org/670
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-21 14:26:24 +01:00
Amaury Pouly
193753aa1f Introduce volume_{present,removable} and fix invalid calls in apps/
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>
2013-11-20 21:34:04 +01:00
andypotter
c71e0567d6 Add IAP support to iPod Mini 1G.
Tested on iPod Mini 1G.

Change-Id: I67ac9b7ed84c34533107136d0aa72e5ce3bcc5bc
Reviewed-on: http://gerrit.rockbox.org/668
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-11-20 21:20:54 +01:00
Amaury Pouly
75dc601738 imx233/sdmmc: {sd,mmc}_{present,removable} don't depend on multivolume
Change-Id: Id35fbdbc62b804e9a67c6d1f18b19a1d2051bb78
2013-11-20 16:38:54 +00:00
Amaury Pouly
262479173b sonynwz: rework keymap based on lebellium's work and enable volume in list
Change-Id: Ieb015e78d1c0aa74c61591e442bfdf5f883f3811
2013-11-20 13:40:16 +00:00
Amaury Pouly
1ef7b6529e Finally fix yellow
Change-Id: Ia7c30821a9417a23478c053b3edcf26e1179a9d9
2013-11-19 22:58:41 +00:00
Amaury Pouly
0fb05249c6 Fix yellow
Change-Id: I9d283592c6411c97948ae4962e2c22d7ab45bec3
2013-11-19 22:29:31 +00:00
Amaury Pouly
da7be39614 Fix sim red
Change-Id: Icbdf47c5c508516892b1ce75558b878dc512e780
2013-11-19 22:12:42 +00:00
Amaury Pouly
0c394770aa Forgot lcd driver of the ZEN V !
Change-Id: I0e0e04d4de3b28058e3822043d46d64291265c75
2013-11-19 21:05:47 +00:00
Amaury Pouly
446f352abd imx233: factor fmradio i2c and tuner power code
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
2013-11-19 20:39:10 +00:00
Amaury Pouly
c2c2274e0a imx233: factor adc accross targets
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
2013-11-19 19:04:03 +00:00
Amaury Pouly
977a6c3ce7 Initial commit for the Creative ZEN V
Change-Id: I3408cfdf742ea5995d5c87bf76653f436e1ec2b0
2013-11-18 21:44:06 +00:00
Amaury Pouly
a8b816ae9c creativezenmozaic: factor out code with the zen/zenxfi
Most of the code is similar, only the lcd driver is significantly different.

Change-Id: I9eab1faf08d2356f2d820d6930ef3b0653349aa1
2013-11-18 21:44:05 +00:00
Amaury Pouly
bb8dd05343 imx233/creative: workaround stupid Creative partition table
This should fix wrong partition size on the ZEN, X-Fi and Mozaic

Change-Id: Ib8999d414773c12e1b97d515e9bf058a82141d35
2013-11-11 02:02:11 +00:00
Amaury Pouly
39bfd0d2ab imx233: fix yellow
Change-Id: I6fc2559a0c6f91301bb1039d7125f7a6fb55cac5
2013-11-11 02:01:48 +00:00
Amaury Pouly
a54c4ab7d4 zen/zenxfi: correctly implement partial redraw
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
2013-11-11 02:01:05 +00:00
Amaury Pouly
7bbdcc1c3b zen/zenxfi: implement lcd standby
Change-Id: I5960221d45490c469ffd2a481d447185aba70e56
2013-11-11 02:00:41 +00:00
Ralf Ertzinger
b170c73f92 Updated IAP commands.
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>
2013-11-10 18:41:24 +01:00
Amaury Pouly
6979a5b63c zenmozaic: add keymap and bitmap for simulator
Change-Id: I1be76d5b82ef585d2146d12aacad456071341827
2013-11-08 13:57:21 +00:00
Amaury Pouly
0c2ebbb2cf zenxfi: add simulator keymap and bitmap
Change-Id: Ic82ad39234d3056c3cc06d9f8f0ba6f28892e15f
2013-11-08 13:05:58 +00:00
Amaury Pouly
b1ee21d45e zenxfi/zenmozaic: put HAVE_HEADPHONE_DETECTION in config file
Otherwise it breaks the simulator build

Change-Id: I816a34920283fc16e9c08ed6abe5fa41c0671f0a
2013-11-08 13:05:02 +00:00
Amaury Pouly
59b1fbce36 Add Creative ZEN simulator bitmap and button map
Change-Id: I15fad76fe48d9736be9e4cdbc9ae8fdc96cc9ac3
2013-11-07 18:41:57 +00:00
Andrew Ryabinin
357dd680b4 ma8/ma9: Cleanup - fix tabs, remove unused defines. 2013-11-05 13:34:52 +04:00
Andrew Ryabinin
3a97e12fc5 Introduce HiFi E.T. MA8/MA8C ports.
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
2013-11-05 09:59:45 +04:00
Andrew Ryabinin
a170c99170 ma9: Slightly change df1704 driver API.
This change should be done for easier integration of ma8 port.
2013-11-05 09:59:45 +04:00
Andrew Ryabinin
d602717735 Introduce HiFi E.T. MA9C port.
The only difference between this target and HiFi E.T. MA9
is display driver (ILI9342 in MA9 and ILI9342c in MA9C)

Change-Id: Icc3d2490f850902a653175360f12283f3708bbb7
2013-11-05 09:59:45 +04:00
Andrew Ryabinin
b48e6d0e1c ma9: Fix 'always load OF' bug in bootloader.
button_read_device() could be called before pca9555_read_thread
intializes pca9555_in_ports variable, and return incorrect value.

Change-Id: I960bff72fe230c9d0256b20e92d0a75e67266038
2013-11-05 09:59:45 +04:00
Amaury Pouly
2778e7613a Forgot the config files for ZEN, ZEN Mozaic and ZEN X-Fi
Change-Id: Id95d0078d7f4862e596d47ef1bdbfe75942c50fa
2013-10-26 13:23:27 +02:00
Amaury Pouly
78c060b09c imx233: rework vdd5v shared irq handling
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>
2013-10-23 13:33:02 +02:00
Amaury Pouly
4aa32fb8f4 imx233: fix partition window computation
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
2013-10-22 15:55:28 +02:00
Amaury Pouly
51ed6da0b1 zenxfi2: fix red by adding partition style
Change-Id: Id5b8907b68d1913f8f36d7494d7e78b63562187c
2013-10-22 00:56:47 +02:00
Amaury Pouly
7a65710836 tea5760uk: use correct i2c address on the Creative
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
2013-10-22 00:34:45 +02:00
Amaury Pouly
a0728672bf Initial commit for the Creative ZEN and ZEN X-Fi
Change-Id: Ibd7b1b0b957ef11c200cb63eff7da53f11774748
2013-10-22 00:34:45 +02:00
Amaury Pouly
d3bc64833c Initial commit for the Creative ZEN Mozaic
Change-Id: Ib65aad9f5de37e514047955cad7ca40dc0af4f74
2013-10-22 00:34:44 +02:00
Amaury Pouly
3d1666042e imx233/system: don't do frequency management on < stmp3780, it's not working
Change-Id: Ie9ff5122f1cb4fe3809bb4c6b88ef0cfc353e0e1
2013-10-22 00:16:22 +02:00
Amaury Pouly
151fa30257 imx233/sdmmc: add write protect pin config
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
2013-10-22 00:14:24 +02:00
Amaury Pouly
17851f742e imx233/audio: workaround unused variable
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
2013-10-22 00:07:50 +02:00
Amaury Pouly
7d62a78af4 imx233: extend partition window support to be more generic
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
2013-10-22 00:07:07 +02:00
Amaury Pouly
5c7167c79c imx233/i2c: relax timeout
Change-Id: Ie9cf8c8bb0a89d9cbcc795e04559864b9fbaf639
2013-10-22 00:02:05 +02:00
Amaury Pouly
15dc944694 imx233: add package defines
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
2013-10-21 23:56:24 +02:00
Amaury Pouly
0463bf4cb2 tea5760uk: properly power up the tuner during detect
The old was doing register read/writes without calling tuner_power(), this
is broken for target with real tuner power management.

Change-Id: I5e60234697a8b91de6189daf6a10e871d5119b65
2013-10-21 23:54:04 +02:00
Amaury Pouly
9bdf24a4fe tea5760uk: add support for TEA5761UK
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
2013-10-21 23:52:40 +02:00
Amaury Pouly
71c5a52add imx233: fix power irq storm
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
2013-10-21 01:23:14 +02:00
Amaury Pouly
898b760e59 imx233: fix audioout on stmp3700
Strangely enough, only stmp3780 and stmp3600 have speaker control

Change-Id: Icec1ed4b7e80e8b3787a3d08b32695551b58aeb9
2013-10-21 01:23:14 +02:00
Amaury Pouly
28669ca0fd fuze+: fix typo
Change-Id: I0b86d5cadeb5b792dbdd71ea1e25230a6643afdf
2013-10-21 01:23:14 +02:00
Amaury Pouly
46416c619d imx233: fix usb_detect() to be consistent with vbus detection
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
2013-10-21 01:23:14 +02:00
Amaury Pouly
187017bad1 imx233: simplify sd/mmc code
Change-Id: I7e36b4c1c91540a2ae383109e440818bc610dde6
2013-10-21 01:23:13 +02:00
Amaury Pouly
5b3eaf6f5b imx233/i2c: use 1sec timeout by default instead of blocking
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
2013-10-21 01:23:13 +02:00
Amaury Pouly
6006eb59b1 imx233/i2c: always reset the i2c block on timeout
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
2013-10-21 01:23:13 +02:00
Frank Gevaerts
4ead0344c6 Disable LCD_FLIP and MORSE_INPUT on recorder to make it build.
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
2013-10-18 22:56:49 +02:00
Lorenzo Miori
9a8ed6ba35 Simulator for Samsung YP-R0
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>
2013-09-29 14:15:48 +02:00
Lorenzo Miori
c300c1b58d screendump.c: use HOME_DIR instead of the hard-coded "" (root)
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>
2013-09-27 09:21:05 +02:00
Amaury Pouly
4c6c8cd1aa fuze+/zenxfi2: make sure pixclk is running before initialising lcdif
Change-Id: I50b2376d5f6dcf4dde994b533e0b946589a737e8
2013-09-26 22:54:29 +02:00
Amaury Pouly
120701646f imx233: always start SSPCLK before ungating the spp blocks
This should fix some boot hang issues which appeared at random.

Change-Id: I5430690a61c042b45ed26b58f485a1cc5d82987f
2013-09-26 20:12:42 +02:00
Amaury Pouly
0897794f44 sonynwz: fix time handling
Be consistent with the OF and use RTC PERSISTENT2 as offset

Change-Id: Ic8b970cbc4096d1f4efa0380a3af51c93484fe58
2013-09-26 17:01:44 +02:00
Amaury Pouly
94f2bc7473 sonynwze360: fix color swap
I found the BGR bits in the lcd registers by trival and error.

Change-Id: Ib263611e827e8671a0128242b947d76911bd9f47
2013-09-26 16:41:57 +02:00
Amaury Pouly
f37f3393c9 sonynwze370: fix simulator
Change-Id: I23cd8ce8549119868011e2a05341f3cb6335fad6
2013-09-26 13:22:45 +02:00
Amaury Pouly
ddf56a102b sonynwze360: fix simulator
Change-Id: Ib63d5aceeafb1078013599616cb6dcec3a2b8598
2013-09-25 18:22:26 +02:00
Amaury Pouly
e41d2ba02b imx233: only clear got_a_nak on imx233, it doesn't exists on other stmps
Change-Id: I88e369dd7fa289f054837b442983bb7c97a58c53
2013-09-25 16:36:41 +02:00
Amaury Pouly
9392d036c4 Initial commit for the sony NWZ-E360 and NWZ-E370
Change-Id: I52d21e136a98eaf481615d641795cf7ecf325465
2013-09-25 14:31:39 +02:00
Amaury Pouly
b181c4963e fix whitespace
Change-Id: I569dba9c172ec3927cf8a26ee4e58e189addc728
2013-09-25 14:31:39 +02:00
Amaury Pouly
5909438193 imx233: improve button lradc driver
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
2013-09-25 14:31:39 +02:00
Amaury Pouly
2f5f2ba91d imx233: always boost in bootloader
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
2013-09-25 14:31:39 +02:00
Jean-Louis Biasini
89afa32584 fuze+: fix volume bottom limit
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>
2013-09-18 23:09:44 +02:00
Amaury Pouly
b4c1bb0214 imx233: fix block reset code
Change-Id: I5fbc76315a651c91b278e1c7dc6cb49b7e00d9ad
2013-09-18 13:17:19 +02:00
Amaury Pouly
90007da3e9 imx233: implement mmc card info
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
2013-09-07 00:53:21 +02:00
Amaury Pouly
070e27933c imx233: fix red when target cannot record
Change-Id: Ia5f6b290da2f645021ef8becdfbac7436407ec0b
2013-09-07 00:52:36 +02:00
Amaury Pouly
a1e557bbdd imx233: fix horrible sd/mmc bug
The wrong variable was used to enumerate mmc drives. Also fix incorrect
function prototype.

Change-Id: Idd8dca7685bbc2bc4744b7b29e948f0ca2f56cc9
2013-09-06 18:22:34 +02:00
Amaury Pouly
4be366f4b0 cosmetics
Change-Id: Ia2b334ad9dd3f465ad5024e6fc226cb3e60a6e45
2013-09-06 18:22:02 +02:00
Amaury Pouly
74ed592b39 imx233: fix lcdif (don't send anything on empty buffer)
Change-Id: Ic39b2117b24d84452bb6f7b9c410b1cf55066b6d
2013-09-06 18:21:35 +02:00
Amaury Pouly
164876eaf1 imx233: fix i2c issues
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
2013-09-06 18:19:09 +02:00
Amaury Pouly
f13cad4c8e imx233: cleanup lradc button driver
Change-Id: I85fbe6807a1f91ae5be97b6847c07b24a4f18c24
2013-09-05 23:16:19 +02:00