Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA works, but PulseAudio gives "Error opening PCM device"
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

Joined: 22 Jan 2010
Posts: 1
Location: Norway

PostPosted: Fri Mar 20, 2015 9:21 am    Post subject: ALSA works, but PulseAudio gives "Error opening PCM dev Reply with quote


I am having issues with getting PulseAudio to work nicely with ALSA. I got ALSA to work and the following command is outputting sound OK to my speakers and headphones: aplay -D plughw:1 /usr/share/sounds/alsa/Front_Center.wav. Using -D front:1 works as well.

I normally like to figure these things out myself but after having googled for hours yesterday I am at a loss. I have also tried updating both .asoundrc, /etc/asound.conf and tried deleting ~/.config/pulse with no different result. As a last desperate attempt I have upgraded my kernel to 3.19.2 and PulseAudio to 6.0. I am on a Lenovo ThinkPad T440s.

I hope you guys/gals can tell me that this is just some stupid error on my part and have a reasonable explanation of why and how, because audio is the last piece of the puzzle to get all the drivers/components on this computer to work smoothly with Gentoo. :)

Following is the relevant output of "pulseaudio -vvvv" including the ALSA device I am using.

I: [pulseaudio] source.c: Created source 2 "alsa_input.pci-0000_00_1b.0.analog-stereo" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     alsa.resolution_bits = "16"
I: [pulseaudio] source.c:     device.api = "alsa"
I: [pulseaudio] source.c:     device.class = "sound"
I: [pulseaudio] source.c:     alsa.class = "generic"
I: [pulseaudio] source.c:     alsa.subclass = "generic-mix"
I: [pulseaudio] source.c: = "ALC3232 Analog"
I: [pulseaudio] source.c: = "ALC3232 Analog"
I: [pulseaudio] source.c:     alsa.subdevice = "0"
I: [pulseaudio] source.c:     alsa.subdevice_name = "subdevice #0"
I: [pulseaudio] source.c:     alsa.device = "0"
I: [pulseaudio] source.c:     alsa.card = "1"
I: [pulseaudio] source.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] source.c:     alsa.long_card_name = "HDA Intel PCH at 0xf0634000 irq 46"
I: [pulseaudio] source.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] source.c:     device.bus_path = "pci-0000:00:1b.0"
I: [pulseaudio] source.c:     sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card1"
I: [pulseaudio] source.c:     device.bus = "pci"
I: [pulseaudio] source.c: = "8086"
I: [pulseaudio] source.c: = "Intel Corporation"
I: [pulseaudio] source.c: = "9c20"
I: [pulseaudio] source.c: = "8 Series HD Audio Controller"
I: [pulseaudio] source.c:     device.form_factor = "internal"
I: [pulseaudio] source.c:     device.string = "front:1"
I: [pulseaudio] source.c:     device.buffering.buffer_size = "65536"
I: [pulseaudio] source.c:     device.buffering.fragment_size = "32768"
I: [pulseaudio] source.c:     device.access_mode = "mmap+timer"
I: [pulseaudio] source.c: = "analog-stereo"
I: [pulseaudio] source.c:     device.profile.description = "Analog Stereo"
I: [pulseaudio] source.c:     device.description = "Built-in Audio Analog Stereo"
I: [pulseaudio] source.c:     alsa.mixer_name = "Realtek ALC3232"
I: [pulseaudio] source.c:     alsa.components = "HDA:10ec0292,17aa220c,00100001"
I: [pulseaudio] source.c:     module-udev-detect.discovered = "1"
I: [pulseaudio] source.c:     device.icon_name = "audio-card-pci"
D: [pulseaudio] alsa-util.c: Trying plughw:1 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] alsa-util.c: Error opening PCM device plughw:1: Device or resource busy
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=plughw:1"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

Following is my /etc/pulse/ (Note: I have also tried using just device=hw:1 with no different result).
 load-module module-alsa-sink device=plughw:1

Following is my lspci -nn | grep -i audio:
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 0b)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series HD Audio Controller [8086:9c20] (rev 04)

Following is my cat /proc/asound/cards
 0 [HDMI           ]: HDA-Intel - HDA Intel HDMI
                      HDA Intel HDMI at 0xf0630000 irq 45
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf0634000 irq 46

Following is my /etc/asound.conf

pcm.!default {
   type plug
   slave {
      pcm "hw:1,0"

ctl.!default {
   type hw
   card 1

Following is my ~/.asoundrc
defaults.pcm.!card 1
defaults.pcm.!device 0

Following is my emerge --info
Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop, gcc-4.8.3, glibc-2.19-r1, 3.19.2-gentoo x86_64)
System uname: Linux-3.19.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-4600U_CPU_@_2.10GHz-with-gentoo-2.2
KiB Mem:     7858536 total,   6757608 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of tree: Fri, 20 Mar 2015 00:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.4
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.19-r1::CatoOverlay
Repositories: gentoo CatoOverlay
CFLAGS="-O2 -pipe -march=core-avx-i -mavx2"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core-avx-i -mavx2"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="X a52 aac acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gnome gpm gtk iconv ipv6 jpeg lcms ldap libav libnotify mad mmx mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support readline sdl session spell sse sse2 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en nb" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Back to top
View user's profile Send private message

Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Sun Mar 22, 2015 10:18 pm    Post subject: Reply with quote

well, close the apps that currently access the sound card and try again (oftentimes was the case for me with e.g. sound-mixers or volume control applets)

fuser -a /dev/snd/*


Hardcore Gentoo Linux user since 2004 :D
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