The lcd driver now works but is awfully slow. The trick is to put it in system
mode instead of RGB and setup 16bpp. The GRAM data can then be sent directly
with the SPI but since it's bit-banged and the CPU running at slow speed,
full screen refresh takes over a second, even with a slightly optmised version.
The OF uses a DMA mechanism with a proper LCD controller but the setup is much
more complicated and doesn't work at the moment.
Change-Id: I6c95d91de31bff97d0a5848b8e2078c21deb5895
errno is supposed to be thread local and we do that here in a rather
makeshift way by implementing a function that returns a pointer to
the __errno variable in the thread block.
If more serious TLS is required, perhaps it would be worthwhile
implementing it using the linker and the "__thread" storage attribute.
That's a bit overkill just for this. I'm also not liking what I saw
the compiler producing.
Change-Id: I03bc0bd6a89f6e3d6bae7653284ee01054614f9a
Reviewed-on: http://gerrit.rockbox.org/803
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
The write buffer should not be modified but the current code does and then
forget to restore it to its original content. I'm not sure if any code relies
to the write buffer to not be modifies by the write function but this seems like
a reasonable assumption in general so it's better not to break it.
Change-Id: I449a01db2ec51d2273e59b69c59db0e7d2eed3db
Scrollstrip works as quadrature encoder. We set pin change
interrupt for both edges of signal both lines and sample the state
in ISR. From time to time the sequence is out-of-sync which was
properly detected but erroneously handled leaving scrollstip
interrupts disabled.
Change-Id: I08e4f99c6c27df0f8180aa16e6e1d9e4203bafa7
Reviewed-on: http://gerrit.rockbox.org/782
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested: Marcin Bukat <marcin.bukat@gmail.com>
This patch completes the plugin keymaps for the Zen X-Fi3 and enables those plugins for compilation.
One key was changed in "button-target.h" for compatibility with Rockboy.
This also caused the changes to "keymap-zenxfi3.c", to keep the stock functionality (no further changes in here).
Change-Id: Ic222faf89e9a9a2332a49d6e532cedb6eb16d3d7
Reviewed-on: http://gerrit.rockbox.org/762
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Apart from the fact that the original settings were much
to sensitive for my taste, they are now easier configurable.
Change-Id: If1772367fc1f34fa1255f57b1831d1f33dc34558
Reviewed-on: http://gerrit.rockbox.org/772
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Before, the Cypress chip power is always turn on either from internal battery
or from usb host. In this regard, the internal battery energy was spend on the
inactive chip. Now power of the Cypress chip is enabled only on the external usb host.
Change-Id: Iae7cddd1237ea9ed93fee5404575cc01543cb00c
Reviewed-on: http://gerrit.rockbox.org/433
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
When the align parameter was a 32bit value (like all default integer literals),
and the to-be-aligned value is a pointer the upper 32bit got corrupted because
the value was casted down to 32bit.
Note: This hasnt been a problem because apparently the sim always gets 32bit
addresses (I found this when compiling Rockbox as a library).
Change-Id: I0d2d3fd8bfa210326b27162bb22c059da97d207a
Turn on 4x oversampling inside UDA1380 codec.
This allow will move the quantization noise to the higher frequencies,
that slightly improve the final sound quality.
Change-Id: Idf79cd877c526d8937a47c34e9c180d837a15db1
Reviewed-on: http://gerrit.rockbox.org/435
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
Reviewed-by: Björn Stenberg <bjorn@haxx.se>
Defining HAVE_BUTTON_DATA without simultaneously defining HAVE_TOUCHSCREEN
caused compile errors. (I need them separated for a scrollstrip driver.)
Change-Id: I945d3437d840035ccc0c147f8155029b403c6ec2
Reviewed-on: http://gerrit.rockbox.org/771
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.
On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).
As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.
This commit also adds some documentation to events.h
Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
This complements offset-based resume and playback start funcionality.
The implementation is global on both HWCODEC and SWCODEC.
Basically, if either the specified elapsed or offset are non-zero,
it indicates a mid-track resume.
To resume by time only, set elapsed to nonzero and offset to zero.
To resume by offset only, set offset to nonzero and elapsed to zero.
Which one the codec uses and which has priority is up to the codec;
however, using an elapsed time covers more cases:
* Codecs not able to use an offset such as VGM or other atomic
formats
* Starting playback at a nonzero elapsed time from a source that
contains no offset, such as a cuesheet
The change re-versions pretty much everything from tagcache to nvram.
Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38
Reviewed-on: http://gerrit.rockbox.org/516
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
The build system needed fixes because the tools paths changed and one tool that
we used (apkbuilder) was removed entirely. Recent NDKs don't ship gcc 4.4.3
anymore, therefore switch to 4.6. The code itself needed a fix for a jni
reference bug that was uncovered by KitKat.
The port now builds with latest sdk (r22) and ndk (r9d).
Change-Id: Id74fa54ba93bbb0ee30373fbe79e92c5ff03201d
With the lcd underflow code at work, it results in small flicker when
switching frequency but it should be fine because it doesn't happen very
often and I don't think there is a way to avoid it without disabling EMI
frequency scaling.
Change-Id: I458732d52bbf27cda2510c3836539db1fb24ea15
For some reason the power subsystem needs to know the relationship between
the VDD{D,A,IO} and uses a weird register to do so.
Change-Id: I7fcc75f6cc0460b4997914986deda7ca544a4940
Contrary to the imx233, the stmp37xx lcdif doesn't know how to properly
recover from underflow and things are worse because of the errata which
makes the lcdif not clear the fifo. Workaround this by detecting underflow
and taking action: stop dotclk mode (will clear fifo) and schedule next frame.
The dma transfers now write the ctrl register as part of the PIO writes,
making the code simpler.
Change-Id: I15abc24567f322cd03bf2ef7903094f7f0178427
Uses a cosine factor to smoothly shift the PCM level from the old level
to the new one over the length of a frame.
Implements indirect calls to PCM scaling function instead of testing
conditions on every callback, cleanly assigning a different call to
do the volume transition. The volume change call then assigns the final
scaling function.
Change-Id: If1004b92a91c5ca766dd0e4014ec274636e8ed26
Reviewed-on: http://gerrit.rockbox.org/763
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested: Michael Sevakis <jethead71@rockbox.org>
Implement scanning as binary tree in array.
Make the ADC calls fewer without compromising read quality.
Declare the thread function as 'noreturn' to save some stack. Reduce
stack size (regardless, % use is now a bit lower).
Change-Id: I239792fd2a0a2c019d1ec4af1d6d4b466cdf0ef5
I must have been blind and copied some intermediate file
instead of final version. No functional change, only fixes.
Change-Id: Icaa868225517662c88f8492b1f04808407853361
No code changed, just shuffling stuff around. This should make it easier to
build only select parts kernel and use different implementations.
Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5