SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2013-05-23 21:06:42

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Apps hogging sound

Not sure if this is posted in the right place, I'm running waldorf but I apt-pinned to the new testing as well. I have sound on working on everything but when I have a browser open or anything else that's using sound and I try to run mednafen, renoise, or some things in wine I get this error:

Using "ALSA" audio driver with device "default":ALSA Error: snd_pcm_open(&alsa_pcm, id ? id : "hw:0", SND_PCM_STREAM_PLAYBACK, 0) Device or resource busy
Error opening a sound device.

If I close the other programs that are using sound first and then run those problematic apps then I get sound on those but not on anything else until I close those first. I have both pulse and alsa installed.

Edit: sound card details:

todd@shadow-lugia:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
todd@shadow-lugia:~$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Last edited by MarioMaster100 (2013-05-25 15:57:39)


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

Help fund CrunchBang, donate to the project!

#2 2013-05-24 06:33:13

ohnonot
#! Die Hard
Registered: 2012-05-22
Posts: 559

Re: Apps hogging sound

this is totally normal behavior for alsa.
you have to tell all your apps to use pulse!

Offline

#3 2013-05-24 16:08:10

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Um well here's the default /etc/asound.conf I had

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}

ctl.!default {
    type pulse
}

Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#4 2013-05-24 17:11:33

ohnonot
#! Die Hard
Registered: 2012-05-22
Posts: 559

Re: Apps hogging sound

you didn't change the default /etc/asound.conf? neither is there an .asoundrc or .asoundconf in your home folder?
it looks like your alsa.conf is just passing everything on to pulse, as it should when you have pulse installed.

is pulseaudio getting started (properly) on boot?

also, you have to go to the preferences of all those apps and tell them all to use pulseaudio. do you get sound then?

Offline

#5 2013-05-24 17:18:52

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Nope there's no .asoundrc or .asoundconf in my home folder. Renoise only looks like it wants alsa or jack and I think mednafen only takes alsa.


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#6 2013-05-24 17:29:29

ohnonot
#! Die Hard
Registered: 2012-05-22
Posts: 559

Re: Apps hogging sound

that's your problem!
for renoise you need jack.
there's ways to reroute that so you can have pulse and jack, but i recommend ditching pulse if you use renoise a lot.
or you just accept the behavior stated in your first post!
with mednafen, i can't help.
there is ways to solve all that, but it's tricky.
AVLinux offers a working solution. i think it's called alsaloop or aloop daemon.
setting it up yourself... well, i didn't succeed...

Offline

#7 2013-05-24 18:02:57

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Ok I think I might try the jack way, which package(s) are needed for jack? Is it libjack0?

Edit: nevermind I looked around and figured out it comes with qjackctl.

Last edited by MarioMaster100 (2013-05-24 21:38:47)


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#8 2013-05-24 22:25:30

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Alright so I installed qjackctl and followed all directions from http://trac.jackaudio.org/wiki/WalkThro … ulseOnJack and renoise works but mednafen (fixed by editing the config file and specifying jack) and for a wine example famitracker still throws that alsa issue hmm

Last edited by MarioMaster100 (2013-05-24 22:58:01)


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#9 2013-05-25 01:24:14

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Crap, mocp isn't having any sound now or vlc for that matter sad

Last edited by MarioMaster100 (2013-05-25 01:39:50)


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#10 2013-05-25 07:31:25

ohnonot
#! Die Hard
Registered: 2012-05-22
Posts: 559

Re: Apps hogging sound

actually, i was wrong saying that "renoise needs jack" - it runs with alsa, too.
i feel bad for bringing up jackaudio at all, because it's really not that easy to set up.
it is probably not the solution to the problem you stated in your 1st post.
however people doing lots of musicking typically use it.

you have quite a setup there, with trackers running under wine... i can't help you there!!!

but with moc and vlc i can.

so you have your setup now so pulseaudio is running on top of jack?

in that case you have to tell both moc and vlc to use pulseaudio.
with vlc this requires an extra package (search vlc pulse in synaptic), plus changing sound output in vlc preferences and restart vlc.
with moc you can use oss as output and some pulseaudio wrapper, here's the howto.

please keep in mind that you have now 3 layers of audio processing: alsa close to the hardware, jack on top of that and the jack-pulse plugin. plus maybe wine has it's own thing running.
all that takes quite some cpu!

Offline

#11 2013-05-25 15:23:52

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

Oh, I freaked out about the things that weren't giving me sound anymore after adding jack so I uninstalled jack.

Edit: updated first post with sound card info. At this point I just want alsa to not hog the sound and I want something to let me up the speaker volume past 100% like pavucontrol lets me do for when I watch videos with people.

Last edited by MarioMaster100 (2013-05-25 16:20:07)


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

#12 2013-05-25 16:40:49

ohnonot
#! Die Hard
Registered: 2012-05-22
Posts: 559

Re: Apps hogging sound

it seems i created some confusion by bringing jack into your problem...

i will try to explain now as if we never talked about jackaudio and you never installed it.

the "problem" you describe in your first post, including the error message, is totally normal and expected behavior for alsa! trust me on that.

however post #3 suggests that you have pulseaudio installed - but post #1 suggests that one, some, or all apps use alsa to access audio hardware, instead of pulse.

imagine it this way: alsa is an electric plug in your wall. it connects straight to your audio hardware. you have only one plug. you can plug an app into that directly, or you can plug an extension cord with 3 (well, actually more) plugs. so now you can plug 3 apps into that extension cord. this extension cord is pulseaudio, but it still uses alsa! alsa is always there, wether you're using plain alsa, pulseaudio or jack. alsa is the wallplug!

now if there is something in your wall plug (this something can be one app, pulseaudio or jack), and another app wants to plug into that socket, you get that error message (post #1).

now, if this wasn't confusing enough, you have to find out why you get that error message - do you get it because:
- pulseaudio did not initialize properly, and some app that would otherwise use pulse, uses alsa as a fallback, causing the next app to throw that error message, or
- pulseaudio occupies the wall plug, but some app that doesn't know how to use pulse (either because it has to be told to, or because it's simply not able to) tries to connect to alsa and throws that error message, or
- with wine running audio apps, who knows what else can happen.

i think my explainering is not so good, so please read up on different linux sound architectures yourself.

Last edited by ohnonot (2013-05-25 16:45:28)

Offline

#13 2013-05-25 17:18:30

MarioMaster100
#! Junkie
Registered: 2011-04-02
Posts: 259

Re: Apps hogging sound

I think I got it, just not sure what to do about it.


Thank you everyone for being helpful and answering my questions.
Machinae Supremacy fan for life \m/_(^_^)_\m/

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo