2002-03-20 04:07:47

by Zenaan Harkness

[permalink] [raw]
Subject: Re: Playback stutters

I am getting the same with stock 2.4.18, DELL Inspiron laptop (Maestro
3i), my test is:

copy a cd image file from one partition to another, while trying to play
an mp3 using mpg123.

The mp3 skips all over the place.

I haven't applied any alsa patches yet - just been trying to set up this
laptop since I got it at work a week ago. At first I thought it was the
loop driver - I'd been loopback mounting my cd image, but that's not the
case.

I've tried:
- low latency patch against 2.4.18
- preempt + lockbreak patches against 2.4.18
- preempt patch against 2.4.19-pre3-ac3 (lockbreak doesn't apply)

all have same problem. Since I've only recently tried setting up this
laptop, I don't know whether or not an earlier kernel works or not. Does
anyone know the earliest kernel that works for them without skipping, when
copying a large file, etc?

thanks
zen


---
I am also having this problem with both my ensoniq es1371 and my
audiophile 2496 with kernel 2.4.18 and alsa 0.9beta12. It seems
to be way worse in mplayer and also when playing tribes2 where it
just constanly shutters. I have an es1371 at work where I installed
the same version of alsa but there it's working fine with the game,
the difference is that I'm running kernel 2.4.8 so I'm wondering if
something broke in kernel 2.4.18 that causes this?

I would really like to be able to get this running stable at home.
My machine config at work and home is almost identical in both
hardware and software except for the kernel version.

Each soundcard have their own IRQ so I'm pretty sure the hardware
I have at home is ok. With OSS/free and OSS/commercial the sound is fine
so it's something between alsa and kernel 2.4.18.

When I was listening to music in xmms, if I move windows around or
just click buttons in netcape for example it seems to shutters everytime
I do that.

Anybody else seeing this?

> Hey,
>
> audio playback stutters on my system. All playback programms I have tested
> have this problem (with and without artsd). I use alsa driver 0.9.0beta12.
> The soundcard is a no-name ALS4000 soundcard. My system: Linux 2.4.18,
> Debian testing, Dual Athlon, Tyan S2460. I have read that often IRQ
> problems cause those kind of problems, but I already tried to disable as
> much as possible hardware to free up interrups. I also changed the order of
> the PCI cards and I tried it with and without MP Interrupts.
> The playback stutters if e.g. I drag around windows or a programm starts
> (even if the load is very low). It doesn't stutter if I do heavy
> calcualtion (like running kfract multiple times) and the load is above 4.
> What else should I try to narrow down the problem?
>
> regards,
> Roland Schulz



2002-03-20 04:10:08

by Zenaan Harkness

[permalink] [raw]
Subject: Re: Playback stutters

Please CC me:

[email protected]

ta
zen


On Wed, Mar 20, 2002 at 03:05:03PM +1100, Zenaan Harkness wrote:
> I am getting the same with stock 2.4.18, DELL Inspiron laptop (Maestro
> 3i), my test is:

2002-03-20 04:14:06

by Paul Davis

[permalink] [raw]
Subject: Re: [Alsa-devel] Re: Playback stutters

>I am getting the same with stock 2.4.18, DELL Inspiron laptop (Maestro
>3i), my test is:
>
>copy a cd image file from one partition to another, while trying to play
>an mp3 using mpg123.
>
>The mp3 skips all over the place.

since you almost certainly have IDE drivers, have you configured them
correctly using hdparm? these are source of considerable scheduling
latency, in ways that AFAIK are not improved by any of the "latency
reducing" patches available. don't ask me how to configure them - i
only use SCSI drives - but a quick google search should reveal
relevant advice.

--p

2002-03-20 05:32:40

by Zenaan Harkness

[permalink] [raw]
Subject: Re: [Alsa-devel] Re: Playback stutters

On Tue, Mar 19, 2002 at 11:15:12PM -0500, Paul Davis wrote:
> >I am getting the same with stock 2.4.18, DELL Inspiron laptop (Maestro
> >3i), my test is:
> >
> >copy a cd image file from one partition to another, while trying to play
> >an mp3 using mpg123.
> >
> >The mp3 skips all over the place.
>
> since you almost certainly have IDE drivers, have you configured them
> correctly using hdparm? these are source of considerable scheduling
> latency, in ways that AFAIK are not improved by any of the "latency
> reducing" patches available. don't ask me how to configure them - i
> only use SCSI drives - but a quick google search should reveal
> relevant advice.

thanks

hdparm improves the situation, but I still get some (minimal) skips now:

zen8100a:~# hdparm /dev/hda

/dev/hda:
multcount = 16 (on)
I/O support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 7296/255/63, sectors = 117210240, start = 0
busstate = 1 (on)


My current 'test':
- playing an mp3
- running make clean && make bzImage
- copying a cd image between two partitions
- loading up the odd application (eg. mozilla)

With hdparm settings I've tried:
- 2.4.18 + preempt + lockbreak
- 2.4.18 + lowlatency
- 2.4.19-pre3-ac3 + preempt

These seem to all give the same minimal skips with above activities.

No skips with only the kernel compile (not doing the large copy).

ta
zen

2002-03-20 05:49:15

by Zenaan Harkness

[permalink] [raw]
Subject: Re: [Alsa-devel] Re: Playback stutters - Correction

On Wed, Mar 20, 2002 at 04:32:15PM +1100, Zenaan Harkness wrote:
> On Tue, Mar 19, 2002 at 11:15:12PM -0500, Paul Davis wrote:
> > >I am getting the same with stock 2.4.18, DELL Inspiron laptop (Maestro
> > >3i), my test is:
> > >
> > >copy a cd image file from one partition to another, while trying to play
> > >an mp3 using mpg123.
> > >
> > >The mp3 skips all over the place.
> >
> > since you almost certainly have IDE drivers, have you configured them
> > correctly using hdparm? these are source of considerable scheduling
> > latency, in ways that AFAIK are not improved by any of the "latency
> > reducing" patches available. don't ask me how to configure them - i
> > only use SCSI drives - but a quick google search should reveal
> > relevant advice.
>
> thanks
>
> hdparm improves the situation, but I still get some (minimal) skips now:
>
> zen8100a:~# hdparm /dev/hda
>
> /dev/hda:
> multcount = 16 (on)
> I/O support = 1 (32-bit)
> unmaskirq = 1 (on)
> using_dma = 1 (on)
> keepsettings = 0 (off)
> nowerr = 0 (off)
> readonly = 0 (off)
> readahead = 8 (on)
> geometry = 7296/255/63, sectors = 117210240, start = 0
> busstate = 1 (on)
>
>
> My current 'test':
> - playing an mp3
> - running make clean && make bzImage
> - copying a cd image between two partitions
> - loading up the odd application (eg. mozilla)
>
> With hdparm settings I've tried:
> - 2.4.18 + preempt + lockbreak
> - 2.4.18 + lowlatency
> - 2.4.19-pre3-ac3 + preempt
>
> These seem to all give the same minimal skips with above activities.
>
> No skips with only the kernel compile (not doing the large copy).

CORRECTION:
Just retested with full hdparm (added -u setting) settings on
2.4.19-pre3-ac+preempt, and no skipping with above activities. This
seems pretty good.

I could generate skips when switching from X to text console. Could not
generate skip when cycling virtual desktops within X (at high key repeat
rate). Again this seems pretty good.

thanks
zen

2002-03-20 13:07:27

by Paul Davis

[permalink] [raw]
Subject: Re: [Alsa-devel] Re: Playback stutters - Correction

>CORRECTION:
>Just retested with full hdparm (added -u setting) settings on
>2.4.19-pre3-ac+preempt, and no skipping with above activities. This
>seems pretty good.
>
>I could generate skips when switching from X to text console. Could not
>generate skip when cycling virtual desktops within X (at high key repeat
>rate). Again this seems pretty good.

this is a know deficiency in the vt "driver", and is noted in Andrew
Morton's "Things Not To Do" while requiring low scheduling latency. it
would be nice if the vt code was fixed sometime, but right now, i
think it can cause a scheduling delay for up to about 50ms.

btw, i think it is still the case the Andrew's patch provides more
reliable and lower absolute latency than the preemption patch.

--p

2002-03-20 23:18:41

by Zenaan Harkness

[permalink] [raw]
Subject: Re: [Alsa-devel] Re: Playback stutters - Correction

On Wed, Mar 20, 2002 at 03:06:56AM -0500, Paul Davis wrote:
> >CORRECTION:
> >Just retested with full hdparm (added -u setting) settings on
> >2.4.19-pre3-ac+preempt, and no skipping with above activities. This
> >seems pretty good.
> >
> >I could generate skips when switching from X to text console. Could not
> >generate skip when cycling virtual desktops within X (at high key repeat
> >rate). Again this seems pretty good.
>
> this is a know deficiency in the vt "driver", and is noted in Andrew
> Morton's "Things Not To Do" while requiring low scheduling latency. it
> would be nice if the vt code was fixed sometime, but right now, i
> think it can cause a scheduling delay for up to about 50ms.
>
> btw, i think it is still the case the Andrew's patch provides more
> reliable and lower absolute latency than the preemption patch.

It might do, but I couldn't compile it against 2.4.19-pre3-ac3, and with
the three hdparm parameters, I was still generating skips on 2.4.18+akm
with just file copying.

When 2.4.19 proper is out I'll do the rounds again when the patches
are available (and, in time, figure out how to use a proper latency
measuring tool - so my test reports might become useful to someone other than
myself).

Lock-break patch also didn't apply to 2419pre3ac3 either. Anyway, I can
play mp3s which is a starting point for me. Next I need to get a
hammerfall 9652 card working in a desktop so my band can start digital
recording.

I had read akm's 'things not to do' but for some reason missed the
hdparm stuff.

In summary, what is currently working for me: on a new DELL
Inspiron 8100 laptop, Maestro 3i sound, 1GHz Pentium ('Pentium III' I
assume), 60G HDD, Radeon Mobility 7500 64MB, DRI and framebuffer compiled into
kernel:

Linux 2.4.19-pre3-ac3 + preemptible kernel patch

hdparm -c 1 -d 1 -u 1 /dev/hda

Thanks for everything,
zen