You are not logged in.

#1 2009-03-14 00:05:15

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

[Solved] High CPU by alsa?

I was playing with mpg123, an efficient console mp3 player, then I notice the CPU usage varis according to what output option I use in mpg123.

generally alsa uses more CPU, while sdl uses less and esd uses even less. I am just thinking what is the story behind this? What are the differences between them? Which one is best, in term of what?  Do they provide different sound qualities?  if you use a hi-fi audiophile earphone, can you hear the difference?

Can somebody help.
Thanks a lot.

Last edited by yingwuzhao (2009-03-14 03:06:38)

Offline

#2 2009-03-14 03:06:11

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: [Solved] High CPU by alsa?

Here is the reason
http://www.mpg123.de/faq.shtml

Offline

#3 2009-03-14 15:24:45

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] High CPU by alsa?

Well ... the default alsa resampler is a big piece of cr** and still uses more cpu time than oss does with vmix source set to production (in my case at least) which gets a really good sound quality unlike the default alsa resampler.
Since I've changed from alsa to oss I've never had more complaints about cpu usage or sound quality, and OSSv4 being open source now (as far as I know) and BSD also having improved the original OSS I still can't understand why alsa is still the most used sound system now, as a user, even not considering the sound quality I've had more problem with alsa than I ever did with OSS.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2009-03-14 17:21:46

michaelks
Member
Registered: 2009-01-26
Posts: 68

Re: [Solved] High CPU by alsa?

I had to switch back to alsa because i could not get any sound on youtube - can you ?

Offline

#5 2009-03-14 17:47:25

sm4tik
Member
From: Finland, Jyväskylä
Registered: 2006-11-05
Posts: 248
Website

Re: [Solved] High CPU by alsa?

michaelks wrote:

I had to switch back to alsa because i could not get any sound on youtube - can you ?

Seems to be hw specific. Maybe someone with the same hardware can give you some advice? There's been a few too many alsa vs oss(4) discussions around which eventually have led nowhere but the bin, so
1) wait..
2) wait.....
3) in the meanwhile use what Works for you..

..just my 1/2 a cent

and the other 1/2 would go for flash ..portable.. .. ..I wish...

Offline

#6 2009-03-14 19:58:36

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [Solved] High CPU by alsa?

Most probably you are missing libflashsupport-oss to have sound on youtube with OSS.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2009-03-14 20:00:19

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] High CPU by alsa?

R00KIE wrote:

Most probably you are missing libflashsupport-oss to have sound on youtube with OSS.

It's just libflashsupport now.

Offline

#8 2009-03-14 22:10:13

michaelks
Member
Registered: 2009-01-26
Posts: 68

Re: [Solved] High CPU by alsa?

Worked, and the sound is hugely better than with alsa. Thanks guys !

Offline

#9 2009-03-14 23:29:50

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: [Solved] High CPU by alsa?

Read pacman's notices and the Wiki next time tongue
Glad you got it worked out.

Offline

#10 2009-03-15 02:41:04

michaelks
Member
Registered: 2009-01-26
Posts: 68

Re: [Solved] High CPU by alsa?

Ranguvar, not everyone has much time on their hands to pore through documentation and to be on the cutting edge of the available info - so if a guy needs a quick answer, well maybe he has a sick child at home needing attention, maybe he's spending the half hour of free time he has per day trying to learn something, so just give it to him if you can. If you think it's too elementary, then just ignore it, but please please no lectures, ok ? And besides, it's the simple questions that are the most useful to the silent many who know very little and feel too intimidated to ask.

Offline

#11 2009-03-15 04:16:26

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: [Solved] High CPU by alsa?

Hey, I wasn't trying to be offensive. One, pacman says when you install OSS that you may want libflashsupport (and learning to listen carefully to pacman is essential if you want your Arch to stay problem-free), and two, if we want to keep progressing as a distro, the sources of information that are passive need to be pushed. I'm not asking anyone to "pore through documentation", the OSS article is airy tongue
Again, I definitely did not mean any offense, and apologies that I did apparently come off that way.

Last edited by Ranguvar (2009-03-15 04:17:33)

Offline

#12 2009-03-15 16:40:37

michaelks
Member
Registered: 2009-01-26
Posts: 68

Re: [Solved] High CPU by alsa?

No offense taken at all, maybe i just over-reacted to what i see only too often, people who know an answer but instead will try to make the asker uncomfortable for not having increased his carbon footprint through hours of googling. Granted, no one should ask before trying to find the needed info, but then again, few people will wait for a forum answer if they are able to solve their problem, it's usually a last resort even if it doesn't seem so. And, let's not forget, so much of this is nothing more than a bag of blind tips and tricks, and expendable at that, witness the change  libflashsupport-oss -> libflashsupport. Had i followed pacman's message, i would probably have given up again.

Offline

#13 2009-03-15 17:05:17

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] High CPU by alsa?

Actually michaelks, we have a few thousand users here that make no effort what-so-ever to solve their own problems. I'm in no way accusing anyone in the this thread of not trying, but it's a constant uphill effort to get people as self sufficient as possible. I fully agree that when one is up 'against the wall' that they may come in and ask for help. I do it when time is a real issue, but I always qualify these threads by letting people know why I'm asking questions that I could solve if I wasn't in rush.

Offline

#14 2009-03-15 17:17:00

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: [Solved] High CPU by alsa?

Hey, guys.
Thanks for the reply, I have just installed oss and mpg123-oss from AUR.
Now almost everything is working better than alsa, at least the CPU usage is much lower, a good surprise!

Now I have one question, alsa-lib seems to be installed as a dependency by other package, and is it possible that I use oss as the default from the beginning when I do the fresh install of Arch?  instead of after installing alsa then blacklist it as the Wiki said.

The packages that depend on alsa-lib, how do we make them depend on oss instead? like the following:

Required By    : esound  kdemod3-arts  libsndfile  lirc-utils

big_smile

Offline

#15 2009-03-15 17:36:19

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] High CPU by alsa?

alsa-lib is pretty much tied into Arch because, for compatibility reasons, it's the default sound server. It's not doing anything installed on your system if you're using OSS, so unless it because totally annoying to you having some unused files laying around, I wouldn't worry about.

Offline

#16 2009-03-15 17:50:03

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: [Solved] High CPU by alsa?

Thanks Skottish!

Then I won't worry about it,  and just blacklist it!
big_smile:D

Offline

#17 2009-03-15 18:03:56

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] High CPU by alsa?

yingwuzhao wrote:

Thanks Skottish!

Then I won't worry about it,  and just blacklist it!
big_smile:D

You're welcome. You don't even need to blacklist it; just don't have it in the DAEMONS array in rc.conf. It will happily just sit on your hard drive not doing anything.

Offline

#18 2009-03-15 18:50:31

michaelks
Member
Registered: 2009-01-26
Posts: 68

Re: [Solved] High CPU by alsa?

Skottish, i don't think anyone can survive long in LinuxLand if not by trying to become self-sufficient. I find it hard to imagine any user relying only on posted questions to get by, he would never have got past the install.
   There is however a body of ad hoc information such as
" put   'AllowGLXWithComposite'
in your xorg.conf if you want compiz to work"
or
"remove /tmp/.vbox-user-ipc if you get a weird message from VirtualBox"
that we all have booklets full of, that are hardly worth the time spent trying to find , because most users (me included) will use them blindly without attempting to find out what they mean, since that would be too difficult.
   An entirely different matter is  knowing what to put in my hosts.deny so i can access my network, or how to use uuid s to identify my partitions, that's useful and empowering  knowledge, and here i think it's right to RTFM if it's a spoonfeeding situation, but again, you never know what's the situation at the other end of the line, so i'd be open by default.

Offline

#19 2009-03-15 20:21:10

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [Solved] High CPU by alsa?

@michaelks
I aggree with you. But I would definitely prefer both (having been a documenter myself for a long time),
a) present an immediate, easy to follow solution if ever possible,
b) and point to more extensive documentation so that the solution will be understood afterwards at least.

Last edited by bernarcher (2009-03-15 20:21:44)


To know or not to know ...
... the questions remain forever.

Offline

#20 2009-03-15 21:15:16

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved] High CPU by alsa?

Since yingwuzhao's problem is solved, this thread is complete. The other discussion is off topic, as well has been covered many, many times in the forums.

Offline

Board footer

Powered by FluxBB