Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Firefox using ALSA instead of PulseAudio
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
Hello71
n00b
n00b


Joined: 17 May 2012
Posts: 35

PostPosted: Thu May 17, 2012 2:20 am    Post subject: [Solved] Firefox using ALSA instead of PulseAudio Reply with quote

Firefox seems to only output audio when all other audio applications aren't. When Firefox is outputting audio, other applications cannot output audio. As soon as Firefox stops outputting audio, other applications begin playing again.

I suspect that the cause is that Firefox is defaulting to the ALSA server instead of outputting to the PulseAudio sink.

Results of emerge --info firefox:

Code:

Portage 2.1.10.49 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r3, 3.2.12-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-Intel-R-_Core-TM-_i5_CPU_750_@_2.67GHz-with-gentoo-2.0.3
Timestamp of tree: Wed, 16 May 2012 22:45:01 +0000
ccache version 3.1.6 [disabled]
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r1, 3.2.3
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"                                                                                                                                                                                                                                             
MAKEOPTS="-j3"                                                                                                                                                                                                                                                                 
PKGDIR="/usr/portage/packages"                                                                                                                                                                                                                                                 
PORTAGE_CONFIGROOT="/"                                                                                                                                                                                                                                                         
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"                                                               
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                                                                                                                                     
PORTDIR="/usr/portage"                                                                                                                                                                                                                                                         
PORTDIR_OVERLAY=""                                                                                                                                                                                                                                                             
SYNC="rsync://rsync4.ca.gentoo.org/gentoo-portage"                                                                                                                                                                                                                             
USE="X a52 acl acpi alsa amd64 bash-completion berkdb branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative dga dri dvd dvdr encode exif firefox flac gdbm gif gpm gtk hardened iconv ipv6 jpeg kde kipi lcms libnotify lm_sensors mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp pam pango pch pcre pdf phonon plasma png policykit ppds pulseaudio qt3support qt4 readline sdl semantic-desktop session smp sound spell sse sse2 sse3 ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis x264 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zlib" 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" 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 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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 ubx" INPUT_DEVICES="evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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"                                                                                                   
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON                                                                                         
                                                                                                                                                                                                                                                                               
=================================================================                                                                                                                                                                                                             
                        Package Settings                                                                                                                                                                                                                                       
=================================================================                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                               
www-client/firefox-12.0 was built with the following:                                                                                                                                                                                                                         
USE="alsa (consolekit) crashreporter dbus ipc libnotify minimal (multilib) (policykit) startup-notification webm -bindist -custom-cflags -custom-optimization -debug -pgo (-selinux) -system-sqlite -wifi" LINGUAS="-af -ak -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -kn -ko -ku -lg -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -nso -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh_CN -zh_TW -zu"                                                                                                                                                                                                 
CFLAGS="-pipe -march=native -mno-avx"                                                                                                                                                                                                                                         
CXXFLAGS="-pipe -march=native -mno-avx"


Last edited by Hello71 on Thu May 24, 2012 12:30 am; edited 1 time in total
Back to top
View user's profile Send private message
jtshs256
n00b
n00b


Joined: 25 Mar 2011
Posts: 17

PostPosted: Thu May 17, 2012 2:39 am    Post subject: Reply with quote

emerge alsa-plugins
Back to top
View user's profile Send private message
Hello71
n00b
n00b


Joined: 17 May 2012
Posts: 35

PostPosted: Thu May 17, 2012 2:41 am    Post subject: Reply with quote

jtshs256 wrote:
emerge alsa-plugins


But other applications play audio fine.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu May 17, 2012 5:27 am    Post subject: Re: Firefox using ALSA instead of PulseAudio Reply with quote

Hello71 wrote:
Firefox seems to only output audio when all other audio applications aren't.

Are you confusing firefox with Adobe Flash?

I don't use pulseaudio. Can pulseaudio show what apps are using it?

ALSA's dmix only works properly with stereo (2 speakers). See my ~/.asoundrc for a dmix setup that works for surround sound also.

Show which apps are using ALSA:
Code:
fuser -fv /dev/snd/* /dev/dsp*

_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
Hello71
n00b
n00b


Joined: 17 May 2012
Posts: 35

PostPosted: Thu May 17, 2012 8:39 pm    Post subject: Re: Firefox using ALSA instead of PulseAudio Reply with quote

PaulBredbury wrote:
Hello71 wrote:
Firefox seems to only output audio when all other audio applications aren't.

Are you confusing firefox with Adobe Flash?

I don't use pulseaudio. Can pulseaudio show what apps are using it?

ALSA's dmix only works properly with stereo (2 speakers). See my ~/.asoundrc for a dmix setup that works for surround sound also.

Show which apps are using ALSA:
Code:
fuser -fv /dev/snd/* /dev/dsp*


The same problem occurs with both Firefox's native HTML5 audio and when Flash plays audio in the plugin-container.

Output of "fuser -v /dev/snd/* /dev/dsp*" (with Amarok playing under PulseAudio):

Code:

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  alex       2590 F.... pulseaudio
/dev/snd/controlC2:  alex       2590 F.... pulseaudio
/dev/snd/pcmC0D0p:   alex       2590 F...m pulseaudio


When Firefox starts playing:

Code:

                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  alex       2499 f.... firefox
                     alex       2590 F.... pulseaudio
/dev/snd/controlC2:  alex       2590 F.... pulseaudio
/dev/snd/pcmC0D0p:   alex       2499 F...m firefox
/dev/snd/timer:      alex       2499 F.... firefox
Back to top
View user's profile Send private message
DuzaK
n00b
n00b


Joined: 31 Mar 2009
Posts: 14
Location: Glückstadt, Germany

PostPosted: Sun May 20, 2012 1:20 pm    Post subject: Reply with quote

A bit late, but try setting pulse as the default device in .asoundrc (alsa-plugins required)
Code:
pcm.!default {
    type pulse
    hint.description "Default Audio Device"
}
ctl.!default {
    type pulse
}

The wiki says we don't need this any more but i couldn't get sound working through alsa-plugin>pulse in wine without it.
I suppose Firefox can be dealt with the same way.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


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

PostPosted: Tue Jun 09, 2015 8:56 pm    Post subject: Reply with quote

@DuzaK:


Thanks for the suggestion !


Seems like I had this set for some time - then for some reason had it disabled and removed,

afterwards firefox would play sound on alsa (no pulseaudio) on full volume [Oh the fun :lol: ]


Re-adding hopefully lets it work again with pulseaudio
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

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