You are not logged in.

#1 2010-05-04 12:45:31

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Chromium locks audio for mplayer

When I am running Google Chrome, it is impossible for me to get audio in mplayer. I am using alsa.

The mplayer warning:

[AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy

Result of lsof | grep pcm :

chrome     2569     ben  mem       CHR              116,5                    4444 /dev/snd/pcmC0D0p
chrome     2569     ben   76u      CHR              116,5          0t0       4444 /dev/snd/pcmC0D0p

As you can imagine, this is very annoying! Has anyone got an idea for a fix?

Offline

#2 2010-05-04 12:54:33

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Chromium locks audio for mplayer

Configure mplayer to use alsa instead of oss.

Offline

#3 2010-05-04 13:32:10

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

Thank you, that is working on one of my computers. I thought I had configured mplayer to use alsa on the other without luck. I will try that again tomorrow.

Offline

#4 2010-05-05 18:34:11

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

On my other computer it still does not work. I have 5.1 surround.

Error:

[AO_ALSA] alsa-lib: pcm_hw.c:1291:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.

My config:

ao=alsa
channels = 6

Offline

#5 2010-05-05 20:17:00

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: Chromium locks audio for mplayer

Revelation60 wrote:

On my other computer it still does not work. I have 5.1 surround.

Error:

[AO_ALSA] alsa-lib: pcm_hw.c:1291:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.

My config:

ao=alsa
channels = 6

Is OSS still using that device? They can't both use the same one at the same time

Offline

#6 2010-05-05 20:39:01

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

I don't know. Does chrome use oss? It is weird, because this worked on my other computer (with only stereo sound).

Offline

#7 2010-05-11 10:08:01

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

Okay, chrome does not use OSS but alsa. I found out that if I run I play a movie that supports 6 channels and I use -channels 6, I have no audio. Apparently chrome locks the 6 channels. If I load my movie with -channels 2 I get audio. Of course, this isn't a satisfying solution...

Offline

#8 2010-05-11 10:33:50

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Chromium locks audio for mplayer

Revelation60 wrote:

locks the 6 channels

Don't forget that there is a SEARCH button available on forums. See:

http://bbs.archlinux.org/viewtopic.php?id=91908 - fuser command for showing ALSA & OSS usage
http://bbs.archlinux.org/viewtopic.php? … 35#p746535 - improved dmix

Offline

#9 2010-05-11 11:10:44

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

Ah, thank you brebs. Your .asoundrc is working perfectly! smile

Offline

#10 2010-05-11 11:27:51

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Chromium locks audio for mplayer

Please post your exact config to that thread, then. It's valuable testing info, since I'm not in a position to test surround-sound unfortunately.

Offline

#11 2010-05-11 11:33:07

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Re: Chromium locks audio for mplayer

I am using the exact configuration file from this post of yours. But now all of a sudden it isn't working anymore.. I shut down MPD and with only chrome using the device, I don't have sound anymore in  mplayer. Even -channels 2 does no good anymore. Maybe I should reboot my system...

edit: I think I know what happened when I had my false success. I quit chrome and started a new session. But the sound in mplayer only died when chrome made a sound of some sorts. It was google chat that made a bleep and locked the device for as long as chrome was running... So I am still having this issue sad
edit2: with your new sound config, chrome even locks the audio for MPD as well. I am switching back to  a blank config file.

Last edited by Revelation60 (2010-05-11 11:39:31)

Offline

Board footer

Powered by FluxBB