Commit Graph

35738 Commits

Author SHA1 Message Date
William Wilgus f9c5d1fccf open_plugin.c (CORE) File input Bugfixes
Explicitly Null terminate char fields
0 is a valid file descriptor

Change-Id: I0faa9f5ec919ca913bceabf919fbaefcb38c39b9
2021-07-29 23:15:33 -04:00
William Wilgus ea438ee132 cuesheet.c Fix potential NULL in INDEX parsing
untested

Change-Id: I6160348eeece364e3242f047437877ea34136f9c
2021-07-30 02:30:49 +00:00
Solomon Peachy 7318d393ea libc: atoi() is supposed to return 0 if handed a NULL pointer
Change-Id: I2d77532536ca83e5c9c2d7622a0e672082969f75
2021-07-30 01:41:13 +00:00
Aidan MacDonald 2e9443104f rbcodec: Fix typo in makefile
Hopefully this will fix all those random build failures.

Change-Id: I02ff625c538a21f20b33874b4ab54ed8c893a433
2021-07-25 15:55:36 +01:00
Aidan MacDonald 05d4d6a4f2 Fix remaining yellow from e532714d1f
Change-Id: If0bdd1fb3c8ee3324562638bc4c4181357a8fd53
2021-07-25 14:36:47 +00:00
Aidan MacDonald 148fac6f34 Fix yellow from e532714d1f
Change-Id: I4f49e93fc1efa78874fb76de6a436ad1fc894cc5
2021-07-25 15:22:33 +01:00
Aidan MacDonald e532714d1f pcm: Remove unused function pcm_play_dma_get_peak_buffer()
Change-Id: Ifd20fb14a22489cdb99154c01f69809a1e70d0c5
2021-07-25 14:07:41 +00:00
Aidan MacDonald 77ec752248 shortcuts: fix file handle leak on OOM condition
Change-Id: If09db7a084d83e9bdeeafb8e8f434fcb502c45c5
2021-07-25 14:53:00 +01:00
Solomon Peachy d0536b8b6b Fix typo in f8bbe3352c
Change-Id: I02ab35f21c2733efd81a9b97d1c88e283f6187ff
2021-07-24 16:27:49 +00:00
Solomon Peachy f8bbe3352c rocker: First crack at manual for the AGPTek Rocker
It needs screenshots and slightly better installation instructions

Includes bits shared with other HibyOS platforms

Change-Id: I1c1974143b5badf1aca5c3281556ce553ab1b8a5
2021-07-24 11:16:57 -04:00
Solomon Peachy a0948ddfa1 Enable building the manual for the FiiO M3K and Shanling Q1
The nightly manual builds previously only included targets that were
marked as "stable" -- The M3K and Q1 are not because they lack rbutil
integration, but we would like to provide the manual builds regardless.

Change-Id: I113e0576753ba6bb1518da2169c1b0b84aebd2f4
2021-07-24 11:16:57 -04:00
Aidan MacDonald fde6eaa8e1 Add Fiio M3K and Shanling Q1 manuals
Includes installation instructions and a description of Rockbox's
limitations versus the original firmware. Some things are still
missing, notably screenshots for the Q1. The M3K image also needs
to be updated to include the 'select' button.

Change-Id: Ib533206df01925203edeccdd75e1bf22f407e794
2021-07-24 14:07:09 +00:00
William Wilgus 42ba117952 tree.c use strlcpy to avoid buffer ovfl
Change-Id: I6ac4ec6306c2101b11bc0495edd7bbe2717acf9c
2021-07-24 13:44:35 +00:00
William Wilgus 26fd90bb49 talk.c check for proper file load
few sanity checks on voice clip loads

Change-Id: I15fdf05d2964e9f6d00360b9730357dac6054af7
2021-07-23 22:53:25 +00:00
Solomon Peachy cb92280eca usb_storage: Fix a memset in SCSI_INQUIRY that overflowed its buffer
The funny thing is that the memset() for the field in question was
redundant, as the overall inquiry structure was memset(0) already.

Change-Id: I8bec0c93c9317823ff39cf7133535e3bf58fb987
2021-07-23 00:26:35 +00:00
Solomon Peachy 68294da574 Document an intentional fallthrough in the volume limit menu code
Change-Id: I51d331ff788b73aa84fece63bfdca9c3e08c0384
2021-07-22 23:55:03 +00:00
William Wilgus 1fea6f4670 plugins pong, properties remove dead code
Change-Id: I6645ff850a637343dde129600f0b5eaa2e4f6d31
2021-07-22 23:24:12 +00:00
William Wilgus 363f6595b4 tlsf make ~0 explicitly unsigned ~0u
Change-Id: Ib3220df24fee470416ef813b89bdc5f27e455af7
2021-07-22 23:23:51 +00:00
Aidan MacDonald 00129ac872 Fix battery_bench bug by using a static buffer for stack
Since battery_bench is a TSR (terminate & stay resident) plugin it
cannot allocate the plugin buffer -- various parts of the Rockbox
core make use of it as temporary storage space. The buffer was used
for stack space so this generated false 'Stkov' panics when one of
those in-core users overwrote the buffer.

The default stack size of 1kb is a bit small, so use 4x the default
size to be on the safe side.

This also fixes a minor issue where trying to view OS stack usage
while battery_bench was running would cause audio dropouts, due to
scanning the possibly huge stack with IRQs disabled.

Change-Id: I2e6b76f9946db9090c1af61f7aa0a0dac0698c20
2021-07-22 13:50:26 +00:00
Solomon Peachy f0e3a36fe4 autoresume: Properly check the path string, not the pointer.
(the pointer is _always_ valid as it's to a fixed buffer)

Change-Id: I88489012b76ed3b5b214cf01da1a6260e259fe87
2021-07-21 15:06:28 +00:00
William Wilgus 8cd4b8da84 talk.c check for 0 talk clips file descriptor leaks & announce_status fix typo
talk.c potential division by zero warrants a check

desowin pointed out multiple fd leaks

announce_status.c dumb typo

Change-Id: Iae99bd64696afdd9585952245a7a04cdc9f88ef1
2021-07-21 11:26:29 +00:00
Aidan MacDonald 48c29e3b3b Fix announce_status usage of plugin buffer
Since this is a TSR plugin, it is not safe to use the plugin buffer.
Convert to using static buffers instead.

Change-Id: Ic5b297468a99d77d56f5b75e52dafabeb80d2f78
2021-07-21 11:26:14 +00:00
William Wilgus b91ad60d63 timefuncs.c valid_time() should return false if tm == NULL and not try to deref
luckily no one has
yet..

Change-Id: I4117db84b013fa826958aea635daa0a24ee534b6
2021-07-20 23:25:31 +00:00
Aidan MacDonald 966e210e6d Small fixes to kbd_create_layout
- Make the argument const since it's not actually mutated
- Actually return the size of the buffer used since this is what it
  was supposed to do (although no existing callers cared anyway)

Change-Id: I0802071cf63d4af419f427ff54adca50b14918ad
2021-07-20 21:30:55 +01:00
Aidan MacDonald 740a50687f jztool: add support for Shanling Q1 and Eros Q
Change-Id: I8e93162d1a9d82e9d132219f2803b1856d24ae6c
2021-07-20 14:56:58 +00:00
Aidan MacDonald 6f042e91dd FS#13302 - Updated Polish translation (Adam Rak)
Change-Id: I3dd2c75d3e51061b71f3057b1a4ed4f398127ced
2021-07-20 15:24:02 +01:00
Solomon Peachy df37450f91 talk: Explicitly cast -1 as unsigned before a left shift.
The code is explcitly relying on twos complement numerical represntation
so this just shuts up the compiler and static analysis warnings.

Change-Id: If11cd0a3a4127e8a872a752119d347ac6e09424c
2021-07-20 00:09:33 +00:00
Aidan MacDonald 09fc9ee9a3 sim: change Eros Q native bitmap to a symlink
Change-Id: Id55ef276af0de52d7cbd8c7cdc6da46f171a01bd
2021-07-18 14:15:25 +01:00
Aidan MacDonald 07a3f6bcdb add Eros Q native simulator build
Change-Id: Ifdc882d19020da2e18234d6276409ad3e7efa138
2021-07-18 13:51:30 +01:00
Dana Conrad 3e7a09cb0d New Port: Eros Q Native
What works:
- LCD: 16-bit RGB565
- all buttons, including scrollwheel
- SD Card
- Battery level and charging/not charging status
- USB
- audio
- sample rate switching
- HP / LO detect, with "safe" fixed LO volume -
   LO volume will only be put to user-defined max volume
   if headphones are not present.
- rtc
- Plugins build, tried a couple and they seem OK
- Bootloader, installable to nand via usbboot

What doesn't work:
- Dual Boot
- power on/off has intermittent, low volume audio click
   (sometimes it's completely silent, sometimes there's
    a click)
- Audio uses 16-bit volume scaling, so clicking/popping
   is pretty bad at lower volumes - need 32 bit volume
   scaling, 24 bit I2S data
- USB HID keys not yet defined
- no jztool support

Unknowns:
- Stereo Switch pins: Direction select, AC_DC
   (probably not even hooked up)
- What is the actual purpose of the Stereo Swtich?
- How does the bluetooth module connect?

"Someday" stuff:
- get LCD working at higher bit depth
- Bluetooth

Change-Id: I70dda8fc092c6e3f4352f2245e4164193f803c33
2021-07-18 12:14:35 +00:00
James Buren 64a24591ae crc32: add fast variant of regular crc_32r function
This relies on a macro, CRC32R_FAST, to select which version to
compile with. In tests the fast version is 2x faster at the expense
of requiring 960 more bytes for the lookup table. For now the default
is the space optimized version but in the future I would like to enable
this for ports where we can afford the extra storage and/or memory
requirements.

Change-Id: I25397dadedc3187bb02b2444f8b8ded77c2509b6
2021-07-18 05:17:31 +00:00
Solomon Peachy cd17decd5a xduoox3ii: Add "Super Slow" filter roll-off
I'm not happy with the proliferation of filter-roll-off options
but I don't have a less ugly solution.

Change-Id: I740fca006fa0c3443a467acfea55b6574d48346b
2021-07-17 08:18:31 -04:00
Solomon Peachy ec31a2b4ad Fix builds.pm syntax error (1d72d9cf)
Change-Id: I7c7e8e7de16157ecc6535a8b461c12430bd376fb
2021-07-15 15:40:26 -04:00
Aidan MacDonald 1d72d9cf28 builds: add Shanling Q1 to unstable
Change-Id: Ic490b4d68c2faa35dd8cb6733766019aeeb192e7
2021-07-15 18:54:35 +00:00
Solomon Peachy 144d1b1e81 misc: Fix up a few warnings uncovered by LTO
* direct use of memcpy() instead of ci->memcpy() in flac and mod
 * uninitialized variable in mpegplayer

Change-Id: I2d08682d5f66c319780e69e3ff63d600c61d8f5a
2021-07-15 18:37:42 +00:00
Aidan MacDonald 4c60bc9e68 New port: Shanling Q1 native
- Audio playback works
- Touchscreen and buttons work
- Bootloader works and is capable of dual boot
- Plugins are working
- Cabbiev2 theme has been ported
- Stable for general usage

Thanks to Marc Aarts for porting Cabbiev2 and plugin bitmaps.

There's a few minor known issues:

- Bootloader must be installed manually using 'usbboot' as there is
  no support in jztool yet.

- Keymaps may be lacking, need further testing and feedback.

- Some plugins may not be fully adapted to the screen size and could
  benefit from further tweaking.

- LCD shows abnormal effects under some circumstances: for example,
  after viewing a mostly black screen an afterimage appears briefly
  when going back to a brightly-lit screen. Sudden power-off without
  proper shutdown of the backlight causes a "dissolving" effect.

- CW2015 battery reporting driver is buggy, and disabled for now.
  Battery reporting is currently voltage-based using the AXP192.

Change-Id: I635e83f02a880192c5a82cb0861ad3a61c137c3a
2021-07-13 22:01:33 +01:00
Aidan MacDonald 3abb7c5dd5 x1000: revamp MSC driver card detection logic
Debounce logic now handles both removal and insertion and verifies
the detection is stable for 100ms before taking any action.

This solves the bootloader "file not found" issue on the Shanling Q1.
It seems a false removal event was generated, causing the filesystem
to be automatically unmounted. Probably this is due to some transient
noise at boot. Delays didn't solve the problem, probably because the
bogus hotplug event was queued, and normal mdelay() would simply delay
event delivery.

Change-Id: I8b03fb3550309f5a7ab4be0be7465a3dab2d3450
2021-07-13 22:01:17 +01:00
James Buren 3c4fdf10e2 crc32: add fast variant of regular crc_32 function
This relies on a macro, CRC32_FAST, to select which version to compile
with. In tests the fast version is 2x faster at the expense of requiring
960 more bytes for the lookup table. For now the default is the speed
optimized version but in the future I would like to enable this for ports
where we can afford the extra storage and/or memory requirements.

Change-Id: I8c7fde6b6ff130f0fdc7c8e472825e25bcdba022
2021-07-13 04:41:32 +00:00
Tomasz Moń 321680973b
Sansa Connect: Display battery info in debug menu
Show battery temperature, current, discharge power and available energy
in battery debug menu.

Change-Id: I799af4e5ca7ec168d726e689264e0f092ebc2bf7
2021-07-12 14:14:59 +02:00
Aidan MacDonald 84362141a0 x1000: Unified flash bootloader installer
Change-Id: Ib1d41d4e7d663ff8a21eb08108c13568f7408533
2021-07-11 15:39:50 +01:00
Aidan MacDonald e9d228832c x1000: Unified bootloader
Change-Id: Ib1f2ca2a376866c61dd1bd62abd6e31210d11e5c
2021-07-11 15:39:40 +01:00
James Buren d6dcb99684 uisimulator: implement sim_modtime
Change-Id: I1094632df092ba63605631333e939cf30b585a59
2021-07-11 13:48:26 +00:00
James Buren 1298e47134 zip: include strlcpy.h
Change-Id: Ic26a95e35a005837cbd3c8d9318d2cced9b726ff
2021-07-11 13:17:54 +00:00
James Buren fa743258ea filesystem: implement os_modtime for unix
Change-Id: If030d526f29aa786b5a37402413d804752286cf5
2021-07-11 12:40:08 +00:00
James Buren 8846e087c0 zip: implement zip extraction support
This adds code sufficient to extract files to available storage given a
suitable root directory to extract to. It works on an already open zip
handle and also supports chain-loading a secondary callback in the event
that integration into the process is desired.

Change-Id: Id200d8f20d84a0cbd22906470de8bbd21d4525ef
2021-07-11 05:14:20 +00:00
James Buren a1bcca645b zip: rename modts field to mtime
This brings it more in line with other structs with this exact same data
type and usage.

Change-Id: I5fe8564750ef28ccd0b12efedca2e6958369f712
2021-07-10 13:44:03 +00:00
Tomasz Moń 6c084ac3ea
Sansa Connect: Ensure LCD starts before backlight
Extra delay prevents white flash after hold switch release.

Change-Id: Ib0d33937dcbb738b913388e7df92ffdf9346c9f9
2021-07-10 13:20:29 +02:00
Tomasz Moń b4ecd612f7
Sansa Connect: Use deviceid in USB Serial Number
Atmel AT88SC6416C CryptoMemory is almost I2C compatible. The device
is connected to bitbanged I2C bus shared with compliant I2C devices.

Change-Id: Iec54702db1bdfb93c01291eef18ec60391c63b16
2021-07-10 08:56:32 +02:00
Solomon Peachy 663539619c configure: fix a typo that could break voice builds
(If you don't have espeak, festival, or flite installed)

Change-Id: I5820535c55cc02e32bf31f3e30070b2c1e68ff87
2021-07-09 15:10:50 +00:00
Tomasz Moń 8de163b8ae
Sansa Connect: Fix reported CPU frequency
Make frequency related comments accurate. Disable UART0 clock.

Change-Id: I224a3d6656ad53165dcff68ed716fa2c6863240d
2021-07-09 14:16:05 +02:00