i'm sure there are lots of other options, but https://www.raspberrypi.org/documentation/usage/audio/

(and https://forum.duet3d.com/topic/13194/dsf-extension-exec-on-mcode-was-shutdown-sbc of that wasn't obvious)