LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-02-2003, 01:35 PM   #16
Angelo
Member
 
Registered: Mar 2003
Location: Connecticut
Distribution: Slackware, OpenBSD
Posts: 63

Rep: Reputation: 21

Quote:
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.

Hope that helps.

Last edited by Angelo; 12-02-2003 at 01:40 PM.
 
Old 12-02-2003, 01:40 PM   #17
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
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.
 
Old 12-02-2003, 03:13 PM   #18
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
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.
 
Old 12-02-2003, 04:37 PM   #19
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
Talking Yay!

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.
 
Old 12-03-2003, 01:12 AM   #20
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
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...

Cheers...
 
Old 12-03-2003, 04:02 AM   #21
jazzyjazz
Member
 
Registered: Oct 2003
Location: Brussels
Distribution: Slackware-current
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
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
 
Old 12-03-2003, 09:19 PM   #22
Tino27
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Slackware 14.2-stable, Ubuntu 16.04 LTS
Posts: 401

Rep: Reputation: 30
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.
 
Old 12-04-2003, 12:52 AM   #23
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
Lightbulb Eureka!!!

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:
Code:
pcm.dsp0 {
  type plug
  slave.pcm "dmixer"
}
                                                                                                                             
pcm.!default {
  type plug
  slave.pcm "dmixer"
}
                                                                                                                             
pcm.dmixer {
  type dmix
  ipc_key 3950183
  slave {
    pcm "hw:0,0"
    rate 44100
    period_time 0
    period_size 1024
    buffer_size 8192
  }
  bindings {
    0 0
    1 1
  }
}
                                                                                                                             
ctl.mixer0 {
 type hw
 card 0
}
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.

Cheers.

Last edited by ZiGiE; 12-04-2003 at 12:54 AM.
 
Old 12-04-2003, 03:15 PM   #24
lockejr
Member
 
Registered: Jan 2003
Location: Wichita, KS
Distribution: Slack, Gentoo, CPUBuilders
Posts: 37

Rep: Reputation: 15
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?

here is my lsmod

lockejr@defiance:~$ lsmod
Module Size Used by Tainted: P
nvidia 1628576 11 (autoclean)
snd-pcm-oss 37316 0
snd-mixer-oss 12080 0 [snd-pcm-oss]
parport_pc 14724 1 (autoclean)
lp 6752 0 (autoclean)
parport 23264 1 (autoclean) [parport_pc lp]
usb-ohci 18888 0 (unused)
usbcore 58400 1 [usb-ohci]
snd-intel8x0 17736 0
snd-ac97-codec 43244 0 [snd-intel8x0]
gameport 1452 0 [snd-intel8x0]
snd-pcm 56288 0 [snd-pcm-oss snd-intel8x0]
snd-timer 13412 0 [snd-pcm]
snd-page-alloc 6004 0 [snd-intel8x0 snd-pcm]
snd-mpu401-uart 3136 0 [snd-intel8x0]
snd-rawmidi 12640 0 [snd-mpu401-uart]
snd-seq-device 3904 0 [snd-rawmidi]
snd 29924 0 [snd-pcm-oss snd-mixer-oss snd-intel8x0 snd-ac97-codec snd-pcm snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore 3332 4 [snd]
sis900 13388 1
crc32 2880 0 [sis900]
ohci1394 24200 0 (unused)
ieee1394 42436 0 [ohci1394]
ide-scsi 9424 0
agpgart 39576 0 (unused)

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.

Last edited by lockejr; 12-04-2003 at 03:32 PM.
 
Old 12-04-2003, 03:33 PM   #25
murray_linux
Member
 
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210

Rep: Reputation: 30
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

Thanks for your help,

Murray
 
Old 12-05-2003, 11:31 AM   #26
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
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 ).

Later...
 
Old 12-05-2003, 06:28 PM   #27
Angelo
Member
 
Registered: Mar 2003
Location: Connecticut
Distribution: Slackware, OpenBSD
Posts: 63

Rep: Reputation: 21
How does dmixer compare to esd?

I've been using esd for a while now and it seems like just about everything supports esd.
 
Old 12-05-2003, 09:17 PM   #28
ZiGiE
Member
 
Registered: Oct 2003
Location: ex USSR, Canada
Posts: 58

Rep: Reputation: 15
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.

EDIT:
forgot to add my e-mail: zigie13@yahoo.ca

Last edited by ZiGiE; 12-07-2003 at 03:14 AM.
 
Old 12-07-2003, 07:39 PM   #29
GT_Onizuka
Member
 
Registered: Aug 2003
Location: Atlanta
Distribution: Debian, OS X
Posts: 711

Rep: Reputation: 31
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 ^_^.
 
Old 12-08-2003, 11:33 AM   #30
murray_linux
Member
 
Registered: Nov 2003
Distribution: Slackware Current
Posts: 210

Rep: Reputation: 30
ZiGiE:

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..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA Question dave_starsky Linux - General 1 05-26-2004 01:18 PM
Alsa question BinaryLinux Slackware 6 05-10-2004 07:07 AM
Alsa question Harp00 Slackware 16 04-05-2004 06:18 AM
Alsa question... CryptDragoon Slackware 1 02-20-2004 10:51 AM
ALSA question dhrivnak Slackware 5 10-28-2003 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration