Linux Sound subsystem development
 help / color / mirror / Atom feed
* playing MP3 vs CPU usage
@ 1999-08-27 16:31 Yau Chan
  1999-08-27 18:06 ` Benno Senoner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yau Chan @ 1999-08-27 16:31 UTC (permalink / raw)
  To: linux-sound

Hi.  I'm a beginner in Linux.
I just set up my new sound card and it plays very good when
I'm plaything something alone.  But when I'm playing a song
in a terminal, and tryig to do something else.  like switching
to another terminal on the Desktop, the song will stall for
a very very short bit.  i tried to keep track of the CPU
usage.  when it's playing the song alone, it's using about
20%.  But whenever i try to do something else, it just jump
to full for a short instance.  I wonder if there is any way
that I can modify it so that it will be more smooth when i'm
playing song and do other things.  Thanks.

I'm using a very slow computer, which is a Pentium 133.
But I don't have such problem in windows95 and windows NT.
So, I guess linux should do better.  Thank you very much.

Ben.
(ychan@cs.wisc.edu)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: playing MP3 vs CPU usage
  1999-08-27 16:31 playing MP3 vs CPU usage Yau Chan
@ 1999-08-27 18:06 ` Benno Senoner
  1999-08-28  5:16 ` Yau Chan
  1999-08-28  8:52 ` Benno Senoner
  2 siblings, 0 replies; 4+ messages in thread
From: Benno Senoner @ 1999-08-27 18:06 UTC (permalink / raw)
  To: linux-sound

On Fri, 27 Aug 1999, Yau Chan wrote:
> Hi.  I'm a beginner in Linux.
> I just set up my new sound card and it plays very good when
> I'm plaything something alone.  But when I'm playing a song
> in a terminal, and tryig to do something else.  like switching
> to another terminal on the Desktop, the song will stall for
> a very very short bit.  i tried to keep track of the CPU
> usage.  when it's playing the song alone, it's using about
> 20%.  But whenever i try to do something else, it just jump
> to full for a short instance.  I wonder if there is any way
> that I can modify it so that it will be more smooth when i'm
> playing song and do other things.  Thanks.
> 
> I'm using a very slow computer, which is a Pentium 133.
> But I don't have such problem in windows95 and windows NT.
> So, I guess linux should do better.  Thank you very much.
> 

Linux actually has some problems in this area, especially on slow computers.
The trick is to increase audio buffers of your mp3 player (what player are you
using ?),
plus tuning your EIDE disk with
hdparm -d 1 -u 1 -m 8 -c 1  /dev/hda
because when there are disk accesses, the kernel stalls sometimes, especially
when you run non-DMAed disks
most distros don't tune your disk properly.

Perhaps if your player supports realtime-scheduling , your could try to run it
as root to see if things get better.

The P133 is easily capable of playing an MP3 , the problem is mainly buffering
and process scheduling. ( already solved in some unofficial patches,
let's see if they can get into the mainstream kernel :-) )

regards,
Benno.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: playing MP3 vs CPU usage
  1999-08-27 16:31 playing MP3 vs CPU usage Yau Chan
  1999-08-27 18:06 ` Benno Senoner
@ 1999-08-28  5:16 ` Yau Chan
  1999-08-28  8:52 ` Benno Senoner
  2 siblings, 0 replies; 4+ messages in thread
From: Yau Chan @ 1999-08-28  5:16 UTC (permalink / raw)
  To: linux-sound




On Fri, 27 Aug 1999, Benno Senoner wrote:
> 
> Linux actually has some problems in this area, especially on slow computers.
> The trick is to increase audio buffers of your mp3 player (what player are you
> using ?),

I'm using mpg123 to play it.
How can I increase the audio buffer of it?

> plus tuning your EIDE disk with
> hdparm -d 1 -u 1 -m 8 -c 1  /dev/hda
> because when there are disk accesses, the kernel stalls sometimes, especially
> when you run non-DMAed disks
> most distros don't tune your disk properly.

what does that command do?  I'm use an EIDE non-DMAed harddisk.
does that line of command tune all kind of disks?
Does the size of disk matter?


So many questions. =P  Thanks for helping me.


Ben.
(ychan@cs.wisc.edu)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: playing MP3 vs CPU usage
  1999-08-27 16:31 playing MP3 vs CPU usage Yau Chan
  1999-08-27 18:06 ` Benno Senoner
  1999-08-28  5:16 ` Yau Chan
@ 1999-08-28  8:52 ` Benno Senoner
  2 siblings, 0 replies; 4+ messages in thread
From: Benno Senoner @ 1999-08-28  8:52 UTC (permalink / raw)
  To: linux-sound

> 
> 
> 
> 
> On Fri, 27 Aug 1999, Benno Senoner wrote:
> > 
> > Linux actually has some problems in this area, especially on slow computers.
> > The trick is to increase audio buffers of your mp3 player (what player are you
> > using ?),
> 
> I'm using mpg123 to play it.
> How can I increase the audio buffer of it?

mpg123 -b 1000 mp3file

should help

( In 1-2 days I will post the URL to mingo's patch ( for kernel 2.2.10) ),
this will help even on the crappiest hardware.

> 
> > plus tuning your EIDE disk with
> > hdparm -d 1 -u 1 -m 8 -c 1  /dev/hda
> > because when there are disk accesses, the kernel stalls sometimes, especially
> > when you run non-DMAed disks
> > most distros don't tune your disk properly.
> 
> what does that command do?  I'm use an EIDE non-DMAed harddisk.
> does that line of command tune all kind of disks?
> Does the size of disk matter?

this command turns on all useful EIDE options, like
-d 1 = DMA on
-u 1 = unmask irqs during disk writes
-c 1 = enable 32 bit access
-m 8 = enable multicount disk transfers

even if DMA is not supported the other options are still useful,
just give the commandline as is, unsupported options will be ignored
by hdparm (ie turning on DMA on a non DMAed disk)

Disk size does not matter.

> 
> 
> So many questions. =P  Thanks for helping me.

No prob.
:-)

regards,
Benno.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-08-28  8:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-27 16:31 playing MP3 vs CPU usage Yau Chan
1999-08-27 18:06 ` Benno Senoner
1999-08-28  5:16 ` Yau Chan
1999-08-28  8:52 ` Benno Senoner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox