Commit graph

23 commits

Author SHA1 Message Date
Solomon Peachy
0456ec5630 IAP: First steps towards true multiport state
iap_reset_state() and iap_getc() are now passed the logical IAP port
(0 is dock/only connector, 1 is headphone connector)

Change-Id: I97421146a8cab032b90c9b4eb55b50aa00d73312
2025-08-20 07:56:43 -04:00
Solomon Peachy
472a6a69c6 IAP: Reset IAP state upon headphone or dock unplug
Provides a semi-automatic way of recovering from desynchronization

Change-Id: I527b0bacc22ef38c1e7213653e522ea1b0ac155d
2025-08-14 20:41:14 -04:00
William Wilgus
7100090f99 Remove NVRAM infavor of a separate cfg file
remove nvram and use the existing settings framework for it

add a crc check to the user_settings data to see if we need to save
the user setting file or if we can just save the status file (resume.cfg)

move volume to the system_status struct so we don't write the whole settings file
over volume changes

allow user to still export volume with save sound settings

allow the user to also export pitch and speed

name the file .resume.cfg

Rename all the SYSTEM_STATUS save file variables to TLAs to save space and
discourage tinkering

Cleanup DEBUG_AVAIL_SETTINGS output

when saving user_settings it calls status_save as well this cause the resume
file to be written twice. instead remove the callback for status_save
when setting_save is called

remove header text when saving .resume.cfg

convert status_save() to status_save(bool force)
add SYSTEM_STATUS_UPDATE_TICKS

for ATA device set this to 5 minutes
since we arlready wait for the disk to be up before saving
we don't want to miss our window

for all other every 15 minutes

that way if the battery is too low by the time shutdown comes around you
don't lose much progress

Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
2025-01-21 00:04:32 -05:00
Vencislav Atanasov
5d7c8a0df1 Convert non-ASCII characters to UTF-8
Comments and notes are converted to UTF-8. Already broken multibyte characters are fixed using common sense.

This patch contains no code changes.

Change-Id: Ia511ab84936cb2495ac17309493a9b98727a7902
2024-12-15 21:16:12 -05:00
William Wilgus
fdbaf7df59 [Feature] playlist_viewer id3 title display
Not sure this is a great idea from disk and battery standpoint
but there is no reason you can't..

using the name buffer to fill title data
prevent hitting the disk for each screen scroll

add get_metadata_ex to allow flags
 METADATA_EXCLUDE_ID3_PATH
  prevent copying the filename to the ID3 struct
 METADATA_CLOSE_FD_ON_EXIT
  instead of seeking to the beginning the file is closed before
  get_metadata returns

add logic to allow a invalid fd to signal that get_metadata
should open and close the file within its call

bugfix per Chris_s don't use the tagcache for the trackinfo

Change-Id: Ic7a595b39a8d7a57f975312bc9c8bb4111f22a88
2024-07-09 01:40:02 -04:00
Christian Soffke
ea5ce8034b Replace "Reload After Saving" with option to remove queued tracks
The "Reload After Saving" setting was added in
g3347 (4f83e66) to solve FS#13287, by allowing
you to bookmark a modified playlist after saving,
without having to manually reload it first.

Since the rewrite of playlist_save in g5192
(90e3571), a modified playlist doesn't have to be
reloaded anymore in order to be bookmarked after
it's been saved, unless it contains queued tracks.

To cover the remaining use cases of the previously
available option, Rockbox will now offer to remove
any queued tracks from a playlist when saving it.

Change-Id: I2d6f12bcce14d8ff41a4d921ce84d628774103ac
2024-04-21 18:28:16 +02:00
Solomon Peachy
57713f6308 ipod: Support IAP remote MENU/SELECT/UP/DOWN keys in MODE2
Only the primary contexts (standard, wps, quckscreen, tree, radio)
handle the new keys so far.

Todo contexts:  Settings, keyboard, pitchscreen, bookmark, & recording.

Available docs for MODE4 don't list anything other than playback
controls, so it's not clear if there is a path forward here.

Change-Id: I91908092f75d96813e2e155e447129ba15f58051
2023-10-06 11:31:59 -04:00
Aidan MacDonald
1e9ad3ca0d Remove buflib allocation names, part two
Remove allocation names from the buflib API and fix up all callers.

Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
2023-01-13 10:32:54 +00:00
William Wilgus
7b3e2f6f85 fix yellow iap-core.c
Change-Id: Idebedd10962e358002ea1a3dd6ae491e59c44ecb
2022-11-17 04:43:38 -05:00
William Wilgus
687767bd8f convert a few more strlcpy to strmemccpy calls Fix Red and Yellow
albumart is imported to plugins just use a macro substitution
for now

Change-Id: I7c2e10d7559c087f0b3d0e6b844027d3b323da55
2022-11-15 01:24:26 -05:00
William Wilgus
f6c719d7ec replace strlcpy with strmemccpy
replace applicable calls to strlcpy with calls to strmemccpy
which null terminates on truncation

in theory the strmemccpy calls should be slightly faster since they
don't traverse the rest of the source string on truncation
but I seriously doubt there is too much of that going on in the code base

Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2
2022-11-14 23:56:16 -05:00
Aidan MacDonald
13da1ba785 Remove is_fading from the global WPS state
Turns out it was never assigned and always false.

Change-Id: I8cd9118682e7a0785c262d4c0594f8f51412c18b
2022-10-18 12:56:28 +01:00
Aidan MacDonald
d55dceff37 apps: Add ability to do a clean reboot
Allow a clean shutdown to end in either power off or reboot. Add a
new event SYS_REBOOT to signal it and sys_reboot() to trigger the
event. SYS_REBOOT signals a reboot request and should be listened
for alongside SYS_POWEROFF events.

Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
2022-04-16 14:36:39 +01:00
Dana Conrad
4f83e66cd4 FS#13287 - Load a newly saved playlist and resume where it was
Works from any playlist saving operation accessed from the
While Playing Screen, all other playlist saving operations
are unchanged.

Now a user-selectable setting! Located in
General Settings -> Playlists -> Current Playlist ->
Reload After Saving (Yes/No)

Change-Id: I5085c3f4c56c518a812d5ee015d15cc4dca19a28
2021-05-03 20:10:27 +00:00
LiveboxAndy
77f8c9c9f1 Update to allow the Apple Radio Remote to function on iPod Video 5G.
This was broken when the major update to iap was comitted.
ia-lingo7.c created and various iap related files modified.
On 4G, 6G and Nano 1/2Gen iPods the remote will function
even though the radio won't.
Tested on 4G Greyscale, 4G Color, 4G Photo, 4G Mini 1st Gen,
4G Mini 2Gen, Nano 1G, Nano 2G, Video 5G, Video 5.5G

Change-Id: Ia74e3d07d9ab5edc6da8eafa96801ede722be331
2020-07-09 18:02:07 +00:00
Solomon Peachy
2d57bfba36 portalplayer: Fix three set-but-not-used warnings.
(They show up when building with gcc494)

Change-Id: Id5e2bccf18114ed78a557ac1b369f46b4f07d042
2020-07-05 17:15:57 +00:00
Solomon Peachy
51ad625404 FS#13186: IAP: Send periodic updates in mode 4 (Stefan Ott)
Devices in IAP mode 4 do not explicitly request specific notifications, thus they don't get *any* periodic notifications at the moment (in particular, they miss the track position updates that are supposed to be sent out every 500 ms).

The attached patch fixes this by skipping an early return for devices in IST_EXTENDED state.

Change-Id: I23e35247dd0494e537429d4fd9d51dc7f4653d76
2020-03-29 18:44:15 +02:00
Cástor Muñoz
cbcc8f368f iAP: fix USB storage mount after using an iAP accessory
Change-Id: Ieb10da5850e9a2fa751142c2cf29447dccec0a17
2016-08-26 00:16:16 +02:00
Cástor Muñoz
be5fc0ff7f iAP: lingo 1 (microphone)
Change-Id: I65da2064951972368a2880d271280e5b5ae878fe
2015-10-07 06:15:04 +02:00
Cástor Muñoz
b2d650f511 iAP: authentication 1.0
Change-Id: I71b8e9f7ce2568c180396d6695cef18ce94ded32
2015-10-07 06:15:04 +02:00
Thomas Martitz
470989bd70 events: Rework event subsystem (add_event, send_event) to be more versatile.
add_event_ex is added that takes an extra user_data pointer. This pointer is
passed to the callback (add_event and add_event_ex have slightly different
callbacks types). All callbacks also get the event id passed. Events added
with add_event_ex must be removed with remove_event_ex because the user_data
pointer must match in addition to the callback pointer.

On the other add_event is simplified to omit the oneshort parameter which
was almost always false (still there with add_event_ex).

As a side effect the ata_idle_notify callbacks are changed as well, they
do not take a data parameter anymore which was always NULL anyway.

This commit also adds some documentation to events.h

Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-03-14 23:36:30 +01:00
Marcin Bukat
7f5dce4116 ipods: fix DEBUG builds
iap-core.h defines LOGF_ENABLE unconditionally but hexstring()
helper function was not compiled if logf support was not
selected in configure. The regular builds worked by accident
because logf() lines where discarded by preprocessor.

Change-Id: Id76af478e7c760d81168ebf9bf3eb973a679987c
2014-01-16 08:19:27 +01:00
Ralf Ertzinger
b170c73f92 Updated IAP commands.
Originally written and uploaded by Lalufu (Ralf Ertzinger) in Feb 2012.
They have been condensed into a single patch and some further additions
by Andy Potter.

Currently includes Authentication V2 support from iPod to Accessory,
RF/BlueTooth transmitter support, selecting a playlist and selecting a
track from the current playlist. Does not support uploading Album Art
or podcasts. Has been tested on the following iPods,
4th Gen Grayscale, 4th Gen Color/Photo, Mini 2nd Gen, Nano 1st Gen and
Video 5.5Gen.

Change-Id: Ie8fc098361844132f0228ecbe3c48da948726f5e
Co-Authored by: Andy Potter <liveboxandy@gmail.com>
Reviewed-on: http://gerrit.rockbox.org/533
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
2013-11-10 18:41:24 +01:00