Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

powermgmt: adjust sleep timer behavior

Responding to the bug report posted by iPodVT:
https://forums.rockbox.org/index.php/topic,55180.msg255292

- An active sleep timer that runs out will now cause the
player to shut down regardless of playback state

- When playback state is paused or stopped, once the
idle timer has run out, player will shut down, regardless
of any running sleep timer

Change-Id: I33de682a63ed1db76174eb2394ef5568f37cc677

+5 -8
+5 -8
firmware/powermgmt.c
··· 990 990 #ifndef BOOTLOADER 991 991 static void handle_sleep_timer(void) 992 992 { 993 - if (!sleeptimer_active) 994 - return; 995 - 996 - /* Handle sleeptimer */ 997 993 if (TIME_AFTER(current_tick, sleeptimer_endtick)) { 998 994 if (usb_inserted() 999 995 #if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING) ··· 1055 1051 #endif 1056 1052 !usb_inserted() && 1057 1053 (audio_stat == 0 || 1058 - (audio_stat == (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE) && 1059 - !sleeptimer_active))) { 1060 - 1054 + audio_stat == (AUDIO_STATUS_PLAY | AUDIO_STATUS_PAUSE))) 1055 + { 1061 1056 if (TIME_AFTER(tick, last_event_tick + timeout) 1062 1057 #if !(CONFIG_PLATFORM & PLATFORM_HOSTED) 1063 1058 && TIME_AFTER(tick, storage_last_disk_activity() + timeout) ··· 1065 1060 ) { 1066 1061 sys_poweroff(); 1067 1062 } 1068 - } else 1063 + } 1064 + 1065 + if (sleeptimer_active) 1069 1066 handle_sleep_timer(); 1070 1067 #endif 1071 1068 }