I currently try to setup my raspberry pi 3 with a HiFiBerry DAC+ Pro XLR (using Raspian based on Debian 10).
I installed the sound card and configured alsa to use device 1 as new default. Restarted raspotify, audio plays now over XLR. (So now i can simply switch between the two devices with no additional configuration) So far so good.
However, now I would like to have the audio stream of raspotify simultaneously on both the new hifiberry sound card and on the onboard phone jack. The XLR ouput will go directly to the speakers, the phone jack output is need for my LED control (i build a FFT LED control which expects an audio input). Normally, I'm pretty familiar with Linux (Server & Embedded), however I have never had to deal with audio stuff on linux.
The last 5? hours i tried to set up Alsa to play the audio stream (coming from raspotify) to both sound cards simultaneously, however not a single tutorial etc. worked. I tried several solutions from StackExchange, various Blogposts, Linux Mailinglists and Wikis. Nothing, and i mean really nothing works. (The "best" was a completely mixed/f*cked up sound on XLR for about 30sec, before it crashes, but no sound on the onboard jack, based on this blogpost: http://www.6by9.net/output-to-multiple-audio-devices-with-alsa/)
Other sites/things I tried:
(and many more - I lost track 2 hours ago...)
After wasting many hours now: does anyone have any idea? Is it even possible, what I want to achieve? (based on my research it should be possible, even if it might run out of sync after hours). Should I give PulseAudio a try? Or does anybody as another configuration I could give a try?
At this point, I'm kind of open for all solutions.
(And yes, I know, I didn't include any config samples or error messages. That's because I mostly just tried the solutions from the various sites and adapted them to my local setup (like reducing 4 channels to 2; setting the proper hardware interface and so on) and i kind of lost track, what I already tried...)