First finding - How to encode an audio signal in an I2S data stream.
A quick recapI have been having a problem with my audio system for a year and a half. There are two main symptoms:
1) General loss of resolution increase in harshness collapsing of sound stage and dynamics when playing at high (16x) up-sampling rates (linked to when 2) is present) and,
2) When Playing music at a -144db XX volume setting, I can hear a distorted version of the music playing at low levels through my speakers. What is surprising is that the DAC converters and IV section of my DAC can be turned off and yet still this breakthrough music can be heard.
Trying to approach this my thinking was that symptom 1) is quite general and none specific, it could be almost anything causing it so its difficult to test even with my new test equipment on hand.
Point 2 however is quite interesting. Key here is the diagnostic assumption that if I could hear the music breakthrough even with the DAC turned off then something in the digital domain upstream was decode data to an audio frequency music signal. But how was this happening ?
Main suspects were:1) Some unintended DAC process in the PC (there are DACs in the PC but there shouldn’t be working …). I decided this was un-likely following a few tests and discussions with Peter.
2) I have worked on USB to SPDIF interfaces with build in DACs in the past. Might it be that the NOS USB interface has a DAC on board and this is unintended decoding the music data. Peter kindly confirmed that there is no such feature on the NOS1 USB interface, so this was ruled out.
3) Is the USB stream from PC to DAC somehow modulated by the music signal ? Could possibly be the case but not sure how. If necessary I could can test with my logic analyser
4) Is the I2S data stream that links the NOS1 USB interface card to the DAC might somehow be modulated by the music signal ? This stream of data is very close electrically to the output of the DAC, there are many reports of I2S being noisy on the net, and there is the possibility of timing problems with I2S signalling so this is where I decided to start looking.
Peter has been very helpful and we have been sharing ideas and experiences relating to I2S observations over the last weeks. Amongst points Peter raised was that the 1704 DAC chip uses 2’s complement binary data encoding to pass music data over the I2S data stream into the DAC.
When looked into the key here is that bit values and therefore the electrical “on” and “off” values of the I2S data near the zero vale of the musical wave form look very different when they are passed down the I2S data connection.
For example:
0 (dec) = 0000 0000 0000 0000 0000 0000 (24bit Binary) so electrically for this music value the I2S data line is “off” at 0 volts to send a 0 value. Likewise positive low values are mostly zeros (offs).
-1 (dec) = 1111 1111 1111 1111 1111 1111 (24bit Binary) so electrically the I2S line is “on” at 3.2 volts to send a -1 value. Other negative music data values just below 0 are also mostly 1s (ons).
A couple more useful bits of information that turned out to be relevant:
- I2S data is sent at the logic gate values of the sending and receiving chips so in the case of my interface that’s 0v = an off bit and +3.2volts = an on bit.
- I estimated the peak to peak voltage amplitude that would be needed at my DAC’s output XLRs to generate the breakthrough music sound level I hear played whilst at the XX volume setting of -144db to be in the rage 100uv to 500uv. (from an estimate that the volume heard is about 50db at 1m, played via 103db/w/m loudspeakers and a 36db amp).
So the I2S carrier of 0-3 volts square wave signals at a carrier frequency (data bit rate) of up to 22mhz per I2S line and there are two I2S data lines in use within the NOS1. Is seemed possible that the breakthough audio signal of 100-500uv could be coupled to the output of the DAC even with the DAC chips turned off. Now time to look for how an audio frequency signal could be encoded into the electrical conditions of the I2S data lines.
I obtained an 8 channel logic analyser (which decodes I2S data) and a 200Mhz oscilloscope to probe the I2S data lines with music playing at -144db. I was amazed to see the following emerge.
Traces taken with logic analyser. Key of the trace lines in each picture.- Top trace line is one of the two I2S lines in the NOS1 with the software set to decode the music word values being passed to decimal values. Note that that since this is tws compliment data that the music value of -1 is decoded to Dec 1677215 (bin 11111111 11111111 11111111).
- The next trace line down is the raw I2S data on the NOS interface so low is 0 volts and high on this trace a 3.2v condition.
- The next line down is the word select clock which changes state every 32 bits word sent on the I2S data lines.
- And the final line down is the bit clock signal.
First trace 1 khz test tone recorded at 0db played with XX volume at -144db not upsampled (44.1khz).This is a close up of what happens when the music wave form values (in this case a sine wave attenuated by -144db) moves from a positive in the wave cycle to a negative part of the wave cycle. Note that when the music wave was above the zero point the wave is attenuated to the binary value of 0, so the electrical state of the I2S line is mostly 0v. However when the sine wave was in the negative cycle the attenuated value never gets to 0 it stays as -1 and due to the two compliment treatment of the I2S data the electrical value of this -1 data is a state of mostly +3.2volts.
I was looking in my system for a misbehaving semiconductor acting like a diode to demodulate the data transmission, but the actual I2S line and Twos Complement state values themselves are creating an electrical state on the I2S data line that corresponds to zero crossing points in the music wave form ! oh boy
So now lets look at zoomed views of the trace so that you can see a longer duration of the sine wave with more transitions of the music sine tone across the zero value point.
Humm, the electrical condition of the I2S data line is now a good approximation to a square wave at the 1khz frequency of the music sine wave. The square wave has a low value of 0v when the original audio sine wave signal was of a value below zero and a high value of 3.2 volts when the audio value was below zero.
Bloody hell QED
! the audio signal IS being demodulated into the I2S data transmission voltages.
From here it is a short step. The modulated data (I have looked at many many more measurements including normal music and its facinating watching the demodulation take place, the audio looks like Pulse Code Modulation centred on the zero crossing point as the volume us raised from -144db upwards) is being carried at up to the bit clock frequency on a square wave of approaching 22mhz. This frequency of carrier and its overtones can couple with near by traces / connections power rails etc. I need just 100uv to couple to the DAC outputs and that plays the breakthrough sound – which is what is happening.
Continued in next post