Tips, Tricks und Bauanleitungen fuer SPDIF


Nachtrag: In der Zwischenzeit ist meine Steckkarte leider einfach so verstorben. Keine Ahnung wieso, macht aber nichts da ich inzwischen sowieso eine CMI8336 habe.

Es geht hier im folgenden um die beruehmte $21 Karte mit digitalen Ein und Ausgaengen mit CMI8330 Chipsatz.


Hersteller dieser Karte ist Cmedia Dort sollte man auch immer die neuesten Treiber bekommen.
Im folgenden ein paar News/Mails die ich zum Thema in der datheads Mailinglist geschrieben habe.

I would share my experience with a $21 soundcard with SPDIF-I/O. My card is called HT-1869V+. (prosound)
At first, there was no need for me to file the card smaller. It fits in one of my ISA slots like every other card.
You have to build levelconverter for SPDIF to TTL. I build them for coppercable. The TTL->SPDIF (card output) was very easy. Perhaps you need only two resistors and a transformer. This works from the first minute, but I use now a buffer, because I don't know if the CMI8330 will do the load all the time.


A1,A2,A3
Three HC-TLL Inverter. I used an 74HC00 with wired inputs. Because this was the only HC-TTL in my box. Perhaps a 04 is a better choice.

390R, 100R
Two Resistor for the correct cable impedance (75R) and DC-pegel. They should be a little bit smaller. But this works. Can't tell you the right ones now, because I lost the slip with the mathematics. Oh, and I am using old RG-62 cables. :-)

T
A selfmade transformer. I use a small ferritring with two windings of thirty. Can't say anything about the ferritring, because it was a used one from some stuff.

This works really from the first minute with win95 and linux. You can send every kind of wavefile to the card (even 8khz Mono, 8bit) They send all at 44.1k to his port! For this you need no special driver. You can play games and the sound comes out of your DAT.

The input is not so easy. I build the circuit for this, I found in my DTC57 servicemanual. I am not safe if a can post this, so I will not do it. Perhaps you can use optical converters. They are a little bit expensive, but you should connect them direct to the ports. (I don't tested it)

To aktivate the soundcard SPDIF input you have to press the [digit] button in the mixer program. But this is not enough! You also have to press the [play] button in the soundcard cd-player program. You really have to use the soundcard cd-play, no other cd-player works!

After this you can read something, but it is possible that it sounds really, and I mean _REALLY_ horrible. I am not safe about the reasons, but it looks like that the card will read correct SPDIF-input only from a CD-Player for the first time. Have a look at my devices:


I have to switch the DTC57 to DA-Mode (optic). The DAT works know as a optic to copper converter and sends the CD-Player signal to the computer. Only this are read without an error by my HT1869. If I send something from the Aiwa or the DTC57, it sounds horrible!

But if it works one times with the CD-Player I can switch to the Aiwa and now I can read from the Aiwa without problem, and I can put a tape inside the 57 and can read it too.
Thats not all! I can put a _48k_ Tape inside of the 57 and the card will read 48k!!! But they read not 32k.

Your computer can sample with all samplerate between 11k and 48k. Think about it. You can play a 44.1k Tape or CD and sample it with 48k. Or you can sample a 48k tape with 44.1k or 22k. Something inside the card does a samplerate conversion. They are many ways to do this. (bad ones and good ones) I don't know how the CMI8330 do it. And I don't know if this affect sampling a 44.1k tape with 44.1k. This is an interesting point! I need a datasheet of the 8330. :-/ But I believe the card using a bad method. (DA-AD converter)

A word about sound quality:

Don't think a minute about the analog in and outputs. Compared with my old Gravis ultra Classic, it sounds really bad. The OPL3 is a bad bad bad joke. Absolutely useless! Everybody with a DAT should cry about this. The AD/DA Lines are very noise. Don't know why this card has 16bit, they are not so good as a cheap 8bit converter. But you don't need them because you are the owner of a DAT. :-)
For people that don't believe this here two pictures:

Spectrum of Card-Input with analog Input on and off. Digital input always zero (DAT in pause-mode)




The digital-I/O sounds fine. My ear and a Beyerdynamic DT-800 can't detect any kind of interference. I read a Test-CD with a digital 400Hz sinus on it and looked at the data. They are perfect!

BTW: You have to press [stop] on the software-cdplayer to use the digital output after reading, or it will sound horrible. This is because the digital input reads white noise when there is no SPDIF-Signal and is switched on.

Summary:

With some tricks you really get a cheap card for reading 44.1k and 48k inside of your computer. Try it! Perhaps this card is not so good as a ZA2 or something like this, but I think they will do a good job for many of us.



Okay, now I know a little bit more of my soundcard. After reading a 48khz radiobroadcast from DAT with 44.1khz my ears detect some kind of disharmonic.

I am the proud owner of a expensive test-CD with many different kind of signal and had a look on the signals.

Reading 44.1k CD with 44.1k

When I read correlated pink noise (L=R ->Mono) I saw no differences between the two channels. I think we can accept that the card read SPDIF without errors because It should be untrustworthy that there are Error on the same time on both channels.

When I read digital zero I saw digital zero.

With the small signal quantisation test I can see only bit 16 switching with 400Hz. -->Card reads really 16Bit.


Treble frequency response, 18, 20, 22khz. I saw a small other (lower) frequency above the 22khz. Perhaps this are from the digitalfilter inside of my CD-Player?
When doing the same test with reading the 44.1k CD with 48k, I can see many errors! I think the card does no sampling rate conversation. It look like she reads a word every time she needs one, and this is bad. So it is important to read a 48k source with 48k and doing the conversation with software.
It should be a good idea to reapeat the test with reading a 48k Testtape with 48k, but I have no 48k testtape. I can record my testcd on DAT, but then I think I am testing the AD-Konverter of my DAT and not the card.


Da sich hier gerade die DAT-Recorder stapeln habe ich die Gelegenheit genutzt und mal ein bisschen mit der Soundkarte gespielt.

Zuerst mal der Versuchsaufbau:

Ich habe meinen SPDIF-Killer im 57er abgeschaltet, ausserdem greift der eh nur in den internen Datenstrom der Subprozessoren ein und wuerde nichts aendern.

Das interesanteste zuerst. Ein 44.1k Tape auf dem Aiwa laesst beim 57er das rote Laempchen (prohibit) leuchten, der 670er kann aber aufnehmen. Die Karte entfernt also den Kopierschutz. :-]

Stellt sich natuerlich die Frage wie sie es macht! Entweder interne DA-AD Wandlung oder sie kopiert die Daten intern um. Auf jedenfall wird der Datenstrom nicht direkt durchgereicht.
Es hoert sich aber gut an! Oder sagen wir mal lieber ich hoere keinen Unterschied, vielleicht ist das ja bei Leuten die ihre CDs gruen anmalen anders.

Nimmt man ein 48er Tape kommt es als 44.1k aus der Karte wieder raus. Allerdings mit den schon beschriebenen Aliasingstoerungen. (oder habe ich das jetzt nur auf Datheads erzaehlt?, egal) 32k, funktioniert, wie auch schonmal erwaehnt, nicht.

Man kann waehrend man die Daten durchreicht problemlos mit dem Computer mitsampeln. Man kann auch _zusaetzlich_ zum sampeln noch einen Wav oder Midiplayer starten und diese Zusatzspuren werden on the fly in das Ausgangssignal gemischt. (nicht schlecht fuer so eine Billigkarte) Vermutlich wuerde das auch noch fuer den analogen CD-Playereingang der Karte gelten, aber ich bin noch nie auf die Idee gekommen den Audioausgang eines CD-Roms zu benutzen da qualitativ indiskutabel.
Dies wuerde eigentlich fuer die DA-AD-Theorie sprechen, allerdings kann man am Summenregler des Mischpultes zwar die Lautstaerke der einzelnen Analogquellen im SPDIF-Ausgnang regeln, nicht jedoch des digitalen Eingangs, den kann man nur ab oder anschalten.

Dann habe ich ja schonmal das interessante Problem angesprochen das die Karte manchmal nicht auf Tapes einrastet. Es kann also passieren das sie nur Muell wiedergibt wenn ich ein Tape in den 57er einlege, es aber gut einliesst/durchreicht wenn es im X1 spielt und der 57 den X1 durchreicht. (oder umgekehrt) Das ganze ist mit bestimmten Tapes reproduziertbar. Ich kann da keine Gesetzmaessigkeit erkennen, es passiert sowohl mit Tapes die selber aufgenommen habe als auch mit Tapes von Pioniers, DTC-1000, usw.) Es ist mir ein Raetzel! Das einzige was immer geht, ist der CD-Player.

Noch ein Wort zu den Treibern. Es gab seit Weihnachten zwei neue Betatreiber auf dem Server des Herstellers. Ich kann zwischen den Versionen keinen funktionellen Unterschied feststellen, aber man gibt sich immerhin den Anschein als wenn man was macht. :)
Dafuer beobachte ich seit einiger Zeit mit jeder der Treiberrevisionen das interessante Problem das dieses Idiotenbetriebssystem zwar behauptet zu funkionieren, aber die digitalen Ein und Ausgaenge der Karten funktionieren nicht. Ich muss dann die Treiber in irgendsoeinem Fenster loeschen, sie werden nach dem naechsten booten automatisch neu eingebunden und danach geht wieder alles bis zum naechste booten, dann wiederholt sich das Spiel. Ne...was ist dieses System krank! Wenn ich damit auf dauer arbeiten muesste wuerde ich mir zwei DATs ans Bein binden und in einen See springen, aber ich komme vom Thema ab. :)

Ich weiss nicht wo man die Karte in Deutschland kaufen kann. Mail mit dieser Frage wird gekillt! Eine Mail mit einer Bezugsquelle in D aber gerne gelesen. :-)


Wer es schafft ein Datenblatt fuer dem CMI-8330 zu besorgen dem ist ewige Dankbarkeit gewiss. :)


Es gibt seit kurzem ein kleines 12seitige Datenblatt. Das habe ich natuerlich schon. Das klaert zwar noch nicht alle Fragen aber immerhin besser wie nichts.

Insbesondere habe ich es jetzt geschafft auch den SPDIF-Eingang unter Linux zu verwenden. Dazu ist es noetig in der Datei

/usr/src/linux/drivers/sound/ad1848.c

die Funktion 'void ad1848_spdif (int dev)' zu patchen.

----------------------------------------------------------------------
devc->irq = (irq > 0) ? irq : 0;
devc->opened = 0;
devc->timer_ticks = 0;
devc->osp = osp;

/* REC-Eingang einschalten */
ad_write (devc, 0x0c, 0x40);
ad_write (devc, 0x10, 0xc0);
ad_write (devc, 0x0c, 0x40);
ad_write (devc, 0x11, 0xc0);
ad_write (devc, 0x0c, 0x00);

/* REC-Eingang ausschalten */
/*
ad_write (devc, 0x0c, 0x40);
ad_write (devc, 0x10, 0x40);
ad_write (devc, 0x0c, 0x40);
ad_write (devc, 0x11, 0x40);
ad_write (devc, 0x0c, 0x00);
*/

if (devc->model > MD_1848)
{
----------------------------------------------------------------------

Wenn der SPDIF-Eingang aktiv ist dann macht leider der Ausgang probleme. Jedenfalls wenn ihr da nichts anderes angeschlossen habt. Der offene Eingang empfaengt dann Rauschen mit maximaler Amplitude. Vorsichtig! Soetwas ruiniert ratz-fatz eure Hochtoener!
Ich habe derzeit zwei soundmodule die ich je nach Bedarf lade. Zwar keine tolle Loesung, aber immerhin eine funktionierende.
Ausserdem muesst ihr mit einem Mixer die analogen Eingaenge abschalten da sie sonst als Rauschen zum Eingangssignal addiert werden.