[linux-audio-dev] [Fwd: Re: Jiffy question and sound.]

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] [Fwd: Re: Jiffy question and sound.]
From: watermodem (aquamodem_AT_ameritech.net)
Date: Tue Mar 20 2001 - 07:38:59 EET


Any ideas?

  Running Mandrake with ALSA sound drivers and 2.4.2 with low latency
patches. KDE, music player is KDE-Media player but XMMS has the same
problem.

.......................................................
bogomips : 1333.65 Celeron (Coppermine) 668.207
PCI:
 Bus 0, device 9, function 0:
    Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 2).
      IRQ 5.
      Master Capable. Latency=64. Min Gnt=12.Max Lat=128.
      I/O at 0xe800 [0xe83f].

   Bus 0, device 1, function 0:
    PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo
MVP3/Pro133x AGP] (rev 0).
      Master Capable. No bursts. Min Gnt=4.
I/O Ports
  e800-e83f : Ensoniq 5880 AudioPCI
  e800-e83f : Ensoniq AudioPCI

                 cat mtrr
reg00: base=0x00000000 ( 0MB), size= 256MB: write-back, count=1
reg01: base=0xd8000000 (3456MB), size= 64MB: write-combining, count=1
reg02: base=0xdc000000 (3520MB), size= 4MB: write-combining, count=1

       cat meminfo
        total: used: free: shared: buffers: cached:
Mem: 261976064 259833856 2142208 0 10911744 139137024
Swap: 1052794880 0 1052794880
MemTotal: 255836 kB
MemFree: 2092 kB
MemShared: 0 kB
Buffers: 10656 kB
Cached: 135876 kB
Active: 25296 kB
Inact_dirty: 107824 kB
Inact_clean: 13412 kB
Inact_target: 252 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 255836 kB
LowFree: 2092 kB
SwapTotal: 1028120 kB
SwapFree: 1028120 kB

 cat stat
cpu 68553 0 30001 898708
cpu0 68553 0 30001 898708
page 177592 37877
swap 1 0
intr 1737336 997262 9734 0 4 4 129660 3 2 0 0 137971 0 427567 0 20123
15006 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
0 0 0 0 0 0
disk_io: (3,0):(20367,9216,221474,11151,298200)
ctxt 5196896
btime 985056605
processes 3047
                      
 cat modules
usb-uhci 21808 0 (unused)
usbcore 46736 1 [usb-uhci]
ne 6608 1 (autoclean)
8390 6128 0 (autoclean) [ne]
snd-pcm-oss 18832 0
snd-pcm-plugin 14864 0 [snd-pcm-oss]
snd-mixer-oss 5152 0 [snd-pcm-oss]
snd-card-ens1371 2336 0
snd-ens1371 9904 0 [snd-card-ens1371]
snd-pcm 32064 0 [snd-pcm-oss snd-pcm-plugin
snd-ens1371]
snd-timer 8640 0 [snd-pcm]
snd-rawmidi 10208 0 [snd-ens1371]
snd-seq-device 3840 0 [snd-rawmidi]
snd-ac97-codec 24352 0 [snd-ens1371]
snd-mixer 24176 0 [snd-mixer-oss snd-ens1371
snd-ac97-codec]
snd 37008 1 [snd-pcm-oss snd-pcm-plugin
snd-mixer-oss snd-card-ens1371 snd-ens1371 snd-pcm snd-timer snd-rawmidi
snd-seq-device snd-ac97-codec snd-mixer]
soundcore 3952 5 [snd]
nls_iso8859-1 2832 3 (autoclean)
nls_cp437 4352 3 (autoclean)
vfat 10416 3 (autoclean)
fat 30496 0 (autoclean) [vfat]
..........................................................

-------- Original Message --------
Subject: Re: Jiffy question and sound.
Date: Mon, 19 Mar 2001 22:53:22 -0600
From: watermodem <aquamodem_AT_ameritech.net>
To: Matti Aarnio
<matti.aarnio_AT_zmailer.org>,"linux-kernel_AT_vger.kernel.org"
<linux-kernel_AT_vger.kernel.org>
References: <3AB5A53F.F8B0373B@ameritech.net>
<20010319114615.E23336_AT_mea-ext.zmailer.org>
<3AB6DAFB.1E8F14DB_AT_ameritech.net>

watermodem wrote:
>
> Matti Aarnio wrote:
> >
> > On Mon, Mar 19, 2001 at 12:20:47AM -0600, watermodem wrote:
> > > With the 2.4.0 kernel the loops_per_sec field was replaced (for i386)
> > > with current_cpu_data.loops_per_jiffy.
> > ...
> > > #define LOOPS_PER_SEC current_cpu_data.loops_per_jiffy * 100
> >
> > The intention was to accomodate systems with faster than 2 GHz clock
> > at which the LOOPS_PER_SEC counter spins around a bit too fast..
> > ('signed long' at i386 handles 0..2G just fine, then it thinks the sign
> > got inverted.. 'unsigned long' works fine until 4 GHz processors.)
> >
>
> My sound card uses ALSA and ALSA wasn't available yet for
> the new kernel. So.. Noting that LOOPS_PER_SEC was what
> failed in the kernel I modified it and compiled. I am
> not associated in anyway with the ALSA folks just wanted
> too listen to music while working away. I have no idea
> why it needs it or if it is busy-looping... (I hope not).

I noticed that if I kill the "artsd" daemon and then
let it naturally restart when starting another music player
the problem goes away for awhile. When artsd starts using
more than 1.7% of the CPU then the problem occurs. So I think
I was looking at the wrong code. Perhaps the problem is with
the daemon.

>
> > Why does the ALSA need LOOPS_PER_SEC ?
> > Is it doing timing by busy-looping ?
> >
> > > Now compiling the same ALSA modules with 2.4.2 this problem happens
> > > much quicker and you don't need any other activity. In fact it is hard
> > > to play more than half a song. (MP3)
> > > It doesn't matter if what set of music players or tools I use the
> > > problem is quite visible.
> > >
> > > When I boot back to the original 2.2.x kernel everything is perfect.
> > >
> > > So I guess I have a few questions here.
> > > 1) Is a jiffy 100th of a second or is it smaller (so my loop count
> > > is starving things.) (10ms) ?
> >
> > "HZ" is the answer. E.g. Alpha has HZ=1024, while i386 has HZ=100
> > Nearly all architectures have different values based on what some
> > other UNIX uses at given system.
> >
> > > 2) Why is it so much worse in 2.4.2 than 2.4.0?
> > > 3) Any other "gotch's" that are important to watch for when moving
> > > 2.2.x drivers to 2.4.x?
> >
> > The FAQ may have some pointers to "porting drivers to 2.4" documents.
> >
> > > Thanks....
> > > Watermodem
> > > -
> > > Please read the FAQ at http://www.tux.org/lkml/
> >
> > /Matti Aarnio
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo_AT_vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sat Apr 07 2001 - 15:25:53 EEST