Commit graph

34753 commits

Author SHA1 Message Date
Dominik Riebeling
5efaa9ef80 rbutil: Use globalPos() for getting mouse position.
globalX() / globalY() are deprecated for Qt6. Use globalPos() instead,
which gives the same result.

Change-Id: Ie0b733b88107e971de9c3e8c42434d7d47a65b76
2020-10-11 18:05:21 +02:00
Amaury Pouly
4e89e0e0ea nwztools: fix wrongly generate MD5 files
When generating the MD5 using -z index,name the tool would add the entry but
forgot to increase the file size, hence truncating the file.

Change-Id: Ibd3c594722ab46350cda60d158666fe34a96e922
2020-10-11 16:20:45 +02:00
Solomon Peachy
6533d983ca hosted: Add ROLO support for hosted targets
Change-Id: I2d46a63ee8225a9d9d77dd80a06c418af78c260c
2020-10-11 14:18:42 +00:00
Amaury Pouly
fcdfeb2a45 nwztools: re-implement MD5 on Windows
I forgot to fixup the windows up and missed it because of conditional
compilation

Change-Id: I526c765b9d56508815941ecb9b9dbac7ea407cf0
2020-10-11 14:10:12 +02:00
Amaury Pouly
e371dee4a3 nwztool: fix computation
It turns out the calculation gives the right result for the wrong reason, this
fixes it.

Change-Id: I36053c8993b5ae1e85380da59546ffade265fb3f
2020-10-11 13:08:03 +02:00
Amaury Pouly
8ce60c54f7 nwztools/upgtool: add support for MD5
When compressing, it is possible to tell the tool to add an entry to the MD5
file (index 1), it is still necessary to give an empty file for that index.
To do so, pass the option "-z idx,name" insteas of "-z idx". This will create
an entry of the form "size md5 name". For instance "-z 6,system.img".
When decompressing, if one passes "-z idx,name" instead of "-z idx", the tool
will decompress and check against the value in the MD5 file.

Change-Id: Ifb945f6121644ae9105265d2d83ce6067301c5b2
2020-10-11 13:08:03 +02:00
Amaury Pouly
7cba599106 nwztool/upgtools: add NW-A55 and DMP-Z1 KAS, reorganize list
Change-Id: I24bc6b15c954540cfa9b4f176ecbf817b1b641e7
2020-10-11 13:08:03 +02:00
Amaury Pouly
1b5e824405 nwztool/upgtool: add support for compression
To decompress some output file(s), simply pass -z <idx> where idx is the index
of the file to decompress, starting from 0. For example
  upgtool -e NW_WM_FW.UPG -o tmp/ -m nw-wm1a -z 6 -z 7
to decompress files 6 and 7. To compress file, use the same options:
  upgtool -c NW_WM_FW.UPG -m nw-wm1a -z 2 script.sh md5sum.txt system.img

Change-Id: I1ef0b3e02c98e58154f1a959fb1ad70ad2ce6500
2020-10-11 13:08:03 +02:00
Amaury Pouly
1f338f7078 nwztools/upgtools: add support for windows
In order to avoid the crypto++ mess, the code uses the Windows Cryptography API,
which is standard. There is also some makefile magic to cross-compile:
  make PREFIX=i686-w64-mingw32- EXE_EXT=.exe
I selected the option so that it should statically link supports libraries used
by gcc (slsj and libwinpthread).

Change-Id: Iaf07da23afe81ed217fb3921ce13367c5441514d
2020-10-11 13:08:03 +02:00
Amaury Pouly
05fa8fc343 scsitools: typo
Change-Id: I0f4e5b6c5e88a1ae49102e6f6fc6f8c86cb63959
2020-10-11 13:08:03 +02:00
Amaury Pouly
53d2742a48 nwztools: add support for new UPG format on post-WM1/A30 devices
The new code supports reading and writing UPG files. I kept the old keysig
search code but it only supports the old format (the new format has too long
keys anyway). Since we now have to support two types of encryption(DES and AES),
I reorganized the crypto routines and clean-up some code.

Change-Id: Ie9be220ec2431ec6d0bd11699fa0493b62e1cec2
2020-10-11 13:08:03 +02:00
Amaury Pouly
cda16f9439 scsitools: const correctness and add "get_dnk_nvp all" subcommand.
Change-Id: Ic5cb3dfa3be684f31a2c55a3cb7d45cfe8c65b25
2020-10-11 13:08:03 +02:00
Amaury Pouly
76fbb33adf nwztools: fix MW-WM1/A30 KAS, fix KAS length
Split WM1A/WM1Z because they don't have the same KAS. On newer devices, the KAS
is actually 64 bytes, not 60. The strange thing is that "get_dnk_nvp kas" returns
60 bytes whereas "get_dnk_prop kas" returns 64, not sure why.

Change-Id: I944d3d838209ba58388439af0cdf5d7c74f1f7fc
2020-10-11 13:08:03 +02:00
Dominik Riebeling
c8fa53050d rbutil: Add project file for building multiple binaries.
To use ipodpatcher and sansapatcher as external binaries (so we can do
proper permission elevation) we need to build them using qmake as part
of the main build. Add a subdirs template based project file to do that,
and project files for the patchers.

Move Linux appimage rules one level up, since it needs to include the
patchers as well.

Change-Id: I63ee59372668f4319402df65a77a6f04521d133b
2020-10-11 09:42:13 +02:00
Dominik Riebeling
cd192f239b rbutil: Fix encoding of turkish translation.
The file encoding was messed up long ago. Since the translation wasn't
updated since reimport the original patch (FS#8407).

Change-Id: I93e12fbde4f63926d18df382c0254465b11750cd
2020-10-11 09:42:13 +02:00
Solomon Peachy
5cfd3ae4e6 hosted: Use O_CLOEXEC for all open() and "e" for fopen() calls
This way we'll automatically close the files upon exec()

Change-Id: Ic0daca8fb56432830de4a2f4a86a77337121ecc7
2020-10-11 01:47:03 -04:00
Szymon Dziok
4f8736909a SVG image of the xDuoo X3 and other formats for the manual.
Change-Id: I1f6eecb43907b5fb845a48209349194e32cd6994
2020-10-11 02:30:53 +00:00
Franklin Wei
7c00e9b30b puzzles: improve frontend documentation
What it says on the tin.

Change-Id: Idf8f520e0c8c1fab98d292f4ad94e5231578f9ce
2020-10-09 22:01:00 -04:00
Solomon Peachy
4b10aacbc2 xduoox3ii/x20: headphones take precedence over line out
so if both are plugged in, assume headphones (and respect volume)

Change-Id: Ia77ae6d484ac61f6a2b4cd51a991f59de239cfa6
2020-10-09 20:52:43 -04:00
Solomon Peachy
6c6642e8d5 m3k: Fix red bootloader build
Change-Id: I3a6e9e6222e6219484c6903325c985bff8af39ef
2020-10-09 19:54:49 -04:00
Solomon Peachy
02a49386a9 Fix the FILTER_ROLL_OFF build; got a test inverted.
Change-Id: I8d4ade8b59022f5e8275bec96d98f806e7e09c37
2020-10-09 21:33:26 +00:00
Solomon Peachy
aabc8aca47 New port: FiiO M3K
Most credit goes to:  Roman Skylarov
Additional integration and refactoring by myself.

 *** COMPLETELY UNTESTED ***

Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-10-09 12:41:18 -04:00
Solomon Peachy
4231c2c83f codecs: Add support for the 'VTX' ZX Spectrum chiptunes format.
This codec requires floating point.

Original author:  Peter Sovietov
Ported to Rockbox:  Roman Skylarov
Further integration and bugfixes:  Solomon Peachy

Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
2020-10-09 11:39:25 -04:00
Solomon Peachy
278522f811 plugins: Enable overlay features for all targets
Change-Id: I8dfbdf903c1fb82541382709a50e411f1bcdaa5d
2020-10-09 13:30:05 +00:00
Solomon Peachy
c18839e3f8 Fix red, hopefully.
Change-Id: I4ee6b9793260ac7dec9d72f27bfe242cd4adbf38
2020-10-09 13:04:38 +00:00
Solomon Peachy
7ad8b2eb3c Clean up some of the plugin SOURCES
Change-Id: Ib68a275c85550acb52306c7af1c3b9ab683362f0
2020-10-09 12:35:23 +00:00
Solomon Peachy
88b2a45b5f xduoox3ii/x20: Define a sane BUTTON_LEFT/RIGHT alias
Change-Id: If11dfa50aeb8cb8b80de730c494d81a9e87880c4
2020-10-09 12:15:43 +00:00
Solomon Peachy
7a1bf01541 Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY*

Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
2020-10-08 20:30:08 -04:00
Solomon Peachy
dc81f96fd1 Don't compile audio codecs into native bootloader builds.
Change-Id: I0b2cc143572bf88423bdf7647cee0af567aee684
2020-10-08 19:20:50 -04:00
Solomon Peachy
ff6e175c20 get rid of ACTION_F3 (leftover from Archos days)
Change-Id: I8f602299bbc8caf6c8189361dbd41af31f19c1b3
2020-10-08 19:20:47 -04:00
Moshe Piekarski
2e2e899869
more DEBUG build fixes
Change-Id: I4ae2b79f53ce59c37ccc9ef06f5ebd145e988763
2020-10-07 00:01:07 -05:00
Moshe Piekarski
cb9280c9e1
Fix DEBUG builds
Change-Id: Ie3b4caebf448444b7400541e44d11d40961781cb
2020-10-06 15:27:56 -05:00
Solomon Peachy
914114fd21 FS13241: Get rid of the hacky hold switch emulation on the X3ii & X20
It doesn't work properly and interferes with the power button in the keymap.

Rework WPS keymap a bit to make single-tap power emulate lock.

Change-Id: I9d9b9b4adcea3764e6e427f484e051c9bab9d13b
2020-10-05 22:55:08 +00:00
Solomon Peachy
c6f66cf696 agptekrocker: Rework WPS keymap a bit; replace direct pitchscreen access with browse
Change-Id: If5cb1e1fae6ed74397cd7f56cd54c14224a4bab0
2020-10-05 22:54:52 +00:00
William Wilgus
ef34126913 lua add better memory stats
lua gives you a memory used number that only reflects the current allocations
if fact it doesn't even give you a way to get the amount of ram free

rb.mem_stats() seeks to fill this gap by marking the memory allocated for lua
with a sentinel value which can later be checked to get a high water mark
of the ram used by lua and a pretty good idea of how much ram is available

Also includes an example script
usage:
used, allocd, free = rb.mem_stats()

Change-Id: Ia282869f989848324d7d88c7df4827fdbce4fb4e
2020-10-05 11:53:27 -04:00
Dominik Riebeling
74258fca31 rbutil: Replace sysinfo filesystem cluster size with type.
The cluster size isn't too useful. Show the filesystem type instead,
since that makes it easier to identify a device not showing up because
of its filesystem type.

Change-Id: I8f58ea23ab90808ab0c37978b211a5470ed8bb8e
2020-10-04 11:31:30 +02:00
William Wilgus
1aa739e3c3 lua misc tweaks and cleanup
checks button_status in rockev
strpbrk_n custom implementation allows setting max search len in source string
add some branch prediction where appropriate
fix formatting in splash_scroller script

Change-Id: Id5d8e9d83f4b3e361ccb67b403af8f9a8a31b8f0
2020-10-04 04:00:54 -04:00
Solomon Peachy
f3ae48f552 hosted: control buttonlights along with the display backlight.
Change-Id: I03385db46e94ca1bb6a4e35c89f630145c9d40e5
2020-10-03 20:12:31 -04:00
Solomon Peachy
7642184fd9 alsa: Refactor pcm_dma_apply_settings_nolock()
Change-Id: I32190e6987afca99b24197ca7ae2853053062d30
2020-10-03 20:12:31 -04:00
William Wilgus
80c3b84e08 lua Add scrollable stack traceback WIP
lua currently splashes a stack traceback on error
for deep tracebacks and especially on devices with smaller screens
this leaves out a lot of vital information

in the past I have resorted to splitting the traceback string or
even saving the return to a file

This patch provides a scrollable buffer with rudimentary text reflow
to allow you to read the whole traceback string

Upon traceback if you press nothing the screen will display for 5 seconds
If you press OK or CANCEL it will quit immediately
PREV/NEXT scrolls the list on button press timeout is disabled

lua now provides rb.splash_scroller(timeout, str)

example script provided too

Change-Id: Idbc8ce0c514196f0fae48c43aeaea8b60d6da1a5
2020-10-03 22:09:52 +00:00
Solomon Peachy
1916aca7f3 imx233: Enable 96/192K playback for all imx233 targets that have room
Change-Id: Ief00cc9243af3168f0c088520936137b64f3b581
2020-10-03 16:56:19 -04:00
Solomon Peachy
c1d4bf290c coldfire: Fix iAudio M5 build
Change-Id: Iecbcfa16918be3abfaab0936a0dae9c9ed48933e
2020-10-03 16:56:19 -04:00
Solomon Peachy
d5167b1221 coldfire: Allow building when 88KHz audio is disabled
Change-Id: Ieeacf591ad4233428dca99c347043e61abae1d1f
2020-10-03 15:57:38 -04:00
Solomon Peachy
2b358ffa7f Disable 88/96KHz from targets that lack the IRAM to hold the mix buffers
Change-Id: I67b15d4c517a74a23639f8659acbc89022c264b5
2020-10-03 15:27:30 -04:00
Solomon Peachy
2e708c48c5 pcm: Dynamically-size the mixer buffer at higher audio bitrates.
Basically, existing sizes apply for <= 48KHz audio. Up to 96K,
we double the mix buffer.  up to 192K, we double it again.

Will help reduce the interrupt load and overall latency, keeping it
roughtly constant as a function of time, regardless of bitrate.

(It is acutally a fixed-size buffer, statically-allocated to handle the
 worst-case bitrate the player supports. However, at runtime if we are
 using a lower bitrate we will only use a portion of it in order to keep
 latancies down)

Change-Id: I61ca23180a86502732b0903fe9691c1a8c2aeaea
2020-10-03 14:19:17 -04:00
Solomon Peachy
d4a620e85a alsa: introduce AUDIOHW_MUTE_ON_PAUSE, and have rocker use it.
Change-Id: I1edbb8e71a9c73baaeecb01b66cbee6c3f7b5f8f
2020-10-03 14:41:40 +00:00
Solomon Peachy
d18157608d xduoo codec cleanups
Change-Id: I6c3437bde2d9f781a02ffc6b3a83148b9a7af872
2020-10-03 14:41:21 +00:00
Solomon Peachy
1824f8b103 xduoox3ii/x20: Rework the mute control to actually function properly.
(By switching the output away from the audio jacks)

Change-Id: Ib8511c9d45029bba038dc4d1d187174d56cb3043
2020-10-03 04:13:13 +00:00
Solomon Peachy
90c30bc7ef alsa: Explicitly mute the output when we stop playing, and unmute after playback starts
Allows us to avoid hearing the codec powering on and off.

Change-Id: Idaaff437932009952ed248be97eedf54cb4cf28e
2020-10-03 04:12:51 +00:00
Solomon Peachy
c7eceea183 alsa: Handle underruns when starting a new stream
Unsure why this is happening, but now we detect and recover errors at
startup.

Also clean up the mismash of printf(), DEBUGF(), etc in favor of panicf() for the really serious stuff and logf() for everything else.

Change-Id: I9aaa620d55d556645c9a6d108541b987983b32a8
2020-10-03 01:04:53 +00:00