No sound in firefox when running an app with aoss (Linux)

User Help for Mozilla Firefox
Post Reply
slackhead
Posts: 32
Joined: June 16th, 2012, 4:12 pm

No sound in firefox when running an app with aoss (Linux)

Post by slackhead »

Hi

I'm using slackware 14.2 with alsa and pulse audio.

I run an old game (UnrealTournement 99) with aoss and have .asoundrc setup allow dmixing.

I can play sounds when running this game, but firefox refuses to play sounds. In fact youtube HTML5 videos just freeze up totally.

I got my .asoundrc from section 6 here: http://alsa.opensrc.org/Dmix

I have tried piping to aplay and various other .asoundrc setups but nothing has worked so far.

Any ideas how to get firefox to use the dmixer plugin, or some other way to get shared sounds?

TIA
Last edited by DanRaisch on August 21st, 2016, 10:52 am, edited 1 time in total.
Reason: "(Linux)" added to subject line.
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: No sound in firefox when running an app with aoss (Linux

Post by Grumpus »

You might want to do a search for "Slackware 14.2 sound problems." There appears to be a number for different reasons.
In some cases it appeared to be a conflict with Pulse.
I used to remove the pulse components in distributions or Linux versions where I could without getting and dependency problems and run Alsa or some other sound base but newer distributions, various Linux Operating Systems appears to have maintained it. Since this Slackware version is Systemd-free it might be good to see if any of the sound packages you install have dependencies which are relational.
I'd stick to the repositories for Slackware.
It's the system which will determine whether the sound will work not so much Firefox.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
slackhead
Posts: 32
Joined: June 16th, 2012, 4:12 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by slackhead »

Thanks. I did search but didn't find anything relevant. I should say that firefox plays sound/video fine when not running UT99.
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: No sound in firefox when running an app with aoss (Linux

Post by Grumpus »

Maybe post something on the Games web site and see if you get any answers.
The game could be looking for something missing on your system, either access or software or maybe the ability to install something.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
slackhead
Posts: 32
Joined: June 16th, 2012, 4:12 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by slackhead »

Well the game is so old that nothing really applies to it anymore. It's from 1999. It's more a problem with whatever firefox is doing for sound being interfered with by aoss.

Perhaps I should ask specifically which sound driver firefox uses.
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: No sound in firefox when running an app with aoss (Linux

Post by Grumpus »

Firefox does not have anything to do with drivers.
Drivers are a system thing coming from the Church of the Subgenius according to the hardware the system supports.
Also there's no telling what you really have operating unless you can define the way you've installed and set up Slackware.
It's strictly a system thing.
On the off hand have you enabled/disabled any player plugins.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
Gusar
Posts: 205
Joined: March 17th, 2006, 1:52 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by Gusar »

UT99 accesses /dev/dsp directly, aoss has no effect. Which means it'll take exclusive control of the sound card, because accessing /dev/dsp will bypass all alsa userspace, most notably dmix. It's not possible to change that. So you're out of luck - whenever you have UT99 running, nothing else will have sound. This isn't a Firefox issue, it's an UT99 issue. If you can even call it an issue, it's not really, it's simply how oss works.

Edit: There is something you could try, I haven't yet so no idea if it works. Unload all alsa/oss emulation kernel modules (snd_pcm_oss, snd_mixer_oss and snd_seq_oss) and then install ossp. ossp will create a virtual /dev/dsp device that routes back to userspace, so dmix should work.
User avatar
Grumpus
Posts: 13239
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: No sound in firefox when running an app with aoss (Linux

Post by Grumpus »

Maybe look for this package in the repos which supply slackware: OSS Proxy Daemon: PulseAudio backend or osspd-alsa OSS Proxy Daemon: ALSA backend (experimental)
There's a few more which are available which seem to pipe things through.
You might not have to remove anything but Gusar may be right as some sound packages will conflict with others which replace others.
You might want to see if you can read the dependents and dependencies.
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
slackhead
Posts: 32
Joined: June 16th, 2012, 4:12 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by slackhead »

Gusar wrote:UT99 accesses /dev/dsp directly, aoss has no effect. Which means it'll take exclusive control of the sound card, because accessing /dev/dsp will bypass all alsa userspace, most notably dmix. It's not possible to change that. So you're out of luck - whenever you have UT99 running, nothing else will have sound. This isn't a Firefox issue, it's an UT99 issue. If you can even call it an issue, it's not really, it's simply how oss works.

Edit: There is something you could try, I haven't yet so no idea if it works. Unload all alsa/oss emulation kernel modules (snd_pcm_oss, snd_mixer_oss and snd_seq_oss) and then install ossp. ossp will create a virtual /dev/dsp device that routes back to userspace, so dmix should work.
Sorry, but you're wrong about that. With aoss and a .asoundrc from section 1.6.6 here: http://alsa.opensrc.org/Dmix I can get ut99 and other alsa apps using alsa to work just fine together.

I have tried osspd but I can't get it to work since upgrading to slackware 14.2.
Gusar
Posts: 205
Joined: March 17th, 2006, 1:52 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by Gusar »

Alright then, let's try a new approach. That config you linked to creates a new device, "ossmix". That can very possibly interfere with applications that will use the "default" device. Have you tried without any alsa config? Dmix nowadays shouldn't need any config. But if that won't do the trick, another option is a config that creates a "default", instead of creating a new device. I did a quick google just now, this looks promising: http://toxiccode.com/ut/howtos/utonlinux.html
slackhead
Posts: 32
Joined: June 16th, 2012, 4:12 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by slackhead »

I get no sound at all in UT with that .asounrc
Gusar
Posts: 205
Joined: March 17th, 2006, 1:52 pm

Re: No sound in firefox when running an app with aoss (Linux

Post by Gusar »

Just for kicks, I installed aoss and did "aoss ut", while having mpv open and playing a video. Both mpv and ut had sound. Then I went to youtube in the browser - it too had sound.

Then I launched ut without aoss and it didn't have any sound. So I closed mpv and launched ut again. This time it had sound. Opening mpv with the aoss-less ut running, it was silent. Youtube was likewise silent, but the video did play. This makes sense - without aoss, ut has exclusive control of the sound card.

So aoss does its job, it allows ut to have audio at the same time as everything else. And I have no alsa configuation whatsoever, no .asoundrc or /etc/asound.conf or anything. Never configured anything in ut either, I always simply relied on the kernel oss emulation, which worked (but of course in this case only ut can have sound). I never before tried aoss, because for some reason I thought it doesn't work with ut. Well, it does.

Basically, the issue is somewhere in your configuration. I suspect you have applications configured to use the "ossmix" device you created, instead of having them simply use the "default" device.
Post Reply