Digital audio from IDE

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I can't see that it is worth the effort to build dedicated hardware to extract CD audio over IDE.

Get a PC with a CD drive and install linux. Install the CD ripper program called cdparanoia. Use that to rip tracks to hard drive. Now blow it out of your sound cards digital port. Total cost, free to not much if you have to get an old PC to do this.

cdparanoia does not rip in real time. I'm not sure that's even possible. Rather it goes to exteam lengths to ensure a bit perfect copy.

If you need all this to be small and portable use a PC104 form factor unit as used in embedded systems or an ITX unit. Cost goes up dramatically here.
 
gmarsh said:

they're ISO (optionally with joliet) or sometimes UDF for DVDs. Either way it involves parsing FATs, which personally I don't find all that fun.

The goal here is to build a better, "zero-introduced-jitter" CD player. If there's a set of ATAPI commands for reading DVD-Audio from a DVDA disc in a DVD drive, then maybe I'll work on that eventually. But for the first software revision, CDs only..


Well,there are various MMC READ commands that are used in conjuntion with the ATAPI commands. Via these commands you can specify the type of sector you want to read be it CD-DA, CDROM mode 1 or 2 all the way up to Blu-ray discs. If you want to read ANYTHING of a CD/DVD/BD disc then the ATAPI and MMC commands are the only way. Even with HD's you have to tackle the ATAPI commands before you can get to grips with FAT.
BTW how do you plan to deal with errors?
 
CD Paranoia Plug in

There is a cdparanoia plugin for XMMS (basically winamp for Linux) which shows that the error correction/multiple read functionality can be done in real time. Theres no documentation for it yet, and i havnt tried it, but it may be of use.

http://www.usinglinux.org/audio/xmms-cdparanoia.html

for WINAMP/sonique/apollo there is a similar plugin, but doubt theres any chance of obtaining code for it

http://www.url.ru/~copah/CDReader.htm

Foobar2000 has similar functioanlity built in, where the spin speed of the drive used can be altered to suit (may be of use to find a compromise between drive speed and performance without building).

The use of a CDparanoia type extraction was suggested early on in the cd-rom thread, which appeared to evolve into the PC music players thread. If gmarsh can get this going, this project will, to me, be many times more interesting and potentially better than any pc music system, which would be dependent on the purchase of a high spec soundcard.
 
I ran cdparanoia on my linux system, and successfully ripped a track from the start of a CD at 5X using full paranoia. Only problem is, the CD drive i'm using is *loud*!

I haven't tried slowing down the CDROM yet.

I could avoid using paranoia mode and just use overlapped reads. This way any sort of read jitter is eliminated and the drive runs a lot slower, but it means you have to keep your CD collection in good shape.
 
Gmarsh,

I reckon full paranoia at 5X is a good result - I use full mode on EAC with my cheap lite-on burner and it is noisey in starting up, but once going is pretty much silent (although this is in relation to my howling gale of a pc!).

I picked up a kenwood drive which has "multibeam" technology i.e. it has 7 read heads (actually one split into 7) so the drive can perform equivalently to high spin speeds at much lower speeds. I have read that their TrueX x72 model, using this technology, is not only one of the fastest drives, but one of the quietest. Unfortunately it appears that the company which licensed this technology to kenwood (zen technology) has gone under and the drive is no longer in production. They are however fairly cheap to pick up on ebay. I havnt got linux installed at the moment, but will shortly, and will try it out with paranoia then.

Asus also have "quietrack" drives which are suppose to be extremely quiet as well - some guy on the cd-rom controller thread raved about them. They are also not too expensive.

I also noticed on the meridian site they state that they use 3 buffers in their system to improve the data flow out of the player, which may indicate there will be many more issues once the read functioanlity is sorted out.

Unfortuantely I have no programming skills to speak of so my contribution to this project is very limited, but I do think it is worth persuing.

Cheers,

Ross
 
I'm desigining an ATA/I2S adapter board for my ADSP-BF535 evaluation board now. Once that's done, I can begin some basic software development and verification.

In case it's not obvious, this project won't be developed and finished in a week. I'll bump this thread in a month or so. :D
 
I mentioned this project to one of my co-workers, who said exactly the same thing. "Why don't you just use an embedded PC?" - I managed to convince him, so I'll try again here :D

(1) size... This board, when it's done, will be tiny - 3" by 3" is my goal. That's smaller than any PC/104 or ITX sized piece of equipment.

(2) This board will produce an I2S, slave mode, LVDS interface - ready to attach to a mating DAC board, digital output board, or whatever. You'll have to use a custom PCI or PC104 card to do this, which will cost just as much as my board. It'll also take up more room, and you'll have to buy the host PC too.

(3) I'm hoping that this project will promote the DIY community:

I'm envisioning that people can make a CD player "the way they want" - DIYers can take my board, add either a big or compact CDROM drive (their choice of drive), add an output board (their choice of DAC, clock, digital interface, etc), add a human interface board (their choice), and put it in a case (their choice or design) with a power supply (their choice) and they've got a full fledged CD player that they've built entirely to *THEIR* standards for a reasonable cost!

And output boards can be designed hundreds of different ways. For D/A output boards... Oversampling or non-oversampling or sigma delta? Tent, Kwak or $0.25 oscillator for a clock? Passive or active I/V? if active, what op-amps?

You can roll your own board that does what you want it to do, and it's easy - your own isolated power supply, DAC+related analog hardware, clock source, LVDS transcievers to exchange I2S with my board, and that's it. No SPDIF clock recovery circuits and resulting jitter. And hey, if you like the results of your DAC board, start building more and selling them to CD player DIYers!

I think that's enough for now :)

heater said:
I can't see that it is worth the effort to build dedicated hardware to extract CD audio over IDE.

Get a PC with a CD drive and install linux. Install the CD ripper program called cdparanoia. Use that to rip tracks to hard drive. Now blow it out of your sound cards digital port. Total cost, free to not much if you have to get an old PC to do this.

cdparanoia does not rip in real time. I'm not sure that's even possible. Rather it goes to exteam lengths to ensure a bit perfect copy.

If you need all this to be small and portable use a PC104 form factor unit as used in embedded systems or an ITX unit. Cost goes up dramatically here.
 
gmarsh

I think the point about pc players is their upgradability, flexibility wrt. storage media and "future-proofness" (to a degree). Hence why some people are so keen on them.

I think this project is more economical (if you don't have a spare pc) but more importantly makes more audio sense than a PC player for the reasons you've just stated.
The main benefit is providing a flexible CD-taylored device which gives the diyer the freedom to realise a high performance cd-player of their own design without resorting to expensive or obsolete, hard to find audio drives .

Ideally, in order to achieve the best of both worlds, leaving room for further future improvements/changes should be a part of the desing process. Eg. the ability to use dvd-roms (as CD players) later on, or perhaps SCSI or SATA cd-roms/HDs. Or the ability to decode WAV, mpeg files etc.

However SCSI or SATA devices might require a completely different design so it would be hard to start a project with a scope as wide as that. IDE dvd-roms, though, are perhaps not that far from CDs wrt implementation here and could offer more storage plus potentially better performance and life-span. In any case I think it would be nice to be able to re-use the knowledge/code generated in this project, at least partly, in potential future editions incorporating the devices mentioned. Then again things are not always this way in the real world.

I'll be following the progress closely in any case as it's a very interesting attempt.

stelios
 
No matter how I design this thing, it will go obsolete eventually.

But the software won't go obsolete; I can keep updating that, to support WAV/FLAC/DVD Audio/hard drives/etc as the need arises - the Blackfin DSP chip I'm looking at (ADSP-BF531) has more than enough horsepower to handle almost any format you throw at it. It's just a matter of finding the time. :D

The I2S interface can go well beyond 192KHz/24bit, and I don't expect I2S to go obsolete. RS232 is disappearing from desktop PC's, but it's still common everywhere else. Only the IDE interface on the board faces obsolescence...

When PATA CDROMs/DVD-ROMs/etc start disappearing off the market (which I don't think will happen anytime soon!), I could pull the 40-pin connector and put in a Marvell PATA<->SATA chip to make the thing SATA ready. Or you could buy one of these things:

http://fwdepot.com/thestore/product_info.php/products_id/666

...which will likely become much more common and cheaper as PATA CDROMs become rare, and computers need to be kept running.

Bottom line is, I wouldn't worry too much.

stelios said:
gmarsh

I think the point about pc players is their upgradability, flexibility wrt. storage media and "future-proofness" (to a degree). Hence why some people are so keen on them.

I think this project is more economical (if you don't have a spare pc) but more importantly makes more audio sense than a PC player for the reasons you've just stated.
The main benefit is providing a flexible CD-taylored device which gives the diyer the freedom to realise a high performance cd-player of their own design without resorting to expensive or obsolete, hard to find audio drives .

Ideally, in order to achieve the best of both worlds, leaving room for further future improvements/changes should be a part of the desing process. Eg. the ability to use dvd-roms (as CD players) later on, or perhaps SCSI or SATA cd-roms/HDs. Or the ability to decode WAV, mpeg files etc.

However SCSI or SATA devices might require a completely different design so it would be hard to start a project with a scope as wide as that. IDE dvd-roms, though, are perhaps not that far from CDs wrt implementation here and could offer more storage plus potentially better performance and life-span. In any case I think it would be nice to be able to re-use the knowledge/code generated in this project, at least partly, in potential future editions incorporating the devices mentioned. Then again things are not always this way in the real world.

I'll be following the progress closely in any case as it's a very interesting attempt.

stelios
 
gmarsh said:
It's incomprehensible rant time again! :)

I'm not sure if anyone is serious about going ahead with this project, but I've been anxious to get a new side project on the go and this one should be fun to do. I spent last night putting together a basic design for this system, and came up with the following "core"...

- Analog Devices ADSP-BF531 DSP, the LQFP176 version. It runs at 400MHz, has onboard I2S, a SDRAM controller, and it's $17 from Digikey in a single quantity. It even runs Linux!
- 16/32/64 meg PC133 SDRAM chip, probably from Micron. It will be soldered onto the board - sorry, no DIMM socket.
- SPI flash from ST or Atmel holding the DSP code. It will be an 8 pin DIP, easy to remove and reprogram if needed.
- 74xx logic acting as a 3.3V/5V IDE bridge. The CDROM will sit in the DSP's memory mapped space. It will operate in PIO mode, but the DSP will still read from it using DMA.
- ADM3202 or similar providing a RS232 interface.
- Powered off 5 volts; 3.3V from a LDO, 1.2 volts from a LM3671, TPS54310 or similar integrated switcher. The power connector will likely be a 4-pin floppy power connector, since presumably this thing will be mounted next to a CDROM.
- likely a 4 layer PCB. It will be small.

I've designed a similar board using a 535 Blackfin. But since I probably won't be designing this board for myself, this means I have to bring other people's opinions into this. Soo... I'll need a few questions answered:


Gmarsh, I am pleased having the same idea some weeks ago. If You are going ahead with this project, I'll participate in doing both hard- and software.
What do You think about using a Linux kernel on it? I know, it's big, but possibilities doing some cool things like pitch, external sync, reading audio from DVD may be easier using existing GPL code. Porting should be easy to do.

Doing IDE->DSP->SPI is a great idea.

Daniel
 
I've purchased a BF-533 EZ-KIT to work on the project, and I'm finishing up the Verilog for an IDE interface for it. While I haven't had much time to put into this project, I'm committed to getting it done. And if you can help out on this project (primarily software help) then that would be excellent.

I originally planned on writing the entire thing in C. I've never used embedded linux - writing kernel drivers and other things for setting up SPORTs and other things is a scary thought to me, and I'm not sure what's involved in porting the '533 ucLinux port to the '531 or '532 processor. But if you've got experience in doing this type of work, then by all means, we'll put linux on the thing.

It's a good idea anyway - gcc is free, which means anyone can work on it. And it's not all that big; SDRAM and flash are cheap, and the blackfin has more then enough balls for this application.

Gary

selftones said:


Gmarsh, I am pleased having the same idea some weeks ago. If You are going ahead with this project, I'll participate in doing both hard- and software.
What do You think about using a Linux kernel on it? I know, it's big, but possibilities doing some cool things like pitch, external sync, reading audio from DVD may be easier using existing GPL code. Porting should be easy to do.

Doing IDE->DSP->SPI is a great idea.

Daniel
 
http://users.pandora.be/jon/mp3/zplayer.html

The guy on this site made an MP3 player based on a CDROM player with a Z80. By changing the MP3 decoder to something else and changing the software, it might work!(His design also seem pretty simple).

Note:
-There are other IDE2??? than IDE2MSX that can be DIY.
-Speeds higher than 1x should be used(Better error correction).
My Asus QuieTrack 52x burner starts making a bit noise @ 32x, 24x is SILENT.
-There are useful links on the page(Like ATA protocol things)
 
I've thought about such a project for a long time. I am very glad that I found this one!

About running ucLinux on 531/532, please see this thread:
http://blackfin.uclinux.org/forum/forum.php?thread_id=336&forum_id=7

There're some folks requesting IDE support for BF533 stamp, but unfortunately no one responses. otherwise, BF533 stamp will be a perfect platform to do this project because it also support 10/100Mbps ethernet.

My initial ambitious plan is to support both a CD-Rom drive and a hard drive. It can play audio CD(via EAC), and mp3, wave, FLAC or APE. Of course, it can rip CD with one touch. other features include an ethernet port (FTP to update the hard drive), and an optional USB2.0 port to support external hard drive or cdrom. The plan is so ambitious that it seems the only feasible way to do it is an embedded computer.
 
Yes, this is getting a bit "out there"...

My plan to create a very small board that turns a computer CDROM into an I2S slave. No ethernet or USB - just a RS232 control interface, a single IDE channel, and a LVDS connector that delivers I2S audio. Adding FLAC/ape/mp3/DVD-A or master/slave hard drive support requires no extra hardware, and would be done later.

I'm waiting on a PCB to come in the mail, with my IDE-to-blackfin-EBIU interface. It's based on a Xilinx XC9572 and nothing else. It will operate the IDE device in PIO mode, but the Blackfin will be able to MemDMA data to/from the hard drive. Once I test and verify it works, I'll post the design so others can turn it into a STAMP interface.

crtubes said:
I've thought about such a project for a long time. I am very glad that I found this one!

About running ucLinux on 531/532, please see this thread:
http://blackfin.uclinux.org/forum/forum.php?thread_id=336&forum_id=7

There're some folks requesting IDE support for BF533 stamp, but unfortunately no one responses. otherwise, BF533 stamp will be a perfect platform to do this project because it also support 10/100Mbps ethernet.

My initial ambitious plan is to support both a CD-Rom drive and a hard drive. It can play audio CD(via EAC), and mp3, wave, FLAC or APE. Of course, it can rip CD with one touch. other features include an ethernet port (FTP to update the hard drive), and an optional USB2.0 port to support external hard drive or cdrom. The plan is so ambitious that it seems the only feasible way to do it is an embedded computer.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.