You are not logged in.

#1 2005-07-03 11:20:45

Stonebone
Member
From: Göteborg, Sweden
Registered: 2005-07-03
Posts: 11
Website

Alsa problems

Sometime earlier this year with an Alsa upgrade the sound started working very well on my computer. I could play sound in several apps at the same time.

I've been away for a month and now when I came back I did an upgrade and problems started to appear again. As soon as there is some load on the cpu, like loading a page in Firefox, XMMS stops. I've had this problem before and unticking "mmap mode" in the Alsa plugin solves it partially. The sound only skips instead of stopping which ofcourse is much better but still very annoying.

I don't remember what sound card I have though. It's something integrated on the motherboard. Perhaps this help:

% lsmod | grep snd_
snd_intel8x0           34624  7
snd_ac97_codec         79352  1 snd_intel8x0
snd_pcm_oss            56224  0
snd_mixer_oss          21120  2 snd_pcm_oss
snd_pcm                98564  4 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              27268  2 snd_pcm
snd                    59492  16 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
snd_page_alloc         10244  2 snd_intel8x0,snd_pcm

Any ideas?

Offline

#2 2005-07-03 11:24:40

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: Alsa problems

does running esd as a daemon help?

Offline

#3 2005-07-03 12:13:52

Stonebone
Member
From: Göteborg, Sweden
Registered: 2005-07-03
Posts: 11
Website

Re: Alsa problems

No sure what you mean. If I start ESD and use the corresponding plugin in XMMS I get the same problems. It also blocks other (non-esd) applications from using the soundcard since I need dmix in Alsa and ESD seems to use OSS (I don't use any Alsa config files, only default settings).

Offline

#4 2005-07-03 12:36:09

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Alsa problems

afaik ESD uses libao, which can be in turn configured to use alsa with this line in /etc/libao.conf,

[code]default_driver=alsa09
[/code

Offline

#5 2005-07-03 13:06:27

pholie
Member
Registered: 2005-06-04
Posts: 234

Re: Alsa problems

From time to time XMMS (but beep-media-player too) stops playing here too when set sound output to ALSA. I'm mainly working in KDE. I didn't find the reason of it but it may be high CPU usage as Stonebone says.

Offline

#6 2005-07-03 13:10:57

pholie
Member
Registered: 2005-06-04
Posts: 234

Re: Alsa problems

I find all the linux soundsystem too complicated. There are so many different sounsystems like ALSA, OSS, arts esd... and they don't like each other. And not every app can use every of these. Something should be done with it.  :?

Offline

#7 2005-07-03 13:29:34

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Alsa problems

pholie: let me clear it up.

There are two primary drivers.

OSS which is old, and now deprecated
Alsa, the new linux sound architecture.

To use sound, you must have either of these loaded.

The rest of these things are software based mixers. esd, arts, are both software based mixers and allow you to use multiple sounds on your soundcard at once, if your hardware does not support it. Their weakness is that they require each piece of software to use the correct driver to access them.

The alsa project has been working on dmix, which is part of the drivers, and does software mixing for those cards that dont support it. As of 1.0.9, dmix is transparent, and enabled by default, and works with all Alsa based programs.

OSS programs may have problems with dmixer and any other software mixing, the problem with OSS based programs, is that they expect to 'own' the soundcard when they are using it, and when alsa doesnt let them do this, they dont like it and dont play sound. Nearly all major programs now support alsa, the primary programs that still use OSS are games.

what's being done about it?

Well the ALSA project have implemented dmix, so this stops all these clones of arts and esd popping up and creates a standard way of having more than one program using sound at once.

In turn, all new programs, are using ALSA, so in time, when all programs use alsa, and ALSA's dmix is even more improved, you wont have anything to worry about, OSS, esd, arts will all be a thing of the past.

iphitus

Offline

#8 2005-07-03 13:43:53

pholie
Member
Registered: 2005-06-04
Posts: 234

Re: Alsa problems

iphitus:thanks for the explanation  smile

but another question: when i'm using KDE it automatically uses arts, but I can change it to use ALSA. What's better for me? When alsa, I would have to configure to dmix somehow... Is it ok that my soundcard can hardware mix sounds and dmix will do it too?

And as I said, programs that use ALSA, sometimes stops playing, I have to rerun them. Any solution?

Offline

#9 2005-07-04 08:41:50

Eugenia
Member
From: Bay Area, CA, USA
Registered: 2005-03-08
Posts: 74
Website

Re: Alsa problems

The problem you are describing has hit me as well. It happened after the ALSA 1.0.9 upgrade. It seems that the 1.0.9 driver for our sound card AC97 from Intel is somewhat broken and there is nothing we can do but await a fix in the coming months.

A few days ago I filed a bug report for this, glad to see that I am not the only one: http://bugs.archlinux.org/index.php?do= … a=comments

Offline

#10 2005-07-04 10:09:54

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Alsa problems

Eugenia: try a proper  /etc/asound.conf, I find i have issues with programs 'stopping' playing music, mainly mpd, which has on occasion stopped mid song and gone onto the next. This happens substantially more when I dont have my asound.conf in place.

So try putting an /etc/asound.conf in place and see if it fixes it.

#/etc/asound.conf start: 
pcm.!default {
  type plug
  slave.pcm "dmixer"
  }
pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
  }
pcm.dmixer {
  type dmix
  ipc_key 1024
 slave {
  pcm "hw:0,0"
  period_time 0
  period_size 1024
 buffer_size 8192
  rate 44100
  }
 bindings {
  0 0
  1 1
  }
  }

ctl.dmixer {
  type hw
  card 0
  } 
#end.

If it doesnt...... google, check kernel mailing list, check alsa mailing list. Try other programs.

Your bug report is quite....... generic. Add detail. Try other mp3 players, xmms is old and dated anyway, try beep-media-player, mpd or rhythmbox or %{insert player here}

Get outputs of these:

vmstat 1 > vmstat.log
top -b > top.log

while it's happening and make sure it's not any errant processes running rampant causing the problem.

It could well be a bug in XMMS, not ALSA. Try going into ABS and recompiling XMMS under 1.0.9.

Maybe try a kernel without pre-empt, or at least in your bug report, tell judd the driver you use for the card.

In other words: do some sort of debugging yourself, and dont rely on Judd's telepathic capabilities to detect your card, chipset, driver and 'bug'.

iphitus

Offline

#11 2005-07-04 11:26:03

pholie
Member
Registered: 2005-06-04
Posts: 234

Re: Alsa problems

First, nice to see the famous Eugenia here  smile

And to the point: Ok, XMMS is old, actually I don't use it anymore. And with bmp, the pauses occur from time to time, but not so often as with xmms. It really may be something in bmp, not ALSA's fault, cause it's still in development. I'll see bmp's next version.

Offline

#12 2005-07-04 13:06:09

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Alsa problems

how i fix this: http://wiki2.archlinux.org/index.php/Al … 0at%20once << which i wrote btw big_smile (except the dmix part)

i just set all my apps to output oss and use option number 2. i also use alsa 1.0.9 have AC97 and no asound.conf.

and everything works. jack is also supposed to have lower latency than dmix. but i don't know if it's possible to notice any difference unless you have überleet equipment.

when that is said however; i spent a week figuring that shit out just because ALSA have a crappy implementation that doesn't take care of hwmixing alsa & oss out-of-the-box >:(

it's too weak to say that we should all just wait for every app becomes alsa compatible when almost all the commercial games for linux uses oss.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#13 2005-07-04 13:28:49

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Alsa problems

test1000 wrote:

how i fix this: http://wiki2.archlinux.org/index.php/Al … 0at%20once << which i wrote btw big_smile (except the dmix part)

HAHAHA no, dont write off someone elses work as your own.

Firstly, it's a wiki, it's a collaborative work over time, you havnt done all of that page except dmix.

I started that page. I did the dmix, and began sections on arts, oss/nonfree, and listed some of the other daemons without any detail. It's good that people have improved on it over time, but I really dont like it when others pass off your work as theirs.

You can use oss applications with Alsa, and with dmix, without going to the extent of jackd.
just do aoss programyouwanttorun, and it runs that program through alsa, compatible with dmix.
For example, I was using it today, to run realplayer, which is a OSS based app, through alsa.

Besides, although you disagree, I believe that moving everyone to Alsa is the best way, games are the main programs left on OSS, but even then, many of them can be made to run on alsa with other programs if you know what to do, or use aoss as detailed above.

iphitus

edit: Added aoss to wiki, and tidied up the complete mess that page had been made over time.

Offline

#14 2005-07-04 16:08:23

Eugenia
Member
From: Bay Area, CA, USA
Registered: 2005-03-08
Posts: 74
Website

Re: Alsa problems

AAAAh.
Thank you for the suggestion, but the problem is NOT dmix here! I HAVE dmix setup on my laptop for months now and it works fine. The problem is NOT to be able to have more than one sound at the same time, I already HAVE that. The problem is that XMMS bails out every few seconds! This is a driver bug, that happened IMMEDIATELY after the 1.0.9 upgrade.

Offline

#15 2005-07-07 00:04:08

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: Alsa problems

iphitus wrote:
test1000 wrote:

how i fix this: http://wiki2.archlinux.org/index.php/Al … 0at%20once << which i wrote btw big_smile (except the dmix part)

HAHAHA no, dont write off someone elses work as your own.

Firstly, it's a wiki, it's a collaborative work over time, you havnt done all of that page except dmix.

actually i have.

I started that page. I did the dmix, and began sections on arts, oss/nonfree, and listed some of the other daemons without any detail. It's good that people have improved on it over time, but I really dont like it when others pass off your work as theirs.

in time. i have rewritten EVERYTHING except the dmix part.
when i came on it said simply that oss was deprecated, there was NO arts part so i don't know what your smoking... also: i've never claimed i started the page: but 90%> of it i've made. and the oss2jack part, which so far: i've seen detailed no other place on the net... and which currently is the only non-propriatory option for many people..

You can use oss applications with Alsa, and with dmix, without going to the extent of jackd.
just do aoss programyouwanttorun, and it runs that program through alsa, compatible with dmix.
For example, I was using it today, to run realplayer, which is a OSS based app, through alsa.

yes. it's just sad that this doesn't work with most stuff. Certainly no commercial games.. aoss isn't perfect. and it still only allows only one more oss app, not several as jack does.

Besides, although you disagree, I believe that moving everyone to Alsa is the best way, games are the main programs left on OSS, but even then, many of them can be made to run on alsa with other programs if you know what to do, or use aoss as detailed above.

maybe maybe not; it's still just an excuse. i still think most people just want a set-it-and-forget-it solution that just works.

edit: Added aoss to wiki, and tidied up the complete mess that page had been made over time.

"complete mess" - you certainly go a long way to undermine my work. i've worked on that wiki a long time man. and not only with the info; clearness and everything else. your dmix part, which is no longer needed btw, you can find a million other places on the internet. i dare you to find info on how to set up oss2jack any other place on the net.. Also as if that wasn't enough i come on the internet after some days gone and i see that the wiki is worse than i left it!

no i don't know if it is you that has done this iphitus although if judging by your post has any merit, you are certainly capable..

suddenly a lot of important info has been removed out of the wiki.. like the fact that you can also use oss/free with oss2jack(if alsa has a bug like eugenia experience in this very thread for example..)

also there's flat out wrong info in here now:

However, if you find that you need more apps to operate with sound at once than it allows by default

what is this? a way to boost your ego? you don't get more apps to play at the same time if you add that dmix entry if dmix is already included internally...

Due to bugs in oss2jack, make sure that snd-mixer-oss is a module

should read: oss2jack might crash with snd-mixer-oss loaded, module or in-kernel...

Buy a new card

this was also correct before, a new card won't be suficient in all cases... not all cards support hw-mixing. and why do we recommend this option first to a _linux_ user? it takes 5 min max to set up any of the options beside dmix working perfectly...

not work with many games

sigh.. it should read many COMMERCIAL games, which was also correct before...

there's a number of other stuff that is changed that just serves to make it worse/more unclear than it was, although i'm tired of spending more time on this msg..

it just makes me sad that you, or someone else, deterioate something that was better before when i have spent a long time looking for and getting-to-work a solution noone have documented before...


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#16 2005-07-07 01:12:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Alsa problems

this is inane... before this goes off the handle, I'm locking this - if anyone has a problem with it, feel free to PM me

Offline

Board footer

Powered by FluxBB