From dbd026ca648dd1028b1b3716e811ad23da36d578 Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Wed, 25 Nov 2026 18:42:00 +0000 Subject: [PATCH 1/4] feat: add the reprise library stub The RepriseOS core answers the library id reprise itself. Its manifest and header let rv.mk build extensions that import from it; there is no reprise.rvx. --- extensions/reprise/manifest.toml | 16 ++++++++++++++++ extensions/reprise/reprise.h | 19 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 extensions/reprise/manifest.toml create mode 100644 extensions/reprise/reprise.h diff --git a/extensions/reprise/manifest.toml b/extensions/reprise/manifest.toml new file mode 100644 index 0000000..adc41ce --- /dev/null +++ b/extensions/reprise/manifest.toml @@ -0,0 +1,16 @@ +id = "reprise" +name = "RepriseOS" +description = "RepriseOS services its core provides to extensions. Nothing to install: list it under [libraries] optional." +version = "0.1.0" +author = "RepriseOS contributors" +license = "GPL-3.0-only" +api = "1.84" +category = "library" +exports = [ + "reprise_legacy_preference", + "reprise_album_artist_read", +] + +[[module]] +name = "main" +trigger = "always" diff --git a/extensions/reprise/reprise.h b/extensions/reprise/reprise.h new file mode 100644 index 0000000..20dd966 --- /dev/null +++ b/extensions/reprise/reprise.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-3.0-only */ + +/* What the RepriseOS core exports as the library `reprise`. There is no + * reprise.rvx: the core answers the id itself. List it under + * `[libraries] optional`, so the extension also runs on other cores, where + * these stay NULL; call them through RV_OPTIONAL or test them first. */ + +#ifndef REPRISE_H +#define REPRISE_H +#include + +/* Copies the stored value of an old firmware preference `key` into `data` + * and returns its size, 0 when absent; at most `capacity` bytes. */ +uint32_t (reprise_legacy_preference)(uint32_t key, void *data, uint32_t capacity); +/* Copies the album artist of a library record as UTF-16 units into `text` and + * returns how many, at most `capacity`. */ +uint32_t (reprise_album_artist_read)(void *record, uint16_t *text, uint32_t capacity); + +#endif From e7346c2dcab2253e7827365e9add0cf4b2ac228a Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Wed, 25 Nov 2026 18:42:00 +0000 Subject: [PATCH 2/4] feat: use the reprise library when the core provides it SDK 1.84 drops the RepriseOS slots from rv_api and lists libraries in a [libraries] table. Night Shift, Crossfeed and Playback Log list reprise as an optional library. On a core without it they skip the settings migration, and Playback Log leaves the album artist empty instead of refusing to load. Crossfeed lists dsp as required, and the catalog keeps listing the required ids as requires. All three get a patch release. --- extensions/crossfeed/manifest.toml | 9 ++++++--- extensions/dsp/rv_dsp.h | 2 +- extensions/night-shift/manifest.toml | 7 +++++-- extensions/playback-log/main.c | 4 +--- extensions/playback-log/manifest.toml | 7 +++++-- extensions/playback-log/test.c | 14 ++++++++++++-- extensions/shared/legacy.h | 8 +++++--- tools/catalog.py | 4 ++-- 8 files changed, 37 insertions(+), 18 deletions(-) diff --git a/extensions/crossfeed/manifest.toml b/extensions/crossfeed/manifest.toml index 1109dc6..4813240 100644 --- a/extensions/crossfeed/manifest.toml +++ b/extensions/crossfeed/manifest.toml @@ -1,14 +1,17 @@ id = "crossfeed" name = "Crossfeed" description = "Blends a little of each channel into the other so hard-panned stereo is easier on headphones. A simple mode or a custom filter." -version = "0.1.0" +version = "0.1.1" author = "RevolaOS" note = "Ported from Rockbox" license = "GPL-3.0-only" -api = "1.78" +api = "1.84" stability = "beta" category = "effects" -requires = ["dsp"] + +[libraries] +required = ["dsp"] +optional = ["reprise"] [[module]] name = "main" diff --git a/extensions/dsp/rv_dsp.h b/extensions/dsp/rv_dsp.h index 5ae8a22..d63b241 100644 --- a/extensions/dsp/rv_dsp.h +++ b/extensions/dsp/rv_dsp.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-3.0-only */ /* What the dsp library exports, and the state its limiter and fade run on. - * An effect lists `requires = ["dsp"]` in its manifest; rv.mk finds the + * An effect lists dsp under `[libraries] required`; rv.mk finds the * library and the core fills in the addresses when it loads. No * RV_MODULE_CALL here: a call into a library is a long call. */ diff --git a/extensions/night-shift/manifest.toml b/extensions/night-shift/manifest.toml index fd37372..0173f6e 100644 --- a/extensions/night-shift/manifest.toml +++ b/extensions/night-shift/manifest.toml @@ -1,12 +1,15 @@ id = "night-shift" name = "Night Shift" description = "Warm the display manually or follow sunset and sunrise in the iPod's time zone." -version = "0.1.2" +version = "0.1.3" author = "RepriseOS and RevolaOS contributors" license = "GPL-3.0-only" -api = "1.81" +api = "1.84" category = "system" +[libraries] +optional = ["reprise"] + [[module]] name = "main" trigger = "always" diff --git a/extensions/playback-log/main.c b/extensions/playback-log/main.c index 81db894..f369469 100644 --- a/extensions/playback-log/main.c +++ b/extensions/playback-log/main.c @@ -119,7 +119,7 @@ static void field_media_text(struct osos_media_item *item, enum osos_media_text osos_media_item_text(item, field, &string); } else { uint16_t text[255]; - uint32_t units = api->album_artist_read(item->record, text, 255); + uint32_t units = RV_OPTIONAL(reprise_album_artist_read, 0, item->record, text, 255); osos_native_string_assign_utf16(&string, text, units); } const char *text = osos_native_string_data(&string); @@ -657,8 +657,6 @@ static const struct rv_descriptor extension = { const struct rv_descriptor *rv_module_entry(const struct rv_api *core, rv_extension_handle handle) { - if (!rv_has_reprise_services(core)) - return NULL; api = core; self = handle; load_config(); diff --git a/extensions/playback-log/manifest.toml b/extensions/playback-log/manifest.toml index 73fed35..73fb9a2 100644 --- a/extensions/playback-log/manifest.toml +++ b/extensions/playback-log/manifest.toml @@ -1,12 +1,15 @@ id = "playback-log" name = "Playback Log" description = "Write a scrobbler log and optional detailed listening reports." -version = "0.1.1" +version = "0.1.2" author = "RepriseOS contributors" license = "GPL-3.0-only" -api = "1.82" +api = "1.84" category = "media" +[libraries] +optional = ["reprise"] + [[module]] name = "main" trigger = "always" diff --git a/extensions/playback-log/test.c b/extensions/playback-log/test.c index 44b56db..2a24e0f 100644 --- a/extensions/playback-log/test.c +++ b/extensions/playback-log/test.c @@ -138,6 +138,9 @@ static int mock_seek(void *h, uint64_t n, int w) #define osos_file_read mock_read #define osos_file_close(h) ((void)(h)) #define osos_file_seek mock_seek +/* Weak like the optional.h of the build, so the tests against NULL stay. */ +#pragma weak reprise_legacy_preference +#pragma weak reprise_album_artist_read #include "main.c" enum { FINISH, COMPLETE }; @@ -168,7 +171,15 @@ static int32_t mock_enabled(rv_extension_handle ext, uint16_t key) return 0; } -static uint32_t read_artist(void *r, uint16_t *s, uint32_t n) +uint32_t (reprise_legacy_preference)(uint32_t key, void *data, uint32_t capacity) +{ + (void)key; + (void)data; + (void)capacity; + return 0; +} + +uint32_t (reprise_album_artist_read)(void *r, uint16_t *s, uint32_t n) { (void)r; (void)s; @@ -194,7 +205,6 @@ int main(void) { static const struct rv_api mock = { .hook_next = mock_next, - .album_artist_read = read_artist, .setting_get_int = mock_enabled, }; api = &mock; diff --git a/extensions/shared/legacy.h b/extensions/shared/legacy.h index 974435c..474e871 100644 --- a/extensions/shared/legacy.h +++ b/extensions/shared/legacy.h @@ -1,20 +1,22 @@ /* SPDX-License-Identifier: GPL-3.0-only */ #pragma once #include "rv_api.h" +#include "../reprise/reprise.h" /* Only the initial load imports the old firmware switch. A later reset records - * the extension default so rebooting cannot resurrect the old preference. */ + * the extension default so rebooting cannot resurrect the old preference. On a + * core without the reprise library nothing is imported. */ static inline void migrate_switch(const struct rv_api *api, rv_extension_handle self, int first_load, uint16_t key, uint32_t old_key, uint32_t old_on, int on, int off, uint8_t type) { uint32_t value; - if (!rv_has_reprise_services(api) || + if (!reprise_legacy_preference || api->setting_read(self, key, &value, sizeof value) == sizeof value) return; int32_t mode = off; if (first_load && - api->legacy_preference(old_key, &value, sizeof value) == sizeof value && + (reprise_legacy_preference)(old_key, &value, sizeof value) == sizeof value && value == old_on) mode = on; api->setting_write(self, key, type, &mode, sizeof mode); diff --git a/tools/catalog.py b/tools/catalog.py index 4c698d2..a099275 100644 --- a/tools/catalog.py +++ b/tools/catalog.py @@ -162,7 +162,7 @@ def image(filename): entry.update( category=manifest.category(doc), api=doc["api"], - requires=manifest.requires(doc), + requires=manifest.libraries(doc)[0], firmware_id=f"{header['firmware']:08x}", repo=source["repo"], source_path=source.get("path", ""), @@ -359,7 +359,7 @@ def local_manifest(identifier, source): doc = tomllib.loads((folder / "manifest.toml").read_text()) if doc["id"] != identifier or not (folder / "listing.toml").is_file(): raise ValueError(f"{identifier}: expected matching local manifest and listing") - return {"category": manifest.category(doc), "requires": manifest.requires(doc)} + return {"category": manifest.category(doc), "requires": manifest.libraries(doc)[0]} def review(sources, previous, body=None, index=None): From 9d0443e7789cf0b13f38f63a70d18335dc5c583c Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Thu, 26 Nov 2026 18:41:18 +0000 Subject: [PATCH 3/4] feat: build against API 1.86 rv_row and rv_menu_entry grew in SDK 1.86, so a core at that API refuses images an older SDK packed, and the SDK refuses a manifest api below 1.86. Every manifest asks for 1.86. Balance and dsp get a patch release with the rebuild, 0.1.1 each, beside Crossfeed 0.1.1, Night Shift 0.1.3 and Playback Log 0.1.2; reprise stays 0.1.0, it has no release. --- extensions/balance/manifest.toml | 4 ++-- extensions/crossfeed/manifest.toml | 2 +- extensions/dsp/manifest.toml | 4 ++-- extensions/night-shift/manifest.toml | 2 +- extensions/playback-log/manifest.toml | 2 +- extensions/reprise/manifest.toml | 2 +- tests/test_catalog.py | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/balance/manifest.toml b/extensions/balance/manifest.toml index 2e4aa37..d0d54db 100644 --- a/extensions/balance/manifest.toml +++ b/extensions/balance/manifest.toml @@ -1,10 +1,10 @@ id = "balance" name = "Balance" description = "Shift the sound towards the left or right ear in decibel steps, or play one ear only." -version = "0.1.0" +version = "0.1.1" author = "RevolaOS" license = "GPL-3.0-only" -api = "1.78" +api = "1.86" stability = "beta" category = "effects" diff --git a/extensions/crossfeed/manifest.toml b/extensions/crossfeed/manifest.toml index 4813240..4e6777d 100644 --- a/extensions/crossfeed/manifest.toml +++ b/extensions/crossfeed/manifest.toml @@ -5,7 +5,7 @@ version = "0.1.1" author = "RevolaOS" note = "Ported from Rockbox" license = "GPL-3.0-only" -api = "1.84" +api = "1.86" stability = "beta" category = "effects" diff --git a/extensions/dsp/manifest.toml b/extensions/dsp/manifest.toml index c1657c3..fa8adf8 100644 --- a/extensions/dsp/manifest.toml +++ b/extensions/dsp/manifest.toml @@ -1,11 +1,11 @@ id = "dsp" name = "DSP" description = "Signal processing the audio effects share: the look-ahead limiter, filter designs, the biquad cascade and the maths behind them." -version = "0.1.0" +version = "0.1.1" author = "RevolaOS" note = "Partly adapted from RepriseOS" license = "GPL-3.0-only" -api = "1.74" +api = "1.86" stability = "beta" category = "library" exports = [ diff --git a/extensions/night-shift/manifest.toml b/extensions/night-shift/manifest.toml index 0173f6e..57d70d1 100644 --- a/extensions/night-shift/manifest.toml +++ b/extensions/night-shift/manifest.toml @@ -4,7 +4,7 @@ description = "Warm the display manually or follow sunset and sunrise in the iPo version = "0.1.3" author = "RepriseOS and RevolaOS contributors" license = "GPL-3.0-only" -api = "1.84" +api = "1.86" category = "system" [libraries] diff --git a/extensions/playback-log/manifest.toml b/extensions/playback-log/manifest.toml index 73fb9a2..ed2f635 100644 --- a/extensions/playback-log/manifest.toml +++ b/extensions/playback-log/manifest.toml @@ -4,7 +4,7 @@ description = "Write a scrobbler log and optional detailed listening reports." version = "0.1.2" author = "RepriseOS contributors" license = "GPL-3.0-only" -api = "1.84" +api = "1.86" category = "media" [libraries] diff --git a/extensions/reprise/manifest.toml b/extensions/reprise/manifest.toml index adc41ce..d49691f 100644 --- a/extensions/reprise/manifest.toml +++ b/extensions/reprise/manifest.toml @@ -4,7 +4,7 @@ description = "RepriseOS services its core provides to extensions. Nothing to in version = "0.1.0" author = "RepriseOS contributors" license = "GPL-3.0-only" -api = "1.84" +api = "1.86" category = "library" exports = [ "reprise_legacy_preference", diff --git a/tests/test_catalog.py b/tests/test_catalog.py index fd4de66..922385a 100644 --- a/tests/test_catalog.py +++ b/tests/test_catalog.py @@ -55,7 +55,7 @@ def test_remote_release_and_failed_update_retains_all_assets(self): folder = catalog.ROOT / source["path"] package = (self.packages / "balance.rvx").read_bytes() release = { - "tag_name": "balance/v0.1.0", + "tag_name": "balance/v0.1.1", "published_at": "2026-11-24T00:00:00Z", "assets": [ {"name": "balance.rvx", "size": len(package), "state": "uploaded"} @@ -77,7 +77,7 @@ def download(url, limit): ): self.assertEqual(catalog.generate(sources, self.out, catalog.remote), []) before = self.entries() - release["tag_name"] = "balance/v0.1.1" + release["tag_name"] = "balance/v0.1.2" self.assertTrue(catalog.generate(sources, self.out, catalog.remote)) self.assertEqual(before, self.entries()) self.assertTrue((self.out / before["balance"]["package"]["url"]).exists()) @@ -182,7 +182,7 @@ def test_corrupt_package_is_rejected(self): catalog.snapshot( "balance", source, - "0.1.0", + "0.1.1", lambda path: (folder / path).read_bytes(), package, None, From 25b991bfa6174a945591c80eec78117342379654 Mon Sep 17 00:00:00 2001 From: Paul-Vincent Roll Date: Fri, 27 Nov 2026 01:36:51 +0000 Subject: [PATCH 4/4] feat: build against API 1.89 rv_pane grew in SDK 1.89, so a core at that API refuses images an older SDK packed, and the SDK refuses a manifest api below 1.89. Every manifest asks for 1.89. The versions stay: the 1.86 rebuilds have not been released. --- extensions/balance/manifest.toml | 2 +- extensions/crossfeed/manifest.toml | 2 +- extensions/dsp/manifest.toml | 2 +- extensions/night-shift/manifest.toml | 2 +- extensions/playback-log/manifest.toml | 2 +- extensions/reprise/manifest.toml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/balance/manifest.toml b/extensions/balance/manifest.toml index d0d54db..635b3c2 100644 --- a/extensions/balance/manifest.toml +++ b/extensions/balance/manifest.toml @@ -4,7 +4,7 @@ description = "Shift the sound towards the left or right ear in decibel steps, o version = "0.1.1" author = "RevolaOS" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" stability = "beta" category = "effects" diff --git a/extensions/crossfeed/manifest.toml b/extensions/crossfeed/manifest.toml index 4e6777d..1449cb3 100644 --- a/extensions/crossfeed/manifest.toml +++ b/extensions/crossfeed/manifest.toml @@ -5,7 +5,7 @@ version = "0.1.1" author = "RevolaOS" note = "Ported from Rockbox" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" stability = "beta" category = "effects" diff --git a/extensions/dsp/manifest.toml b/extensions/dsp/manifest.toml index fa8adf8..14b074b 100644 --- a/extensions/dsp/manifest.toml +++ b/extensions/dsp/manifest.toml @@ -5,7 +5,7 @@ version = "0.1.1" author = "RevolaOS" note = "Partly adapted from RepriseOS" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" stability = "beta" category = "library" exports = [ diff --git a/extensions/night-shift/manifest.toml b/extensions/night-shift/manifest.toml index 57d70d1..f6f6e5b 100644 --- a/extensions/night-shift/manifest.toml +++ b/extensions/night-shift/manifest.toml @@ -4,7 +4,7 @@ description = "Warm the display manually or follow sunset and sunrise in the iPo version = "0.1.3" author = "RepriseOS and RevolaOS contributors" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" category = "system" [libraries] diff --git a/extensions/playback-log/manifest.toml b/extensions/playback-log/manifest.toml index ed2f635..77324e3 100644 --- a/extensions/playback-log/manifest.toml +++ b/extensions/playback-log/manifest.toml @@ -4,7 +4,7 @@ description = "Write a scrobbler log and optional detailed listening reports." version = "0.1.2" author = "RepriseOS contributors" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" category = "media" [libraries] diff --git a/extensions/reprise/manifest.toml b/extensions/reprise/manifest.toml index d49691f..dd8d996 100644 --- a/extensions/reprise/manifest.toml +++ b/extensions/reprise/manifest.toml @@ -4,7 +4,7 @@ description = "RepriseOS services its core provides to extensions. Nothing to in version = "0.1.0" author = "RepriseOS contributors" license = "GPL-3.0-only" -api = "1.86" +api = "1.89" category = "library" exports = [ "reprise_legacy_preference",