Netscape Causes MP3s to Skip? 48
A member of the ubiquitous Clan Anonymous Coward asks:
"Hi, I'm having some trouble playing MP3s smoothly on my
PII333/96MB Linux box, running Slakware 3.6 w/ kernel
2.0.35. X11amp and mpg123 both skip when I scroll in
Netscape. I have messed around with it a bit to no avail.
Can anyone give me some pointers on giving the MP3 player
a higher priority than other apps (in the hopes that this
will keep it from skipping)."
Why PCI Retry is a problem (long) (Score:1)
What sound card and, more importantly, driver? (Score:1)
- A.P.
--
"One World, One Web, One Program" - Microsoft Promotional Ad
Shouldn't be a problem (Score:1)
Here's the solution (Score:1)
I used to have the same exact problem, you have a couple solutions at hand:
1) Hunt down the settings for Accelerated X, and if you see "PCI retries" or "PCI retry" anywhere, disable it.
2) Alternatively, you can switch to XFree86, which has PCI retries on Matrox cards disabled by default. The performance of the Matrox XFree86 driver is very good, too.
Please feel free to email me at muaddib@magicnet.net [mailto] so we can get this fixed.
not Netscape, X* (Score:1)
while XFree is pretty adjustable on PCI behaviour, I can't find how to tell Xaccel to be nice.
XFree86 version 3.2 didn't have the problem (Score:1)
Also the free open sound system driver can rarely allocate more than 4096 bytes for a DMA buffer because it's memory management sucks. You should either try the commercial sound driver or figure out how to permanently allocate 128k DMA buffers at startup.
For rock solid buffering, get rt.c which allows one process to lock the CPU until it's finished buffering. I use rt.c with mpg123 and it's rock solid with no crashes.
Skippage. (Score:1)
I do have AGP (Score:1)
Something's wrong. (Score:1)
--
use buffering and realtime scheduling (Score:1)
First, try enabling the buffering in mpg123. A buffer of between 128kb - 4096kb will allow the player thread to continue working even when the decoder falls behind due to high system load.
Second, try using rtstools to give mpg123 realtime priority. This will result in mpg123 getting run before all other pending processes on your computer. I also have a patch for mpg123 that can do this -- mail me if rtstools helps but you get tired of doing it by hand.
Third, check for hardware issues. Make sure your video card or another device isn't hogging all the bus bandwidth. Make sure slow devices like parallel port zip drives and old IDE controllers aren't holding up the entire system.
Why PCI Retry is a problem (long) (Score:1)
---
(If you are not using a PC with a PCI VGA accelerator card,
you need not read any further....)
WARNING: Long post ahead! updated 11/11/97
In the past this information has been suppressed, now it can be told...
A good number of VGA card manufacturers are squeezing out a few extra
points on their winbench scores by locking up the PCI bus. This is fine
for graphics and most systems on the PC (hard disks and such) don't even
notice the problem.... Unfortunately this can hurt the audio system in
a big way.
Most audio cards use ISA/DMA to trickle samples over the bus one word
at a time. Even PCI cards such as the AMIII can be hurt by this problem
because they trickle the data over the bus in tiny PCI transfers. When
another device illegally locks up the bus for more than 1/88200th of a
second, there's a good chance you will lose audio samples resulting an a
glitch in the recording or playback.
How do you know if you're having this problem? Try opening up your
favorite wave editing program, loading a wave file and hitting the play
button. While the audio is playing, grab the top of the window (assuming
it is not maximized) and repeatedly pick it up and drag it to another
location on the desktop. On a soundblaster compatible card, the audio
will glitch and pop while you drag the window. On a ZA2 card, there is
a 50/50 chance the audio will swap L/R channels after such a glitch.
On an adb card, not only can the right and left channels swap, but there
is also a good chance the audio will be left in a glitchy mode that makes
the audio repeatedly jump channels resulting in a high pitch scratchy noise.
At this point in the discussion, I would like to stress that this is NOT
(I repeat NOT) the fault of the soundcard! This is not even the fault
of the VGA card... it is in fact the fault of the VGA driver. If you do
not experience any glitching or distortion then you can probably ignore
the rest of this post! I've heard that the VGA drivers supplied by
Microsoft (verses the drivers supplied by the VGA manufacturer) do not
suffer from this problem.
I think Matrox was the first to play with this, but it doesn't really
matter because most high performance VGA accelerator cards for the PCI
bus are doing the same thing now. When a number of graphics acceleration
operations need to be performed, these commands are sent from the VGA driver
to the VGA card over the PCI bus. The VGA chipset has a built in queue
that is capable of holding several accelerator commands. Normally the driver
checks a status bit on the VGA card to tell if this queue is full or not.
If the queue is full, the driver waits for the queue to have a free space
before sending the next command. Matrox discovered (and everyone soon
followed) that you could increase VGA performance by NOT CHECKING THIS
STATUS BIT!!!!! What happens when you write blindly to a full queue of
commands on the VGA card? The bus hangs... The bus master has started a
PCI transaction, but the target (the VGA card) can't accept the data yet
because it has no place to put it. As soon as the VGA card has room for the
data, then the transaction can complete... but until that time the PCI bus
is completely locked up. No PCI or ISA transactions can happen. This can
take a long time (40 or more audio cycles) if the current VGA operation is
a huge BITBLT on a 24bit screen... A 256 or 512 bit FIFO just ain't gonna
cut it.
The only acceptable solution to this problem is to put the queue check
BACK into the VGA driver. I have been discussing this problem with some
of the engineers at Matrox and Tseng labs and have some solutions for you!
Tseng labs has released a new version of their ET6000 VGA driver that
behaves nicer to the PCI bus.. this driver is now trickling down to the
STB and Hercules products that use the ET6000 chip. For the Hercules
Dynamite 128 card, there is a new driver on the Hercules BBS (not web
page... don't ask me) called DV95112 (Version 1.12) Using this driver,
you need to add a special switch in your system.ini file. Under the
heading [Hercules] there is a line that reads "Optimization=0" you will
need to set this to "Optimization=1"... ta da, problem fixed.
It turns out that Matrox has ALWAYS had a hidden back door switch to
enable this check in the VGA driver. If you are using the Matrox Millennium,
you will need to add the following lines to your system.ini file:
[mga.drv]
PCIChipset=1
This almost fixes the problem completely.... you will also need to disable
the "Use PowerGDI acceleration" feature in the Advanced Matrox setup
(Control Panel->Display Properties->MGA Settings->Advanced->Performance)
ta da... problem fixed.
[update July 1997] I've heard from the good folks at S3 that _ALL_ S3
drivers for all of their VGA cards (downloaded from www.s3.com) can be
fixed by adding a line in system.ini under the [display] section...
After [display] add the line 'bus-throttle=1' so (for S3 drivers):
[display]
busthrottle=1
[update September 1997] For owners of newer Matrox cards:
Go to screen properties (right click in main window)
Go to setting tab, Click on PowerDesk button
Check 'Use Bus Mastering' (on)
Uncheck 'Use Automatic PCI Bus retries' (off)
On Pentium Pro machines, Uncheck 'Use Write-Combining'
Click on OK
[updated November 1997] For owners of the #9 Imagine 128 series 2
It seems a new driver (version 4.102.36) is now available directly from
the folks at #9 upon request..
Unfortunately there are other VGA maker who have not
acknowledged this problem (not that Matrox or Tseng has formally done so
either). And we as users, software manufacturers or hardware
manufacturers need to get the word out that this is a VGA problem
and not a DMA problem!!!!!! We need to drill it through the heads of
the VGA card makers that they can't get away with this B.S. without at
least having an OPTION to make the driver behave appropriately.
Have you ever been told to turn the VGA acceleration off??? or to reduce
the size of your VGA screen??? or reduce the color depth???
THESE ARE NOT ACCEPTABLE SOLUTIONS!!!
Call your VGA manufacturer and tell them they need to fix the problem!
(You will probably need to get beyond Joe Tech Support, because he
probably doesn't know anything about this... please inform him!)
This message has been brought to you by Greg Hanssen (hanssen@zefiro.com)
copyright 1996 Zefiro Acoustics.
PLEASE feel free to post this to any forum where the knowledge can be used.
try this (Score:1)
I had the same skipping problem and was able to fix it by using the -b option to increase the memory buffer size when using mpg123. I actually found that 4MB or more of buffer was usually necessary for flawless play.
So mark that two votes for increasing the buffer size.
damn pc's (Score:1)
Same on NT4Wkstn and Win98 (Score:1)
C'est la vie (Score:1)
Are you running controlpanel? (Score:1)
Thats a hardware problem... (Score:1)
Nullsoft's reason for Winamp skippage (Score:1)
K6.
on mp3 playback (never tried X11amp, cause mpg123
is more effecient - no X interface to drive). As
posted earlier, even a 128k buffer can kill _most-
skips. Hm. speaking of matrox (offtopic now),
how does one enable X for agp2x mode?
x11amp (Score:1)
I have a similar system. Same video card, but I've got a cyrix 200, and an ess sb compatible. When I ran a 2.0.x kernel, I had absolutely NO skipping whatsoever. Now that I'm using a 2.2+ kernel it skips like crazy. My assumption is a change in sound drivers to these oss ones, but I'm not sure.
in my experience (Score:1)
So, is this a nonissue for people with AGP video cards?
Skippage. (Score:1)
I'm the AC who posted that question (IGNORE OTHER) (Score:1)
Something's wrong. (Score:1)
Choppy MP3s under KDE (Score:1)