Forums » Bugs

Vendetta has no sound if another app is using audio

Oct 20, 2012 Savet link
This is not related to the multi-threading, it's just something I've dealt with for a while.

If I start VO, I can then start any other program that uses audio fine. If, however, I start a movie in mplayer, or another program that uses the sound card, VO starts with no sound whatsoever.

Example:

1. Start VO
2. Start mplayer
Both have sound.

Example 2:
1. Start mplayer
2. Start VO
No sound in VO

System:
Slackware 13.37 64 bit.

bash-4.1# lspci |grep -i audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
01:00.1 Audio device: nVidia Corporation Device 0e0c (rev a1)
bash-4.1#

bash-4.1# lsmod |grep snd
snd_seq_dummy 1479 0
snd_seq_oss 30116 0
snd_seq_midi_event 5708 1 snd_seq_oss
snd_seq 52486 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 5473 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 40089 1
snd_mixer_oss 17282 2 snd_pcm_oss
snd_hda_codec_realtek 293594 1
snd_hda_intel 21915 4
snd_hda_codec 71748 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 6254 1 snd_hda_codec
snd_pcm 73762 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer 19671 2 snd_seq,snd_pcm
snd 58334 15 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore 5681 3 snd
snd_page_alloc 7297 2 snd_hda_intel,snd_pcm
bash-4.1#

Any suggestions?
Oct 20, 2012 momerath42 link
Sound on linux is a total mess, and different distros have tried to tame it in different ways; I haven't used Slackware since kernel 1.2, and I haven't had device-exclusivity problems for years, so I hesitate to make pronouncements about your situation, but it seems to me that it's likely to be an issue with how mplayer opens the device by default.

I can do both example cases on my gentoo system, also using the snd_hda_intel alsa driver, with mplayer2 defaults and I get sound on analog and digital outs. This page is where I'd start.
Oct 20, 2012 Pizzasgood link
Looks like you're using OSS. I suggest switching to Alsa.
Oct 21, 2012 Savet link
I am using alsa, but sound is one of those things I haven't dived too deeply into. VO uses the alsa driver, but if another app is using sound when VO starts, the only available driver is OSS, which doesn't play any sound.

I looked at that page mom, it's about time to upgrade to Slack 14, so perhaps it's something to dig into after the upgrade. Any suggestions that you have too Rin, are appreciated.
Oct 21, 2012 Pizzasgood link
Hmm. Why I said that is your lsmod shows a couple OSS related modules, whereas mine does not. I guess those are probably just part of Alsa's OSS emulation deal though. So another thing you might try (if you don't upgrade) would be to figure out which applications are still trying to use OSS and switch them to Alsa so you can just get rid of the OSS bit.

I did have a problem with some OpenAL program once (I forget which, not VO). I had to add the following to ~/.alsoftrc:

[general]
drivers = alsa
[alsa]
device = default

Though I'm not sure what exact problem I had. It might have been an issue with getting it to use the correct soundcard during a time when I had two physical soundcards (one was a burned-out onboard chip, thus the second) and was using some kind of goofy virtual mixer device to provide a "master" control since alsa wasn't giving me one for some reason. None of that is the case anymore though. My asound.conf file is empty (well, not empty but totally commented out). I still have that .alsoftrc file though, with the above contents.

For reference, my own lsmod looks like this:

$ lsmod | grep snd
snd_hrtimer 1312 1
snd_seq 41535 1
snd_hda_codec_hdmi 22015 4
snd_usb_audio 82689 0
snd_hda_codec_via 33270 1
snd_usbmidi_lib 15548 1 snd_usb_audio
snd_hda_intel 22160 2
snd_rawmidi 14630 1 snd_usbmidi_lib
snd_hda_codec 83677 3 snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel
snd_pcm 61470 5 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc 5869 2 snd_pcm,snd_hda_intel
snd_hwdep 4746 2 snd_usb_audio,snd_hda_codec
snd_timer 14902 4 snd_hrtimer,snd_pcm,snd_seq
snd_seq_device 4284 2 snd_seq,snd_rawmidi
snd 44874 15 snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_via,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore 4378 1 snd
usbcore 126634 8 uas,usblp,snd_usb_audio,usb_storage,ohci_hcd,sn _usbmidi_lib,ehci_hcd,usbhid

But yeah, if you plan to upgrade anyway, you might as well do that before trying anything too extensive in case it magically fixes itself.
Oct 21, 2012 mr_spuck link
Try starting mplayer with "-ao alsa". If that works add "ao=alsa" to your ~/.mplayer/config. If I remove it from mine it defaults to oss and blocks here too.
Oct 21, 2012 Savet link
That did it spuck. Thanks!
Oct 22, 2012 abortretryfail link
I'd get rid of the OSS compatibility modules if you don't need them for anything. Sound on Linux isn't "a total mess" if you use ALSA and none of that other ridiculous crap like PulseAudio, esd, etc.
Oct 22, 2012 raybondo link
Unfortunately Ubuntu defaults to using PulseAudio, according to their website.