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.

[Bugfix] FS#13492 - Playback resume fails after USB insert

On usb plug system_flush() gets called before the other
threads get a chance to ACK the insert

system_flush() calls playlist_shutdown() (amongst other things)
playlist_shutdown closes the control file

the audio thread acks USB insert
audio_stop_playback is called which now can't look up the
filename from the now closed handle for control the control file

I left the guard for checking for USB insert but it appears to be
fine without it

Change-Id: I935dbf7aed38d4a57413c0063ad953f427e9b3bb

+5 -1
+5 -1
apps/playlist.c
··· 1949 1949 * Clean playlist at shutdown 1950 1950 */ 1951 1951 void playlist_shutdown(void) 1952 + 1952 1953 { 1954 + /*BugFix we need to save resume info first */ 1955 + /*if (usb_detect() == USB_INSERTED)*/ 1956 + audio_stop(); 1953 1957 struct playlist_info* playlist = &current_playlist; 1954 1958 playlist_write_lock(playlist); 1955 - 1959 + logf("Closing Control %s", __func__); 1956 1960 if (playlist->control_fd >= 0) 1957 1961 pl_close_control(playlist); 1958 1962