Retry Button To "Alsa Device Busy" Dialog

When running Renoise on linux the most common dialog you ever see is “Alsa device busy, switching to JACK” cause ALSA device spends most of the time being busy because of pulseaudio.

The annoying thing there is only one button on that dialog, and it says “OK”

I am NOT “OK” with this! Trying to use jack will fail too, cause it’s pulseaudio, not jack which is blocking the ALSA device. Why can’t there just be two buttons: “Retry ALSA”, “Switch to JACK”? So I could just stop pulseaudio when I see the dialog, and press “retry” so I wouldn’t have to go to the preferences and reconfigure my audio every time.

I also added PulseKiller tool to xrnx repository. Which does pretty much the same as qjackctl, tells pulseaudio to bugger off on application startup. This isn’t foolproof though, when rendering song, Renoise releases sound card, and pulseaudio might kick back in. Is there a way to know when renoise does those things? Or should i just constantly poll for pulseaudio to make sure it doesn’t wake up again?

Maybe some sort of “Audio Driver Init Hook” could be useful?

Is there a way to completely get rid of PulseAudio at all?
Nobody needs this for audioprocessing apps in the first place, i’ld rather write down a 10-step plan how to completely dismantle Pulseaudio rather than embedding options to circumvent the cause.

But perhaps the best tip we could give away is to install audio and video directed linux distributions, like Ubuntu Studio. (US doesn’t seem to come with Pulse Audio installed)

Where did you get that information? AFAIK Ubuntu Studio not only has pulseaudio as default audioserver but it also uses JACK as a sink. So most programs go through PulseAudio -> JACK -> ALSA.

Pulseaudio is actually a good thing, it lets multiple programs make sound at the same time. Most programs out there won’t be complaining that the device is already in use thanks to pulseaudio which lets them share the same device… And I don’t think we can barge in with renoise and say everyone should just uninstall pulseaudio cause we don’t care to cope with it.

The script I uploaded into svn does the right thing in coping with pulseaudio, it shuts down the pulseaudio with pulseaudio -k. The only thing is that when a program which uses pulseaudio wants to access sound again, it restarts the pulseaudio server, so renoise should try to shut down pulseaudio on every time it tries to get audio.

according to their site, UbuntuStudio has integrated PulseAudio and JACK by default since 10.10, but I didn’t check it

It’s not where i get the information, it’s about where i don’t find the information at all.
The package list does not make mentioning of PulseAudio anywhere.

That’s good for pulse-audio, but not good for performance and latency.
I can’t judge how much latency is involved though, but i suspect some or more would not find the latency amount acceptable compared to using Jack audio only.
If PulseAudio would be an answer to some of the incompetence of Alsa with or without Jack, then why aren’t Alsa and Jack improved instead?
Now you have another audio layer consuming cpu resources that could be spend on other stuff.

9.10 have PA as the standard audio when I installed it. Didn’t have PA and Jack integrated very well (at all?) though and in the end I think I gave up trying to get them to play nicely together and just stopped PA loading up at all. I hope that they have worked on this for 10.4 / 10.10.

Times I most found myself wanting to be able to use PA was when tracking, needing a little break from what I’m doing and thinking to put something on, Youtube video or maybe stream a little something for inspiration. From web browser, while having Renoise using Jack, is about the only time I couldn’t get audio without somehow having PA running, not using ALSA or otherwise, and would find I would have to close Renoise and start up PA. Hope these things are a bit better sorted on a standard install now…

Bump.

PS: Pulseaudio is here to stay.

i hate everything about pulseaudio.

That’s why i abandoned Linux.

Well I just got here and am committed to three years. (until the service contract on my new laptop runs out). Hopefully longer. So, bump!

just replace pulseaudio with JACK. use module-jack-sink and module-jack-source in pulseaudio to keep those apps working, but then use jack outputs wherever you can (gstreamer, mplayer, xine, etc).

Sorry, I’m Ubuntarded. What?

Seriously though, the whole Ubuntu desktop experience (and several other distributions at the time of this writing, example Fedora, Mint, Suse…) are built around Pulse Audio. Sure I can start ripping things out like I’m sort sort of digital plumber, but then I start breaking things like the Ubuntu integrated settings panel. I come from OSX. I don’t roll my own distro. Do I want to learn? Not really. Do I want to try an alternative distro? Not really. Ubuntu does what I want. It’s Renoise that doesn’t. Like Suva wrote (in 2010…):

“I don’t think we can barge in with renoise and say everyone should just uninstall pulseaudio cause we don’t care to cope with it.”

The original suggestion (written in 2010…) isn’t even asking to support Pulse Audio. It’s just asking for a more intelligent way to deal with the busy signal. To quote Suva again:

Why can’t there just be two buttons: “Retry ALSA”, “Switch to JACK”? So I could just stop pulseaudio when I see the dialog, and press “retry” so I wouldn’t have to go to the preferences and reconfigure my audio every time.

This is what I want.

Pulse Audio is 2 years more entrenched than when that suggestion was originally posted.

Good times.

Why not? Pulseaudio didn’t existed when Renoise released its first Linux version. Linux audio is a mess and i’m not the only one thinking that. For generic Desktop use, Pulseaudio is fine. But for a DAW environment, PulseAudio is mainly a PITA. It has nothing to do with “Barging in” it is simply understanding what matters regarding audio processing and priority demand. Supporting Pulse-Audio seems to me like sponsoring a Trabant team and letting them race along F1 cars. You know this Trabant is never going to win except for some charms, but that’s it.

If Pulseaudio works for you, by all means, feel free to use it, no hard feelings in any regard here even if it doesn’t work. For as far as i experienced Linux, if you need to do something special with it (regardless of whether this involves specific drivers or not) you need to dig deeper and this always seem to have been like that.
You have the power to strip down Linux if you really want to and if you don’t want to, or can’t, well then there is still Windows or MacOSX (And there is also Renoise for Windows and MacOSX, what a surprise ;)). I wish anyone who desires PulseAudio support good luck with the applications that do offer this performance trade-off.

By Graham Morrison from Linux Format Issue 130 - April 28th 2010

Sorry, this is dumb.

Apple Retina didn’t exist when Renoise released 2.8 and we fixed that. UAC on Windows didn’t exist and we fixed that.

Or this is like saying “We only support ASIO on Windows because the default sucks.”. Terrible.

Can everyone shut up and just read the feature suggestion please? Here it is in super bold letters for the third time:

“Why can’t there just be two buttons: “Retry ALSA”, “Switch to JACK”? So I could just stop pulseaudio when I see the dialog, and press “retry” so I wouldn’t have to go to the preferences and reconfigure my audio every time.”

Sucks? Sure. But Pulse Audio is the default now. 2 years is a lifetime in Software development.

Thank you.

Enough DAW programs exist which exactly do that. I’ll admit, for e.g. Midi-only sequencing this is quite a short-sighted approach but if audio processing is an application its main thing, its developer can make these demands if they want to warrant minimum results.

[b]


[/b]
It was clear enough the first time.
I will transcode this to a similar question for the Windows variant:
[font=verdana, arial, tahoma, sans-serif][font=arial, verdana, tahoma, sans-serif]Why can’t there be two options when my Asio card cannot be found? “Retry Asio”, “Switch to DirectSound” so i could plugin my USB audio card and press “retry”…
In Windows you can’t do this just like that because Windows doesn’t dynamically update the audio software accessing the audio-system on changes. Can this situation be treated better in Linux?
[font=verdana, arial, tahoma, sans-serif][font=arial, verdana, tahoma, sans-serif]

I don’t know enough about Windows to have an opinion on this, sorry. But, one thing I do know that when I’m running Windows and I have a Chrome browser playing a YouTube video, if I launch Renoise, Renoise doesn’t complain that the soundcard is busy and abort.

I think that’s the difference here?

Here’s a diagram explaining Pulse Audio:

http://upload.wikimedia.org/wikipedia/commons/0/00/Pulseaudio-diagram.svg

Scroll to the bottom of that picture and look at the [Linux Kernel].

Renoise communicates directly with that layer (ALSA).

But, the rest of Ubuntu Linux OS plays all sound through the [[Pulse Layers]].

ALSA doesn’t like to share? Not sure. All I know is that whenever any other sound is playing except Renoise, I get that “Alsa Device Busy” dialog and it boots me into (non-existant Jack) and fails. To quote suva: “cause it’s pulseaudio which is blocking the ALSA device.”

I just want a way to avoid going into the settings and changing it back. I know what is going on. I don’t need Renoise to keep forcefully booting us into a different config (that doesn’t even exist most of the time, and failing hard.).

Thanks.

i do think that when Ubuntu uses Pulseaudio in such a way, and with the knowledge that

  1. ubuntu is not a distro which takes nicely to being changed around too much (ie. removing pulseaudio), and
    b. ubuntu is still one of the most popular Linux distributions out there
    it kinda makes sense to me to have some type of support, especially when it is as simple as a button.

the fact that Windows can’t do this type of thing doesn’t mean Linux can’t either. i think it can. there isn’t a Reinitialize-button for nothing.
correct me if i’m wrong on this. i never ran into this issue because i don’t use Pulseaudio (because i don’t use Ubuntu). i do have to say that Conner not being willing to try out another distro is just plain lazy. however, i do not regard laziness a cardinal sin, as that would mean my own imminent doom as well, and as we all know we humans are selfish to the death. in other words: it’s lazy, and i agree with him.

i also don’t really see the sense in this opposition. i’ve read through the thread but don’t really understand what would be so bad about this idea. if you’re not on Linux you won’t be bothered by it, if you’re on Linux but have your sound-setup working fine you won’t be bothered by it, and if you’re on Linux and you have to deal with the problem, it is a pretty easy solution.

I don’t oppose lazyness or personal choices.
Pulseaudio can be stopped if i read comments of some others, is there perhaps anyway to stop Pulseaudio using a bash- or shell-script in Linux?
If that is true, you can also add an extra line in the same script that start starts up Renoise after Pulseaudio has been terminated, you then have a renoise startup solution that doesn’t popup error dialogs.
Perhaps i should try some vanilla virtual appliance and see how far i can get. Though this weekend i don’t have much time to spend on it (family quality time).

^ that’s true, it should definitely be possible to do something like that. after all, it’s Linux. everything is scriptable. i just don’t know how flexible Ubuntu is in handling this.