Setting up my DIY headless (remote controlled via phone/pc) battery powered digital audio player. Need guidance.
Nov 7, 2019 at 11:19 PM Thread Starter Post #1 of 7

manueljenkin

100+ Head-Fier
Joined
Sep 18, 2015
Posts
410
Likes
218
The single board computer you see there in the attachment is an Allo Sparky. It as 2 usb 2.0 ports, 1 usb 3.0 port, an Ethernet and a hdmi port. Also has some gpios. The processor is
ARM Cortex A9 based. 4 cores clocked in at 1.1ghz each.

https://www.allo.com/sparky/sparky-sbc.html

The other unit you see is my dac+amp - apogee groove. It has lots of power and a clean signal. The reason why i went with Allo Sparky over raspberry Pi is because the device has a cleaner usb power supply to my dac/amp.

I'm looking to make my own headless digital audio player. It will be battery powered (the battery will be placed in the bottom side of the box, not shown in picture). The usb 3.0 port will be connected to my 256gb pen drive which will contain my music and videos. The device will mostly be used as a headless music player only, but at times I might connect it's hdmi port to my tv to enjoy videos.

All control shall be done by my phone/pc though a way similar to hiby link. Basically what it does is. It parses and makes a list of all music stored in the audio player. Shares this list via bluetooth to the phone. And now you can make all control through the phone. It would also support volume control via phone. I'm trying to make a more powerful variant of the same, as I'll explain below.



On the two usb 2.0 ports, one will be connected to a bluetooth dongle for remote control via phone/pc and the other for sending usb audio out to my apogee groove.

Downloaded Fedora commandline OS (the server one, exploring other options for os like ap-linux, mx-linux, volumio etc). Things I'm gonna implement.

1. Proper alsa/pulse audio/other audio output configuration. Need more enlightenment on this topic though. Bit perfect playback etc. Including, flush to ram etc. Need to understand the paging algorithms available and make the best one for my utitlity. Also, dsd-pcm conversion, and upsampling support (44.1khz converted to 44.1x4 khz, 48khz converted to 48x4 khz, etc) !!but no resampling!! More details about audio transfer in this link.

https://opensource.com/article/19/2/define-top-music-player-Linux

https://opensource.com/article/19/2/audio-players-linux

The groove dac requires a separate driver for windows but is apparently plug and play on Linux/android. I'm not entirely sure how audio drivers work on Linux vs windows and if i would need to do anything additional. The windows driver did come with a tool where I can control the preference of low-latency vs safer data transfer. I'd prefer the latter unless I'm gaming.

https://apogeedigital.com/blog/blog-how-to/improve-sound-quality-samsung-galaxy-s6

Note: I dont use streaming services etc so such support is not of priority. All my music and video will be in my pendrive. So no need to support bluetooth audio in as well. The bluetooth is only for control purposes. I'd be happy if i can use the gpios for the same purpose instead of bluetooth if possible.

2. Drive parser + metadata gatherer. It'll gather all and give me a file I can load into my phone. Now my phone will control everything on the dap. Similar to hibylink but now I'll have all album art and lyrics info on my phone. Hibylink only sends basic text metadata due to bluetooth bandwidth limitations. Here I'll actually take the pendrive out after the list is made and store it in my phone.

3. (Continuation of point 2) A full on data parser system that can access inside multiple internal directories, image files (iso) etc. It needs to parse iso files since I organize my content that way to have better organization and better security over viruses. This would essentially mean support for mounting disc image files. And make a full list of audio and video files, thumbnails and other tags. I'll just have a copy of the entire file system with all metadata etc copied to my phone, except for the content inside those files which will reside on my pendrive connected to the sbc.

4. Typically headless, but with hdmi out and some video playback capabilities when called for (connected to a tv).

5. Replaygain + upsampling the bit depth as well (all upsampled to either 24bit or 32bit before having these replaygain tweaks added). Replay gain is used for volume normalization. It does an RMS calculation of the waveform and stores it as metadata. This shall be used to alter the sound level of the data being fed to the dac.

6. Another data analyser for foobar. It'll analyse if my music is mastered too center channeled or too side channeled. And also another check for live/binaural. This would be something I'd personally code and add as metadata. I just made this point here for continuity. Also be able to just save the spectrogram of the song as metadata (1080p res) along with lyrics if possible.

7. Equalizer profile auto swappable using the analysed metadata. For side channeled music, I'll keep shure srh1540 (it is my headphone) stock. For condensed center channel stuff, I'll EQ it to 940/er4b curve. For binaural, same. For live, I'll just EQ 7khz a little up for srh1540.

8. Battery indicator on the phone and on the device. Power management etc as well. Ability to disengage/downclock processors when not required. When I'm not using Equalizer or playing video, etc most of the tasks being done would just be copying from ram to usb out and monitoring input from bluetooth stick.

9. Ethernet out and support for separate processing through stuff like zynq processors. Will later try my own other signal processing like active noise cancelling, spatial processing, head tracking and other stuff. Using mics attached to the headphone. Not a priority for now, but would be nice if i can add support now itself.

10. Ethernet in for network music player.

I'm a Linux noob so I'd love step by step guidance on the same. I do know a fair share of coding (been used to matlab and basic Linux shell commands etc) and also have had courses on computer architecture etc, so I do know some basics, but I prefer if someone could guide me through it.

List of things I need help on are - driver stack for both the processor and also audio transfer protocols, kernel support, music players, video players, how to use Linux to write my file system parsing code, making app/ui on android/pc/web to make my control possible. Would also like to know help on what are the players and and client servers like mpd, cantata, ncmpcpp, deadbeef. etc

Currently installed fedora server on virtual machine on my PC and have a hard time figuring out how to use it or navigate through it. Guide for noob/video link would also be helpful.
 
Nov 7, 2019 at 11:21 PM Post #2 of 7
The image of my diy setup

https://i.redd.it/h2h1zmlr8eu31.jpg
h2h1zmlr8eu31.jpg
 

Attachments

  • 4c8f471.jpg
    1.5 MB · Views: 0
Last edited:
Nov 8, 2019 at 11:01 AM Post #3 of 7
IMHO, this is a really big job, going to take a lot of work. Way beyond anything I could advise you on.

I can say you should consider adding a wifi dongle instead of bluetooth, Or just connect up ethernet for now, to get it going.
With a network connection and an existing sparky image, maybe Volumio, you can probably do a lot of your audio wishlist (if not all).

Or go with dietpi, which is more of an OS. It supports a bunch of different video and audio programs, you can see if one of them does what you want.

Sometimes its easier to connect up a basic system, then start trying stuff.

Not to discourage you, but some really smart guys have spent years developing programs like Volumio and runeaudio.
You can program a sd card with volumio, connect up your dac and give it a try.
 
Nov 16, 2019 at 4:57 AM Post #5 of 7
Nice project.

The reason why i went with Allo Sparky over raspberry Pi is because the device has a cleaner usb power supply to my dac/amp.

Do you have a source or link for that?
Have you measured it by yourself or read it somewhere?
 
Nov 16, 2019 at 6:05 AM Post #6 of 7
Nice project.



Do you have a source or link for that?
Have you measured it by yourself or read it somewhere?

Allo audio has measurements somewhere. I forgot the exact location where i found that. Also in raspberry Pi, the usb and ethernet ports use shared bandwidth. Not that bandwidth is an issue for audio, but the latency etc arising from the design might affect timing.
 
Nov 16, 2019 at 7:40 AM Post #7 of 7
I personally use a Rasberry Pi3b+ with a Hifiberry DAC+ Pro hat and a linear power supply and i'm still impressed with the sound quality it delivers, especially in relation to the spend money.

But i never tried to build and configure the OS and software on my own, i don't have the time and i doubt the results would be better than a dedicated linux audio distribution.
I started with running Volumino and an external wifi antenna, but i had stability issues.
Now i switched to Moode Audio and with the Raspi Pi3b+ i don't need an external wifi antenna any longer. The system now runs stable the whole day and i'm happy with the sound quality.

For a deeper analysis of electrical noise i would need proper measurement equipment, but this i don't have.

Nevertheless i'm interested in other similar solutions like yours, because i plan to build a second headless streaming system.
 

Users who are viewing this thread

Back
Top