• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Opening up DYI streaming solution

MadEnvel

New Member
Joined
Aug 23, 2024
Messages
3
Likes
7
Hello, Fellow Audio Enthusiasts,

I'm excited to share the results of a year-long DIY adventure with you all! After many hours tinkering, I've developed a solution to stream audio from Raspberry Pi 4B with a HiFiBerry Digi2 Pro card to my old and rusty Yamaha RN-602 MusicCast device via optical cable. And now, I'm thrilled to open up the software to the community under the GPLv3 license.

The project is split into two main parts:

  1. Server: Designed to run on any Linux machine with ALSA support.
  2. Client: Works on mobile, desktop, or browser platforms. Currently, the most supported client is Android, with a ready-to-use APK available, and the Raspberry Pi 4B (raspbian) is the most tested server device, with a deb package provided.

Key Features:

  • Gapless, Bit-Perfect Playback: No resampling is supported at this stage, ensuring pure audio quality.
  • Qobuz Streaming: Currently, Qobuz is the only supported streaming service (a valid subscription is required), with FLAC as the sole supported format.
  • Versatile Client App: Connects to the server over the network and can even run on the same device as the server.
  • Extensible Code: The software includes an addon mechanism, making it easy to extend with other input sources or device plugins.
This project is offered "as is," with no guarantees, but I hope it proves useful to others. Contributions and feedback are very much welcome!


GitHub Link to the Server
GitHub Link to the App

Yours,
MadEnvel

screencap-3.png
screencap-2.png
screencap-1.png
screencap.png
 
Hats off to your advanced and extensive project. I always look at alsa code to learn as that's my sort of hobby and using alsa is quite complicated. Just a note if you don't mind - selecting fixed S24_LE soundcard format for bitsPerSample > 16 works OK for the RPi I2S soundcard you use https://github.com/raspberrypi/linu...1847112/sound/soc/bcm/bcm2835-i2s.c#L770-L772 . Other soundcards support S32_LE instead, or even the 24-bit S24_3LE only. While supporting S24_3LE is quite complex as it would require passing a 24bit stream, perhaps a check in https://github.com/madenvel/Kalinka...8e4a9b/native_player/AlsaAudioEmitter.cpp#L39 could check whether S32_LE is available should trying S24_LE fail.

Of course users can use the plug wrapper and not care about formats.
 
Last edited:
Hats off to your advanced and extensive project. I always look at alsa code to learn as that's my sort of hobby and using alsa is quite complicated. Just a note if you don't mind - selecting fixed S24_LE soundcard format for bitsPerSample > 16 works OK for the RPi I2S soundcard you use https://github.com/raspberrypi/linu...1847112/sound/soc/bcm/bcm2835-i2s.c#L770-L772 . Other soundcards support S32_LE instead, or even the 24-bit S24_3LE only. While supporting S24_3LE is quite complex as it would require passing a 24bit stream, perhaps a check in https://github.com/madenvel/Kalinka...8e4a9b/native_player/AlsaAudioEmitter.cpp#L39 could check whether S32_LE is available should trying S24_LE fail.

Of course users can use the plug wrapper and not care about formats.
Thanks for the feedback, created an issue with some more details.

Alsa is indeed quite complicated with the documentation being far from clear. It is pretty low-level and gives more control to the application, I have tried a few others before ending up there. For instance, one of the issue that Alsa allowed me to understand and work around was related to this bcm2835 driver code. It turned out that "I2S Sync Error!" does not just produce an annoying log message every time I prepare the hardware to new format, it actually fails to sync, so that if you start feeding the data, up to first 500ms of the sound are skipped as the device is not ready.
 
Back
Top Bottom