Commit graph

33783 commits

Author SHA1 Message Date
Solomon Peachy
0662793ca0 Add cleaned-up xDuoo X3 support
Cleaned up, rebased, and forward-ported from the xvortex fork.

(original credit to vsoftster@gmail.com)

Change-Id: Ibcc023a0271ea81e901450a88317708c2683236d
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
2018-07-28 10:56:31 -04:00
Amaury Pouly
b3e2bd619b Update MIPS toolchain to GCC 4.9.4 and binutils 2.26.1, update configure
Change-Id: I4d3dad4521bdf0b0d6ee5d1635ddbf57483d2b42
2018-07-28 10:56:31 -04:00
William Wilgus
8fb1740a78 Fix scroll_engine truncation
fix one off error

Change-Id: I9b3b23c9f6c36107e73e511d8cb1bc5cd987e765
2018-07-28 15:36:13 +02:00
William Wilgus
568b81202e Fix Red on PowerSave in Simulator
Change-Id: Ic5d9de230efceabc2c428e5c78fa6596a5a34840
2018-07-28 14:55:52 +02:00
William Wilgus
6f0320a953 As3525 v1/v2 Add power savings menu
Allow user to select cpu undervolt

There have been quite a few issues across the SANSA AMS line related
to CPU undervolting while most players show greatly increased runtime
some crash.
Rather than constanly upping the voltage we now have a
setting with a safe value for all players and the option for lower voltages

I plan to add a few other options here later such as disk
timings and maybe some other clocks/experimental settings

Added: Disk Low speed option for AS3525v2 devices cuts
	frequency to 12 MHz from 24 MHz
Added: Disk Low speed option for AS3525v1 devices cuts
        frequency to 15.5 MHz from 31 MHz

Added: I2c Low Speed AS3525 devices, should be bigger improvement for v1 devices

Fixed: Debug menu for AS3525v2 No SDSLOT frequency,
	Showed IDE freq though it is unused

Added: DBOP and SSP underclocking affects display on v1/v2 respectively

Fixed: debug menu now has SSP frequency, and SSP_CPSR

Update: made settings menu more generic

Update: cleaned up code

Added: Clip v1 & Fuze v1 didn't have HAVE_ADJUSTABLE_CPU_VOLTAGE.
	not sure why but,  waiting on testing to confirm

Added: C200v2 and E200v2 devices and HAVE_ADJUSTABLE_CPU_VOLTAGE.

Fixed: v1 devices don't like display timing set lower (dbop)
       v1 devices don't have a divider set for ssp (causes divide by 0)

Fixed: ClipZip display lags with Max SSP divider changed from 0xFE to 0x32

Fixed: v1 devices didn't work properly with highspeed sd cards
	Added code from http://gerrit.rockbox.org/r/#/c/1704/
	Added powersave and IDE interface enable/disable

Added: V2 devices now have powersave enabled on sd interface

Update: cleaned up code, lang defines, added manual entries

Update ssp clock mechanism added calculated ssp divider to clipzip

Update turn display clock off when clip+ turns off display

Fixed: clipzip wrong register for SSP clock

Change-Id: I04137682243be92f0f8d8bf1cfa54fbb1965559b
TODO: add other players?
2018-07-27 23:56:32 +02:00
William Wilgus
400603abdf Lua -- Fix device hang when scroll function active on clear_screen
I previously noticed that manually clearing the framebuffer while scroll
function was active caused lua to crash

I could reproduce in sim and on device but I thought using the plugin
supplied rb->lcd_clear_screen was immune to this issue

Unfortunately some devices exhibit this behavior with the plugin function
as well

This patch adds rb->lcd_scroll_stop() before lcd_clear_screen at lua start-up
and to the supplied include file lcd.lua

Change-Id: I9800145e5c834ea27df5db5f1bca50b0d40faa49
2018-07-27 15:09:55 +02:00
William Wilgus
dcd71e66bd Optimize lcd-ssd1303 driver (clip series)
Saves 100+ bytes (50 of it in iram), saves a bit of power

Internal LCD clock decreased but with added efficiency of drawing routines
loses only around 2 Hz on the scanrate (~75Hz) while fps is slightly increased

Column offsets are now calculated outside the loops saving a few instructions

Passing a LCD_NOP command after lcd_update turns off Data/Cmd# gpio
saving a bit more power

Added a function lcd_write_cmd_triple() that allows 3 commands to be sent at once
when enabled with LCD_USE_FIFO_FOR_COMMANDS it sends them back to back without
checking FIFO status in between or sending to thhe D/C# Gpio.
Makes an assumption about the FIFO being large enough to
accept 3 commands after being emptied which should be the case on the
clipv1, clipv2, clipplus. I have only enabled it for the clip plus
as thats the only device I have to test it on.

On clip+ the SSP clock is now turned off when screen is off

Change-Id: Ib5fd24697bfe4ac8b8ee017361e789e4a7910d21
2018-07-26 04:23:28 +02:00
William Wilgus
056d4b0ec0 Update AS3525 v1/v2 debug menu; add scrolling and missing frequencies
On the clip zip most debug menu items get cut off and there is
no way to read most of the debug menu items.

This patch makes the menu button scroll the text 1 character
to the right with each press and the center (select) button
re-aligns the text

Adds SSP frequency(v2) & register
Adds SD slot frequency(v2)

Change-Id: If4705d6790e25061931ca654062e22fc2e0a6f16
2018-07-26 04:00:28 +02:00
William Wilgus
ff7d2bdee1 Fix lcd-scroll.c truncation warnings
Change-Id: I312ec7ad06fde5b2f9747661cd2d4ffcb4cbf755
2018-07-25 20:53:17 +02:00
William Wilgus
1054b5748c Revert "Ignore truncation in lcd-scroll.c"
This reverts commit 540637ed33.

Change-Id: I88e71ef47a11818a5acb407ff9c0723d3c197243
2018-07-25 20:41:48 +02:00
William Wilgus
7b5ce736db Fix playersim CHAR_WIDTH re-definition
Change-Id: I49d2b3635c62277723665d0bdd68808cc82ca1a9
2018-07-25 20:16:02 +02:00
William Wilgus
540637ed33 Ignore truncation in lcd-scroll.c
Change-Id: Id1008300e58cf12ab920c1023354a74a6d32daae
2018-07-25 19:56:53 +02:00
William Wilgus
5e5ddce270 Fix truncation warnings in tree.c, filetree.c
Change-Id: Ic5ae1e5f904a3da4bba07cdef7f4bb003dc091b2
2018-07-25 19:33:52 +02:00
William Wilgus
7bec71368b Fix formatting cuesheet.c
Change-Id: I51edd5319882b2928b565c27615e20937399a1f9
2018-07-25 19:32:25 +02:00
William Wilgus
2fb6b2b458 Fix truncation warning playlist.c, tree.c
Change-Id: I0c62f06fea3ccb55efa21b719a44a263dedc32e2
2018-07-25 18:34:53 +02:00
William Wilgus
2eeb338e90 Ignore cuesheet title truncation
Change-Id: I0de8a1468379f60140fb30b6c086fe15ea753da2
2018-07-25 14:14:45 +02:00
William Wilgus
bdbc7f7b7b Revert "Remove truncation from cuesheet"
This reverts commit a81c63160c.

Change-Id: Ie6d3e780fd6318b6173943167015f78f4a9c327a
2018-07-25 08:33:14 +02:00
William Wilgus
021124f868 Revert "Fix cuesheet printf truncation"
This reverts commit c332180afd.

Change-Id: Ic7a85a0fe82cd13514e85011e0a5cbd79ec36c2b
2018-07-25 08:31:13 +02:00
William Wilgus
c332180afd Fix cuesheet printf truncation
Change-Id: I48189c3ce29f27d4b3bb4f874c80636c1f0ca6b6
2018-07-25 08:13:19 +02:00
William Wilgus
a81c63160c Remove truncation from cuesheet
Lets see if this works..

Change-Id: I1fa7f17a07b3a7b479f987694ffcd59bc4e0bf5b
2018-07-25 07:33:13 +02:00
William Wilgus
c15af64452 AMS v1/v2: Fix I2C2_CSPR debug menu entry
I2c controller needs to be enabled in order to read CSPR0, CSPR1
registers function sets CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE
and only clears if it wasn't previously enabled

Use divider set in register to calculate frequency rather than
hard coded divider

Change-Id: I54ecc0c1859e906c00f4c2ae8ae2424a4619df98
2018-07-25 06:03:44 +02:00
William Wilgus
6a568761c8 CLIPPLUS -- Remove un-needed handling for power button button button_read_device()
switching GPIOB in order to read GPIOD96)
(power button) is apparently unneeded

Change-Id: I1fbf13f67f938806086754cdd5e389ef6746ae5f
2018-07-25 06:01:56 +02:00
William Wilgus
1b68aea444 Try #4 for lua make
Last commit was just a test to see if it work this one cleans it up
a bit and should be a bit faster

Change-Id: Ifdff5c5b78bcc6889506de607193246beccdde6b
2018-07-24 08:31:19 +02:00
William Wilgus
1482a31134 Try # 3 for lua make file
Change-Id: I888612f3339ffcde28602a4e739b08f630de9c28
2018-07-24 07:31:40 +02:00
William Wilgus
aefdd2061d Lua Fix image saving for 32 bit targets -- update make file
Hopefully this will fix the build faliures for a few targets

Change-Id: I68f6c85513ef589e5f6a50a8efc7bfae9fd62acd
2018-07-24 07:09:01 +02:00
William Wilgus
af35d19916 Rocklua -- Extend / Fix rliImage
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 & 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices

Fixed handling for 24-bit devices (32?)

-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I8a9ff0ff72aacf4b1662767ccb2b312fc355239c
2018-07-23 05:13:32 +02:00
William Wilgus
ef210b5fe4 Revert "Rocklua -- Extend / Fix rliImage"
This reverts commit 2daec3d3c3.

Change-Id: I53ea1f491e3c6d6fb759f426f203f927bd26b1e9
2018-07-22 18:43:04 +02:00
William Wilgus
2daec3d3c3 Rocklua -- Extend / Fix rliImage
Some devices(1-bit / 2-bit displays) have packed bit formats that
 need to be unpacked in order to work on them at a pixel level.

This caused a few issues on 1 & 2-bit devices:
 Greatly Oversized data arrays for bitmaps
 Improper handling of native image data
 Framebuffer data was near unusable without jumping through hoops

Conversion between native addressing and per pixel addressing
 incurs extra overhead but it is much faster to do it
 on the 'C' side rather than in lua.

Not to mention the advantage of a unified interface for the end programer

-------------------------------------------------------------------
Adds a sane way to access each pixel of image data
Adds:
--------------------------------------------------------------------
img:clear([color],[x1],[y1],[x2],[y2])
 (set whole image or a portion to a particular value)
--------------------------------------------------------------------
img:invert([x1],[y1],[x2],[y2])
 (inverts whole image or a portion)
--------------------------------------------------------------------
img:marshal([x1],[y1],[x2],[y2],[funct])
 (calls funct for each point defined by rect of x1,y1 x2,y2
  returns value and allows setting value of each point return
  nil to terminate early)
--------------------------------------------------------------------
img:points([x1],[y1],[x2],[y2],[dx],[dy])
 (returns iterator function that steps delta-x and delta-y pixels each call
  returns value of pixel each call but doesn't allow setting to a new value
  compare to lua pairs method)
--------------------------------------------------------------------
img:copy(src,[x1],[y1],[x2],[y2],[w],[h],[clip][operation][clr/funct])
 (copies all or part of an image -- straight copy or special ops
  optionally calls funct for each point defined by rect of
  x1, y1, w, h and  x2, y2, w, h for dest and src images
  returns value of dst and src and allows setting value of
  each point return nil to terminate early)
--------------------------------------------------------------------
img:line(x1, y1, x2, y2, color)
--------------------------------------------------------------------
img:ellipse(x1, y1, x2, y2, color, [fillcolor]
--------------------------------------------------------------------
Fixed handling of 2-bit vertical integrated screens

Added direct element access for saving / restoring native image etc.

Added more data to tostring() handler and a way to access individual items

Added equals method to see if two variables reference the same image address
(doesn't check if two separate images contain the same 'picture')

Optimized get and set routines

Fixed out of bound x coord access shifting to next line

Added lua include files to expose new functionality

Finished image saving routine

Static allocation of set_viewport struct faster + saves ram over dynamic

Cleaned up code

Fixed pixel get/set for 1/2 bit devices
-------------------------------------------------------------------------
Example lua script to follow on forums
-------------------------------------------------------------------------

Change-Id: I7b9c1fd699442fb683760f781021091786c18509
2018-07-22 18:05:02 +02:00
Michael Sevakis
19b2964d78 AMS v1/v2: Remove sd_enabled as an externally-visible variable.
Also removes the sd_enable() function call. It was only used in
the debug screen on AMSv1 and not used at all on AMS v2.

For v1,obtain debug info in a struture passed to a dedicated
debug info function so that enabling and disabling the controller
isn't racy.

Change-Id: I7c44693bc2df5a1f16168b05b3abfe622f9584ce
2018-07-04 15:20:47 +02:00
Moshe Piekarski
ab1b67f37b Textviewer night mode
Add a night mode to textviewer.

Change-Id: I6ddcd9c3c87473cbbffaeacf63a21ef11c0e5f44
2018-07-04 06:25:45 +02:00
Marcin Bukat
8742f6f0e2 Agptek: Fix headphones detection
Change-Id: Id43bfee7357eef8dda6a617c1207b930f3ea90a0
2018-06-28 09:52:59 +02:00
Marcin Bukat
971001d141 Agptek: Fix support for empty strings in sysfs helper functions
Change-Id: Id5573059da2b454f5336b3cebce7c09a83a7826f
2018-06-28 09:52:59 +02:00
Franklin Wei
d64ff86fb6 puzzles: resync with upstream
This brings the source to upstream commit 506b073 (though I have made some
extra commits on top of that). Notably this includes a fix for a double-free
bug that I myself introduced upstream.

Change-Id: I02671586bbc34d63e05398ee971271fed42538cf
2018-06-20 19:13:03 -04:00
Marcin Bukat
708a54d3de Fix yellow for LCD_DEPTH == 32
Change-Id: I59e9ec8720555c17e882a3a8c7ed0ba281b8d7c7
2018-06-20 21:57:34 +02:00
Marcin Bukat
28cfeed4c1 Agptek Rocker: Add missing lcd_set_active(true) in lcd_init_device()
This should fix problem introduced in 5c015ad resulting
in not updating screen properly in wps.

Change-Id: Ie36b6edfcfc7d425c84381402adae79d77fcc92f
2018-06-20 21:17:08 +02:00
Marcin Bukat
706e31b415 Volume adjustment in WPS ignored AUDIOHW_SETTING values
AUDIOHW_SETTING() defines number of decimals and step size.
This is taken into account in sound menu but ignored in WPS.
This was not a problem so far since all drivers used 0 decimal
places and step size equal 1.

Change-Id: I3466d6651c46a24cb5114eae1e1747293a76a1a6
2018-06-20 12:19:33 +02:00
Marcin Bukat
20bdfa8209 Agptek Rocker: Add to builds.pm
Change-Id: I512dc1d5419d4e59a3dd2503ce9da0a826975af1
2018-06-14 11:29:02 +02:00
Marcin Bukat
203e4adb1e Agptek Rocker: Slightly tweak build procedure
In bootloader build create stripped binary bootloader.rocker

Change-Id: Id67bebe82251fac22ad905ad3d49525691816746
2018-06-14 11:02:18 +02:00
Marcin Bukat
5c015ada90 Agptek Rocker: Implement lcd_enable()
In theory this should slightly improve battery life.

Change-Id: Iaf55beb7dbc20e7562017958aeb0386459d49a31
2018-06-14 10:03:07 +02:00
Marcin Bukat
755b824596 Agptek Rocker: Fix mpegplayer keymap
Change-Id: Iba438b49b66dc3bb3fbfc24b74ced9eaab993886
2018-06-14 09:09:24 +02:00
Marcin Bukat
419219e06d Agptek Rocker: Update tools to alter .upt update images
Change all references to official rockbox repository

Change-Id: I22d305bc6c6f89b8737b2bc15378bfd7fe10621e
2018-06-13 13:30:34 +02:00
Franklin Wei
f727b0787a puzzles: minor nitpicks to fbb6a2f
Just some whitespace changes to maintain stylistic consistency.

Change-Id: I50b5d52db2795cfcb4155bdffbfb80c1c3773112
2018-06-12 12:11:06 -04:00
Franklin Wei
c2d5ac1762 puzzles: fix typo introduced by fbb6a2f
When zoomed in, the original commit made a mono bitmap (a.k.a. text) always
have the red component set to 255. This would cause drawn text to always be
red. Fixed.

Change-Id: Iec06256a3a783948c60c70557de042b375224448
2018-06-12 12:09:44 -04:00
Marcin Bukat
f2075a5709 Add XRGB8888 native format
This got lost somehow during Agptek port merge

Change-Id: Ie84463ba523d2307466b49354867117e7393a440
2018-06-12 13:25:12 +02:00
Marcin Bukat
0e48cb7768 Silence warnings
Change-Id: Ied5ad7d3c193427892b681f95b44fcac5af0e16e
2018-06-12 13:09:31 +02:00
Marcin Bukat
32e8028a04 Cleanup comment
Change-Id: If39a5d2f64a9453a9b9b0cf0a2e3ad36027978ff
2018-06-12 13:02:47 +02:00
Marcin Bukat
f4390794ef bmp2rb: Add XRGB 32bit native format
Change-Id: Ic4af5a7c53c032e58dc252d1f69001d7aafd7f26
2018-06-12 12:55:56 +02:00
Marcin Bukat
307ea8382e Fix merge errors which broke sony linux targets
Change-Id: Ic0c618c6e2034609d1964bb3e9ff96c7a7cf1d40
2018-06-12 12:50:09 +02:00
Marcin Bukat
71dc1a789a Fix MIPS threading code to compile with older compiler
Official rockbox mips gcc is old and doesn't support
symbolic register names in inline assembly

Change-Id: If67230d06e28ccf31b0f8f8e1b622275fed3f6ff
2018-06-12 12:41:03 +02:00
Marcin Bukat
9be14c014f Fix merge error
Change-Id: If1b5258bb86e477ac4cb1adb95f6c887a2ef8810
2018-06-12 11:44:01 +02:00