1 (edited by abtr 2018-12-18 20:34:46)

Topic: How does ADI-2 DAC handle USB transmission errors?

Hi all,

A question that came up recently is, how does the ADI-2 DAC handle USB transmission errors? Does it somehow fill in the gaps (the corrupt USB data), or does it produce an audible click or drop-out?

2 (edited by ramses 2018-12-18 21:16:01)

Re: How does ADI-2 DAC handle USB transmission errors?

> fill in the gaps

If data is missing, then data is missing, how shall the device "guess" the proper data ?

So there will be data loss. If there is data loss then you will hear it. Signalling between sender and receiver and retransmission only makes sense for bulk data, but not for delay/jitter sensitive data, be it voice, audio or video.

USB Diagnosis in the driver will tell you whether on transport level everything was ok or not.
See also Handbook chapter 21.1.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

3 (edited by abtr 2018-12-18 22:11:10)

Re: How does ADI-2 DAC handle USB transmission errors?

The manual is not clear on this subject. I recently understood that the 'driver diagnosis' measures only computer/driver errors; not 'DAC error messages'.

So will there be audible clicks or drop-outs, or will the DAC's circuitry and software fill in the missing USB data (packages) by, e.g., interpolation of the (PCM) sample values before and after the error(s)?

4 (edited by ramses 2018-12-18 22:40:24)

Re: How does ADI-2 DAC handle USB transmission errors?

Calculating averages of data is IMHO wasted CPU time.
If something went wrong on transport, then I think it makes only sense to throw the packet away.

Usually there will be no issues. Tf there are issues, then its good that you can hear it.
Otherwise such fake / calculated packets maybe would modify the music and you have no
chance to recognize it. Then better a clear defined error condition, that you can hear.

Maybe RME can tell kindly, what the CRC 5/16 and 32 checks - which can be seen in the driver - mean.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

5

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

A question that came up recently is, how does the ADI-2 DAC handle USB transmission errors? Does it somehow fill in the gaps (the corrupt USB data), or does it produce an audible click or drop-out?

As all such units the ADI-2 DAC uses isochronous mode for audio transmission. There is no re-send on data error with this method. But the data strream includes checksums and at least can show if such errors happen already on the lowest / smallest level. Small errors will be inaudible, bigger ones become clicks etc.

If you have clicks and the error counter stays on zero these are not USB transmission errors, but performance problems on the computer (the most often case).

The error display of RME units not only shows CRC errors, but also internal hardware states, like sent/received data, FIFO errors etc, so detects and shows more errors.

Regards
Matthias Carstens
RME

Re: How does ADI-2 DAC handle USB transmission errors?

MC wrote:

As all such units the ADI-2 DAC uses isochronous mode for audio transmission. There is no re-send on data error with this method. But the data strream includes checksums and at least can show if such errors happen already on the lowest / smallest level. Small errors will be inaudible, bigger ones become clicks etc.

So the ADI-2 'repairs' small USB data errors. Could many distributed small errors (~ 1/s) be essentially inaudible (without clicks)?


MC wrote:

If you have clicks and the error counter stays on zero these are not USB transmission errors, but performance problems on the computer (the most often case).

Clicks due to errors resulting from e.g. a bad USB cable, or a bad Intona, are USB transmission errors that can't be counted by PC side software.


MC wrote:

The error display of RME units not only shows CRC errors, but also internal hardware states, like sent/received data, FIFO errors etc, so detects and shows more errors.

Do you mean the error counter of the Settings app included in the RME driver software?

7

Re: How does ADI-2 DAC handle USB transmission errors?

> So the ADI-2 'repairs' small USB data errors.

I did not say that, and it doesn't do that.

> Could many distributed small errors (~ 1/s) be essentially inaudible (without clicks)

Most probably not, some will be audible.

> Do you mean the error counter of the Settings app included in the RME driver software

Of course.

Regards
Matthias Carstens
RME

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

So the ADI-2 'repairs' small USB data errors.

While missing samples in digital audio data can be reconstructed/interpolated, USB data does not directly correspond to audio signal, and therefore there is no way to "repair" things by "filling gaps" or so.


Regards
Daniel Fuchs
RME

Regards
Daniel Fuchs
RME

Re: How does ADI-2 DAC handle USB transmission errors?

Yes, I understand, but missing USB data (packages) will ultimately corrupt the PCM or DSD encoded audio signal, right? I imagine that there will be missing and/or corrupt sample values that may not be 'safe' to play.

10 (edited by abtr 2018-12-21 19:20:00)

Re: How does ADI-2 DAC handle USB transmission errors?

That was an implicit question. wink How are missing/corrupt sample values handled by the ADI-2 DAC? Are you saying that there is no error correction of any kind implemented anywhere in the DAC? Doesn't S/PDIF use error correction?

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

That was an implicit question. wink How are missing/corrupt sample values handled by the ADI-2 DAC? Are you saying that there is no error correction of any kind implemented anywhere in the DAC? Doesn't S/PDIF use error correction?

AFAIK error correction, interpolation,  is only done reading from cd audio. This is because of the desired length of the cd there was no room for checksums/error correction on the cd. A cd rom has less room for audio @44.1k then an audio cd, plus it made reading at 1X speed possible. For error correction you need to be able to read ahead and retry, which is possible on cd rom. Plus that now cd rom players cab also do that for audio cd at higher speeds.

Vincent, Amsterdam
https://soundcloud.com/thesecretworld
Babyface pro fs, HDSP9652+ADI-8AE, HDSP9632

12 (edited by abtr 2018-12-22 02:04:44)

Re: How does ADI-2 DAC handle USB transmission errors?

vinark wrote:

AFAIK error correction, interpolation,  is only done reading from cd audio. This is because of the desired length of the cd there was no room for checksums/error correction on the cd. A cd rom has less room for audio @44.1k then an audio cd, plus it made reading at 1X speed possible. For error correction you need to be able to read ahead and retry, which is possible on cd rom. Plus that now cd rom players cab also do that for audio cd at higher speeds.

S/PDIF provides a so called 'parity bit' to detect errors. Isn't that used by the DAC to 'patch' S/PDIF transmission errors?

13 (edited by abtr 2018-12-22 21:03:57)

Re: How does ADI-2 DAC handle USB transmission errors?

My current understanding is that with USB (as well as S/PDIF) audio, a number of bytes is reserved for cyclic redundancy checking (CRC) or error detection and error correction. It seems that the ADI-2 DAC (and possibly any other DAC) only detects errors and subsequently drops the corrupt data packets. Yet, somehow, the DAC produces a playable PCM stream from this incomplete data. I would call that a form of error correction. In the end this may come down to an interpolation algorithm that reconstructs missing PCM sample values. Too many errors result in audible clicks or dropouts.

My question is, how is this implemented in the ADI-2 DAC (the USB interface and/or AKM AK4490 chip)? And related, what would be too many errors? Are some DACs more tolerant against data errors than other DACs?

Another question is, could the experiential fact that different USB audio setups sound different in terms of sound quality have anything to do with the aforementioned interpolation algorithm, introducing audible distortion with certain levels, or patterns of missing PCM samples?

By the way, I recently noticed with a ten year old Win7 notebook connected directly to the ADI-2 USB input, that I could hear computer mouse moves through the speakers as faint scratching sounds. When I put an Intona galvanic USB isolator between the PC and DAC the scratching sounds disappear. I wonder how such electrical, computer based USB noise can audibly distort the DAC's output..

Re: How does ADI-2 DAC handle USB transmission errors?

Well, it's clear that RME isn't going to answer these questions. Not sure why.. sad Any ideas would be much appreciated.

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

Well, it's clear that RME isn't going to answer these questions. Not sure why.. sad Any ideas would be much appreciated.

RME is based out of Germany and the staff are likely just asleep.

The fact that we can have high level engineers and the co-founder of the company answering specific questions in a casual forum format is actually a gift compared to many companies in the audio realm, especially if you look at hifi (which is not traditionally RME's focus but it is the market the ADI-2 DAC targets).

16 (edited by ramses 2018-12-23 07:48:51)

Re: How does ADI-2 DAC handle USB transmission errors?

Don't get me wrong, but I personally think it's also not their primary field of work to teach you how USB works in detail,
be it generally or in their products. If they do, fair enough, but don't push them.

Especially as we have weekend, pre X-mas days, vacation time and as you might have noticed a lot of issues
around Apple Mojave and USB, new products on the horizon, etc.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

17

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

By the way, I recently noticed with a ten year old Win7 notebook connected directly to the ADI-2 USB input, that I could hear computer mouse moves through the speakers as faint scratching sounds. When I put an Intona galvanic USB isolator between the PC and DAC the scratching sounds disappear. I wonder how such electrical, computer based USB noise can audibly distort the DAC's output..

You gave the answer yourself - a classic ground loop from computer over DAC to the power amp. And you broke it up with the Intona. Nothing to wonder. BTW, I don't think the DAC's output was distorted, I am pretty sure it was the amp's input instead.

Regards
Matthias Carstens
RME

18

Re: How does ADI-2 DAC handle USB transmission errors?

MC wrote:

>

Most probably not, some will be audible.

> Do you mean the error counter of the Settings app included in the RME driver software

Of course.

very interesting, i have no idea where is it. do you mean DIGIcheck or MADIface panel?

19

Re: How does ADI-2 DAC handle USB transmission errors?

The error counter is visible in the Windows Settings dialog. See manual, screenshot.

Regards
Matthias Carstens
RME

20 (edited by ramses 2018-12-23 12:12:12)

Re: How does ADI-2 DAC handle USB transmission errors?

In the driver settings dialogue where you also configure WDM drivers and other HW specific settings for the driver.
Some seconds too late LOL.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

21

Re: How does ADI-2 DAC handle USB transmission errors?

USB Diagnosis shows specific USB
transmission errors (CRC5, usually 0)
and general errors. If the unit detects a
record or playback error the number
shown will no longer be 0. An audio
reset is performed automatically. The
counter is reset on start of
playback/record.

well, but nobody looking for small icon in the corner
is it available to set USB errors warning to the main display like short circuit message?
sometimes too many process on the CPU causes errors on the audio path. I'd like to know when.

22

Re: How does ADI-2 DAC handle USB transmission errors?

CPU related problems are on application and software buffer level, that is outside of our scope. Some software like Samplitude and Sequoia examine the data flow and show (ASIO) errors for that on their own.

Regards
Matthias Carstens
RME

23 (edited by joachim.herbert 2018-12-23 18:53:54)

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

Well, it's clear that RME isn't going to answer these questions. Not sure why.. sad Any ideas would be much appreciated.

The proper question to ask is "how transmission errors are handled by the usb protocol and/or usb chips?" Nothing special RME could do.

As a starting point you may want to have a look here https://en.wikipedia.org/wiki/USB_(Communications)

24 (edited by abtr 2018-12-23 22:57:35)

Re: How does ADI-2 DAC handle USB transmission errors?

joachim.herbert wrote:

The proper question to ask is "how transmission errors are handled by the usb protocol and/or usb chips?" Nothing special RME could do.

As a starting point you may want to have a look here https://en.wikipedia.org/wiki/USB_(Communications)

USB for audio uses isochronous transfer with a guaranteed data rate but with possible data loss. Corrupt packets are typically not resend and are dropped by the DAC.

That much is clear to me. What's not so clear to me is how such incomplete USB data is converted into a valid (playable) PCM/I2S stream. I assume that missing USB packets somehow translate into missing PCM sample values (not corrupt PCM sample values), which can be 'recovered' by interpolation over earlier and later sample values.

But this hasn't been confirmed (nor denied) by RME. Note that the resulting PCM stream will not be bit perfect as relative to the original file.

25 (edited by ramses 2018-12-24 00:13:02)

Re: How does ADI-2 DAC handle USB transmission errors?

abtr wrote:

[...] But this hasn't been confirmed (nor denied) by RME [...]

To be very honest .. you expect a bit much. Do you know any company discussing product design
or details of their implementation in the public (which is surely part of their intellectual property) ?

RME is already very open in communication. See alone the technical data of their products in the manuals or on the Web.
The documentation of the competitors is usually very poor in contrast to what RME delivers.
And RME's products reach those values...

If RME does not answer to such implementation details like USB transport and its error correction,
then I think they have either no time or no interest (maybe too close to their intellectual property).

This is IMHO fully understandable and maybe you should simply respect this.

If you need information about how USB works, then I would get in contact with open source developers
or look at Linux source code, i.e. of the kernel and ALSA project.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

26 (edited by abtr 2018-12-24 02:41:07)

Re: How does ADI-2 DAC handle USB transmission errors?

ramses wrote:

...
If RME does not answer to such implementation details like USB transport and its error correction,
then I think they have either no time or no interest (maybe too close to their intellectual property).

This is IMHO fully understandable and maybe you should simply respect this.

If you need information about how USB works, then I would get in contact with open source developers
or look at Linux source code, i.e. of the kernel and ALSA project.

Well, if my inquiry addresses protected intellectual property of RME then of course I'll stop asking questions about it. But I think that handling missing USB data packets is largely equivalent to handling e.g. missing S/PDIF data packets, and as such it may be just a standard algorithm implemented in the AKM chip.

Anyway, my actual interest is that I like to know if a certain level or pattern of USB (or S/PDIF) packet loss could possibly result in audible degradation of the DAC's analog output; without any obvious dropouts or clicks.

There is quite some debate going on in audiophile circles about the question why most (computer to DAC) USB audio sounds bad. Apart from possible ground loops, one theory is that EMF interference from the computer adds to the electrical noise profile of the DAC's USB receiver which electrically interferes with DA conversion. It is after all well established that USB 'packet noise' (at 8 kHz) shows up in the output of some DACs. Another theory is that actual USB transfer errors may more or less push PCM/I2S error correction (interpolation) to its limit, which degrades the DAC's analog output.

It's *not* a USB issue. Converting incomplete/lossy isochronous USB audio data into PCM isn't part of the USB specification. It may not be in the interest of RME to clarify these matters (given they know all the answers) because their solution is proprietary. I can't find anything about this on the web..

27

Re: How does ADI-2 DAC handle USB transmission errors?

I will not comment/repeat all the details that are documented on the web. Sound changes by SPDIF transmission errors is audiophile nonsense. You either get one or multiple clicks or not. To give you a real-world example: listen to optical SPDIF. Now carefully and very slowly move the TOSLINK plug out of the jack. At some point the transmission will start to have errors. The more you move it out the more distorted it sounds, until mute is applied.

And now I have to do serious work (packing some gifts...).

Regards
Matthias Carstens
RME

28 (edited by abtr 2018-12-24 13:33:46)

Re: How does ADI-2 DAC handle USB transmission errors?

MC wrote:

I will not comment/repeat all the details that are documented on the web. Sound changes by SPDIF transmission errors is audiophile nonsense. You either get one or multiple clicks or not. To give you a real-world example: listen to optical SPDIF. Now carefully and very slowly move the TOSLINK plug out of the jack. At some point the transmission will start to have errors. The more you move it out the more distorted it sounds, until mute is applied.

Yes, SPDIF seems to be remarkably robust in terms of data integrity, that was clearly one of the original design objectives. Isochronous USB on the other hand is practically guaranteed to produce occasional bit errors. With both protocols, single bit errors (single dropped packets) will not result in clicks. Nevertheless, it should be measurable at the DAC's output and it may be audible.   

MC wrote:

And now I have to do serious work (packing some gifts...).

Have a happy Christmas! smile