• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Do USB Audio Cables Make A Difference?

chris719

Senior Member
Joined
Mar 22, 2019
Messages
373
Likes
423
Great work! Any chance to get a jitter test and an FFT with this "cable"?

To elaborate on what KSTR said, for USB, most of the devices we care about at ASR work in the asynchronous UAC mode. Unlike SPDIF, this doesn't transmit the audio clock with the data. At a high level, flow control is achieved via feedback of a value to the host, indicating if it should speed up or slow down to ensure that the buffer in the device doesn't under or overflow. Data gets clocked out of that buffer by locally derived clocks. Since data is clocked out with a local clock, any jitter on the USB interface doesn't matter at all up to the point where USB data transfer stops working.

Amir still does the J-Test, but it's sort of looking at higher order effects. I'm not sure I would say it measures jitter over an asynchronous USB interface. It shows data-dependent modulation of the DAC output via whatever mechanisms.
 
Last edited:

dc655321

Major Contributor
Joined
Mar 4, 2018
Messages
1,597
Likes
2,235
I wrote a short script a while back in response to someone thinking flipped bits could be a subtle, even pleasant thing.

The script randomly flips bits in a track segment. Not pleasant at all, obviously...

Will post script and results when I get a few moments. "Working" right now...

Guess which track has 10 ppm randomly flipped bits?
A - https://www.dropbox.com/s/hblytvhebz10lf6/a.flac?dl=0
B - https://www.dropbox.com/s/lknt4dm9qgpvlrc/b.flac?dl=0

Python:
import os
import argparse
import soundfile as sf
import numpy as np


if __name__ == '__main__':
    P = argparse.ArgumentParser()
    P.add_argument('-p', action='store', type=float, default=1e-3, help='bit-flip probability')
    P.add_argument('track', action='store', help='path to flac|wav file')
    args = P.parse_args()

    track = args.track

    d, fs = sf.read(track, dtype='int16')

    # grab 30s of samples, starting from 60s into the song
    d = d[fs*60:fs*60 + fs*30:]

    p = args.p # probability of a bit-flip
    r = np.random.random(d.shape[0]*16)
    b = (r <= p).astype('uint8') # array of bit-flip choices for probability p

    # sanity chk - should be approximately 'p'
    print(f'Sanity check: {p} ~= {np.sum(b) / b.size}')

    # work with left channel only, convert signed 16-bit integer array to bit array
    lch = d[:, 0]
    lch_bits = np.unpackbits(lch.astype('>i2').view('uint8'))

    # operate over input bits flipping bits as indicated by 'b'
    lch_bf = np.where(b==0, lch_bits, lch_bits ^ 1).astype('uint8')

    # check bit patterns - only useful for p >= 0.01
    #print(lch_bits[:128], b[:128], lch_bf[:128])

    # convert the randomly flipped bit-array back to 16-bit integer values
    x = np.packbits(lch_bf).astype('uint16')
    z = ((x[0::2] << 8) | x[1::2]).astype('int16')

    track_base = ''.join(os.path.basename(track).split('.')[:-1])
    suffix = os.path.basename(track).split('.')[-1]
    sf.write(f'{track_base}_mono.{suffix}', lch, fs, 'PCM_16')
    sf.write(f'{track_base}_mono_{p}.{suffix}', z, fs, 'PCM_16')
 

Gekel

Active Member
Joined
Apr 28, 2021
Messages
116
Likes
90
From what it seems, isochronous transfer is prone to jitter and to packet loss too, so getting closer to the initial question now: could a wrongly designed USB cable or a defective one alter the USB transfer is such a way that some bits to actually get lost? Will this affect the output audio in any way?

There is no Jitter on a digital cable resulting in a change of the quality of the sound. Either the data makes it from the source to the target and you hear something, or the data gets lost, and then you hear nothing.

You are making the same errors others make: you try to use rules which are valid in the analog world and extend them into the digital world, wher they don't work.

I am using here the worst combination of all at the moment: a Pi4, hooked up to an under powered PSU (5V 1A) with a cheap 2m cable and continous warnings about under voltage in the syslog. The files are streamed from a SSD attached to one of the USB 3 ports and I am connected to the Moode front end using Wifi with a wifi dongle sitting on the second USB 3.0 port. From there a cheap USB cable runs into the DAC.

And guess what: perfect sound. No noise, no jitter, nothing - despite anything would be clearly notable, because the Nubert Nuline speakers (connected with 2.5mm^2 cables to an amp from Allo) plus the Topping DX3 pro are not the worst combo.
 

Gekel

Active Member
Joined
Apr 28, 2021
Messages
116
Likes
90
For reference, USB is generally expected to achieve a bit error rate better than 1e-12. Your example is thus 10 million times worse than typical.

And now consider that a "sound quality enhancing external device" (= audiphile USB cable), which has no clue about bitrate and frequency or the data format used (DSD, PCM, MQ) has to modify a lot of more bits if it wants the sound be altered in a way you can read in the reviews of some audio professionals, without making too many errors. 10 ppm wrong set bites are already notable.
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
https://www.beyondlogic.org/usbnutshell/usb3.shtml
Every USB packet has a CRC checksum, and data packets which we are dealing here have a 16bit checksum. A typical data packet, at USB2 highspeed 8kHz micro-frame rate, for 44.1kHz contains only a few samples: 44100*2*4/8000=44.1 bytes on average, portioned as 40byte packets and 48byte packets, assuming 32bit sample size used for 24bit data.
You'd need a very intelligent error mechanism to flip just the right bits so that the CRC16 would still pass as correct in order to pass corrupted samples with no way for the receiver to detect the error.
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
Amir still does the J-Test, but it's sort of looking at higher order effects. I'm not sure I would say it measures jitter over an asynchronous USB interface. It shows data-dependent modulation of the DAC output via whatever mechanisms.
This! (bold mine)
Basically it tests the DAC chip proper and to a lesser degree the hardware and layout close to it. Only with an almost broken design one would expect some feedthrough of the USB traffic in general on the analog output. I've seen this only in very entry level bus-powered sound cards so far.
 

Bullwinkle J Moose

Active Member
Joined
Mar 31, 2021
Messages
217
Likes
90
Do USB Audio Cables Make A Difference?

If you are asking> do different USB cables make a difference?

Then YES, Definitely!

I have some USB3 cables that do no pass data at USB3 speeds and some that do, and I also had some that were just plain buggy

I have some short USB 2 cables that will not pass power to my USB DAC and some that do

I also have some Aputure USB Power cables for LED Lights that pass power but not Data

Some USB cables over 6 feet in length will not pass enough power to "some" DACs, or for charging batteries and add condsiderable noise to certain DACs (but not all DACs)

Any cable that does not perform for Data, Power or Noise gets dropped into a box of unused crap
 
Last edited:

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
I have some USB3 cables that do no pass data at USB3 speeds
Those cables are, by definition, not USB 3 cables.

I have some short USB 2 cables that will not pass power to my USB DAC
Then they are not USB 2 cables.

I also have some Aputure USB Power cables for LED Light that pass power but not Data
Again, not a USB cable.

Any USB cable over 6 feet in lenth will not pass enough power for "SOME" DACs,
Three options: 1) not a USB cable (this is getting repetitive), 2) the DAC is drawing higher than the allowed current, 3) the DAC doesn't work over the full allowed voltage range. In each of these cases, something is failing to meet the requirements in the USB spec.

Unfortunately, USB spec violations are quite common. Fortunately, incompatibilities are usually immediately obvious in that the device fails to work at all.
 

Bullwinkle J Moose

Active Member
Joined
Mar 31, 2021
Messages
217
Likes
90
Those cables are, by definition, not USB 3 cables.


Then they are not USB 2 cables.


Again, not a USB cable.


Three options: 1) not a USB cable (this is getting repetitive), 2) the DAC is drawing higher than the allowed current, 3) the DAC doesn't work over the full allowed voltage range. In each of these cases, something is failing to meet the requirements in the USB spec.

Unfortunately, USB spec violations are quite common. Fortunately, incompatibilities are usually immediately obvious in that the device fails to work at all.

These are all USB cables!

They are USB-A / Micro-B and USB-C

The USB 2 and 3 cables are sold as USB 2 and 3 cables

They do not perform to your standards or mine, but they were all sold as USB cables, now properly relabeled as garbage and crap
 

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
These are all USB cables!

They are USB-A / Micro-B and USB-C

The USB 2 and 3 cables are sold as USB 2 and 3 cables

They do not perform to your standards or mine, but they are all USB cables
I can stick a pair of USB connectors on a piece of string. That doesn't make it a USB cable. To be a USB cable, it must meet the requirements in the USB specification, both mechanical and electrical. Your examples meet the mechanical requirements but not the electrical ones.
 

KSTR

Major Contributor
Joined
Sep 6, 2018
Messages
2,690
Likes
6,013
Location
Berlin, Germany
Three options: 1) not a USB cable (this is getting repetitive), 2) the DAC is drawing higher than the allowed current, 3) the DAC doesn't work over the full allowed voltage range. In each of these cases, something is failing to meet the requirements in the USB spec.
Quite often I see way too much supply bypass capacitance and no supply sequencing on device board, violating the "<10uF during attach" spec. Then, with long weak cables (power lines too thin) I've encountered unstability during enumeration.
 

Bullwinkle J Moose

Active Member
Joined
Mar 31, 2021
Messages
217
Likes
90
methinks thou doth protest too much

If one channel on your stereo amp goes out, is it still a stereo amp?

If one channel on you headphones goes out, do you still call them a pair of headphones?

They do not meet the USB spec but are marketed as USB cables!

They are now properly relabeled as garbage!

Your argument is simply to argue

You are now a minor contributor!
 
Last edited:

mansr

Major Contributor
Joined
Oct 5, 2018
Messages
4,685
Likes
10,700
Location
Hampshire
If one channel on your stereo amp goes out, is it still a stereo amp?
No, then it's a broken stereo amp.

Your "cables matter" argument is, to continue your amp analogy, equivalent to saying one stereo amp has much better imaging than another, only to then admit that the bad one in fact has only one channel and thus isn't a stereo amp at all.
 

SimpleTheater

Addicted to Fun and Learning
Forum Donor
Joined
Jun 6, 2019
Messages
927
Likes
1,789
Location
Woodstock, NY
It’s been proven, scientifically, that cables matter. @Bullwinkle J Moose is correct about USB cables that don’t perform to USB specs are garbage USB cables.
 

CuteStudio

Active Member
Joined
Nov 23, 2017
Messages
119
Likes
65
The subjective nature of music means that (functional) digital cables can make a big difference, but only in the mind of the listener.
As the reality of our world is determine by the mind, the effect is 'real'.

Also beliefs add to this to create realities untirely unrelated to reality. these 'believers' used to simply be people belonged to the various cults like the Moonies, Hari Krishna and the group who buy small wooden cones for their turntable legs and post on 'HiFi' forums.
Beliefs laugh at facts and evidence, and only pursue research which points toward their beliefs :oops:.

Before SPARS-COV 2025-2028 I thought that only a small percentage were susceptible, but I now acknowledge that bogus beliefs can be implanted with ease, and the gullibility number is nearer to 95%.
Earnest, righteous, ignorant, safety first lemmings fighting for their place on the clifftop.

The common factor is that these people dive down the belief hole and miss the bigger picture, blinded to reality. For HiFi people this consists of listening to the HiFi or the cables, and not the music. Everything now is a desparate effort to find some tiny details, while the song, music, harmony, melody, cadence - even if good - floats over their head: because their mind, if one could zoom in and look, has the picture of a posh USB-A plug in there, a shiny gold RJ45 socket, or some swish vinyl or polyester cable sleeving. :cool:
 

Gekel

Active Member
Joined
Apr 28, 2021
Messages
116
Likes
90
Those cables are, by definition, not USB 3 cables.

You can have two types of cables. Type 1 is where you have some kind of electrical or mechanical issues. You might hear some music, but the data stream is also sometimes interrupted. Or you might end up with some interrupted data transfers due to bad shielding.

Type 2 is where the data is sent over the cables and reaches the target.

That's all that matters in the digital world, because as already stated: the rules of analog cables, with resistance and capacity of the cable resulting in altering the sound, doesn't apply to digital data. We would be in deep troubles if we received different data just because the information to the computer (and finally DAC) would have been routed over a different digital media somewhere in the middle, and this does not only apply to music, but all kind of information.

I had the pleasure to test several cheap ones and a "higher quality" USB cable (Oehlbach), and there was zero difference. The pi4 I used also doesn't care about the PSU. As long as I don't use one which fries the USB port or other components, everything is fine. What matters (at least I haven't been able to prove otherwise) is the PSU on the DAC, because here we deal with an analog signal, and analog can be influenced.
 

Tokyo_John

Active Member
Forum Donor
Joined
Mar 6, 2021
Messages
214
Likes
289
DACs and sources simply need to do a checksum cross reference to ensure that the data stream is bit perfect...it adds latency and overhead processing to the mix, but that's a small cost to pay. It is standard tech in computing, it is what my external drives, NAS, etc. do in order to ensure data integrity of files I transfer over the network, USB, etc..
 

Julf

Major Contributor
Forum Donor
Joined
Mar 1, 2016
Messages
3,004
Likes
3,998
Location
Amsterdam, The Netherlands
DACs and sources simply need to do a checksum cross reference to ensure that the data stream is bit perfect...it adds latency and overhead processing to the mix, but that's a small cost to pay. It is standard tech in computing, it is what my external drives, NAS, etc. do in order to ensure data integrity of files I transfer over the network, USB, etc..

Or we just need to move to Audio over IP instead of USB. It is pretty clear USB was designed by electrical engineers, not computer science or telecommunications people.
 
Top Bottom