• Home
  • Reviews
  • Articles
  • News
  • Tools
  • GamingHeaven
  • Forums
  • Network
 

Go Back   DriverHeaven.net > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > General Discussion

Notices

Reply
 
LinkBack Thread Tools
Old Aug 26, 2004, 01:21 AM   #1
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Cool! Adding ADAT support to Audigy2

Hi all!

I have looked at the AD_EXT connector on my Audigy2 board and come to the following conclusions:
  • there are four S/PDIF outputs
  • there are two S/PDIF inputs (one on the CD connector though)
  • there are two I2S inputs

In total, this makes eight digital channels in and eight digital channels out.

Furthemore, the S/PDIF outputs are probably clock-locked (I can't see a good reason to design it otherwise) so only one clock recovery device (like DIR1703) is needed and the rest can be slaved to this device (and use simple logic in a small FPGA for decoding Manchester and re-framing from S/PDIF to I2S). Connect a Wavefront (used to be Alesis Semiconductor) AL1401A to the four recovered streams, delayed (if required) to a common bit clock, a Toslink transmitter (TOTX173 I guess) and you're done. So ADAT output is simple and cheap.

I suppose the ADAT input would be trickier. First, you've got to receive the optical with a TORX173, then demux it by an AL1402. A conversion to S/PDIF for the first four channels is easy (even in general purpose logic). Now, the problem is that the I2S inputs require a slave at the other side. If the Emu10k2 can be slaved to the S/PDIF clock, it's no problem, since all ADAT channels have a common clock, and all that is needed is simple delaying of samples to achieve synchronisation with the I2S sample sync signal. However, if the Emu10k2 is persistent in keeping its own clock, it's very bad, because resampling will be needed and it's not like it's easy, because the two clocks will be very close and will probably float with temperature .

I've got all the chips lying around in here, so it's a matter of designing a PCB and the FPGA logic for standard conversion and retiming.

How do you think, does it make sense? I don't know a lot about Emu10k (although I do know a bit about ADAT - I have done some experiments with my SGI Octane which has ADAT built in and with the Alesis chips, too - I'm writing a reverse-engineered audio driver for it so I need some ADAT reference). BTW. This is a good audio implementation, you can slave any clock to any clock in it.
thesis is offline   Reply With Quote


Old Aug 26, 2004, 08:40 AM   #2
DriverHeaven Addict
 
Join Date: Jun 2003
Posts: 257
Rep Power: 0
Nappylady is on a distinguished road

Thumbs Up!

(Travelrec will know a *LOT* more than me on this topic, but here's a start...)

If you simply plug a SPDIF source into one of the SPDIF pins on AUD_EXT, the EMU10K2 will, by default, resample that SPDIF input to its own 48khz clock on-the-fly. So, there can be a small loss of quality. However, in recent kX driver revisions, something called "SPDIF Bypass" allows you to record one of the SPDIF inputs *without* resampling--but at the moment, it's limited to use with the WinMM recording, so only 2 channels can be recorded at a time.

If alll your sources were guaranteed to be the same clock rate, I can't think of a reason you couldn't SPDIF bypass four channels and I2S four channels (I could be wrong, but I don't think I2S resamples either) and then let Eugene modify the driver to allow bypassed channels to go to ASIO...

I think this is possible! Keep us posted on what happens with it!
Nappylady is offline   Reply With Quote
Old Aug 26, 2004, 09:33 AM   #3
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

??? I2S woes

S/PDIF would work, it's clear. Now, the I2S might be a problem.

Who is the master of I2S - in other words, who generates the Frame Sync and Bit Clock (especially the Bit Clock)? Because if it's not the add-on, there *will* be some serious problems with resampling. I looked around a bit and resampling frequencies that are close (47.9998 kHz -> 48.0012 kHz for instance) is pretty impossible.

Of course, the easiest way would be to repeat or drop samples when the clocks slip, but this would be so ugly I'm not having anything like that here...

It is a pity that the card clock can't be slaved to one of the S/PDIFs. I mean, it's not like it's hard, it's just a single PLL to up-convert the input clock to some convenient frequency and a clock multiplexer.
thesis is offline   Reply With Quote
Old Aug 26, 2004, 09:58 AM   #4
DriverHeaven Addict
 
Join Date: Jun 2003
Posts: 257
Rep Power: 0
Nappylady is on a distinguished road

well if you're ambitious enough to make your own PCBs, you probably have a soldering iron that's studly enough you could make your own clock circuits for your card... I think the pins on the 10K2 chip for clock sync and everything are known, and it sounds like you'd know enough to perform the modification...

http://www.electricstart.de/index.htm

Travelrec is, IMO, the most knowledgeable about these things--he's in Germany, so he'll maybe see this thread and reply while we're sleeping tonight.
Nappylady is offline   Reply With Quote
Old Aug 26, 2004, 10:39 AM   #5
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Unfortunately the I2S master is really the Emu10k2 chip.

I think there is one crystal on the Audigy2. So it's probably 24.576 MHz for the whole card. I would probably find out which pin is the input, which is the output and solder something to the input. This should allow me to clock the card at will. This is not the end of troubles, though.

The Alesis AL1402 receiver has only a 12.288 MHz output so I'd have to double the frequency.

There is also a question of switching from internal crystal to ADAT and back. After all, we don't want the card to work only if an ADAT input is connected to it, and hang the machine if it isn't. (Which would probably happen.)

This will be a real problem because exceedingly assymetrical clock cycles (which would appear during a switch) can upset digital logic badly, especially if it uses PLLs (which it surely does, to generate the 98.304 MHz core clock). More often than not, the aforementioned logic would have to be reset.

So it would be needed to make a phase-aligned switch (switch from one clock to another when the phase difference between them is small). This is no mean feat, especially if clocks are very close and the phase-alignment seldom happens (as it is the case here - it might never happen, too).

It is possible that a smooth transition between two clocks could be done using a PLL retimer with a long adaptation time. However, PLLs exhibit interesting non-linear properties, which essentially means that we don't know until we test it
thesis is offline   Reply With Quote
Old Aug 26, 2004, 02:24 PM   #6
DH's Latest Mac Convert
 
dj_stick's Avatar
 
Join Date: Jun 2003
Location: Basement of the first floor
Posts: 15,728
Rep Power: 71
dj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to all
System Specs

the audigy series cards can slave to an external clock
dj_stick is offline   Reply With Quote
Old Aug 26, 2004, 03:44 PM   #7
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Where should I apply this clock?
thesis is offline   Reply With Quote
Old Aug 26, 2004, 03:57 PM   #8
DH's Latest Mac Convert
 
dj_stick's Avatar
 
Join Date: Jun 2003
Location: Basement of the first floor
Posts: 15,728
Rep Power: 71
dj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to alldj_stick is a name known to all
System Specs

i'm not sure how… otherwise you could try to use the ac97 clock and halve it
dj_stick is offline   Reply With Quote
Old Aug 26, 2004, 04:04 PM   #9
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

No way I can use the AC97 clock. The AL1402 is the ADAT receiver and it's always synchronous to the incoming ADAT clock. It is "emu10k, use my clock or DIE!".
thesis is offline   Reply With Quote
Old Aug 27, 2004, 12:19 AM   #10
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,609
Rep Power: 0
TravelRec. is on a distinguished road

Hi thesis!

On Audigy 2 cards the I2S seems to be a master device. You´ll get the bitclock from the card. Ask user SAMIR for the complete layout of AD_EXT. He´s the one who figured out the pinout . But all these is not really tested yet. A possible way to do what you want, is to resample that signals before feeding in I2S (i´ve done this for my Audigy1 with a Sample Rate Converter from Crystal: CS8420, very cool S/N performance -112db), this helps to avoid clicking and desyncronizing, due to the locked DSP. BTW: I have 14 input channels with the Audigy 1 (with AC97), with Audigy 2 you can get 12 if you use Philips onboard 2nd A/D and AC97 too.

Greetings!

TravelRec.
TravelRec. is offline   Reply With Quote
Old Aug 27, 2004, 01:07 AM   #11
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Hi, and thanks for the authoritative reply!

I think that it would be better to slave the board clock to my clock. It would mean better quality, and I think it could be done. What would be needed is to add a retimer after the ADAT clock. This will be a PLL to lock on the input signal. There are two possible realizations:

* a typical VCO-based PLL that would be switched from ADAT clock to internal clock
* a VCXO-based PLL that would be synchronized to ADAT clock or free-running

The first approach is easier, but the second one provides better jitter and other timing properties, too - the ADAT clock is "cleaned" from jitter by the inherently low-jitter VCXO (telecommunications systems tend to use VCXO here-and-there for this very purpose). However, the question of VCXO pullability (they are crystal-based so they don't change a lot even if you want them to) requires some experiments.
thesis is offline   Reply With Quote
Old Sep 1, 2004, 12:45 AM   #12
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,609
Rep Power: 0
TravelRec. is on a distinguished road

Hi again!

You are on the right way. One reason why I suggested the CS8420 is, that it has 2 different stages: one PLL input stage that has high jitter rejection, and the output stage that can easily read out with soundcard´s clock. Samplerate ratio can vary between 1:3 and 3:1. Chip´s performance is also cool (like I said) and it runs in hardware-mode (without the need of any processor). I think, it´s possible to add two of such devices (one Master, one Slave) on I2S port. Slaving the I2S is not possible - and if you use SRCs there is no need of it.

Greetings!

TravelRec.
TravelRec. is offline   Reply With Quote
Old Sep 6, 2004, 03:46 PM   #13
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

OK, so I'm reclocking the whole card. AFAIR there is one 24.576MHz crystal. If I dike it out and feed the card with my own 24.576MHz (plus or minus a few ppm), I'll have my way without resampling (it wouldn't be bit-accurate; why use ADAT if you are not bit-accurate anyway?).

I think I will use a high-stability TCXO at 100 MHz and clock a AD9850 digital clock synthesizer from it. The clock synth is nice because I can give it a 32-bit word and it gives me the *exact* frequency I wanted. This clock will be lowpass-filtered so no harmonics will come and jitter it around. The output will be fed into the card.

The tuning of the AD9850 will be done using a phase-frequency detector and a small microcontroller (ADuC814 for instance). This should solve the problem of wander. If there is an ADAT input clock, the card will be slowly (at least a few seconds) drift to the ADAT clock, and then phase-lock with it. If there is no ADAT clock, the microcontroller will keep the last used frequency.
thesis is offline   Reply With Quote
Old Sep 7, 2004, 12:31 AM   #14
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,609
Rep Power: 0
TravelRec. is on a distinguished road

Hi!

Sounds cool, if it is working, please let us know . But don´t burn your card - I don´t know, how the 10k2 will react on false main frequency input (if an error creates higher clocks than specified...). It´s nice to see what people do to get maximum power from their "consumer" sound-cards .

Good luck!

TravelRec.
TravelRec. is offline   Reply With Quote
Old Sep 9, 2004, 07:18 AM   #15
kX Lover
 
Samir's Avatar
 
Join Date: Jan 2003
Posts: 520
Rep Power: 0
Samir is on a distinguished road

thesis:

Maybe this info might help you.... It shows how clock crystal is connected to the rest of the card trought p16v chip which seems to control other chip's clocks...

http://www.bih.net.ba/~info.com/Audi...ngineering.gif

Keep up the good work & keep us posted about your progres...

Last edited by Samir; Sep 9, 2004 at 03:12 PM.
Samir is offline   Reply With Quote
Old Sep 11, 2004, 02:00 AM   #16
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Thanks, it was very useful.

BTW. I am in the power to start a small-scale production of something like this. I estimate the price to be about $150 for the end-user. Of course, the schematics and code will be still available on the net, but the difficulty in gathering all the parts and soldering the 0.5mm raster chips is considerable (and the cost of setting up a PCB fabrication at this quality level is high, too).

The question is, would anybody be interested in it?
thesis is offline   Reply With Quote
Old Sep 11, 2004, 11:03 AM   #17
DriverHeaven Addict
 
Join Date: Jun 2003
Posts: 257
Rep Power: 0
Nappylady is on a distinguished road

If all it does is ADAT, I would not be interested. I am thinking about a breakout box for my card though.

I need a box that will give me every possible analog input and output for my card with a reasonably good SNR--though if you can beat 96dB, that's a good thing. :-) For my needs, I'd also need at least two pairs of analog inputs to be able to switch to SPDIF so I can record things from my SPDIF-enabled CD players. If this box had ADAT i/o support on top of that, I'd be happy to pay extra for that--after all, maybe someday I'll have to transcribe things from ADAT or something...
Nappylady is offline   Reply With Quote
Old Sep 11, 2004, 12:23 PM   #18
DriverHeaven Newbie
 
Join Date: Aug 2004
Posts: 9
Rep Power: 0
thesis is on a distinguished road

Sad

Most of the difficulty lies in making bit-accurate digital inputs. So if you want just another analog input, I think you can do it much easier with a PCM1804 from Burr-Brown (now TI), which has really good performance (111 dB SNR, -102 dB THD+N - it is almost unbelievable). In this case the card can clock the chip, so there is no question of reclocking the card and stream synchronization.

And the PCM1804 chip itself costs about $5 in large quantites. So expect no more than $10 in small quantities . No point in making a very expensive reclocking breakout box for $10.

What we could do, is a digital breakout box (an 8-channel synchronized ADAT output plus four S/P-DIF outputs straight from the card) - this part is easy - and an 8-channel synchronized clock-locking ADAT input or four S/P-DIF inputs (one with a resampler), clock-locking. Note that all S/P-DIF inputs but one could be bit-accurate (two physical S/P-DIF inputs - S/P-DIF-0-in on AD-EXT and S/P-DIF-CD-in and one I2S clock-locking so inherently bit accurate, too). Adding an analog board to this can be done, too, but if the whole point is using analog then there is no gain in doing something like this.

Yours,

Stanislaw Skowronek
thesis is offline   Reply With Quote
Old Sep 11, 2004, 02:35 PM   #19
DriverHeaven Addict
 
Join Date: Jun 2003
Posts: 257
Rep Power: 0
Nappylady is on a distinguished road

Quote:
What we could do, is a digital breakout box (an 8-channel synchronized ADAT output plus four S/P-DIF outputs straight from the card) - this part is easy - and an 8-channel synchronized clock-locking ADAT input or four S/P-DIF inputs (one with a resampler), clock-locking. Note that all S/P-DIF inputs but one could be bit-accurate (two physical S/P-DIF inputs - S/P-DIF-0-in on AD-EXT and S/P-DIF-CD-in and one I2S clock-locking so inherently bit accurate, too).
Exactly what I was thinking.

Quote:
Adding an analog board to this can be done, too, but if the whole point is using analog then there is no gain in doing something like this.
No gain? I disagree! -Right now-, I need more analog ins and outs; but I also need more than 1 SPDIF input that takes external-level signals, and someday I might need ADAT support--it's worth the extra cost and complexity to me, to have that option down the road.

The other complicating factor is that I am not an electronics guru, but you are. (Also Travelrec.) I don't think I made this clear earlier, but I'd much rather pay someone else to build this box for me, than to try to build it myself. (Unless it'd be less expensive to just buy a Dakota and name-brand outboard AD/DA box... I find that scenario unlikely.)
Nappylady is offline   Reply With Quote
 

 
Powered by: vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Design by Craig Humphreys on behalf of EA Store.

All times are GMT -5. The time now is 02:44 PM. Copyright ©2008 HeavenMedia.net