Commit graph

36521 commits

Author SHA1 Message Date
Aidan MacDonald
8165a6c245 rbcodec dsp: Remove INIT_ATTR from the DSP library
All of these are technically unsafe cross-section references but
most aren't reported by the linker, probably due to inlining. In
practice there was no problem because the affected code was only
run at init time anyway.

For now, remove INIT_ATTR until the init code can be refactored
to avoid the problematic references. This should also save code
size by moving more code to the init section.

dsp_init() gets to keep its attribute because it's already OK.

Change-Id: Idc9ac0e02cb07f31d186686e0382275c02a85dbb
2022-12-18 22:23:52 +00:00
Aidan MacDonald
b650e774a1 kernel: Fix unsafe cross-section reference in init_tick()
This is a small wrapper function which calls other init code
and is only called from init code; mark it INIT_ATTR to fix
the unsafe reference.

Change-Id: I5525461e9fd63955c6396d3151d209c457b3d798
2022-12-18 22:23:52 +00:00
Aidan MacDonald
e8ad52be94 x1000: Rename crt0 .init sections to .startup
Avoid startup code clashing with the .init section, which is
by convention used for INIT_ATTR code that can be discarded
after app initialization.

Change-Id: Id59b7618ef41e65c33fc0f133644e07555a913eb
2022-12-18 22:14:22 +00:00
Aidan MacDonald
68af18a56f x1000: Simplify app linker script
Get the linker to automatically assign load addresses for
the .iram and .tcsm sections. Taken from the i.MX31 linker
script.

Change-Id: Ic03d577d8690c777726daf373a3289316639bfb9
2022-12-18 22:14:22 +00:00
Aidan MacDonald
d6744c92b1 x1000: Add missing LCD activation event on LCD enable
This event is needed to trigger a GUI redraw when the backlight
turns on.

Change-Id: Ib2300dfd1aaeacd84c6df8151072292409357212
2022-12-18 21:01:04 +00:00
Aidan MacDonald
6c52fa139c Remove browse_context_init()
Prefer to use designated initializers to avoid having to specify
unneeded parameters. Non-initialized members are zero-initialized
by the compiler.

Change-Id: Ia6a03c45cb3ef0b30f458d7d0ae1604a350c737c
2022-12-17 13:36:38 +00:00
Aidan MacDonald
701e262d3d settings: Remove setting ID return from find_setting()
Now that all users have replaced setting IDs with direct pointers,
find_setting() and friends don't need to return an ID value.

Change-Id: I8c5c31bb68d3bca5350d43538335265a55fd5517
2022-12-17 13:36:38 +00:00
Aidan MacDonald
767ddef550 quickscreen: Settings ID to pointer conversion
Saves a good deal of code...

Change-Id: Ibaf4138ddffd5d8f7cca560cc52645dbce44149c
2022-12-17 13:36:38 +00:00
William Wilgus
c85a4f1fa4 menus remove reserved 'param' parameter
-- missed the plugin menu --

Change-Id: Iac2c9b0b8212ab5f3ac2ef90e1ac2723d212f86c
2022-12-17 04:24:37 -05:00
William Wilgus
ccf1aaa5be menus move functions with parameters to their own type
left the union with function(void) and function_w_param(param)
as a few areas might still need to use both (onplay.c)

there might be a few I missed yet..

Change-Id: I593a6875301923e19ba04ad1b0f3173dc9ebdf1f
2022-12-17 02:51:43 -05:00
William Wilgus
6f54bb63fc open_plugin.c access open_plugin_entry through a function
just a few updates to open_plugin save a bit of space by granting access through a getter function

Change-Id: I2c0eaa1ade867510798b213006064ee1c00aa016
2022-12-16 09:05:06 -05:00
William Wilgus
626be18da0 [Bug Fix] haas surround use delay_ms instead of index surround_strength
this appears to be an old bug

rather than using an index use delay_ms directly

Change-Id: Ia4d0bf8eb8030d6ded08354abc31cc7ddefdda99
2022-12-16 08:30:54 -05:00
William Wilgus
5903cd4bc8 [Bug Fix] setting.c fail to check F_TABLE_SETTING w/o arbitrary values
table settings have a list of valid values when
they do not have F_ALLOW_ARBITRARY_VALS flag

they were not being treated as such

Change-Id: Ib02643a65ee4fc2abb1be8563a1849076de2f708
2022-12-16 08:30:54 -05:00
Christian Soffke
222ff0cb14 Plugin return: only skip SBS refresh if WPS was previous activity
1) the plugin return value isn't necessarily respected.
2) the screen will be updated regardless, before
the WPS is displayed, which means the skin may
appear in an "incorrect" state for a moment.

It is therefore better to simplify this to a single
condition.

Change-Id: I723e6fe4862172075b9a4814080f612c2b2fb490
2022-12-16 13:04:56 +01:00
Christian Soffke
a6bafe51a6 WPS hotkeys: Don't enable SBS for pitch screen or bookmarking
Change-Id: I5d5f4f1c402500abd15fcbb8b62013c97f4f931c
2022-12-16 08:25:20 +01:00
Christian Soffke
79e6139f56 Playlist Viewer: Fix delayed appearance of backdrop on return from plugin
Change-Id: I84ff9b581d185fecbe3c7405d3e1887715d55d17
2022-12-16 02:05:33 -05:00
William Wilgus
28f768cb84 onplay hotkey add flags
idea here as discussed with chris_s is to allow flags
in the hotkey_assignment struct to change how items are displayed

Change-Id: Id4cf1d79fbe3ff8f5590b9a863fccf00ddd457f9
2022-12-16 01:44:05 -05:00
William Wilgus
31759c9e53 [Bug Fix] quickscreen clashed with WPS Hotkey browser
chris_s noted:
When you set the WPS hotkey as a QuickScreen item and shuffle through the options,
it eventually gets to the "Open Plugin" option and will show the File Browser,
clashing with the Viewports of the QuickScreen

Change-Id: I3addbbbac5842f89c000c155484d7cb934dc500e
2022-12-14 23:45:58 -05:00
William Wilgus
99839960a2 abrepeat add dummy functions and remove some of the ifdefs
Change-Id: Icae7e334e87bb1974712a7a76296cf69bbdbffba
2022-12-14 23:37:14 -05:00
William Wilgus
6b87bfadff wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow

Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
2022-12-14 22:35:33 -05:00
William Wilgus
eaf717744d [Bug Fix] open_plugin.c update checksum check for spinning disks
Lang_id keys take LANG_LAST_INDEX_IN_ARRAY for the checksum
spinning disks did not have the code to do so

Change-Id: I617e1a5462d8d6c4830a9b59171bdd7167d5e7a1
2022-12-13 23:37:26 -05:00
William Wilgus
c6c1d62489 [Bug Fix] filetypes.c move voice data out of INIT_ATTR
tree_get_filetype_voiceclip is called after init it shouldn't be marked as INIT_ATTR

add _init to the functions & data that are used at init only to be a bit more clear

Change-Id: I8eb1914560b782c2c0fdd7649e761f94e382d5cb
2022-12-13 22:35:24 -05:00
Christian Soffke
8ff2c81bde Improve transition between plugin and WPS
Eliminate flashing when plugins are launched
from WPS, by not enabling the SBS, and by
deferring other lcd updates.

Also prevents flashing root menu activity when
returning from plugins.

Change-Id: I7d761867027f2275c4ab8e16ada3107c7ba0be6e
2022-12-13 21:10:16 -05:00
Christian Soffke
0e2e9df991 Plugins: Eliminate 'Loading' splash unless disk is inactive
My impression is that the waiting time for plugins
is only ever significant if a disk needs to spin up.

In other cases, the experience seems nicer
without a 'Loading' splash, especially for
often-used plugins, such as 'Properties',
when it is launched from the Database or
from the File Browser.

Change-Id: I018ccb13466fa618ef089b6dc7714db38cffd9b6
2022-12-13 20:52:09 -05:00
roman.artiukhin
d520dcbfbb Exit Pitchscreen on BUTTON_HOME for Sansa Clip
ToggleMode is remapped to BUTTON_SELECT
Reset is remapped to Long BUTTON_HOME or Long BUTTON_SELECT (avoids accidental reset by pressing BUTTON_SELECT)

Change-Id: I6fc4050c66db2d7db7ec899f9c83b70754fef9df
2022-12-13 20:24:37 -05:00
William Wilgus
0747415277 Settings.c add logf debugging to verify settings
decodes saved settings and available settings & flags

Change-Id: I46bea15e7cef23fe9e41778455564f38bf00eeb1
2022-12-12 23:12:31 -05:00
William Wilgus
2b79ad43bd Haas Surround add flag so the settings can be read back from the config file
not sure how long this has been broken

Change-Id: Ifdbfff1e43f3cd6b5ef1c66d45b6b6f38f60cb95
2022-12-12 03:15:38 -05:00
William Wilgus
863538c50a [Bug Fix] dsp_proc_enable init race / crash
haas surround is causing a seg fault

it appears process is null see https://www.rockbox.org/tracker/task/13382
for details

when the low_latency_callback is enabled it happens less frequently

lets default to an empty process that way there are no NULL pointers to call

Change-Id: Ib72ba1a58cbb20cef04b5ea50964adadeee74a75
2022-12-11 22:17:12 -05:00
Christian Soffke
ac9066dd44 Setttings: Eliminate gui_synclist_init_display_settings callbacks
Since synclists are now re-initialized after leaving
Settings menus where the callback was used, it
shouldn't be needed anymore.

gui_synclist_init_display_settings can also be made
local to list.c now.

Change-Id: I674e4da49153440b48298fed7c4d98b421b7beaa
2022-12-11 11:50:33 +01:00
Christian Soffke
dfd9c10589 Eliminate skin updates in between activities
1) Adds way to pop activity without refreshing the skin at
the same time.

Activities are sometimes popped in immediate succession,
or one activity is popped before another one is pushed right
away. This can lead to the UI appearing glitchy, due to an
activity only appearing for a split-second, which is especially
noticeable with complex skins that change the dimensions
of the UI viewport depending on the current activity

To fix this, prevent superfluous skin updates

* when switching between:
- WPS and browser
- WPS and Playlist Catalogue
- WPS and playlist
- WPS and Settings/System/Plugins

* when accessing Track Info or when displaying
bookmarks using the context menu on the WPS

* when switching from QuickScreen to Shortcuts Menu

2) The playlist viewer activity was pushed & popped
redundantly by playlist_view.

----
NB:
Behavior has remained unchanged in all instances of the
code where pop_current_activity() has been replaced by
pop_current_activity(ACTIVITY_REFRESH_NOW).

Change-Id: I56b517b8c9dba823a9fed3a3f558d7469dcea9fd
2022-12-11 11:50:33 +01:00
Aidan MacDonald
90d1ac0448 settings: Rewrite cfg_int_to_string() and cfg_string_to_int()
It's easier to do the parsing manually.

Change-Id: Ief8b71942d3ab9313dd6927bd7f4bb254d0c12db
2022-12-10 14:21:42 +00:00
William Wilgus
fc18235323 Selective backlight add CONTEXT_MAINMENU
I think its better to just limit this to the mainmenu rather than all contexts

Change-Id: If734a9516b14ec96d9e32beceba22419c47c0720
2022-12-09 17:54:02 -05:00
roman.artiukhin
b63f4c5884 Exit option select on ACTION_STD_MENU
Similar to 59f3f43d. It makes it behave consistently with tree/playlists other menus. So it's possible to exit option select using Back button on Clip Zip or Power button on Rocker

Change-Id: I93fe71ba2222ae16d59f3ba4cfbbedad3fb2568b
2022-12-09 11:02:50 -05:00
William Wilgus
7a00ad72e4 [Bug Fix] bookmark.c failure to compare existing tracks and playlist
the underlying global buffer fo bookmark is overwritten by the read function so
instead make a hash of the playlist and track names

might needa better hash but hopefully CRC32 is sufficient

Change-Id: Ie25dbb62e664b804e4f858d9e0cc248fdc8c9895
2022-12-08 17:55:36 -05:00
Dana Conrad
3555e84a7a Bugfix: some settings can have spaces in them
90bc769 strips spaces from the settings value, but it
goes to the first space rather than just stripping off
the last one. Break out of the loop when we find the
first non-space character.

Also change 0 to '\0' for readability.

Change-Id: I915b82a6d1603740998a67c575d08005456ffbd8
2022-12-08 15:38:12 -05:00
William Wilgus
f6f12db062 events.c do_add_event() only traverse event array once
we already go through the whole array might as well save the free slot as well

Change-Id: I6e1164b57a5510f5de5555d2cb91379afc58ae08
2022-12-08 05:19:40 -05:00
Christian Soffke
66a411a1ba Tree / Playlist Viewer / Menu: Fix redraw issues
1) Tree_lists was only initialized when booting the player.

In cases where a skin used custom UI viewports of
different sizes, when switching between screens, such as
between root menu, QuickScreen, and tree browser, this
caused list titles to appear with a significant delay,
unless a GUI_EVENT_ACTIONUPDATE was sent.

Tree_lists is now initialized when entering dirbrowse
or when restoring/reloading the list.

This eliminates multiple redundant UI refreshes when
entering the tree browser, due to gui_synclist_draw not
being called twice anymore and by being able to omit
GUI_EVENT_ACTIONUPDATE.

Separate calls to gui_synclist_init_display_settings
have become unnecessary since it is already called
by gui_synclist_init.

2) The synclist is also re-initialized when returning
from the QuickScreen in the Playlist Viewer or
regular menus, or when returning from Settings
menus

Change-Id: I2884249eda55f782e97abad9dc19b3d9d1267fc9
2022-12-08 00:38:59 -05:00
Solomon Peachy
a9a284c1a0 lang: Correct a "mistranslation" in english-us
Introduced in 9a8ec7e0d from March 2021

Change-Id: Ica0767531bfd09d57cda2093d0e2764234b79526
2022-12-07 13:17:56 -05:00
William Wilgus
a1e4385acb backlight.c move some conditionals out to functions
de clutter bavklight_thread a bit

no functional changes

Change-Id: Iee3901a0abcea9bcf4fe364839af177e3791d980
2022-12-07 09:07:27 -05:00
Aidan MacDonald
90bc76956c Ignore trailing whitespace in settings .cfg files
Have settings_parseline() strip trailing whitespace from
the setting value.

Fixes a regression introduced by 5b1dd64f5, which caused
filename settings to be parsed incorrectly when there is
trailing whitespace in the .cfg file.

Change-Id: I6c54428f6467ea2d169d2a7449705b40627e1a40
2022-12-07 08:44:18 -05:00
Richard Goedeken
f3b522cac6 bugfix: for Eros Q / Surfans F20, when the scroll wheel is moved, in addition to resetting the power-off timer, we also need to reset the backlight timer and turn it on in case it's currently off.
Change-Id: I73b463e74727a2d00b0d4ce599f0cc611fb98685
2022-12-07 08:16:13 -05:00
William Wilgus
fceb4f6292 misc.c format_time_auto() make several const tables static
Change-Id: I597eee8f2d531d4cc2ec69dd8bc78f8cd7950162
2022-12-07 01:40:49 -05:00
William Wilgus
152a238947 playlist add mutex to public functions
mutexes are in just trying to refactor the rest and make it a smaller
and more robust system

--Done

Change-Id: If64807c3e0ee1966f7593795f26f1f538caf831b
2022-12-06 23:40:02 -05:00
Aidan MacDonald
a89f279fd4 settings: Clean up NVRAM code
Code style fixes, tighten error checking, replace a static buffer
with a stack allocated one.

Change-Id: I48392fa187057cc4a07847d45147f0db9f43f509
2022-12-05 14:18:06 -05:00
Christian Soffke
961e73b3a1 Addendum to d3d2045
Forgot to remove this...

Change-Id: Ifc97e47bb3923554030296097ef46352dad6eff1
2022-12-05 07:53:25 +01:00
Christian Soffke
d3d2045cab Bookmarks: Fix redraw issue in Select Bookmarks screen
Parts of the skin weren't redrawn after deleting a bookmark.

Change-Id: Id06fb95a6d3740340df989bcb9827fe3a87bb296
2022-12-05 07:28:21 +01:00
Aidan MacDonald
1e6c8d2ea6 skin engine: Settings ID to pointer conversions
Convert %St tag to operate on settings pointers instead of IDs.

Change-Id: Iabf4c280be82b495a64b560b59620fb477e0c738
2022-12-04 11:19:57 -05:00
Aidan MacDonald
4ff97ae07c settings: More settings ID to pointer conversions
Convert cfg_int_to_string(), cfg_to_string(), settings_write_config().

Change-Id: Icb72d2ff874cf90ffe5fe14878aece0a53f6bd18
2022-12-04 10:46:02 -05:00
Richard Goedeken
08aa09e15d add Richard Goedeken to CREDITS file
Change-Id: I51c40815ede4c24ef5b287dbda8218b427b3476d
2022-12-04 10:16:14 -05:00
Richard Goedeken
d06cf3ac2d bugfix: for ErosQ/SurfansF20, reset poweroff timer when scroll wheel is moved so that we dont blank the screen while the user is scrolling through a list
Change-Id: Ifdce301e2d75e3f6f54fba5b3eef15b2141cb954
2022-12-04 10:16:14 -05:00