I recently purchased a Popcorn Hour network media player (nifty device, I must say), and unfortunately it doesn't decode DTS due to licensing issues. I'm sure the hardware can do it, which is unfortunate. As a result, I'm unable to play about half my media library, and really object to transcoding DTS to AC3 for this purpose. Unfortunately I don't have a AV receiver to decode it for me, and would rather avoid one if possible.
As everyone knows, finding standalone DTS/AC3 decoder ICs is nearly impossible these days; lots of DSPs can do it an the vendors have code for it, but they won't release it to you unless you have a valid license. Lame.
My proposal is to use a grunty embedded computer running Linux and some glue to take S/PDIF in and provide two channel (or six, if I can find a good way of doing it) I2S out for AC3 and DTS inputs. I don't think the software should be difficult, it would just be a matter of wiring libdca to ALSA (or JACK). As far as hardware goes, the best candidate I've found is AT91RM9200; it should definitely be powerful enough, and has an onboard serial peripheral that supports I2S. It might be flexible enough to multiplex 3 I2S streams somehow, I'm not sure... I'm speculating that GPIO is probably going to be too slow to bit-bang the data.
Does anyone see any glaring problems, or have any suggestions (like a more appropriate IC or an easy way to interface more than 1 DAC?)? I know a DSP is really the tool of choice here, but I have no hope of writing working code for one.
Comments? I'm looking at buying a KB9202 eval board to play around with.
As everyone knows, finding standalone DTS/AC3 decoder ICs is nearly impossible these days; lots of DSPs can do it an the vendors have code for it, but they won't release it to you unless you have a valid license. Lame.
My proposal is to use a grunty embedded computer running Linux and some glue to take S/PDIF in and provide two channel (or six, if I can find a good way of doing it) I2S out for AC3 and DTS inputs. I don't think the software should be difficult, it would just be a matter of wiring libdca to ALSA (or JACK). As far as hardware goes, the best candidate I've found is AT91RM9200; it should definitely be powerful enough, and has an onboard serial peripheral that supports I2S. It might be flexible enough to multiplex 3 I2S streams somehow, I'm not sure... I'm speculating that GPIO is probably going to be too slow to bit-bang the data.
Does anyone see any glaring problems, or have any suggestions (like a more appropriate IC or an easy way to interface more than 1 DAC?)? I know a DSP is really the tool of choice here, but I have no hope of writing working code for one.
Comments? I'm looking at buying a KB9202 eval board to play around with.
It's time to pull the trigger on some parts for this. I settled on the ATNGW100 evaluation board with a 130MHz AVR32 processor, 32MB SDRAM, 2xEthernet, USB2, SD and a bunch of other peripherals relatively cheap ($100). It also has 2 available interrupt or DMA I2S interfaces and comes pre-installed with Linux. I will need to write an ALSA driver for the I2S interface, but I don't believe this will be prohibitively difficult. JACK should run fine and I don't think it will be difficult to write a JACK client to decode S/PDIF packed DTS/AC3. I think the processor should be powerful enough by default, but it can be easily overclocked to ~200MHz if necessary.
I have designed and will be prototyping a receiver & DAC board that will fit neatly below the ATNGW100. S/PDIF receiver is WM8805, DAC is CS4351. WM8805 will be the clock master for the AVR32 and DAC. AVR32 will receive the compressed data and provide uncompressed and stereo downmixed PCM data to WM8805 for S/PDIF transmission and to the DAC for playback. Both external chips are set up so either I2C or SPI can easily be used to communicate with the AVR32 (more drivers to write!).
The AVR32 chip used actually has 3 I2S-capable serial controllers, which would theoretically allow 6-channel output. Unfortunately, one is used for the onboard serial flash which contains the root filesystem that the board boots from. If I get this working in 2-channel mode, I might investigate using the on-chip (ie. low-quality) DAC for LFE and using the two available I2S controllers for front and rear. This should be a decent compromise, and any small phase error due to imperfect synchronization is probably tolerable in the LFE channel.
If the project fails, the ATNGW100 still looks like a fun toy, and the board should be usable as a pretty nice DAC.
In total this experiment will cost me about $200.
I have designed and will be prototyping a receiver & DAC board that will fit neatly below the ATNGW100. S/PDIF receiver is WM8805, DAC is CS4351. WM8805 will be the clock master for the AVR32 and DAC. AVR32 will receive the compressed data and provide uncompressed and stereo downmixed PCM data to WM8805 for S/PDIF transmission and to the DAC for playback. Both external chips are set up so either I2C or SPI can easily be used to communicate with the AVR32 (more drivers to write!).
The AVR32 chip used actually has 3 I2S-capable serial controllers, which would theoretically allow 6-channel output. Unfortunately, one is used for the onboard serial flash which contains the root filesystem that the board boots from. If I get this working in 2-channel mode, I might investigate using the on-chip (ie. low-quality) DAC for LFE and using the two available I2S controllers for front and rear. This should be a decent compromise, and any small phase error due to imperfect synchronization is probably tolerable in the LFE channel.
If the project fails, the ATNGW100 still looks like a fun toy, and the board should be usable as a pretty nice DAC.
In total this experiment will cost me about $200.
Interesting project. I own a NGW100 and I'll be following this thread.
If you can do everything with ALSA and libdca, you probably don't need much for a Linux root filesystem image and should be able to fit everything in the NOR flash on the board. In this case, you can repurpose the SD card serial interface for 6ch out.
If you can do everything with ALSA and libdca, you probably don't need much for a Linux root filesystem image and should be able to fit everything in the NOR flash on the board. In this case, you can repurpose the SD card serial interface for 6ch out.
I did some playing around with my NGW100 today, and unfortunately it seems to perform worse than I though it would (and the numbers Atmel provides indicate)! Decoding MP3 with mpg123 runs at about 50% realtime. libdca is even slower. It looks like this'll be more work than I thought since I will need to actually optimize the decoder for the architecture. The instruction set has some SIMD and DSP operations, but I'd have to get into assembly to use them - and actually know something about the encoding algorithm...ugh.
It might take a while for me to get anywhere with this...
It might take a while for me to get anywhere with this...
It seems just a tiny bit silly to me. What with the lossless audio on Blu-ray/HD DVD media, basic Dolby Digital and DTS are starting to smell a lot like parrots that have been nailed to a perch. If you're going to build a retro surround decoder, do something that sounds better, like Dolby Surround using vacuum tubes and a tape loop delay.
But, for less than $200 you should be able to pick up a Technics SH-AC500D, which is a standalone decoder for Dolby Digital and DTS. It was intended to be sold along with a "digital ready" AV receiver, but is completely usable by itself. It has several RCA and optical inputs, and remote control for volume and input selection. I have one... it served me well, until one hot summer the DTS portion stopped working. So, if you buy used, make sure the DTS decoder still works. One thing: the DTS decoder lacks "bass management" and phantom center, since it seems like Technics just piggy-backed a DTS module onto the SH-AC300 to create the 500D. I got around this by using a separate crossover, to which I added summing inputs for the Subwoofer and Center channels from the SH-AC500D.
There's also a handful of car audio digital surround decoders. New list prices were or are surreal (around $600), but I recently picked one up new in box on the clearance table at a small town car audio dealer for $25. Also some decoders that were intended for use with powered computer speakers; those tend to fetch far too much money on eBay, but you could trip over one at a local computer swap meet or store.
Now, some computer sound cards are capable of capturing unmolested digital surround streams. Perhaps you can configure a decoder in software and use the 5 or 6 or 7.1 analog outputs from the sound card. Some cards have several channels of S/PDIF or I2S available on headers, if you want to use external DACs. It would probably be best to just run this on an HTPC. And, for that matter, you could also play your DVD and CD media on that box, which would avoid the potential hassle of trying to configure S/PDIF capture.
But, for less than $200 you should be able to pick up a Technics SH-AC500D, which is a standalone decoder for Dolby Digital and DTS. It was intended to be sold along with a "digital ready" AV receiver, but is completely usable by itself. It has several RCA and optical inputs, and remote control for volume and input selection. I have one... it served me well, until one hot summer the DTS portion stopped working. So, if you buy used, make sure the DTS decoder still works. One thing: the DTS decoder lacks "bass management" and phantom center, since it seems like Technics just piggy-backed a DTS module onto the SH-AC300 to create the 500D. I got around this by using a separate crossover, to which I added summing inputs for the Subwoofer and Center channels from the SH-AC500D.
There's also a handful of car audio digital surround decoders. New list prices were or are surreal (around $600), but I recently picked one up new in box on the clearance table at a small town car audio dealer for $25. Also some decoders that were intended for use with powered computer speakers; those tend to fetch far too much money on eBay, but you could trip over one at a local computer swap meet or store.
Now, some computer sound cards are capable of capturing unmolested digital surround streams. Perhaps you can configure a decoder in software and use the 5 or 6 or 7.1 analog outputs from the sound card. Some cards have several channels of S/PDIF or I2S available on headers, if you want to use external DACs. It would probably be best to just run this on an HTPC. And, for that matter, you could also play your DVD and CD media on that box, which would avoid the potential hassle of trying to configure S/PDIF capture.
hello fellow PCH (popcorn hour) user 😉
here's my DTS solution. I am planning on doing a full (sort of) review of this puppy:
inside views:
what it came with, in the box:
this does DTS, DD5.1, mapping from 5.1 down to 2.1 (which I need) and all the other regular spdif formats (even HDCD which I never hear of anymore).
cost was $160 shipped from china.
right now, its my only source - and the popcorn hour is feeding this DAC. then from the DAC to my home amp (behringer a500) or pimeta phones amp. I'm finding this chinese DTS dac to be pretty decent, actually. its lacking in the user interface area but the sound is pretty good, I think.
.bl
here's my DTS solution. I am planning on doing a full (sort of) review of this puppy:

inside views:



what it came with, in the box:

this does DTS, DD5.1, mapping from 5.1 down to 2.1 (which I need) and all the other regular spdif formats (even HDCD which I never hear of anymore).
cost was $160 shipped from china.
right now, its my only source - and the popcorn hour is feeding this DAC. then from the DAC to my home amp (behringer a500) or pimeta phones amp. I'm finding this chinese DTS dac to be pretty decent, actually. its lacking in the user interface area but the sound is pretty good, I think.
.bl
- Status
- Not open for further replies.
- Home
- Source & Line
- Digital Line Level
- Standalone DTS decoder idea