Lossless SD-card player

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
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.
 
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 ??
 
Hi cbroegger,

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.
 
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.
 
JC951t said:
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
 
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
 
Hi gene klein,

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.
 
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
 
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.
 
:cool:
 

Attachments

  • darksd.jpg
    darksd.jpg
    95.7 KB · Views: 5,169
Hi JC951t / git,

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).


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.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.