Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

snd_pcm_open failed: Device or resource busy

2,600 views
Skip to first unread message

Haines Brown

unread,
Jun 29, 2015, 11:26:25 AM6/29/15
to
I fiddled to get Skype going yesterday, and in the process broke
Audacious' ability to send sound to my sound card when playing a CD. I
get a general popup: "Failed to open audio output." and an ALSA error
popup: "snd_pcm_open failed: Device or resource busy."

However, if I do $ pulseaudio --kill, I get sound from Audacious, and so
there is some kind of conflict with ALSA.

In /etc/alsa-base.conf I have:

options snd slots=snd-virtuoso,snd-hda-intel,snd-hda-intel

In pavucontrol, Output Devices, it seems my Xonar sound card was set to
be default if pulseaudio is running, but disappears when pulseaudio is
killed. I don't understand this.

I'd like to be able to listen to CD disks without killing pulseaudio.


Henrik Carlqvist

unread,
Jun 30, 2015, 1:42:32 AM6/30/15
to
In short, this is because only one process at any given time can have
your audio device open. Bytes sent to the device becomes amplitudes in
your speaker. Two or more processes sending unrelated bytes would only
cause bad noise.

The solution, if you want to be able to user more than one program giving
sound at the same time is to use some kind of mixer software (sound
server). That mixer software is then the only process having the sound
device open and all other sound processes send their data to the mixer
software. Pulseaudio is one such mixer software. There are also others to
choose from like aRts, ESD and JACK.

If you don't want to kill pulseaudio to play CD you should use some
software that speaks to pulseaudio instead of the soundcard directly to
play your CD. You could also use some software that instructs the CD to
send audio by an analog cable between the CD drive and your sound card.

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

Haines Brown

unread,
Jun 30, 2015, 8:31:50 AM6/30/15
to
Henrik Carlqvist <Henrik.C...@deadspam.com> writes:

> On Mon, 29 Jun 2015 11:26:23 -0400, Haines Brown wrote:
>> I fiddled to get Skype going yesterday, and in the process broke
>> Audacious' ability to send sound to my sound card when playing a CD. I
>> get a general popup: "Failed to open audio output." and an ALSA error
>> popup: "snd_pcm_open failed: Device or resource busy."
>>
>> However, if I do $ pulseaudio --kill, I get sound from Audacious, and so
>> there is some kind of conflict with ALSA.

>> I'd like to be able to listen to CD disks without killing pulseaudio.
>
> In short, this is because only one process at any given time can have
> your audio device open. Bytes sent to the device becomes amplitudes in
> your speaker. Two or more processes sending unrelated bytes would only
> cause bad noise.

The only reason I ran pulseaudio was because I wanted to Skype one
person. I understand pulseaudio can't be running at the same time as
ALSA. I now reinstall pulseaudio and Audacious works OK (and Alsaplayer
still does not work0.

> The solution, if you want to be able to user more than one program giving
> sound at the same time is to use some kind of mixer software (sound
> server).

Rather than use more than one sound program at once, I need only to
switch back and forth between them. Currently, pavucontrol, Playback,
shows ALSA/audacious playing the CD. Pavucontrol shows that my sound
card is the output device. The Skype, Options, cannot produce a test
sound.

To switch back and forth, perhaps I could do:
$ /etc/init.d/pulseaudio --kill / --start and do
$ /etc/init.d/alsa-utils stop / restart

but my sense is I will not recover ALSA sound until I actually purge
pulseaudio. Should the above commands work? (can't test now because I
need to get to work).

> If you don't want to kill pulseaudio to play CD you should use some
> software that speaks to pulseaudio instead of the soundcard directly to
> play your CD. You could also use some software that instructs the CD to
> send audio by an analog cable between the CD drive and your sound card.

I really would like to avoid pulseaudio altogether. I may install it and
Skype just on a laptop with which I never play CDs.


0 new messages