I2S to S/PDIF
I have a satellite radio that is uses a CS4349 to do volume control and digital to analog conversion. I'm trying to use a twisted pear audio WM8804 board add digital output by converting I2S to S/PDIF.
I believe I need to configure the WM8804 for slave mode (AIF/MS L) and the receive source to the audio interface (TXSRC H). Since the CS4349 is configured for I2S with up to 24 bit data (DIF0 H, DIF1 L and DIF2 L) I configured the WM8804 for 24 bit I2S (AIFCONF1 L, AIFCONF0 H). The dip switches are right, left, right
Convenient test points on the tuner give access to SCLK (2.3 MHz):
LRCLK (44.1 KHz):
I'm not having luck getting the WM8804 to sync up and haven't found any examples of folks using a W8804 to do I2S to S/PDIF conversion. What am I doing wrong? The CS3449 does not have a master clock input but do I need to supply this to the W8804? Is what I'm attempting even possible in hardware mode? Would I be better off using a CS8406 to do this?
All good questions, leres. I too have been attempting I2S>S/PDIF conversion using the TPA S/PDIF Transceiver module without success. And when you search on the net for info there is not much available that I can find. USB>I2S? Yep, lots on that. USB>S/PDIF? Yep, some on that too. But virtually nothing on what you and I are attempting. Odd. Some time ago I read the WM8804 manual over a few times and decided that what we want to accomplish is only do-able in software mode. But never got around to an implementation of same. In any event, leres, let's hope one or both of us will eventually succeed. -harry
What pins are you using for your I2S input?
I think that for the WM8804 to do what you want, you need to use
13, 14, 15 and 16 for your I2S input.
According to the Twisted Pear manual, configure as follows:
AIF/MS high (left)
TXSRC low (right)
AIFCONF1 high (left)
AIRCONF0 high (left)
DIN, BCLK, LRCLK and MCLK as inputs.
I did it for a bit different task, but i've confirmed this setup worked for transferring of I2S into SPDIF too:
SPDIF Back Sync
SDIN (3, HW/SW) = 0 (Hardware mode configuration)
SCLK (1, AIF_MS) = 0 (Slave mode, MCLK is INPUT)
CSB (5, TXSRC) = 1 (Transmit from Data_IN)
AIF_CONF[0..1] is up to you. I have used "00" mode for I2S@16BIT, but it ate the I2S@24BIT from DIR9001. I haven't noticed the DIR9001 output format, as everything worked flawlessly from the first touch.
Oh, i know what's the problem. Your SCLK (MCLK) is only 64Fs.
AFAIK Wolfson wants 128/256Fs.
You've gotta pump it up with some *2 frequency multiplier and then try again...
I realize that the original question is relatively old, but I have some suggestions on what to do.
I think that the WM8804 and the CS8406 both require a MCLK (called OMCK for the CS8406). I don't have experience with the WM8804, but I have worked with the CS8406. So I will take this as an example.
The OMCK can be either 128, 256 or 512 x the sample rate. These clocks can of course be generated from the SCLK by using a PLL with x2, x4 or x8 operation. A simpler design may also work OK. If 128x is chosen it can be generated from the SCLK by doubling the clock with an XOR gate plus an RC circuit with a suitable delay. If the duty cycle of the SCLK is 50% this will generate a nice x128 clock. Only one of the edges will be well defined though, since the one defined by the RC time constant may have more jitter.
Another potential issue is the serial format. The CS4349 can operate in different modes. If I2S is used the SPDIF transmitter should of course also be set up for I2S format. If it is a different format the SPDIF transmitter must of course also be set up for this other format, e.g. left justified. It is probably I2S though. If not, it will be very easy to hear once you get a signal through.:yuck:
I spent more time reading the WM8804 data sheet and can to the conclusion that you can't feed the WM8804 44.1 KHz in hardware mode. Maybe one day I'll try hooking a atmega328p up to it.
I was able to get a CS8406 working but I needed to find OMCK and feed that to the CS8406 in addition to SCLK, LRCLK and SDIN. I had a lot of dropouts but I think it was because I had wires everywhere and nothing was shielded. I'm going to wire up a permanent version this weekend and see if I can make it work better.
Good to hear you found a suitable clock for the OMCK and got it working.
It is important to wire it properly, since you can otherwise get a lot of ringing and noise on the clock and data signals. If you use a flat cable (IDC type) and use every 2nd wire as a ground wire, you should be able to get a stable operation. If you don't have this kind of cable, or don't want to use it, you can twist two wires for each signal and use one of the wires for ground, connected to ground at both ends.
I did WM8804 44.1 KHz in hardware mode, with 256Fs MCLK.
Where have you hooked-up the CS8406? If you use PC for SPDIF input then you have to configure your's soundard to sync to the SPDIF IN... Otherwise you'll get these dropouts.
the wm8804/5 DOES support 44.1. it would have to, right? ;) yes, in hw mode, not needing sw mode.
I use the usb audio widget to feed my wolfson i2s to spdif converter. has been working fine for months and months, now.
|All times are GMT. The time now is 02:43 PM.|
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio