Author Topic: Linux Sound Issue  (Read 4756 times)

Zorchenhimer

  • Autococker
  • Posts: 2614
Linux Sound Issue
« on: January 08, 2008, 01:52:14 AM »
Quote
------- sound initialization -------
LoadLibrary("./snd_oss.so")
/dev/dsp: Device or resource busy
SNDDMA_Init: Could not open /dev/dsp.

Everything else loads fine, just no sound.  I have a feeling it was something I did while I was messing around, because I don't get sound from Firefox either (I have to DL a vid off of YouTube to watch it with sound).

Any ideas on how to fix this?  I've got both OSS and ALSA installed.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Linux Sound Issue
« Reply #1 on: January 08, 2008, 01:54:21 AM »
Sounds like something is using the device and not sharing it.  Not sure how that works in the linux world.  Reboot, maybe?

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Linux Sound Issue
« Reply #2 on: January 08, 2008, 08:21:31 AM »
Another OSS application has locked your soundcard output for itself, or the /dev/dsp device doesn't exist on your system.

ls -l /dev/dsp

Which distribution are you on?

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #3 on: January 08, 2008, 01:09:29 PM »
Sounds like something is using the device and not sharing it.  Not sure how that works in the linux world.  Reboot, maybe?

I've done this numerous times.

Another OSS application has locked your soundcard output for itself, or the /dev/dsp device doesn't exist on your system.

ls -l /dev/dsp

Which distribution are you on?

Quote
nick@ubuntu-desktop:~$ ls -l /dev/dsp
crw-rw---- 1 root audio 14, 3 2008-01-08 02:25 /dev/dsp

Ubuntu 7.10

yossarianuk

  • VM-68
  • Posts: 127
Re: Linux Sound Issue
« Reply #4 on: January 13, 2008, 01:56:52 PM »
Hi.

Are you using gnome or KDE ?

Try making sure you have the alsa-oss and oss-compat packages installed :-

sudo apt-get install alsa-oss oss-compat

Also check that your user is in the audio group - you can check with the command

groups username

Also check that the oss modules are loaded

i.e:-

morgan@mrsuse64:~> lsmod | grep oss

snd_pcm_oss            42240  0
snd_mixer_oss          17536  1 snd_pcm_oss
snd_pcm                79816  2 snd_pcm_oss,snd_hda_intel
snd                    63800  9 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_seq_device,snd_hda_intel,snd_pcm,snd_timer

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #5 on: January 13, 2008, 02:31:15 PM »
Nope, still nothing.  I also tried "./paintball2 +set snddriver ao +set snddevice oss" (found it on a quake2 forum) and I get this error:

Quote
------- sound initialization -------
LoadLibrary("./snd_oss.so")
oss: No such file or directory
SNDDMA_Init: Could not open oss.

yossarianuk

  • VM-68
  • Posts: 127
Re: Linux Sound Issue
« Reply #6 on: January 13, 2008, 04:38:14 PM »
did you see the loaded module ?

You can put paintball in alsa mode - I found it buggy compared to oss.

edit config.cfg

and change

seta snd_driver "oss"

to

seta snd_driver "alsa"

Then try ./paintball2

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #7 on: January 13, 2008, 04:51:20 PM »
Quote
nick@ubuntu-desktop:~$ lsmod | grep oss
snd_pcm_oss            44672  0
snd_mixer_oss          17664  2 snd_pcm_oss
snd_pcm                80388  4 snd_hda_intel,snd_pcm_oss
snd_seq_oss            33152  0
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
snd_seq                53232  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_seq_device          9228  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd                    54660  15 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device

And when I changed 'snd_driver' to "alsa":

Quote
------- sound initialization -------
LoadLibrary("./snd_alsa.so")
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM oss
ALSA snd error, cannot open device oss (No such file or directory)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Linux Sound Issue
« Reply #8 on: January 14, 2008, 01:56:44 PM »
You need to set your snd_driver to whatever your sound driver is (/dev/dsp or something).

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #9 on: January 14, 2008, 10:15:42 PM »
You need to set your snd_driver to whatever your sound driver is (/dev/dsp or something).

What do you mean?  In the pball config? Or somewhere else?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Linux Sound Issue
« Reply #10 on: January 14, 2008, 10:19:02 PM »
Sorry, not sound driver, sound device.  Don't remember the cvar offhand.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #11 on: January 14, 2008, 10:36:08 PM »
Hmm.  Doesn't want to work

Code: [Select]
seta snddevice "null"

Gets this:
Quote
------- sound initialization -------
LoadLibrary("./snd_alsa.so")
Initializing ALSA Sound System
Period size: 2048
Buffer size: 8192
Stereo: 1
Samples: 16384
Samplepos: 0
Samplebits: 16
Submission_chunk: 4096
Speed: 48000
Sound sampling rate: 48000
----------------------------------

Whilst these:
Code: [Select]
seta snddevice "dsp"
seta snddevice "audio"
seta snddevice "/dev/dsp"
seta snddevice "/dev/audio"

All return this (or something very similar):
Quote
------- sound initialization -------
LoadLibrary("./snd_alsa.so")
ALSA lib pcm.c:2144:(snd_pcm_open_noupdate) Unknown PCM dsp
ALSA snd error, cannot open device dsp (No such file or directory)

I have a feeling that it isn't the game, however.  I can't hear videos off of YouTube, but I can play mp3's, etc., from Firefox (I have the VLC plugin).

Edit: Oh, and "dsp", "audio", and "snd" are all in the list when I enter this:

Code: [Select]
$ dir /dev

Re-Edit:  Yea, it's not the game.  I get this starting Urban Terror:
Quote
------ Initializing Sound ------
Initializing SDL audio driver...
ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
SDL audio driver is "(UNKNOWN)".
SDL_OpenAudio() failed: No available audio device
Sound initialization failed.
« Last Edit: January 15, 2008, 01:20:21 AM by Zorchenhimer »

yossarianuk

  • VM-68
  • Posts: 127
Re: Linux Sound Issue
« Reply #12 on: January 15, 2008, 01:25:19 PM »
Hi.

Just to confirm you have checked that your user is in the audio group?

Can you let me know if you are using gnome or kde ? Also are you running 32 or 64 bit ?

I take it you have sound in your general desktop ?

Try and also make sure you have the following packages installed (not all of these will be relevant but there is no harm installing them )

sudo apt-get alsa-utils alsa-oss linux-sound-base libsdl1.2debian-alsa oss-compat

Also if you are using KDE (which is so advisable imo) change the auto-suspend time to 1 sec.
(not much experience with gnome... but i understand the gstreamer plugins are important ?)

I would also backup your paintball2 folder and try and extract a fresh copy to test - also try the different sample rates - i.e 22 or 48 - after changing close the game and restart...

As this sounds like a general oss sound issue for you , you could also try posting at http://ubuntuforums.org

(I had the same issue with ubuntu (it's always Ubuntu that has these stupid issues....) with enemy territory but that was fixed by installing
 libsdl1.2debian-alsa

If you get nowhere let me know, I will attempt to install what ever version of Ubuntu you are using and try to recreate your issue (not presently running Ubuntu - running opensuse and gentoo - I find all *buntu variants very buggy)


Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #13 on: January 15, 2008, 01:38:48 PM »
My user is in the audio group, and I can get sound working out of other programs (VLC, Pidgin, Rythmbox, etc).  Also, I'm using Gnome and have all of the mentioned packages installed.  But instead of "libsdl1.2debian-alsa" I have "libsdl1.2debian-all" installed.

Btw, these problems started happening when I tried to get a second sound card woring.

And I'm using Ubuntu 7.10 i386 with Gnome, with a fresh (additional) install of DP.

yossarianuk

  • VM-68
  • Posts: 127
Re: Linux Sound Issue
« Reply #14 on: January 15, 2008, 02:58:29 PM »
Hi.

You could quickly try installing libsdl1.2debian-alsa (this will remove other package) - quake 4 , doom 3 and et didn't seem to have sound for me with the libsdl1.2debian-all package installed (you can change back easily).

See if that works - if not

The fact you have 2 sound cards is most likely complication issues - please try

asoundconf list

and check that both sound cards are showing up.

you can set the default one with -

asoundconf set-default-card CARD  (replace CARD with the one from asoundconf list)

You can also try

sudo dpkg-reconfigure alsa-base
sudo dpkg-reconfigure alsa-utils
sudo /etc/init.d/alsa-utils restart

One thing I noticed is that your lsmod shows the snd_pcm_oss module is loaded with snd_hda_intel .

Also i take it you've played with the gnome sound options ? system - prefrences-sound - check default mixer has pcm access ?

If you still have no joy i would recommend posting on ubuntu forums - i will install a fresh ubuntu soonish also ..

P.S just started playing Urban terror - its great as well.

PPS - opensuse 10.3 has paintball 0.20 in it's packman repo!!



XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Linux Sound Issue
« Reply #15 on: January 15, 2008, 03:19:18 PM »
PPS - opensuse 10.3 has paintball 0.20 in it's packman repo!!

Cool.

yossarianuk

  • VM-68
  • Posts: 127
Re: Linux Sound Issue
« Reply #16 on: January 15, 2008, 03:26:13 PM »

billybag

  • PGP
  • Posts: 6
Re: Linux Sound Issue
« Reply #17 on: February 23, 2009, 01:11:35 PM »
I had this problem last year and couldnt find a fix. I desided since it has been a while, that a fix must have been found or that the developers have recognized the problem and fixed it


guess i was wrong

so i will now, again, be uninstalling. :(

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Linux Sound Issue
« Reply #18 on: February 23, 2009, 09:40:12 PM »
I just tried running DP on my Linux box again (I don't use it for gaming), and I got the sound working correctly with OSS.  I had to close Rhythmbox though.

Code: [Select]
nick@files:~/paintball2b23$ ./paintball2 +exec cmds.cfg

Paintball 2 -- Version 2.0
execing configs/config.cfg
Console initialized.

------- sound initialization -------
LoadLibrary("./snd_oss.so")

Initializing OSS Sound System
Buffer size: 65536
Stereo: 1
Samples: 32768
Samplepos: 0
Samplebits: 16
Submission_chunk: 1
Speed: 48000
Sound sampling rate: 48000