A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

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

usbaudio: triage panic from splash()

Do the check in gui_wps_show() to avoid calling splash()
from anything other than the main thread

Change-Id: Icc1c6f287d82dc6e73b7cae9c75c18be73b82d48

authored by

Dana Conrad and committed by
Solomon Peachy
896cceee bc7bc4e8

+16 -2
+11
apps/gui/wps.c
··· 65 65 #include "skin_engine/wps_internals.h" 66 66 #include "open_plugin.h" 67 67 68 + #ifdef USB_ENABLE_AUDIO 69 + #include "usbstack/usb_audio.h" 70 + #endif 71 + 68 72 #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ 69 73 /* 3% of 30min file == 54s step size */ 70 74 #define MIN_FF_REWIND_STEP 500 ··· 713 717 */ 714 718 long gui_wps_show(void) 715 719 { 720 + /* NOTE: if USBAudio ever gets its own DSP channel, this block can go away! */ 721 + #ifdef USB_ENABLE_AUDIO 722 + if (usb_audio_get_active()) 723 + { 724 + splash(HZ*2, ID2P(LANG_USB_DAC_ACTIVE)); 725 + } 726 + #endif 716 727 long button = 0; 717 728 bool restore = true; 718 729 bool exit = false;
+5 -2
apps/playback.c
··· 2984 2984 static void audio_start_playback(const struct audio_resume_info *resume_info, 2985 2985 unsigned int flags) 2986 2986 { 2987 - /* NOTE: if USBAudio ever gets its own DSP channel, this block can go away! */ 2987 + /* 2988 + * Refuse to start playback if usb audio is active. See gui_wps_show() for 2989 + * a splash message to the user. 2990 + * NOTE: if USBAudio ever gets its own DSP channel, this block can go away! 2991 + */ 2988 2992 #ifdef USB_ENABLE_AUDIO 2989 2993 if (usb_audio_get_active()) 2990 2994 { 2991 - splash(HZ*2, ID2P(LANG_USB_DAC_ACTIVE)); 2992 2995 queue_reply(&audio_queue, 0); 2993 2996 return; 2994 2997 }