You are not logged in.

#1 2017-02-13 13:26:08

shinkawa
Member
Registered: 2017-02-03
Posts: 4

ALSA and cmus - Error: opening audio device: Device or resource busy

I can play audio using cmus without problems usually, but run into the following error when another program (Firefox or Chormium) is already outputting sound and I try to play a song in cmus:

Error: opening audio device: Device or resource busy

If I start cmus playing first and then try to load a video in my browser, the video player just sits there with a buffering icon, and immediately begins to play once I exit cmus. I am able to simultaneously play videos in boh Firefox and Chromium without a problem. Furthermore, the following two sound test commands can run simultaneously and both output sound correctly:

speaker-test -c 2 -D default
speaker-test-c -D default -t wav

Here is the output of aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3227 Analog [ALC3227 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

When I play audio through something, the "Subdevices" of card 0 displays 0/1 instead of 1/1.

I do not have either .asoundrc or /etc/asound.conf, but have created them both previously in my attempts, following the Arch Wiki instructions on dmix.

The only change that I have kept, and not undone is changing the default audio device for ALSA in /etc/modprobe.d/modprobe.conf to include the following line suggested in this post:

options snd_hda_intel index=1,0

If I can hear sound from both Chromium and Firefox, or both of the above speaker-test commands, this means that dmix is working by default, right?

Any help here would be much appreciated, thanks!

Offline

#2 2017-02-13 14:06:58

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,172

Re: ALSA and cmus - Error: opening audio device: Device or resource busy

Unless you have some reason for not using pulseaudio I would suggest installing pulseaudio.


Arch is home!
sway rofi qutebrowser vifm vim mutt lizzy pass

Online

#3 2017-07-17 08:36:43

maggick
Member
From: eridani
Registered: 2017-07-17
Posts: 1

Re: ALSA and cmus - Error: opening audio device: Device or resource busy

I had exactly the same problem having both pulseaudio and ALSA.
You need to modify CMUS configuration stored in ~/.config/cmus/autosave

You need to change the line
set output_plugin=alsa
to
set output_plugin=pulse

Last edited by maggick (2017-07-17 08:37:34)

Offline

#4 2020-07-25 06:15:34

iannnn
Member
Registered: 2020-07-25
Posts: 1

Re: ALSA and cmus - Error: opening audio device: Device or resource busy

maggick wrote:

I had exactly the same problem having both pulseaudio and ALSA.
You need to modify CMUS configuration stored in ~/.config/cmus/autosave

You need to change the line
set output_plugin=alsa
to
set output_plugin=pulse

I hate to necropost, but I just wanted to say that this fixed my issues. Thank you!

Offline

#5 2020-07-25 07:08:25

GaKu999
Member
Registered: 2020-06-21
Posts: 126

Re: ALSA and cmus - Error: opening audio device: Device or resource busy

What with this thread that gets necrobumped from time to time for no valid reason...
The original issue is from 2017, even if you want to thank the author don’t necrobump an old thread...

Two different users necrobumping a thread on their first post...dang...

Last edited by GaKu999 (2020-07-25 07:10:45)

Offline

#6 2020-07-25 12:02:44

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 3,242

Re: ALSA and cmus - Error: opening audio device: Device or resource busy

iannnnn, welcome to the forum, but please read the Code of Conduct, and do not necrobump.

Gaku999, instead of continuing the thread, please use the Report link to let the staff know about a necrobump.

Closing.

Offline

Board footer

Powered by FluxBB