Re: Audio skips when RAM is ~full

From: Anthony DiSante (orders_at_nodivisions.com)
Date: 11/01/03

  • Next message: dave willis: "Re: hacking the keyboard"
    Date:	Sat, 01 Nov 2003 07:48:25 -0500
    To: linux-kernel@vger.kernel.org
    
    

    Willy Tarreau wrote:
    >>Actually, I don't scan the disk to find random albums; I have a text file
    >>that contains a list of every album's full path, and I pick a random line
    >>from that file. So only the selected album's directory gets scanned. And
    >>the mp3 partition is mounted read-only (I should have mentioned that
    >>before), so the atimes shouldn't be getting written as it is.
    >
    >
    > OK, so it's not a disk IO problem at all. It's really related to the sound
    > driver it seems. Now that you say it, I remember having noticed skips on
    > my laptop with a via 82cxxx chip after tens of minutes playing. At first
    > I thought it was related to other activity on the system, but it did exactly
    > what you describe, play seconds 1, 2, then 5 without a hole between them.
    > There may be a problem with the way the audio buffer gets allocated or freed.

    Yeah... in my experience, the whole ac'97 deal is pretty buggy (for one
    thing, with both ALSA and OSS drivers, output is distorted unless I keep the
    volume below ~70%...). But as I said, the skipping only happens when the
    memory is full, or getting close to full. If I select specific albums to
    play instead of using my random function, I can usually play a few albums
    and there aren't any skips, not until the memory gets pretty full.

    >>So I'm guessing that there isn't actually a way to manually move
    >>buffer-data out of RAM?
    >
    >
    > Yes, there is. I have a quick'n'dirty program which does exactly that.
    > Basically, you tell it how many kB you want to free, then it allocates
    > and uses that amount of memory, frees it and exits. Buffered data gets
    > flushed very quickly. I sometimes give it a try before starting to work
    > on large kernel trees, because it helps the entire directories to fit in
    > cache.
    >
    > Here it is if you're interested. Don't start it without an argument, it
    > will try to allocate 4G !

    4G!! (Note to self: s/ffffffff/0000ffff/...) Thanks a lot, I'll give this a
    try. It certainly works here on my home system.

    -Anthony
    http://nodivisions.com/
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: dave willis: "Re: hacking the keyboard"

    Relevant Pages

    • Re: 2.4.23aa2 (bugfixes and important VM improvements for the high end)
      ... > triggering the zone-normal shortage in 32G, ... Also bear in mind that as memory gets tight, ... Without shared pagetables, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: log-buf-len dynamic
      ... Wake up, dude. ... disk and memory. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: swsusp update: supports discontingmem/highmem
      ... driver is responsible for the memory should handle any required state ... Can't you back out nicely if you don't have enough memory for the image? ... Nigel Cunningham ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Audio skips when RAM is ~full
      ... >>The kernel is buffering the contents of each directory that it ... and that the kernel will reclaim memory utilized by ... I don't scan the disk to find random albums; ...
      (Linux-Kernel)
    • Re: Request: I/O request recording
      ... > next reboot. ... > that everything which you will need in the subsequent boot is already in ... > pretty much a waste of time, gaining only 10% or so, from memory. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)