Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA: Device or resource busy [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
jorro
n00b
n00b


Joined: 09 Feb 2010
Posts: 14

PostPosted: Wed Feb 10, 2010 1:02 am    Post subject: ALSA: Device or resource busy [SOLVED] Reply with quote

Hi everyone,

I had this problem for some time now and cannot find any solution. Somehow my dmix is broken, if I understood alsa correcty. I just can get one application using alsa, whatever second application I start I get something similar to:

Code:

[AO_ALSA] Playback open error: Device or resource busy


I can't find any bigger difference to the configuration of my other installations, but there it works.
My emerge --info:

Code:

Portage 2.1.7.16 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 08 Feb 2010 18:15:03 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r2
dev-lang/python:     2.6.4
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/emacs /usr/portage/local/layman/wschlich-testing /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="R X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cddb cdparanoia cdr cdrom cli consolekit cracklib crypt cups custom-optimization cxx dbus dhcp dirac divx dmix dri dts dvd dvdr dvdread emacs emboss encode evdev evo fam ffmpeg firefox flac fortran fuse gdbm gif gimp gpm gstreamer gtk gtk2 hal hald iconv ipv6 irc java jingle jpeg jpg lame laptop latex mad mikmod mmx mng modules mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap multilib mythtv ncurses nls nptl nptlonly nsplugin ogg ogm opengl openmp pam pcre pdf perl png ppds pppd pstricks python qt3 qt3support qt4 quicktime readline reflection scim sdl session sid spell spl sse sse2 sse3 ssl startup-notification symlink sysfs tcpd tex theora thunar tiff truetype unicode usb v4l v4l2 vcd vorbis wifi wma wmp x264 xcb xine xml xorg xulrunner xv xvid zlib" ALSA_CARDS="emu10k1 emu10k1x usb-audio snd-hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

My kernel:
Code:

 $ grep SND /usr/src/linux/.config  | grep -v \#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_HRTIMER=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_RTCTIMER=m
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_RAWMIDI_SEQ=m
CONFIG_SND_PCI=y
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_ATIHDMI=y
CONFIG_SND_HDA_CODEC_NVHDMI=y
CONFIG_SND_HDA_CODEC_INTELHDMI=y
CONFIG_SND_HDA_ELD=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=60
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m


~ $ grep SOUND /usr/src/linux/.config | grep -v \#
CONFIG_SOUND=y

My sound card:
Code:

~ # lspci | grep Audio
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)


Anyone can tell me what I am missing?


Last edited by jorro on Wed Feb 10, 2010 11:56 pm; edited 2 times in total
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2312
Location: /home/zach

PostPosted: Wed Feb 10, 2010 1:06 am    Post subject: Reply with quote

Can you please provide a little more information regarding which applications you are trying to use? Also, are you running KDE?
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
jorro
n00b
n00b


Joined: 09 Feb 2010
Posts: 14

PostPosted: Wed Feb 10, 2010 8:51 am    Post subject: Reply with quote

Yes, right , this was not too clear from my post. I don't use KDE or Gnome and it happens with any application. If one is running using ALSA, I can't make another one use ALSA. For example, if listen to mpd, starting mplayer to play a movie or sound file, I get the "resource is busy" warning. Same with skype, flash in firefox, vlc... Basically everything installed which could make any sound.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1024

PostPosted: Wed Feb 10, 2010 8:59 am    Post subject: Reply with quote

Are you using pulseaudio?
Does /etc/asound.conf exist?
Or does ~/.asound.conf exist?
Back to top
View user's profile Send private message
jorro
n00b
n00b


Joined: 09 Feb 2010
Posts: 14

PostPosted: Wed Feb 10, 2010 9:07 am    Post subject: Reply with quote

By the way, thanks for the replys. I'm not using pulseaudio, I have /etc/asound.conf:

Code:

 ~ $ cat /etc/asound.conf
pcm.!default {
    type hw
    card Intel
}
ctl.!default {
    type hw
    card Intel
}


I had to add this because some programms started to play music to the webcam microphone.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1024

PostPosted: Wed Feb 10, 2010 9:16 am    Post subject: Reply with quote

jorro wrote:
I had to add this because some programms started to play music to the webcam microphone.


lol, try disconnecting the webcam if possible and moving /etc/asound.conf out of the way. This way, we can see if the asound.conf needs some more editing.
Back to top
View user's profile Send private message
aCOSwt
Advocate
Advocate


Joined: 19 Oct 2007
Posts: 2076
Location: Between the keyboard and the chair

PostPosted: Wed Feb 10, 2010 9:18 am    Post subject: Re: ALSA: Device or resource busy Reply with quote

jorro wrote:
...Somehow my dmix is broken,

jorro wrote:
Code:
 ~ $ cat /etc/asound.conf
pcm.!default {
    type hw
    card Intel
}
ctl.!default {
    type hw
    card Intel
}

Well, you get two things :

1/ If this is your asound.conf and get no $HOME/.asoundrc, then your dmix is not broken... :twisted:
You... simply... do not use it ! :P
2/ With such an asound.conf, it is likely that things such as flashplayer will capture the default audio device and make other sound apps see that device busy. => for example, no sound from other audio apps when you get a flashplayered browser running in the same time ! :twisted:

About this last question, you can follow this thread : http://forums.gentoo.org/viewtopic-t-814115-highlight-.html
Back to top
View user's profile Send private message
jorro
n00b
n00b


Joined: 09 Feb 2010
Posts: 14

PostPosted: Wed Feb 10, 2010 10:52 am    Post subject: Reply with quote

Rexilion wrote:

lol, try disconnecting the webcam if possible and moving /etc/asound.conf out of the way. This way, we can see if the asound.conf needs some more editing.


This worked, now I just need to figure out how to tell the programs the right audio device. With webcam plugged in at boot, this is taken as default alsa device.

aCOSwt wrote:

Well, you get two things :

1/ If this is your asound.conf and get no $HOME/.asoundrc, then your dmix is not broken... :twisted:
You... simply... do not use it ! :P
2/ With such an asound.conf, it is likely that things such as flashplayer will capture the default audio device and make other sound apps see that device busy. => for example, no sound from other audio apps when you get a flashplayered browser running in the same time ! :twisted:

About this last question, you can follow this thread : http://forums.gentoo.org/viewtopic-t-814115-highlight-.html


OK, I didn't see that thread. I will check later when I am back from work. Thanks for the help so far.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1024

PostPosted: Wed Feb 10, 2010 3:11 pm    Post subject: Reply with quote

This should give you a pointer in the right direction:

http://alsa.opensrc.org/index.php/MultipleCards#Understanding_.2Fetc.2Fmodprobe.d.2Falsa.conf
Back to top
View user's profile Send private message
jorro
n00b
n00b


Joined: 09 Feb 2010
Posts: 14

PostPosted: Wed Feb 10, 2010 11:55 pm    Post subject: Reply with quote

Well, at the moment, it seems to work. I didn't modify alsa.conf or anything, just removed /etc/asound.conf, but after some reboots, the USB devices never gets the default device and everything seems to work correctly. So, thanks for the help everyone.
Back to top
View user's profile Send private message
dead_parrot
n00b
n00b


Joined: 26 Mar 2012
Posts: 12
Location: /EU/PL

PostPosted: Sat Apr 07, 2012 7:32 pm    Post subject: Reply with quote

Hi,

I have exactly the same problem. Unfortunately, the link http://alsa.opensrc.org/index.php/MultipleCards#Understanding_.2Fetc.2Fmodprobe.d.2Falsa.conf is not working.

How can I prevent my webcam from being a default device?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum