Gentoo Archives: gentoo-user

From: Lasse Pouru <lasse.pouru@××××××××××××.fi>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Pure Data (Pd) can't access ALSA device
Date: Fri, 22 Sep 2017 20:12:08
Message-Id: 871smyqyom.fsf@edu.turkuamk.fi
In Reply to: Re: [gentoo-user] Pure Data (Pd) can't access ALSA device by Daniel Sonck
1 I don't (and won't) use PulseAudio and haven't set up dmix or anything
2 like it. The weird thing is the simultaneous audio works with every
3 other program I use (Qutebrowser, mpd, Audacity etc.) -- it's only Pd
4 that gives the error.
5
6 I already use JACK when recording but it would be more convenient for me
7 to use ALSA when I'm just quickly trying out stuff. (I've set up JACK to
8 use an audio interface I don't have plugged in most of the time.)
9
10 - Lasse
11
12 Daniel Sonck <daniel@×××××.nl> writes:
13
14 > This sounds pretty normal to me. ALSA isn't really suited for simultaneous
15 > audio access. In general with ALSA you have only one program that can use
16 > audio at a time, or you use the mixer module from ALSA. I assume a program
17 > running on the background has claimed ALSA already for certain reasons.
18 >
19 > If you run PulseAudio (which is pretty standard on a regular desktop), this
20 > one will be the cullprit. Usually the jack tools are smart enough to suspend
21 > pulseaudio. You can in fact run puredata through the pasuspend script which
22 > suspends pulseaudio so ALSA is free again.
23 >
24 > What I recommend (which you already tried) is using JACK. JACK will take
25 > ownership of your ALSA device, and gives you a capable routing system allowing
26 > you to hook up more than just PureData to your audio card. Optionally routing
27 > it to other software. In addition, it's possible to compile pulseaudio with
28 > jack support which means you can in fact have regular (non-audio) apps work
29 > together with jack, which is what I sometimes use: Set up my audio studio
30 > setup, while still having pulseaudio around for stuff like browsers and video
31 > players. If I suddenly have a creative spark, I have my studio ready to play
32 > with. When I'm done, browsers still work with sound
33 >
34 > Daniel
35 >
36 > On vrijdag 22 september 2017 18:23:10 CEST Lasse Pouru wrote:
37 >> I can't get Pure Data to work with ALSA. It detects my sound card, but
38 >> whenever I try to turn on the audio I get the error:
39 >>
40 >> ALSA output error (snd_pcm_open): Device or resource busy.
41 >>
42 >> I've tried both using the ebuild from the audio-overlay and compiling
43 >> from the source on the Pd website, both behave the same. I've read that
44 >> Pd deals with ALSA differently than most other programs, but haven't
45 >> found an explanation how. I did get it to work with JACK.
46 >>
47 >> - Lasse

Replies

Subject Author
[gentoo-user] Re: Pure Data (Pd) can't access ALSA device Ian Zimmerman <itz@××××××××××××.org>