HydrogenAudio

CD-R and Audio Hardware => Audio Hardware => Topic started by: reselty on 2012-01-20 11:14:17

Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-20 11:14:17
Hello
USB port provides poor sound quality

It’s a Windows XP or Hardware not a  DJ-Soft Problem.
Only I do not know, where I could ask such a question otherwise.

Problem occurs when sound output via USB (via Jack OK).
- Via ext USB Sound Card
- Via USB Headphone / Mic earphones (which have a well-integrated sound card)

No Problem when:
+ powered USB hub between PC and sound card "sound OK" ( "bad sound" without power )
+ The REALLY WEIRD: if I increase CPU usage, e.g. if I move a window in Windows continuously the output is OK

Attachment: 2 WAV sound files:
http://dl.dropbox.com/u/39224041/USB-out-WAV%27s.zip (http://dl.dropbox.com/u/39224041/USB-out-WAV%27s.zip)
I'm alternating every 10 seconds during playback,
- move a window in a circle permanently CPU Usage 60..64% >> Sound  ok
- Then without window moving CPU Usage 2...7% >> sound bad
Each WAV starting with window moving(so: 10s good, 10s bad, and so on (etc))

Could it be due to the USB power? (Not yet measured)
I've read that some USB devices could damage PC. 
"This could, in extreme cases damage the USB port on the host or upset the energy management of the computer, which can lead to unstable behavior."
Possible? While yes: enough to measure only via Soft-PC-Diagn.Tool e.g. SpeedFan? Or do I have to measure with a MultiMeter?

Could it be speed of USB?
My PC has USB2.0, however I have not found out about whether "Hi-Speed" or "Full Speed"

What ever could it be???

Am glad to rest every tip, even to the other proposals in which forum should be posted!
Thank you
Reselty
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Roseval on 2012-01-20 12:46:51
As this looks to be CPU load related, sometimes power saving schemes can hav a very negative impact.
Try disabling the power saving
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-20 13:35:35
Hi Roseval
ThanX for the fast answer!
Tried it -didn't changed anything.
If I understood you the right way: Power management settings:
Configurated like :
http://www.ehow.com/how_5097708_turn-off-power-saving.html (http://www.ehow.com/how_5097708_turn-off-power-saving.html)
(In all cases "never")
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: slks on 2012-01-20 13:46:01
If you could tell us how the audio sounded "bad" we could give a better answer.

My gut reaction to this is that it should not be possible - USB only transfers digital data, which means that the data either gets to the external sound card, or it doesn't. There should be no degradation in quality, at least until the signal reaches the end of its digital path in the external sound card, and gets converted to analog. But I'm willing to consider that errors interrupting the digital data transfer could cause audible problems. It could be something like power saving schemes trying to shut off the USB ports, like the previous poster suggested. IIRC, data flow control over USB is also done through the CPU, so putting the CPU under heavy load could cause interruptions to the data flow. (However, data interruptions while the CPU is under less loads, I could not understand.) I imagine such interruptions would sound like skips in the audio, possibly only milliseconds in duration, which would make them sound more like small pops, similar to dust in the grooves of a vinyl record.

Perhaps someone with more computer engineering background, or knowledge on how these external sound cards work (do they have their own buffer to fight data flow interruptions? how large is this buffer? etc.) could fill in the gaps of my knowledge. A more detailed description from you as to what exactly happens to the sound when it gets "bad" would also help in diagnosis.

edit: Wow, I glazed over your .wav samples somehow. The clips sound distorted to me from the beginning to end, and opening them up in an audio editor confirms that they peak at 0 dB throughout. That is to say, they've been recorded way too loud. Try recording them again with the volume turned way down, so that we can hear what it going on, not just clipping distortion 
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: itisljar on 2012-01-20 14:13:20
Reinstall chipset drivers, check DMA settings if you have ATA drives.
And btw, you are sending signal waaay into overload and clipping, judging by the recording.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Ouroboros on 2012-01-20 14:17:53
It seems illogical that it should work better at high CPU loads, but try checking the DPC latency.

http://www.thesycon.de/deu/latency_check.shtml (http://www.thesycon.de/deu/latency_check.shtml)
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: JimH on 2012-01-20 15:44:23
No Problem when:
+ powered USB hub between PC and sound card "sound OK" ( "bad sound" without power )
+ The REALLY WEIRD: if I increase CPU usage, e.g. if I move a window in Windows continuously the output is OK

Could it be due to the USB power? (Not yet measured)

Yes.  That's why the powered hub works.
Quote
Could it be speed of USB?

I don't think so.

Here's a similar problem that was also solved by using a powered hub:
http://www.computeraudiophile.com/content/...#comment-120780 (http://www.computeraudiophile.com/content/HP-Slate-500#comment-120780)
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Maggi on 2012-01-20 16:09:49
you could also have a look into your system's BIOS settings and see if "spread spectrum (http://en.wikipedia.org/wiki/Spread_spectrum)" is enabled or not

as a test you could change that setting, retry playing back without CPU load and see if the problem persists

Cheers,
Maggi
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-20 19:00:12
hlloyge Thanks
I tried - No Changings
(Chipset-Driver / DMA-Modus)
I try to load up a bether Example tomorrow..
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-20 19:02:45
Thanks 4 the moment to all of you !!!
try it out later or tomorrow
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: A_Man_Eating_Duck on 2012-01-20 20:33:45
What is the model number of your motherboard?

Some motherboards have enhanced power saving options in the BIOS that you might need to turn off.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Nessuno on 2012-01-21 00:34:58
Try to boot in a different OS install, a live Linux CD for example, and see what happens.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: zima on 2012-01-21 07:00:55
reselty, the description in your first post would seem to suggest a power issue, yes, like few already suggested. Possibly the USB devices getting a bit "dirty" power when the CPU constantly falls in & out of sleep modes (which happens virtually only when its idling). And it's unlikely you'd be able to measure fluctuations of such kind with software tools or with a standard issue multimeter (OTOH they should nicely show on an oscilloscope...)


As this looks to be CPU load related, sometimes power saving schemes can hav a very negative impact.
Try disabling the power saving

Hi Roseval
ThanX for the fast answer!
Tried it -didn't changed anything.
If I understood you the right way: Power management settings:
Configurated like :
http://www.ehow.com/how_5097708_turn-off-power-saving.html (http://www.ehow.com/how_5097708_turn-off-power-saving.html)
(In all cases "never")

That link would NOT be about the issue which I suspect to be responsible; the article, this kind of power management, is a "global" or "macro-scale" operating system behaviour - a computer hibernating when not in usage.

But your symptoms look more like due to something which nowadays happens constantly on a "micro" level (http://en.wikipedia.org/wiki/Dynamic_frequency_scaling) (together with... (http://en.wikipedia.org/wiki/Dynamic_voltage_scaling); or even more aggressive, the CPU essentially going into short micro-sleep periods, imperceptible to us).
I guess it's conceivable that, with your particular motherboard or laptop, the impact of those constant & extremely frequent changes isn't filtered adequately enough (for your USB audio devices at least) from the power supplied to the USB ports...

...while the audio from line-out (from integrated sound, I guess) is OK since that part of your motherboard is adequately shielded from those effects; because somebody did think about that.


CPU-Z can show if your CPU dynamically adjusts its speed & voltages.


It's all probably kinda related to how, a decade+ ago, moving the mouse pointer seemed to generate some line-out buzz on many PCs... (then: possibly activity from mouse interrupts, and/or simply just different kind of electrical impulses from the mouse, manifesting themselves on power levels). Heck, on one old motherboard of mine, when you turn on such aggressive CPU power saving (then typically not enabled, not used on desktop machines, hence the motherboards universally - not just rarely - neglected to implement it properly, its effects), some component on the motherboard itself starts to... "sing", in response to those fluctuations.


If that's the culprit, you can always turn it off of course (maybe in some control panel of your motherboard drivers / tool from the manufacturer installed together with them, maybe in the BIOS like A_Man_Eating_Duck suggests - I think those settings can be found there on every of my machines). But remember, probably at the cost of higher overall power consumption.

Can't you just continue using the powered hub?


Quote
Could it be speed of USB?
My PC has USB2.0, however I have not found out about whether "Hi-Speed" or "Full Speed"

BTW, USB 2 always has Hi-Speed capability, that's what it is. Full Speed is one of the USB 1 modes.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-27 21:17:42
Thanks to all of you
So much answers and I could'nt reply this week.

Now I recorded new files with no23 on second PC.
I uploaded them on the same link in my first post.

answers to each post following
Reselty
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-27 21:31:38
Answer 4 slks

Thanks a lot about your thoughts.
USB only transfers digital data - as I thought..
errors interrupting the digital data transfer - didn't thought about that, but why not! perhaps like zima explained
someone with more computer engineering background - would be nice..
about the uploaded sound - hope you'll listen to the new uploaded files, for me it is not easy to explain in words the craziness. But today I first tried with the USB-Headset and it sounded not anymore like sound (would had the possibility to record it), than I tried the ext.soundcard WITHOUT power (forgotten) and there was no problem.


Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-27 21:52:02
Reinstall chipset drivers, check DMA settings if you have ATA drives.
And btw, you are sending signal waaay into overload and clipping, judging by the recording.

New chipset drivers loaded - no changes
If you write reinstall: does that mean first delete the old one or what would you suggest?
I normaly start the driver exe file to overwrite the old one. Is that not shure enough.

DMA settings - checked - was OK

new example files uploaded use the link in my first post
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-27 22:24:24
It seems illogical that it should work better at high CPU loads, but try checking the DPC latency.
http://www.thesycon.de/deu/latency_check.shtml (http://www.thesycon.de/deu/latency_check.shtml)


Thanks 4 tip Ouroboros
Checked it :normal around 75us(max180us) -> all @ good green level
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-27 22:31:38
Thanks JimH
That's why the powered hub works
but sometimes as today (for a several time) it did the job without power...

But the best will be : using in the future a poered hub - bad that the soundcard do not have a power plug.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: saratoga on 2012-01-27 23:11:57
Overloaded USB voltage regulator seems most likely.  Either due to bad design, too many USB peripherals or failing hardware.

BTW, you should use quote tags.  It makes your posts much easier to understand.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-28 00:46:02
you could also have a look into your system's BIOS settings and see if "spread spectrum (http://en.wikipedia.org/wiki/Spread_spectrum)" is enabled or not
as a test you could change that setting, retry playing back without CPU load and see if the problem persists
Cheers,
Maggi

Hi Maggi (do you speak German?)
In my BIOS I can't change such a setting!
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: A_Man_Eating_Duck on 2012-01-28 01:48:40
what motherboard\PC do you have?
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-28 12:34:10
Hi - Found the problem
Thanks a lot to all of you

Especially to Maggi, A_Man_Eating_Duck, zima, saratoga whitch pointed on power saving settings
I've Found the cause:
In the BIOS Advanced> CPU Configuration>
    Intel ® C-STATE tech (I / O) -> disabled when no sound problem
    Max-C-STATE (C1, C2, C3, C4) -> (original: C4) others are still not tested
    Enhanced C-STATE (I / O) -> (original: I) if it is disabled no sound problem

What I would be interested in:
1:What do this settings? : Not easy to find any information.
    Links ... welcome!
2: What changes the "Performance for Background Services" checkbox,
    I’ve read in forums, this should be enabled for sound systems. My question: What causes this?

Thanks to all of your tips, instructions, hints, and the taken time to hit the keys too!
Reeeselty
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-28 12:59:22
Infos you asked me in between my absence and for others in future tags

Viliv S5
YKMF_Yukyung YKMD_S5 PRE-H
Intel® Atom™ CPU Z520
Motherboard ID  64-0100-009999-00101111-062509-Poulsbo$2YU5I106
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: zima on 2012-01-28 13:29:40
C-states: http://en.wikipedia.org/wiki/Advanced_Conf...rocessor_states (http://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface#Processor_states) (overall, really, Wiki is your friend)

Yeah, lit would appear like (also) my hypothesis was at least close; and turning off routine CPU power saving modes did the trick.

But, just to be clear: you do remember this results in higher power consumption, (also higher temperature, possibly somewhat shorter life of components on average) and how using powered hub could possibly result in lower overall power usage (while also dealing with the problem), right?...

...well, at least with a "standard" CPU - seeing how it's about Atom, there shouldn't be much of a difference, they have very low power consumption either way.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-28 15:46:08
Thnx again
I'll only use it, when necessary...
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: A_Man_Eating_Duck on 2012-01-28 19:00:09
When i had random bacon sizzling noises on my m-audio delta all I had to disable was the enhanced c state in the bios. M-audio did fix the problem through a driver update so maybe drop the soundcard manufacturer an email with your findings so hopefully they will fix it.
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-01-30 16:44:18
When i had random bacon sizzling noises on my m-audio delta all I had to disable was the enhanced c state in the bios. M-audio did fix the problem through a driver update so maybe drop the soundcard manufacturer an email with your findings so hopefully they will fix it.

Did send it to: intel, viliv and realtek  -  let's see what will happen...
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Arnold B. Krueger on 2012-01-31 13:13:43
I think you are onto something with the USB power angle. Some computers have USB ports that are substandard - they can't put out the full one amp and maintain a decent 5 volts.  Using a powered hub circumvents that problem very nicely, thank you.

The power situation on the motherboard may be so bad that changing CPU use is changing power drain, which is in turn changing how the weak power from the USB port is working.hey

I suspect a bad power supply in the PC or a really weird but substandard system board (presuming that the port is coming off the system board.)
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: Maggi on 2012-01-31 14:26:20
you could also have a look into your system's BIOS settings and see if "spread spectrum (http://en.wikipedia.org/wiki/Spread_spectrum)" is enabled or not
as a test you could change that setting, retry playing back without CPU load and see if the problem persists
Cheers,
Maggi

Hi Maggi (do you speak German?)
In my BIOS I can't change such a setting!


Yes, I speak german, so send me a PM, if you need ...

As for all those BIOS switches and their meanings, look here (german BIOS Kompendium):

http://www.bios-info.de/4p92x846/befhpt.htm (http://www.bios-info.de/4p92x846/befhpt.htm)

Also, you could use AIDA64's ( http://www.aida64.com/downloads (http://www.aida64.com/downloads) ) system stability test for monitoring your system's voltages when put under load or running in idle

Maybe that could give a hint on what's going on with your USB's power output ...

Cheers,
Maggi
Title: Crazy problem: USB port provides bad sound, but only at low CPU usage
Post by: reselty on 2012-02-01 14:01:04
Thanks for Inputs Maggi and Arnold

I tried many of this portable tools, also aida (but how I think 32 not 64)  but could not really find the USB voltages. 'll try it again...