Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
having trouble using audio in more than 1 app[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 533

PostPosted: Mon Apr 22, 2013 6:41 pm    Post subject: having trouble using audio in more than 1 app[solved] Reply with quote

I'm an absolute beginner when it comes to multimedia
But I cannot use audio in more than an application
when vlc is using the audio device and another device needs to play audio I get "The audio device "front:CARD=Intel,DEV=0" could not be used:
Device or resource busy." when the song is over

here's my device under lspci:
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)


I have ALSA installed and I have pulseaudio installed even though Im not sure if it 's properly configured or if it needs to be configured

thanks


Last edited by blakdeath on Wed Apr 24, 2013 2:31 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Mon Apr 22, 2013 7:20 pm    Post subject: Reply with quote

ALSA handle that itself now, so must be pulseaudio at fault.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5574

PostPosted: Mon Apr 22, 2013 7:58 pm    Post subject: Reply with quote

krinn wrote:
ALSA handle that itself now, so must be pulseaudio at fault.


Both alsa and pulseaudio should be able to handle such case.

First, check which app take the card into exclusive use and why.
A hint: usually, it's not a good idea to pass strings like "hwX,Y" for alsa device.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Apr 22, 2013 9:15 pm    Post subject: Re: having trouble using audio in more than 1 application Reply with quote

blakdeath wrote:
I have pulseaudio installed

If you're getting that error, then pulseaudio isn't configured right, or not being used.

The first thing you need to decide is whether to fix this using pulseaudio, or just ALSA ;)

If just ALSA, see config in my sig.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Mon Apr 22, 2013 9:39 pm    Post subject: Reply with quote

PaulBredbury: That's why i said "ALSA handle that itself", because even without an .asoundrc alsa handle dmix. I use none and it just works.

VoidMage: if you configure nothing, alsa works, seems logic to says then it must be pulseaudio no ?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Apr 22, 2013 9:44 pm    Post subject: Reply with quote

krinn wrote:
even without an .asoundrc alsa handle dmix.

Yes, I do know this. It only works properly for 2 speakers or less, though.

My config gets dmix working with more than 2 speakers.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4270

PostPosted: Mon Apr 22, 2013 10:39 pm    Post subject: Reply with quote

Oh, never used more than 2 speakers, good thing to know if i goes with more later.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 533

PostPosted: Tue Apr 23, 2013 7:05 pm    Post subject: Reply with quote

Paul
I honestly do not understand what pulseaudio does, I'd rather use alsa alone if it can do the job
but I cannot understand what needs to be done from that link
I have 'pulseaudio' as the driver in my alsa mixer

Card: PulseAudio
Chip: PulseAudio
could you point me to something simpler?
oh and the alsa guide and the wiki were not very useful
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Tue Apr 23, 2013 7:24 pm    Post subject: Reply with quote

blakdeath wrote:
I'd rather use alsa alone if it can do the job

Yes, ALSA can do it itself.

Code:
but I cannot understand what needs to be done from that link

Well then, get rid of pulseaudio, recompile e.g. alsa-plugins to remove pulseaudio.

Then, get googling, get experimenting with the config I provided, and ask reasonably intelligent questions when you're stuck, providing evidence that you're at least trying ;)

This is as simple as it gets, I'm afraid. I'm just the messenger.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5574

PostPosted: Tue Apr 23, 2013 10:42 pm    Post subject: Reply with quote

PaulBredbury wrote:

Code:
but I cannot understand what needs to be done from that link

Well then, get rid of pulseaudio, recompile e.g. alsa-plugins to remove pulseaudio.

This is as simple as it gets, I'm afraid. I'm just the messenger.


...or perhaps fear-monger ?
That's perhaps a bit strong, but while I'm not a fan of pulseaudio, I can't help to notice, that some of the people (that perhaps have been burned by one or other aspect of pulseaudio - been there, done that, the t-shirt was fugly) can't help to push their bad corner case experience as the usual case.

@blakdeath: you've still didn't answer which program was taking the card into exclusive ownership.
Is it vlc or an another app ?
If it's vlc, post that portion of its config.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 533

PostPosted: Wed Apr 24, 2013 6:50 am    Post subject: Reply with quote

well it just happens to be the first application to use the sound card
for example, when using flashplayer:
/dev/snd/pcmC0D0p: adel 2484 F...m opera:libflashp

when using vlc:
/dev/snd/controlC0: adel 2586 F.... vlc
/dev/snd/pcmC0D0p: adel 2586 F...m vlc

I used fuser to check who's using the sound device
I unmerged the pulseaudio and now the default card in the alsamixer is my intel sound card, I've also globally set the -pulseaudio flag and reemerged world

and paul I am trying I did go through the instructions at the wiki and the installation guide and i googled a bit, i just seem stuck at what to do
I don't need to setup sound from scratch
Back to top
View user's profile Send private message
GFCCAE6xF
Apprentice
Apprentice


Joined: 06 Aug 2012
Posts: 229
Location: England, UK

PostPosted: Wed Apr 24, 2013 7:21 am    Post subject: Reply with quote

Remove any alsa config files (asound.conf / asoundrc), install pavucontrol and use that to set up your audio devices if you don't use a DE that has an application for setting that up.
Make sure no applications you have, you have made specific settings, for example setting ao=alsa/oss for mplayer.

Dont let the people here with personal agendas dictate how you use audio on your system.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Apr 24, 2013 12:48 pm    Post subject: Reply with quote

VoidMage wrote:
fear-monger

That's ludicrous. Look at this:
blakdeath wrote:
I'd rather use alsa alone if it can do the job


So I'm showing him an ALSA config that works. Like I've done hundreds of times before.

blakdeath, the apps need configuring too, so they don't try to open ALSA in dmix-bypassing mode.

I suppose one day I should look into patching alsa-lib so it disallows bypassing dmix - that may be less confusing for newbies.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 533

PostPosted: Wed Apr 24, 2013 2:30 pm    Post subject: Reply with quote

nothing wrong with fear-mongering :D, I personally prefer getting the job done with as little tools/configurations/use flags as possible
and if it is possible to configure alsa alone to get audio working then that would just be fine :)
I appreciate everyone's help I have everything working now
the magic words were " the apps need configuring too" :)

thanks everyone :D
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5574

PostPosted: Wed Apr 24, 2013 4:49 pm    Post subject: Reply with quote

The problem is like "my knee hurts" (well, more like "big toe").
The given solution is "you should amputate the leg".
That's very special kind of rational.

Also, you've failed to note the first part:
blakdeath wrote:
I honestly do not understand what pulseaudio does,


and configuring dmix for not trivial cases is at least as hard (if not much harder) than pulseaudio.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Apr 24, 2013 5:11 pm    Post subject: Reply with quote

VoidMage wrote:
configuring dmix for not trivial cases is at least as hard (if not much harder) than pulseaudio.

When the ALSA config file is handed to one on a silver platter? I hardly think so :roll:

Hang on, let me check where I am. Let's see, it definitely says "Gentoo" at the top of the screen. Yeah, Gentoo. Sometimes I think I've strayed into the Ubuntu forums by mistake :lol:
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5574

PostPosted: Wed Apr 24, 2013 7:25 pm    Post subject: Reply with quote

While I don't know enough about alsa to tell outright a case where your settings would fail, I do recall reading posts from alsa devs telling that there are some serious limitations of dmix (IIRC, it was something regarding mixing streams of varying bitrate).
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 7974

PostPosted: Thu Apr 25, 2013 3:35 am    Post subject: Reply with quote

Split off "[Philosophy] On accepting, and offering, advice.", as the discussion wandered away from solving the problem at hand.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum