Linux or PIC based HDD player?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'm hoping to design an HDD player, using SPDIF out to an external DAC, playing FLAC files. You know the kind of thing - like a fat stationary ipod. I also want it to be separate from my PC, apart from an ethernet or eSATA port to load the HDD.
Thing is, I can't decide how to go about it. Since it's only a simple design, HDD > File manager & GUI > FLAC decoder > SPDIF encoder, I thought I could get a PIC to interface with the HDD and do things like track selection, playlists and GUI. Thing is, I really hate PICs - and also, looking around the net, it seems no-one's made a PIC (or other microcontroller) based HDD mp3/FLAC player in over 5 years. Correct me if I'm wrong.
So I thought about making the whole thing out of a tiny low-resourced PC using passive heatsinks and Linux. It seemed overkill, but had the advantages of an easily designed GUI and probably less programming, although would probably be pricier.
What the problem is is that I'm confused about what's the easiest way to get high quality digital out. FLAC of course supports any sample rate and any bit depth, and since I have a few different audio formats to convert, my player needs to be able to play CD quality 44.1/16b, HDCD at 44.1/20b, DVD quality at 48/16b, 20b and 24b, and 96/24b vinyl rips and studio tapes.
But the Linux info I've found seems to suggest Linux machines tend to resample at 48kHz... surely this is hardware dependent? I realise that two different crystals are needed, one for 44.1 and one for 96 and 48kHz, but surely hardware can implement this and switch accordingly??
I'm not worried about latency really, since it's only for playback, and I assume I'm right in saying that all I'd potentially notice was a tiny pause between issuing commands and getting results. If latency has a greater effect, do let me know (!)
All I want is basically bit-perfect sample-perfect FLAC playback, which surely isn't too ambitious a goal?? Is Linux or even Windows the way forward?
All help very greatly appreciated!
Cheers
Kit
 
Software re-sampling is complete waste of resources, and is in my opinion best avoided.
I don't believe it is mandarory on Linux.
I was planning a similar setup - using an OLD motherboard (a few hundred MHz processor), with either a USB DAC, or a PCI audio card.
I was then gonna use an application like "Music On Console" http://moc.daper.net

Ideally, I want a large (several lines, not graphical) LCD display. Not sure how much I'd actually have to code to make that work with MOC.
 
linux sound server

soundcheck has gone into this extensively:

see http://www.diyaudio.com/forums/showthread.php?t=93315

and in particular, his wiki on tweaking linux (although there is currently an issue with the wiki - some pages refer to "oldwiki" and these work; other pages are addressed as wiki" and wil only work if you substtute "oldwiki")

http://www.diyaudio.com/oldwiki/index.php?page=Digital+Sources then goto Linux Audio

check out the use of mpd (sub "oldwiki" in the link) for your application- it would seem to be what you are aiming at.

Ian
 

The last post in that thread explains the cause - his player was using the dmix plugin. For mixing you have to convert all streams to a common sample rate. But you can easily bypass dmix and play directly to the sound card (devices plughw or raw hw), it is just a matter of configuration.
 
Last edited:
That'll teach me to skimread. Thanks phofman :)
So a Ubuntu machine with a decent soundcard will give me bit-perfect out? If so, why on earth aren't more people onto this as the best source? Seems mad.

Perhaps for just the same reason people in the other thread keep fighting and loosing data with fake proprietary raids when linux offers rock-stable software raid with incomparably more advanced management options.

Ubuntu will provide bit-perfect output if properly configured. First that particular card must be properly supported by linux. This is the case for vast majority of cards, but there are exceptions (Lynx, E-MU). Second the default audio server called pulseaudio (something like dmix but a standalone application) must be properly removed from the system. Third the playback application/whole chain must be configured to output to the correct device.

All of that is feasible with a relatively reasonable effort. It all depends on your willingness to learn new things.

A few months ago on one czech forum a user complained about winXP ignoring SPDIF output on his older NTB docking station. Together (online) we managed to configure ubuntu to provide bit-perfect output (both 44.1 and 48kHz) to that SPDIF output. Well, it took a few posts, he got to learn how to use the command line (and found it useful), but the result was a fully working setup on a machine otherwise headed to a recycling facility (we do not throw away toxic waste, do we :) ).
 
phofman- that's interesting, do i take it from that that the drivers are simply not available and short of coding one myself I'm limited to SPDIF? I think drivers may be a bit beyond my skill level!
I'm quite keen on using the HDMI out as I have a receiver that can take it. If I were set on that HDMI out, would it be foolish to use, say, ASIO and WINE, as I've heard others have, or even ASIO and Windows until such time as a cleverer chap makes a suitable driver? If not, no problem really, I'll just stick to SPDIF until either I or another can get a driver working :)
Forgive me, drivers and Linux-modding really aren't my forte at the mo, tho I hope to change that. Thanks again for all your expertise and patience :)
 
withnail

Adding HDMI support is not about your coding skills. The driver comes from one of the alsa gurus and if he says http://www.spinics.net/linux/fedora/alsa-user/msg07842.html it can basically only mean he was not provided with sufficient information from Asus/someone producing the card to enable the HDMI output. I bet if Clemens had the information he would have already added HDMI support to the driver.

HDMI is close to DRM and manufacturers have to follow strict rules about spreading sensitive information.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.