mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
Introduce the generic, target-agnostic pieces for a gadget-driven USB Audio Class DAC, gated by the HAVE_HOST_USB_AUDIO target flag so they stay inert unless a target opts in. Rather than adding a new USB mode, reuse the existing usb_audio setting (never / always / while charge-only / while mass-storage) with its LANG_USB_DAC string, usb_set_audio() callback and the PCM_MIXER_CHAN_USBAUDIO mixer channel. HAVE_HOST_USB_AUDIO becomes the umbrella capability flag for this common code; USB_ENABLE_AUDIO stays the native usbstack class-driver contract (which needs HAVE_USBSTACK and so cannot be used by hosted ports whose kernel owns the USB controller). usb_set_audio() is declared here and implemented by the target (natively by the usbstack driver, or in the hosted port for gadget targets, as with usb_audio_get_active()), and applied at settings load. The playback interlock in wps.c/playback.c keeps local playback from mixing with host audio while the DAC is active. Simulator stubs for usb_set_audio() and usb_audio_get_active() keep sim builds linking. Co-Authored-By: Claude Opus 4.8 Change-Id: I5b7738508c24721d91d4c32379102a1ac7c6228b |
||
|---|---|---|
| .. | ||
| bitmaps | ||
| buttonmap | ||
| common | ||
| uisimulator.make | ||