LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Sound Guidance (https://www.linuxquestions.org/questions/slackware-14/sound-guidance-121619/)

murray_linux 12-01-2003 10:30 AM

Sound Guidance
 
Hello,

Thanks in advance for all your replies. I am looking for some guidance to set up my sound system correctly in Linux. I have sound working*, but not 100%. Let me explain.

First of all, my hardware:

ECS K7S5A motherboard with built in sound card.

What I did:

I installed Slackware 9.1, recompiled the kernel, downloaded, compiled, and installed alsa 0.9.8 (using these instructions: http://www.alsa-project.org/alsa-doc...odule=intel8x0 )

After loading the modules, I have sound support in my system.

Issue:

So, the initial issue with alsa, is that I can only play 1 sound at a time. Also, sound in Quake 3 and Enemy Territory does not work! I have found that if I turn on arts, I am able to play more than 1 sound at a time. I have also found that with arts on, i can play quake 3 and Enemy Territory using "artsdsp -m quake3" or "artsdsp et -m et".

This is great, but to the best of my knowledge I am emulating a sound device. As a result, there is a big lag in my games, and also in some other applications the lag is there.

I see on the alsa install doc referenced above it says:

For professional quality, low latency audio routing use JACK - The Jack Audio Connection Kit

Is this a replacement for arts? I have installed it and ran it, but I don't know how to make clients use it. Could i go "jack quake3" or something like that?

I have also seen in many forums "don't use arts", like it is older technology, and people look down on it. Is that true?

Thank you again,

Murray

slightcrazed 12-01-2003 02:02 PM

Have you tried playing the games as root? If that works, then chances are it is just a permission issue with ALSA, and this is a common problem for many applications.

chmod 666 /dev/dsp*
chmod 666 /dev/mixer*
chmod 666 /dev/snd/pcm*

will usually take care of most permission issues.

slight

murray_linux 12-01-2003 05:42 PM

Quote:

Originally posted by slightcrazed
Have you tried playing the games as root?

slight

yes, same behavior.


Basically what i need to know is;

1. Can alsa play more than 1 sound at a time without arts using my k7s5a onboard?

2. How?

slightcrazed 12-02-2003 09:22 AM

I don't see any reason why ALSA should not be able to play more than one soun d, but the on-board AC97 sound might be the culprit. I have the same board, but I use a different sound card, and I have no problems with multiple sounds at once.

Are you sure that you have the correct modules loaded for the AC97 sound? Can you post the output of lsmod?

slight

murray_linux 12-02-2003 12:24 PM

Yeah I think it may be hardware specific... though I don't have another card to try :(

I've posted my modules below. (BTW, i found that by following these steps I was able to get sound in quake 3 through alsa : http://lunar-linux.org/pipermail/lun...ay/001457.html . same thing for enemy territory, except i replaced quake3.x86 with et.x86)

Module Size Used by Tainted: P
fglrx 173160 151
iptable_mangle 2168 0 (autoclean) (unused)
iptable_nat 24376 0 (autoclean) (unused)
ipt_REJECT 3544 1
ip_conntrack_ftp 4496 0 (unused)
ip_conntrack_irc 3248 0 (unused)
iptable_filter 1740 1
ipt_state 568 6
ip_conntrack 31912 4 [iptable_nat ip_conntrack_ftp ip_conntrack_irc ipt_state]
ip_tables 15712 7 [iptable_mangle iptable_nat ipt_REJECT iptable_filter ipt_state]
keybdev 2080 0 (unused)
mousedev 4408 1
af_packet 14824 1 (autoclean)
snd-seq-oss 29952 0 (unused)
snd-seq-midi-event 3520 0 [snd-seq-oss]
snd-seq 40464 2 [snd-seq-oss snd-seq-midi-event]
snd-pcm-oss 38596 0
snd-mixer-oss 13584 1 [snd-pcm-oss]
snd-intel8x0 19784 1
snd-pcm 63168 0 [snd-pcm-oss snd-intel8x0]
snd-timer 15780 0 [snd-seq snd-pcm]
snd-ac97-codec 42872 0 [snd-intel8x0]
snd-page-alloc 6260 0 [snd-intel8x0 snd-pcm]
snd-mpu401-uart 3616 0 [snd-intel8x0]
snd-rawmidi 14208 0 [snd-mpu401-uart]
snd-seq-device 4260 0 [snd-seq-oss snd-seq snd-rawmidi]
snd 33540 0 [snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-intel8x0 snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
ide-scsi 10352 0
sidewinder 9976 0 (unused)
gameport 1500 0 [snd-intel8x0 sidewinder]
joydev 6112 0
unix 17512 106 (autoclean)

murray_linux 12-03-2003 12:09 AM

Well it is my lucky day today.

It seems that Alsa released their new drivers yesterday; check it out:

"1.0.0rc1 release | ENJOY! | intel8x0 driver fixes, OSS PCM emulation fixes"

Since I am using the intel8x0 driver, i thought I'd give it a go. I modified my ~/.asoundrc file to look like this:

pcm.intel8x0-hw {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "intel8x0"
}

pcm.intel8x0 {
type dmix
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}

I then modified gxine and xmms to use intel8x0 as their default device.

It is working great now.

ZiGiE 12-03-2003 08:47 AM

Excellent... How about Gaim?
 
That fixed my problem with xmms. Now I gotta get my Gaim to play sounds same way as well. So far I tried to play sounds using command aplay -Dintel8x0 %s, but I get error:
aplay: set_params:832: Channels count non available. I think it's because Gaim's sounds are mono...

murray_linux 12-03-2003 09:52 AM

never used gaim. i use aMSN, and I don't like the sounds anyways ;) hopefully someone else can answer your question. now it seems that whenever i change focus on xmms to another app, (alt+tab) xmms stops playing sound and won't start again until I close and kill and lingering xmms processes. anyone seen this?

ZiGiE 12-03-2003 11:23 AM

xmms stops playing when focus lost...
 
Yep. I guess it's not just my system then.

murray_linux 12-03-2003 12:14 PM

hmmm, i don't want to go back to arts...

ZiGiE 12-04-2003 01:01 AM

After I changed my .asoundrc file as I described in this post, xmms started to work much better, but it still hangs once in a while. I can't really tell what it's caused by, though. Sometimes I would be just reading something in my browser and it suddenly would stop playing. :confused:

murray_linux 12-04-2003 02:12 AM

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

zarathustra674 12-04-2003 02:20 AM

I think you have to have a sound server or whatever its called running to play two sounds simultaneously. Arts for kde or ??? for gnome(i dont use gnome). I think the sound server mixes the sounds or something and pipes them through /dev/dsp. But, then what if you didnt use gnome or kde? I really am not sure. But it seems like i read that somewhere, quite possibly in an older linux book at school.

murray_linux 12-04-2003 09:53 AM

Quote:

Originally posted by zarathustra674
I think you have to have a sound server or whatever its called running to play two sounds simultaneously. Arts for kde or ??? for gnome(i dont use gnome). I think the sound server mixes the sounds or something and pipes them through /dev/dsp. But, then what if you didnt use gnome or kde? I really am not sure. But it seems like i read that somewhere, quite possibly in an older linux book at school.
no you don't. from :
http://www.alsa-project.org/alsa-doc...module=Generic


Software mixing

Software mixing is the ability to play multiple sound files or applications at the same time through the same device. There are many ways to have software mixing in the Linux environment. Usually it requires a server application such as ARTSD, ESD, JACK... The list is large and the apps can often be confusing to use. These days we have a native plugin for ALSA called the dmix (direct mixing) plugin. It allows software mixing in an easy to use syntax and without the hassle of installing/understanding a new application first.

Our problem is getting it working correctly.


All times are GMT -5. The time now is 01:46 AM.