Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Pulseaudio on top of ALSA, getting sound from only one app
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
gmaksim
n00b
n00b


Joined: 16 Jun 2005
Posts: 19
Location: Croatia

PostPosted: Wed Feb 14, 2018 11:53 am    Post subject: Pulseaudio on top of ALSA, getting sound from only one app Reply with quote

Hi,

I have been going trough Gentoo ALSA and Pulseaudio Wiki and have successfully got sound from applications like VLC or MPlayer but only from one app at the time. I have read different posts on the Internet and on this forum about that problem but they don't reflect my system or solve my problem. For instance I haven't got .asoundrc in $HOME folder or asound.conf in /etc to configure and as I said I'm using Pulseaudio on top of installed ALSA. Also somewhere is mentioned some DMIX which I presume is some kind of mixer for ALSA but if I use Pulseaudio which is also mixer if I understand it correctly do I need him and if I do how to emerge it and configure the system to use it as default for all apps?
I tried to play with sound settings in second instance of VLC which is playing video, but with no success. Tried changing sound output from default device to different outputs like ALSA, Pulseaudio even physical sound card (getting error when trying to change sound output in VLC to physical sound card; VLC saying that soundcard is beening used) but also with no result. I am getting only sound from VLC that was first started and only when I close that VLC the sound from second instance got trough to my speakers. Also I noticed that on some occasions if I change volume in VLC it is actually changing volume for the whole system as if he outputs the sound directly to the sound card circumpassing ALSA or Pulseaudio.
The hardware on which Gentoo AMD64 edition is installed is Lenovo L512 notebook with this soundcard:

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)

p.s. Have patience with me :) and if you need more info about setup ask but just guide me on how to get that info for you
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6654
Location: almost Mile High in the USA

PostPosted: Wed Feb 14, 2018 8:24 pm    Post subject: Reply with quote

What are your USE flags for each sound application? (You should have USE=pulseaudio; USE=alsa if the app does not support pulseaudio natively)
What are your USE flags for media-sound/pulseaudio (You'll need USE=alsa and USE=alsa-plugin to let alsa applications use pulseaudio)?

Is pulseaudio starting automatically through dbus (do you see pulseaudio running when you start a sound application)?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
gmaksim
n00b
n00b


Joined: 16 Jun 2005
Posts: 19
Location: Croatia

PostPosted: Thu Feb 15, 2018 6:32 pm    Post subject: Reply with quote

eccerr0r wrote:
What are your USE flags for each sound application? (You should have USE=pulseaudio; USE=alsa if the app does not support pulseaudio natively)
What are your USE flags for media-sound/pulseaudio (You'll need USE=alsa and USE=alsa-plugin to let alsa applications use pulseaudio)?

Is pulseaudio starting automatically through dbus (do you see pulseaudio running when you start a sound application)?


For VLC I emerged it with no special USE flags in /etc/portage/package.use/ and for alsa-plugin I have USE flag pulseaudio in /etc/portage/package.use/
I don't know if pulseaudio is starting automatically through dbus but I have sound in Xfce4 sound applications when play some video. To be honest I haven't any sound when I log on in Xfce4 like in Windows where you here logon sound. I have emerged xfce-extra/xfce4-pulseaudio-plugin which is starting normally and with that package I think I'm controlling sound volume with buttons on my notebook. So do I reemerge alsa and alsa-plugins with USE flag pulseaudio or vice-versa? How to check if pulseaudio is starting automatically because I can't find him in rc default? And for VLC I must reemerge it with USE flag pulseaudio or can I set somehow system wide configuration that all packages that have sound output go through pulseaudio and how can I do that (I mean exact commands)?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6654
Location: almost Mile High in the USA

PostPosted: Thu Feb 15, 2018 6:39 pm    Post subject: Reply with quote

You can try setting USE=alsa pulseaudio alsa-plugin in make.conf

and "emerge --update --newuse --deep --ask @world" to refresh all the USE flags. Probably have one missing somewhere.

The pulseaudio plugin for xfce just puts a clicky volume control on the status bar. If you have pavucontrol installed, it can run that. This is a pretty indispensable tool for pulseaudio IMHO, though if your PA isn't working, neither will this...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
gmaksim
n00b
n00b


Joined: 16 Jun 2005
Posts: 19
Location: Croatia

PostPosted: Thu Feb 15, 2018 7:32 pm    Post subject: Reply with quote

eccerr0r wrote:
You can try setting USE=alsa pulseaudio alsa-plugin in make.conf

and "emerge --update --newuse --deep --ask @world" to refresh all the USE flags. Probably have one missing somewhere.

The pulseaudio plugin for xfce just puts a clicky volume control on the status bar. If you have pavucontrol installed, it can run that. This is a pretty indispensable tool for pulseaudio IMHO, though if your PA isn't working, neither will this...


I looked in /etc/portage/make.conf and in there I found that I have written to use USE flags alsa and pulseaudio so I add alsa-plugin USE flag but when I tried to emerge @world with new USE flags Portage i saying that is nothing to emerge?!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6654
Location: almost Mile High in the USA

PostPosted: Thu Feb 15, 2018 7:44 pm    Post subject: Reply with quote

Hmm...something strange still going on.

If you go ahead and run pavucontrol and then click on the playback tab, see what programs are connected to pulseaudio. Then run each application and see if something shows up in playback. If you see a program that doesn't open a connection and thus show up in pavucontrol, then that application is trying to connect to alsa directly -- which it's not supposed to do. It should go through the translation layer at least...

Also, if you run alsamixer it should show up as "PulseAudio" card.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
gmaksim
n00b
n00b


Joined: 16 Jun 2005
Posts: 19
Location: Croatia

PostPosted: Tue Feb 20, 2018 9:06 am    Post subject: Reply with quote

Hi!

One more thing is it possible that when I use vncserver as a normal user it recognizes sound cards with pulseaudio so when I start web page with sound playing or some media player it plays that sound locally on computer on which vncserver has been started and which I control with VNC client? I don't need sound passing trough VNC session but I need that application sound that I have started in VNC session to play on computer to which I connect using vncserver and some VNC client?
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