Commit graph

10124 commits

Author SHA1 Message Date
Amaury Pouly
85390865b5 sansaview: fix lcd code
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
2014-05-11 19:56:43 +02:00
Amaury Pouly
46cd8ea824 sansaview: cleanup backlight code
Change-Id: I0a844931fa2f7f247c8c5e28673241f79902f9be
2014-05-11 19:56:34 +02:00
Amaury Pouly
c1628ba366 sansaview: clean config file
Change-Id: I2dc4bd724272f4c044815370dd2df95f131426a0
2014-05-11 19:56:28 +02:00
Michael Sevakis
355b5406fa Make errno a thread-local variable.
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>
2014-05-09 23:14:58 +02:00
Amaury Pouly
fcb835f61a regtools: normalise description files, and remove obsolete file. No logical change.
Files were generated using utils/regtools/tester in "write" mode.

Change-Id: Ib391b8dbb5ec84eb821e0d0a3699d306414f2aa1
2014-05-01 19:35:05 +02:00
Amaury Pouly
c8461c5152 imx233: fix comments
Change-Id: I2e907feaec39e6ec1614ed19676b13a1d4f7f6b2
2014-04-24 14:12:25 +02:00
Amaury Pouly
25ecbc5432 imx233: fix typos and sdmmc bug regarding write buffer
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
2014-04-23 23:44:11 +02:00
Amaury Pouly
54dd77a5f8 imx233: fix sdmmc driver bug when sector count is 0
Since the driver will read count-1 sectors, this will stuck the card.

Change-Id: Ib80484044acd1fad2914d3ffeb3940a13d2480c4
2014-04-23 23:43:27 +02:00
Marcin Bukat
bd10245e89 MPIO HD300: Fix occasional scrollstrip hang
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>
2014-04-15 08:18:56 +02:00
David Jilke
d489444119 Complete Plugin Keymaps for Creative Zen X-Fi3
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>
2014-04-06 20:51:12 +02:00
Sebastian Leonhardt
580104db4d Vibe500: change scrollstrip and button sensitivity to defines
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>
2014-04-03 07:35:47 +02:00
Dmitry Gamza
020f16a1c7 optimize Cypress chip power supply for iriver h100 series
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>
2014-04-02 20:28:37 +02:00
Szymon Dziok
7b015f8681 Sansa View: implement proper backlight and buttonlight switching.
Change-Id: Iab05c1fa5356efa28a4ee774bfd994b22c5661da
2014-03-27 23:23:38 +00:00
Szymon Dziok
62ac0c78c3 Sansa View: adjust two things (define fake codec, missing header file) in order
to compile the bootloader (now it should).

Change-Id: Iba6aa2f118670d66e10451eaf43dd4d83176b06a
2014-03-27 22:35:04 +00:00
Szymon Dziok
938aa8eefe Sansa View: define a GPIO bit for USB detection in order to compile the bootloader.
Change-Id: I748a49f4b48385f328946e861d1f9a026b1efd7d
2014-03-27 22:29:34 +00:00
Szymon Dziok
ee1a1ce27c define more GPIO ports for the NVIDIA GoForce SoC (PP6100).
Change-Id: Ib02c44b9174fd968ed17640fc515b9c01c4a248d
2014-03-27 21:23:38 +00:00
Szymon Dziok
828f880d40 HDD6330: enable AB repeat.
Change-Id: Ia8bb739cd60b1b2d8a8cd7ad2c536e22553083c6
2014-03-27 19:50:47 +00:00
Szymon Dziok
65ef2c9b1d HDD6330: enable backlight fading.
Change-Id: I60265237485e5892da2d45af0c44eb0aef40d22a
2014-03-27 19:50:47 +00:00
Szymon Dziok
ce28b180b3 SA9200: enable headphones detection.
Change-Id: Ieeeb59f9899a7de61cfc3604b127f1c4377774bf
2014-03-27 19:50:47 +00:00
Szymon Dziok
be6b65162c HDD1630: enable AB repeat.
Change-Id: I474e3cd300e2282de44f9d6e7bdc616e96e3496a
2014-03-27 19:50:47 +00:00
Szymon Dziok
c1d6ba19b9 change order of include headers and at the same time fix warning about
the implicit declaration of the _backlight_brightness().

Change-Id: I84ab4db19663d1918aaf5d98d51308d4ad2c4075
2014-03-27 19:50:47 +00:00
Szymon Dziok
71ee4b44ec HDD1630: enable backlight fading.
Change-Id: I767cab4ab51c17a262519d56d0a3071d3c7bbe16
2014-03-27 19:50:47 +00:00
Thomas Martitz
9cb9f763a9 Fix ALIGN_DOWN() macro on 64bit.
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
2014-03-24 09:35:27 +01:00
Amaury Pouly
5abe98dada zenxfi3: fix horrible bug which prevented the power button to work
Change-Id: Ic8e86762f84ca41e931801c1aee08007129eef20
2014-03-22 22:36:32 +01:00
Dmitry Gamza
7e85fe5be1 some optimization for iriver h100 and h300 series
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>
2014-03-18 14:12:06 +01:00
Sebastian Leonhardt
1cf17436b7 Fix (unintentional) linkage of HAVE_BUTTON_DATA with HAVE_TOUCHSCREEN
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>
2014-03-18 10:56:19 +01:00
Thomas Martitz
915bc09996 Fix stupid typo in 470989b that triggered panics easily.
Change-Id: Ic998a0ea93141a5399e28dc286eea4e3d40663d6
2014-03-15 02:23:43 +01:00
Thomas Martitz
361aa9263d Fix reds.
Change-Id: I4f065a5b9f96df4d70ee8bb2836effc9b97b01fa
2014-03-14 23:43:45 +01:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
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
2014-03-14 23:36:30 +01:00
Michael Sevakis
31b7122867 Implement time-based resume and playback start.
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>
2014-03-10 04:12:30 +01:00
Thomas Martitz
157562bdbd Fix ipod6g build.
Change-Id: I218e1721b8ddbb067581f4bc686a20f4c88694ae
2014-03-09 18:18:45 +01:00
Thomas Martitz
6499ce3e44 android: Get the port up and running again
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
2014-03-09 18:11:35 +01:00
Amaury Pouly
2a71c08533 zenxfi: enable speaker
Change-Id: I603112d2a348abf92d5c8975ea76d3a57fda7cfc
2014-03-09 01:25:51 +01:00
Amaury Pouly
88799b38cf zen(xfi): enable frequency scaling
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
2014-03-08 18:51:54 +01:00
Amaury Pouly
9637f4486b imx233: rewrite frequency scaling to use the new function
Change-Id: I0f9968de76ce17710d31f7bc609440654e68b6f1
2014-03-08 18:51:54 +01:00
Amaury Pouly
1f3979821c imx233: add function to change cpu/hbus frequency safely
Change-Id: I88e9ad54ba65846ae4d94ae03009b3656f2489f2
2014-03-08 18:51:54 +01:00
Amaury Pouly
3e2f3efd89 imx233: prepare frequency scaling for stmp3700
Add entry for stmp3700 maximum frequency which is 320MHz.

Change-Id: I6db4aad4efa0a7c1347a1ceb262a0295f63057ae
2014-03-08 18:51:54 +01:00
Amaury Pouly
9fe3687923 imx233: fix regulator code on stmp3700
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
2014-03-08 18:51:54 +01:00
Amaury Pouly
4b2f59b3db zen: handle lcd underflow by hand
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
2014-03-08 18:51:54 +01:00
Amaury Pouly
b0940b1dd3 imx233: add lcdif underflow irq support
Change-Id: Ie3fe223ff40abff38bb9b09f398eb5411fa0be4c
2014-03-08 18:51:53 +01:00
Michael Sevakis
61d0583384 Greatly reduce volume-change zipper artifacts with SW volume.
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>
2014-03-08 08:04:41 +01:00
Michael Sevakis
669fa9a130 Gigabeat S: Improve headphone thread implementation.
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
2014-03-06 17:28:26 -05:00
Marcin Bukat
2f21f77ade ingenic: crt0.S fixes #3
Hopefyly this time is the final one.

Change-Id: I386964f407ca98499e9a482507e4d5dfa02ee891
2014-03-04 10:28:02 +01:00
Marcin Bukat
7066197ccc ingenic: fix bugs introduced by 5900bf7
I must have been blind and copied some intermediate file
instead of final version. No functional change, only fixes.

Change-Id: Icaa868225517662c88f8492b1f04808407853361
2014-03-04 10:24:43 +01:00
Thomas Martitz
c35e1db832 Fix last warnings.
Change-Id: If0a7e11c3e107cb7756c0d70ed5b17fda92b166e
2014-03-03 20:34:46 +01:00
Thomas Martitz
68768260e8 Fix more reds.
Change-Id: I4b58dda0953b7f9799238c32b78037b0a5403c04
2014-03-03 20:26:08 +01:00
Thomas Martitz
c245de029d Fix various reds. Some includes needed fixup.
Change-Id: I4327740bae17054131feb917abdd58846c451988
2014-03-03 19:10:48 +01:00
Amaury Pouly
e5ce28ca09 zen/zenxfi: correctly implement lcdif errata
Change-Id: Ib2a6000035d70d687025a78bbea416d77af562fe
2014-03-03 18:33:04 +01:00
Thomas Martitz
382d1861af kernel: Break out kernel primitives into separate files and move to separate dir.
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
2014-03-03 18:11:57 +01:00
Thomas Martitz
8bae5f2644 Iaudio m3: implement lcd_get_dpi() (aka fix red).
Change-Id: I66dbbb4d8795cf1274fc721bf0e8769b8f757c31
2014-03-03 17:38:43 +01:00