SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Originally posted by Tino27 ZiGiE: Having the same problem as you are. XMMS works fine (meaning, no popping, can run as root/non-root), but whenever XMMS is running, other system sounds seem to "queue" up. When I quit XMMS, I get a barrage of pings, whooshes, and other system sounds for several minutes.
This is simple to explain. You need a mixer (aka sound server). Your sound card can only play one sound at a time, which is why the other sounds (Gaim, new mail, etc) "queue" up. If you are using a mixer it mixes the sounds together and plays it out. Two mixers that come to mind are esd (used by gnome) and artsd (used by kde). XMMS and Gaim have support for both of these.
So in essence, if you are playing an mp3 with XMMS and your buddy instant messages you, you won't hear the ping until the mp3 is over, BUT if you are using a mixer the ping will get mixed INTO the mp3 and output to your sound card.
jazzyjaz, this may be irrelevant, and I guess only if you use kde/aRTS but I solved the 'multiple sound source' problem by going into the kde control centre>sound & multimedia>sound system>mixer and there are some sliders for 'maximum probed mixers' and another one. I wacked them up to 'full on' and now the problem you desccribe is fixed.
I thought alsa settings would override this stuff, but it seems to make a difference.
I'm not a big gnome user so I haven't experimented there.
OK. I think I found a way to mix sounds with ALSA dmix plug-in. (I can't tell for sure. I'm doing it via telnet from work, so I can't really hear the sound, but I can see that two aplay instances play two sounds simultaneously, while before second would wait for the first one to finish). Anyways here: aplay -Dplug:dmix test.wav
When I execute this on two consoles I get simultaneous message on both: Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
While is I simply use default device -D default (or don't specify a device): aplay test.wav
the message on the second console doesn't appear until the sound on first console stops playing.
I'm trying to figure out a proper way to modify my .asoundrc file so dmix is used by default, but so far unsuccessfuly. I am able to create aliases to my sound device and make my own plug-ins, but still not sure how to make alsa use dmix by default.
Ok, here's one way to get it to (sort of) work. Here's contents of my .asoundrc file:
Code:
pcm.intel8x0 {
type plug
slave.pcm dmix
}
This creates a device intel8x0 that should mix multiple streams directed to it. Unfortunatelly it still won't do the mixing by default, you will have to specify intel8x0 as your sound divice in all applications that play sound . Also, if you have programs where you can't specify sound device, their sound won't be mixed.
Here's example usage I borowed from ALSA user posts (didn't test them all yet):
- aplay neds to be started with "aplay -Dintel8x0"
- xmms, you need the xmms-alsa plug-in and configure it to use the device called "intel8x0"
- (g)mplayer needs to be started with "gmplayer -ao alsa9:intel8x0"
I'm gonna keep looking for better solution. Perhaps ESD or JACK will work better.
Well, I got home tried my configuration and... XMMS crashed
But... thankfully murray_linux posted a solution in parallel thread from ALSA user posts (that I was looking through today, and partially used in previous post, but was dumb enough not to try it exactly as it was posted )
Anyways... My XMMS works flawlessly now (thanks to murray_linux). I got the sounds mixing working, I played simultaneously XMMS and gXine (although sound from gXine is extremely choppy - I'll figure that one later). Also none of my command-line players work now (mpg123 & mpg321), they complain that: ALSA snd_pcm_hw_params_set_period_size error: Invalid argument
Can't find a suitable libao driver. (Is device in use?)
So these two little glitches are left to fix...
Originally posted by tobyl jazzyjaz, this may be irrelevant, and I guess only if you use kde/aRTS but I solved the 'multiple sound source' problem by going into the kde control centre>sound & multimedia>sound system>mixer and there are some sliders for 'maximum probed mixers' and another one. I wacked them up to 'full on' and now the problem you desccribe is fixed.
I thought alsa settings would override this stuff, but it seems to make a difference.
I'm not a big gnome user so I haven't experimented there.
Thx for your input tho i use gnome
Well still nothing here i tried the chmod and adding my user to the sys group still the same error as above.
I'm gonna try to install the new alsa drivers maybe that will help
Angelo: Thanks for the tip. You were right. I hadn't really understood the purpose of arts until now. I started arts upon booting KDE and then selected the arts output in XMMS. No more sound queuing! Thanks for the round-about solution.
I have the solution!!! I got the ALSA working properly on my Sony Vaio PCG-R505GL laptop with Intel ICH 82801AA (AC'97 compatible) soundcard. I got all sounds mixing properly from all kinds of application and without Arts, ESD or JACK. All mixing is done by ALSA dmix plug-in! Anyways, I compiled 1.0.0rc1 alsa-drivers (with intel8x0) and alsa-libs and alsa-utils, but I'm pretty sure it should work with 0.9.x as well. All I had to do to is to create following .asoundrc file in my $HOME folder:
Now to get application to work properly:
- xmms: use ALSA 1.2.x plug-in and configure it to use user-defined device dmixer
- Gaim: in Sound Options select method "Command" and enter aplay -Dplug:dmixer %s
- mpg123/321: run it like this - aoss mpg321 flie.mp3
- MPlayer: with parameters -ao alsa9:dmixer
- (g)xine: that's the only one I'm having problem with now. It plays, and sound is mixing with the rest, but xine's sound is terribly choppy... so any input on this matter is appreciated.
Hey guys I am trying to get my sis7012 sound card to work doing the stuff you guys have but am having problems. I downloaded and compiled the new alsa stuff and created the .asoundrc in my home dir. But when I tell xmms to use the alsa plugin instead of oss it just pops up the window about sound card not working. It only works when I use oss. I did notice that when I do a lsmod that the alsa oss compatible stuff is loaded. Should these not be there?
also I did a locate for dmixer and could not find it. I did install alsa-drivers, alsa-libs, and alsa-utils. I looked at alsa-tools but it's not with that.
Any Ideas? I am really sick of my crappy sound and would like to get it working right
update - I tried putting the .asoundrc as /etc/asound.conf and alsa does not like it it complained that the file may be old or corrupt and i should fix it.
ZiGiE, I'll join you on this thread.. perhaps we can come up with a solution together.
Here's my last reply from the old, dead thread..
( post #12)
COOL! we'll get there yet ZiGiE. i have copied your .asoundrc script. How did you find that? So far it is running well, though i am experiencing some issues as well.
perhaps we could compare some things here:
1. open xmms and kmix at the same time.. now play with the volume on xmms, what control in kmix goes up? It should be the first master volume control, but for me the PCM device is going up and down, and when it's full blast it totally distorts the sound output.
2. I had a problem with xine not playing any sound while xmms was open, but gxine was working perfectly.. i compared my two config files in ~/.gxine and ~/.xine and found that when i modified these 2 options:
audio.alsa_default_device:default
and
audio.alsa_front_device:front
change default and front to dmixer, everything worked for me.
3. still some apps will not run when xmms is playing music. Realplayer for example.. and I am guessing quake 3, though I don't feel like restarting x right now
lockejr, first of all, you won't find dmixer with locate - it's not a file, just an alias to your mixer plug-in.
Second, did you configure your xmms plug-in properly to use dmixer, or did you simply selected the plug-in it from the list?
Third, I'm not sure whether /etc/asound.conf has the same syntax as .asoundrc, so I wouldn't mess with it for now. Just try to get it working with .asoundrc. For testing purposes try to use aplay. For example to see if your sounds are mixing you can run two instances of aplay, and direct output to dmixer or dmix plug-ins: aplay -Dplug:dmixer test.wav.
Another thing... GT_Onizuka mentioned in a different thread that your card has a smaller buffer than my .asoundrc is set to: http://www.linuxquestions.org/questi...495#post635495
Also, search ALSA wiki: http://alsa.opensrc.org/index.php, I found it to be the best source (here's the answer to your question, murray_linux, about how did I find it ).
murray_linux, can you please send me or post here your full .gxine and .asoundrc. I can't figure out what is wrong with my gXine...
In response to your previous question...
I don't have kmix or RealPlayer. I use gnome-volume-control.
I did notice, though, that when I change the xmms's volume PCM volume changes as well. I don't really see why should it be Master slider instead. Also it makes perfect sense when audio starts to sound bad if you max out the volume. Your speakers just can't handle the power anymore.
Howdy! I've decided to move my questions and whatnot over here, since the only problem I seem to be having is this:
1.) I still can't get StepMania to work as it is still having buffer problems. I know there is an option to have it not preload sounds (I think its off by default), however, if it is on, turning it off would most definately fix my problem. I'll just hand around here until someone finds the correct buffer settings for the SiS 7012 Sound Card, I'll look around for information and post anything I find here. ZiGiE, consider my other thread closed, I'll just camp around here now ^_^.
i've tucked my tail between my legs, and gone back to OSS. Here's my reasoning:
1. Compatability. Games like quake and ET just run. There's no need to do the echo >> quake disable 1 1 thing, it just works.
2. dmix was disappointing. I was expecting to have it configured, and I wouldn't have to have EVERY application be modified just to play sounds. also, dmix was only working on alsa aware applications.
I've decided that I really don't need to have 2 applications using the sound device at the same time. There isn't a real 100% solution for that, that everyone conforms to, that is low latency. Linux has to sort their sound story out, so I'm gonna let that happen, and come back to it when it's ready. Until then, OSS works on all my applications, and if I want multiple sounds, I'll flick on arts.
Murray
ps, I guess you don't want my config files for gxine anymore huh..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.