usbaudio: block playback while usbaudio is active

Needed due to us commandeering the AUDIO DSP "channel" for USBAudio.
If/When we add another DSP channel, this can be reverted.

Works, but still goes to a "blank" WPS screen for a split second before
cancelling out.

Change-Id: I5fb8a1e226b4d3e46c86c59d593d807f49d7a35f
This commit is contained in:
Dana Conrad 2025-11-08 15:12:58 +00:00
parent c533222851
commit a1837d2d80
3 changed files with 28 additions and 0 deletions

View file

@ -65,6 +65,12 @@
#include <strings.h> /* For strncasecmp() */
#endif
#ifdef USB_ENABLE_AUDIO
#include "usbstack/usb_audio.h"
#include "splash.h"
#include "lang.h"
#endif
/* TODO: The audio thread really is doing multitasking of acting like a
consumer and producer of tracks. It may be advantageous to better
logically separate the two functions. I won't go that far just yet. */
@ -2978,6 +2984,15 @@ static void audio_on_track_changed(void)
static void audio_start_playback(const struct audio_resume_info *resume_info,
unsigned int flags)
{
/* NOTE: if USBAudio ever gets its own DSP channel, this block can go away! */
#ifdef USB_ENABLE_AUDIO
if (usb_audio_get_active())
{
splash(HZ*2, str(LANG_USB_DAC_ACTIVE));
queue_reply(&audio_queue, 0);
return;
}
#endif
static struct audio_resume_info resume = { 0, 0 };
enum play_status old_status = play_status;