Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extensions/balance/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
stability = "beta"
category = "effects"

Expand Down
9 changes: 6 additions & 3 deletions extensions/crossfeed/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
stability = "beta"
category = "effects"
requires = ["dsp"]

[libraries]
required = ["dsp"]
optional = ["reprise"]

[[module]]
name = "main"
Expand Down
4 changes: 2 additions & 2 deletions extensions/dsp/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
stability = "beta"
category = "library"
exports = [
Expand Down
2 changes: 1 addition & 1 deletion extensions/dsp/rv_dsp.h
Original file line number Diff line number Diff line change
@@ -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. */

Expand Down
7 changes: 5 additions & 2 deletions extensions/night-shift/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
category = "system"

[libraries]
optional = ["reprise"]

[[module]]
name = "main"
trigger = "always"
Expand Down
4 changes: 1 addition & 3 deletions extensions/playback-log/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
7 changes: 5 additions & 2 deletions extensions/playback-log/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
category = "media"

[libraries]
optional = ["reprise"]

[[module]]
name = "main"
trigger = "always"
Expand Down
14 changes: 12 additions & 2 deletions extensions/playback-log/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
16 changes: 16 additions & 0 deletions extensions/reprise/manifest.toml
Original file line number Diff line number Diff line change
@@ -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.89"
category = "library"
exports = [
"reprise_legacy_preference",
"reprise_album_artist_read",
]

[[module]]
name = "main"
trigger = "always"
19 changes: 19 additions & 0 deletions extensions/reprise/reprise.h
Original file line number Diff line number Diff line change
@@ -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 <stdint.h>

/* 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
8 changes: 5 additions & 3 deletions extensions/shared/legacy.h
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
6 changes: 3 additions & 3 deletions tests/test_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand All @@ -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())
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions tools/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", ""),
Expand Down Expand Up @@ -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):
Expand Down
Loading