Lossless SD-card player - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 16th March 2009, 09:29 AM   #1
diyAudio Member
 
Join Date: May 2006
Location: Holland
Post Lossless SD-card player

This thread is about designing a WAV (FLAC) SD-card player for integration in (existing) DACs. It runs on a (divided) DAC master clock, and outputs I2S (64 bit / frame).

The advantage over CD players is the bit-perfect CD image, stored on a semiconductor memory card, that's able to reproduce exactly the same digital audio data, over and over again. Unlike CD players, the semiconductor memory is insensitive to shocks and vibrations, the card is also more robust compared to a CD that damages (scratches) easily. The SD-card player is absolutely silent (no moving parts).

The SD-card capacity also allows storage of multiple CDs or even an entire play-list. Due to the clock strategy and interface (I2S out), very low clock jitter and interference levels could be obtained. The interface / interlink related problems are eliminated.

The advantage over computer (PC) based digital audio sources is the absolute silent operation, low power consumption, very low interference levels, very low jitter, and The interface / interlink related problems are eliminated.
  Reply With Quote
Old 16th March 2009, 12:06 PM   #2
jims is offline jims  United States
diyAudio Member
 
Join Date: Mar 2007
Hi EC


Are you thinking about something like this:

http://www.amazon.com/American-Audio.../dp/B0013UQZZA


JimS
  Reply With Quote
Old 16th March 2009, 01:53 PM   #3
diyAudio Member
 
Join Date: Mar 2009
Hi.

I have done the flac decoding in a tiny Xilinx FPGA, that receives streams (and playback commands) from an ethernet connection, and outputs the I2S.
I have actually had the same idea about a dedicated player, with a simple 2 lines lcd display and navigation keys for the operation, and reading data from usb stick or sd card.

I would be happy to share the FPGA source code, or we can co-work on a complete design ??
  Reply With Quote
Old 16th March 2009, 02:18 PM   #4
diyAudio Member
 
theAnonymous1's Avatar
 
Join Date: Feb 2004
Location: Anonymityville
Quote:
Originally posted by jims
Hi EC


Are you thinking about something like this:

http://www.amazon.com/American-Audio.../dp/B0013UQZZA


JimS
It only plays MP3 format and has a 4GB SD card limit.
  Reply With Quote
Old 16th March 2009, 02:59 PM   #5
diyAudio Member
 
Join Date: May 2006
Location: Holland
Hi cbroegger,

Quote:
I have done the flac decoding in a tiny Xilinx FPGA, that receives streams (and playback commands) from an ethernet connection, and outputs the I2S.
I have actually had the same idea about a dedicated player, with a simple 2 lines lcd display and navigation keys for the operation, and reading data from usb stick or sd card.
Thanks for the offer, but we use a dedicated Microchip DSP that basically has all required hardware like dual ported RAM, DMA, and I2S generation logic on-chip. We use an existing FAT32 library provided by Microchip. The rest is programmed in either assembly or c. The FAT32 file system is already up and running. I2S patterns have been successfully generated, and the clock strategy is already sorted out.
  Reply With Quote
Old 16th March 2009, 03:18 PM   #6
diyAudio Member
 
Join Date: May 2006
Location: Holland
Here are some basic specs:

Support for max. 99 CDs and max. 99 tracks / CD on a single SD-card.
Support for CD and / or track shuffle.
FAT32 file system, provides support for high-capacity SD-cards.
Digital audio stored as WAV files.
Simple user interface, push buttons and blue 7-segments displays.
Remote control (optional).

Functions:

CD increment / decrement (1 ... 99, 0 = CD shuffle).
Track increment / decrement (1 ... 99, 0 = track shuffle).
Play/ pause
Stop
SD-card number support (1 ... 9999) for easy SD-card identification.

Output:

Philips I2S, 64 bits / frame.
44.1/16
44.1 KHz word clock, 2.8224 MHz bit clock (derived directly from master clock).

Power supply:

Single 5V (low-noise).

DSP clock = DAC master clock. The idea is to place the master clock as close to the DAC chip as possible, and route the buffered master clock to the DSP external clock input.

Main objective is to create an ideal digital audio source that provides very low jitter I2S signals, lowest possible interference, and is small enough to integrate in existing DACs. The integration is a must, as an I2S interface is used (short interlinks required), and the DSP must run on the DAC master clock.
  Reply With Quote
Old 16th March 2009, 03:22 PM   #7
diyAudio Member
 
soundcheck's Avatar
 
Join Date: Mar 2005
Location: D
Hi there.

I guess you know Koon's project from 2006. He's been there, done it.
He even made it work with a TI TAS5706 full digital amp.

ultimate source

http://www.koonlab.com/UltimateSource.html

Cheers
  Reply With Quote
Old 17th March 2009, 04:17 PM   #8
JC951t is offline JC951t  Taiwan
diyAudio Member
 
Join Date: Sep 2006
HI EC,
Does that mean the end of the road for CDP's
  Reply With Quote
Old 17th March 2009, 08:10 PM   #9
a333bt is offline a333bt  Slovenia
diyAudio Member
 
Join Date: Jun 2004
Location: Vodice
Quote:
Originally posted by JC951t
HI EC,
Does that mean the end of the road for CDP's
Hi JC95t,

probably yes. When i start using computer for music, CDs are only in the bigger boxes.

But, using SD card can be stored many CDs on 1 card.

To me this is practical solution. I will go for it, when is SD player ready.
Of course with DI1M.

Best regards,
Bostjan
  Reply With Quote
Old 17th March 2009, 08:59 PM   #10
diyAudio Member
 
Join Date: Dec 2004
Location: Brabant
@cbroegger

Are you willing to publish the mentioned fpga design.

I'm curious about the flac decoding part in the fpga

Small fpga you say, which type ?
What are you using for playback on the pc ?

I wanted to start with this avnet evaluation board for some testing
link

Gene
  Reply With Quote
Old 18th March 2009, 02:54 AM   #11
EUVL is offline EUVL  Europe
diyAudio Member
 
Join Date: Oct 2003
Most interesting.

There is at least the TEAC WAP2200, etc. on the market which can read FLAC, WAV, MP3, ..... and other formats from a USB stick or USN HDD, and for a bargain price of 120 Euros, but it only ruins it all with an SPDIF output (probably the only optional for a commercial product), so you get the problem back with different clocks for the Source and the DAC.

I2S out and DAC from the same clock is probably the best solution. Can we then use your linear interpolation idea as well and drive the Sabre 8 channel, effectively getting 18 bit, 192kHz ?


Patrick
  Reply With Quote
Old 18th March 2009, 08:56 AM   #12
diyAudio Member
 
Join Date: May 2006
Location: Holland
Hi gene klein,

Quote:
Are you willing to publish the mentioned fpga design.

I'm curious about the flac decoding part in the fpga

Small fpga you say, which type ?
What are you using for playback on the pc ?

We are not using a FPGA, it's a DSPIC33 series micro controller with dedicated on-chip hardware for SPI / I2S. It's a 28-pin chip (no SMD).

The intention is to support WAV only, FLAC decoding could be included as well, but creates too high interference levels (larger processor load). We are attempting to create a self-sustained DMA-controlled data flow, meaning that the controller is basically idling during playback, and will produce minimum interference. The main objective is to achieve best possible performance, not adding unnecessary features that would complicate things and would possibly degrade performance.

The SD-cards can be quickly re-written many times, so I don't see the need for using lossless compression like FLAC. Cheap SD-cards can already store 2Gb of data, that's already enough to store 4 CDs in WAV format. The latest cards have a capacity of up to 64Gb, and it's likely this capacity will be further increased. The 64Gb card will already be able to hold the maximum amount of 99 WAV CD images. It's also not practical to have so many CD images stored on a SD-card that's used in a basic player like this (browsing).

The WAV files are stored on the SD-card using a computer. This can be done by creating a sub directory for each CD, and simply copy the WAV files and CD cover-art in this directory, that's all. We also plan to provide software that extracts data from iTunes for example, and writes it on the SD-card using correct directory and file names. Next the SD-card is placed in the stand-alone player that will then work without computer.


We were thinking of the following approach for storing files:

Each CD image is placed in a separate sub-directory. The sub-directory name must start with a two-digit number, followed by artist name and CD name.

The WAV files (tracks) of that specific CD are placed in that sub directory, again using a two-digit number, followed by the track name.

The CD cover art is also placed in this directory, I always use 500 x 500 pixels and a file size of approx. 40Kb.

This way, all required data (Artist name, CD name, track names, and artwork) is present on the SD-card.

The computer can extract all data from the SD-card, and display the card contents, cover-art included. This information can be printed for reference. The data on the SD-card can be backed-up, read and written by any computer, without conversion.

The basic SD-card player will scan the SD-card upon insertion, and knows how many CDs and tracks are stored on the card. This information is then used to quickly display, and access the selected CD / track. The SD-card player will only scan for directories / files that start with a two-digit number. The SD-card player will (have to) use FAT32 for supporting higher SD-card capacities, and because of the integrated SD-card controller properties. We use an existing FAT32 library, offered by Microchip.

Each SD-card will also receive a unique number that will identify it (when multiple SD-cards are used to store a CD collection). The SD-card player displays this number upon insertion.

Depending on SD-card capacity, a play-list can be generated to play-back a maximum of 99 stored CDs images, or the equivalent amount of mixed tracks.

The player will be able to shuffle between stored CDs, tracks, or CDs and tracks.


The DSPIC micro controller will run on a very low jitter master clock. This master clock is located close to the DAC chip, and directly drives this DAC chip. Both DATA and WS will be generated by the DSPIC. This is possible because both devices run in sync, the DAC master clock basically slaves the controller.

Finally we plan to include a (slow speed) optical communications channel for extra functions like remote control, and retrieving information from the inserted SD-card.
  Reply With Quote
Old 18th March 2009, 11:35 AM   #13
diyAudio Member
 
Join Date: Dec 2004
Location: Brabant
Hi ecdesigns,


I was actually asking the question to cbroegger


Sorry for any missunderstanding


Gene
  Reply With Quote
Old 18th March 2009, 01:48 PM   #14
Onnosr is offline Onnosr  Netherlands
diyAudio Member
 
Join Date: Aug 2006
Default sd2i2s

Hi John EC

Are you interested in de schematics of the Edirol R1.

It has a clock running on 11.2896 and i2s intern feeding a DAC.
Easily diy for output i2s.

I am using now a 744T from Sounddevices (coax spdif) and I try to get schematics to get i2s out of it.

Onno
  Reply With Quote
Old 18th March 2009, 11:56 PM   #15
Javin5 is offline Javin5  Switzerland
diyAudio Member
 
Join Date: Mar 2006
Location: Switzerland
Hello -ecdesigns-, I was actually looking for something like you propose, but all I could find were dual players for mp3 aimed at the DJ-market. Your project makes a lot of sense, and I actually wonder why such a unit is not (yet) available on the market.

While music servers are one way to digitally store and play your music collection, they have several disadvantages: They are noisy and need to to be placed away in a room where the noise does'nt matter, they need a transmission to the stereo rig in the living room (cable or wireless), and if the worst happens, all your music is lost in a disc crash. If continuously run, such a server also consumes quite a bit of electricity over the year.

Your product would be able to store quite a bit of music on a single card. The cards are getting larger capacity and cheaper each year, which makes for a very attractive and future proof design. If a card is lost or damaged, only a fraction of your music is lost (and of course you could store backup cards to avoid this). No moving parts, no noise. Just a player that would replace your cd-player, but would be much more convenient. The clocking/jitter problem can be solved in a really elegant way. Couple this with an excellent ADC, and you have the potential to get really outstanding SQ. And imagine that you could store quite a number of chips in one CD sized box instead of having a whole bookshelf full of CD's. Since you probably would only occasionally change cards in the player, the player box could be in a cabinet, out of sight; most women would love this. Mavbe you could even allow for 4 card slots instead of one, which would allow for higher active storage capacity. I also could imagine that some audio companies would be quite interested to talk with you, once you have a working unit.

Just wanted to encourage you.
  Reply With Quote
Old 19th March 2009, 09:20 AM   #16
diyAudio Member
 
audio1st's Avatar
 
Join Date: May 2005
Location: Foxton, CAMBS..
Attached Images
File Type: jpg darksd.jpg (95.7 KB, 4767 views)
  Reply With Quote
Old 19th March 2009, 04:59 PM   #17
JC951t is offline JC951t  Taiwan
diyAudio Member
 
Join Date: Sep 2006
Hi Guys,
Putting aside the convenience. Would the play back
quality be as good as a good quality CDP ? The concept
by EC in itself is super but what about the corruption that
might be added during the transfer of data to the SD card ?
  Reply With Quote
Old 19th March 2009, 06:30 PM   #18
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
ecdesigns,

Very nice!. I know you have a commercial interest, but have you thought of building a basic arduino shield with an sdcard reader and a dspic chip and some basic library to select a file and get the DMA going?. There is currently an "arduino wave shield" but very limited since it is using PIO
  Reply With Quote
Old 19th March 2009, 07:27 PM   #19
diyAudio Member
 
Join Date: May 2006
Location: Holland
Hi JC951t / git,

Quote:
Would the play back quality be as good as a good quality CDP
The data from the SD-card player would be bit-perfect (file system data integrity), and the produced interference would be much lower compared to a CD servo system. The jitter should be way lower as it now only depends on master clock intrinsic jitter, and the distance from master clock to DAC chip. Finally, the SD-card player consumes far less power compared with a CD transport, so now it's much easier to keep the power supplies clean.

Unlike CD players, it's insensitive to shock / vibration, and jitter induced by the opto-mechanical servo system is also eliminated. Read errors don't occur, because the original CD can be ripped using programs like Exact Audio Copy.

This SD-card reader was basically the result of reaching a dead-end, using conventional digital audio sources (jitter, interface / interlink issues, and data integrity problems).


Quote:
Very nice!. I know you have a commercial interest, but have you thought of building a basic arduino shield with an sdcard reader and a dspic chip and some basic library to select a file and get the DMA going?. There is currently an "arduino wave shield" but very limited since it is using PIO
It's my intention to construct a basic low-cost player with fewest possible components.
  Reply With Quote
Old 20th March 2009, 08:04 AM   #20
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
Quote:
Originally posted by -ecdesigns-
Hi JC951t / git,

It's my intention to construct a basic low-cost player with fewest possible components.
It would be nice to have the option to take the output from the I2S line and feed different DACs
  Reply With Quote
Old 27th March 2009, 01:22 PM   #21
diyAudio Member
 
Join Date: May 2006
Location: Holland
SD-card player prototype is working, there are some minor problems with SD-card latency, this will be solved by doubling RAM buffer size.

SD-card access is software-driven, I2S signals are generated by the on-chip DCI module and through DMA.

The player already supports multiple directories (99) and multiple tracks within each directory (99 track / directory). Long file names can be used as well.

Shuffle play (CD / tracks) also works.

Bit clock jitter can be kept very low as expected. First impressions of sound quality are very good.

The SD-card latency limits max. sample rate and bit depth. The latency is basically caused by the on-card controller, and may vary with SD-card brand.
  Reply With Quote
Old 27th March 2009, 03:50 PM   #22
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
Very nice. Any photos?
  Reply With Quote
Old 27th March 2009, 04:15 PM   #23
Onnosr is offline Onnosr  Netherlands
diyAudio Member
 
Join Date: Aug 2006
Quote:
Originally posted by glt
Very nice. Any photos?

John

Congrats to you (and brothrer!)

Onno
  Reply With Quote
Old 27th March 2009, 07:46 PM   #24
EUVL is offline EUVL  Europe
diyAudio Member
 
Join Date: Oct 2003
How about user interface (display, remote, ....) ?
And when would you be offering to us ?

I have a serious interest in the frontend part, up to I2S output.
There are just too many limitations in the Koonlab version.

Pls keep us posted.


Patrick
  Reply With Quote
Old 28th March 2009, 12:33 AM   #25
diyAudio Member
 
spzzzzkt's Avatar
 
Join Date: May 2005
Location: Melbourne
Just came across this...

http://www.compactstick.com/

it seems the only stuff being released in this format at the moment is psychedelic trance, however it will be interesting to see if this becomes more widely adopted.

There is specification for the filesystem layout here:

http://www.compactstick.com/cs_contents_v10.pdf

  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



New To Site? Need Help?

All times are GMT. The time now is 07:54 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2