LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-28-2007, 05:09 PM   #1
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Rep: Reputation: 0
Sound crackle on high CPU usage


I have kind of low hopes of getting this fixed judging by lack of results from Googling, but I figured I would try here.

I have an M-Audio Transit soundcard. It is an external, USB card. I essentially use it as a 44.1khz transport to an outboard DAC, but I digress. My point is that the firmware must be loaded before the card works. I have this working via madfuload. I'm using the most recent version (1.2) and kernel 2.6.20-rc4.

Relevant links:
Transit: http://www.m-audio.com/products/en_us/Transit-main.html
MadFuLoad http://usb-midi-fw.sourceforge.net/


My issue comes about during high CPU usage, but not always. I think this may have to do with using a duel core CPU (that is, both cores must be used fully in order to cause the crackling). But not always. For instance, right now, Amarok is updating my 16,000 song DB (from an external NTFS based USB 2.0 SATA drive in an enclosure) and I hear no static. However, resizing a transparent gnome-terminal causes static city.

I managed to find this:
Sound problems and CPU stepping

That seems to be a logical conclusion, but my sound is not skipping, rather, just creating crazy static. Sound still plays in realtime.

I know it isn't the Transit itself. It works fine in both XP and Vista (go figure).

Suggestions?
 
Old 03-03-2007, 10:04 PM   #2
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Original Poster
Rep: Reputation: 0
bump from a
 
Old 03-13-2007, 03:52 PM   #3
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Original Poster
Rep: Reputation: 0
Please?


How about stoping the CPU from scaling all together?
 
Old 03-18-2007, 07:00 PM   #4
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Original Poster
Rep: Reputation: 0
I'm really hoping someone will have a suggestion...
 
Old 03-18-2007, 07:45 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Using USB for sound is stupid. USB is not designed to handle large amounts of data with little latency. I suggest using PCI sound cards or invest in IEEE-1394 (aka Firewire or i.Link) based sound cards. The crackling is actually caused by the video card and other devices taking control of the bus. This issue has always been a problem since day one of the introduce of sound cards and VGA graphics cards. Right now, I recommend upgrading both ALSA and graphics software to minimize the problem.

Probably it is best to create a bug report at ALSA site stating this issue, so they can find work-arounds.

Until a fix is found, play around with async_unlink and nrpacks for the snd-usb-audio module.
 
Old 03-18-2007, 08:19 PM   #6
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Electro
Using USB for sound is stupid. USB is not designed to handle large amounts of data with little latency. I suggest using PCI sound cards or invest in IEEE-1394 (aka Firewire or i.Link) based sound cards. The crackling is actually caused by the video card and other devices taking control of the bus. This issue has always been a problem since day one of the introduce of sound cards and VGA graphics cards. Right now, I recommend upgrading both ALSA and graphics software to minimize the problem.

Probably it is best to create a bug report at ALSA site stating this issue, so they can find work-arounds.

Until a fix is found, play around with async_unlink and nrpacks for the snd-usb-audio module.
While what you say makes sense, you will notice that I'm on a laptop. PCI cards are out of the question. I also have a relatively new laptop which narrows the field because I only have an expresscard slot. So that limits me to firewire if another card is the only solution. Have you seen the prices? $250 would be my minimum cost, which is simply unacceptable.

This issue just doesn't make sense. Vista/Windows XP work fine on a graphical load. What you said makes sense, but if that is true, then should the other OS's have the same problem? Are you sure it is just because the card is USB?
 
Old 03-19-2007, 02:43 PM   #7
KyPeN
LQ Newbie
 
Registered: Apr 2004
Distribution: Ubuntu Edgy Eft on 2.6.20-rc4
Posts: 12

Original Poster
Rep: Reputation: 0
OK, so I've eliminated the problem by disabling the nVidia driver. This is a pretty crappy fix because my CPU usage skyrockets just switching desktops. I would love another work around if at all possible.
 
Old 05-16-2007, 11:32 PM   #8
desertc
LQ Newbie
 
Registered: May 2007
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by Electro
Using USB for sound is stupid. USB is not designed to handle large amounts of data with little latency.
It's not necessary to call people names. In addition, your wrong.

First, External amplification is a very good way to process sound without the distortions caused the electronics of a desktop computer.

Second, USB is not slow. USB 2.0 has 320-480 MEGAbits per second of throughput.

Everything that Linux fails to properly support does not default to being junk.
 
Old 05-17-2007, 12:23 AM   #9
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
Originally Posted by desertc
It's not necessary to call people names. In addition, your wrong.

First, External amplification is a very good way to process sound without the distortions caused the electronics of a desktop computer.

Second, USB is not slow. USB 2.0 has 320-480 MEGAbits per second of throughput.

Everything that Linux fails to properly support does not default to being junk.
USB is slow compared to IEEE-1394. USB effective speed is a lot slower than 480 Mb. The reason why it is slower, is how USB is designed. USB is mainly controlled by software that makes its speed slower than USB is advertised. Firewire effective speed is a lot closer to what it is advertised. Firewire was designed at the start to handle large amounts of data with little latency, so using it for sound cards will be a lot better than USB.

Sure having audio amplification outside the computer is good, but the box have to use a linear power supply and be separated by the computer by optical connections. Most external sound cards get their power from the computer, so it still has the same problems as internal sound cards.

I did not call anybody names. Re-read the post again. It is not good to use USB for sound.
 
Old 05-17-2007, 03:07 PM   #10
desertc
LQ Newbie
 
Registered: May 2007
Posts: 6

Rep: Reputation: 0
[deleted semantics]

Sorry - my pet peeve is people cutting into newbies looking for help.

Last edited by desertc; 05-18-2007 at 11:29 PM.
 
Old 05-17-2007, 09:39 PM   #11
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Quote:
Originally Posted by Electro
Using USB for sound is stupid.
Quote:
Originally Posted by desertc
It is stupid to take pictures with a flash camera! ... Not that I'm calling you stupid, of course.
Please keep posts on-topic. Editorializing by describing something as "stupid" will probably only lead to arguments. I think we all recognize the points that are being made, and Yes, it's understood that calling an action or a decision "stupid" is not equivalent to calling a person "stupid", but a lot of people might not make that distinction, and arguing semantics is not a good use of time.

Either way let's keep this thread focused on the question at hand. Thanks for your cooperation and understanding.
 
Old 05-19-2007, 09:33 AM   #12
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

I have neither the sound card or that problem. But I think I have some suggestions:

sudo apt-get install stress

I play music with an USB card, and can stress test like this:

stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s
- No problems

stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s -d 2
- I hear a skip.

See "man stress" after installing it. The first one was the example in the man page, the second I added disk stress. I have only one harddisk, but no problem

Another advice is not to use the desktop kernel version of e.g. Ubuntu for good sound. Server versions often work better. You can always add your programs later (kde/gnome), but you will have a less responsive desktop instead.

Hope this helps
 
Old 05-22-2007, 08:26 PM   #13
desertc
LQ Newbie
 
Registered: May 2007
Posts: 6

Rep: Reputation: 0
In my experiences, it is not the sound driver that fails when the system is stressed, it is the USB driver that fails.

While it is true the USB sound can get distorted, slow down, and ALSA can freeze when then the system has high graphics, I have also seen the USB keyboard and/or mouse halt, in the same conditions.

I suspect a remedy is stopping and starting the USB module.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
High Cpu usage untak Debian 21 01-23-2007 06:21 AM
High CPU usage with kded seanfitz Linux - Software 1 12-19-2006 12:28 PM
cpu usage high corbintechboy VectorLinux 2 07-27-2005 08:11 AM
CUPS and High CPU usage Malibyte Linux - Software 11 10-21-2004 09:56 AM
xine high CPU usage Phathead Slackware 1 07-14-2004 01:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration