Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
question about use flag alsa
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 173

PostPosted: Wed Jan 09, 2013 1:07 pm    Post subject: question about use flag alsa Reply with quote

I use pulseaudio, so the best sound data flow should be:
application -> pulseaudio -> alsa_driver.
or
application -> pulseaudio_alsa_emulation_layer -> pulseaudio -> alsa_driver

for some packages, alsa flag is neccessary, like:
1. pulseaudio itself
2. apps don't support pulseaudio:
dosbox
bluez
...

and for the other packages, alsa flag should be unselected, like:
1. apps support pulseaudio:
qemu
libao
...

Then how do I correctly select alsa flag for all these packages?
Obviously I shouldn't set either "alsa" or "-alsa" in make.conf.
Should I just remove alsa from make.conf and use the package's default value?
Or must I give selection to every package in package.use?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Wed Jan 09, 2013 1:48 pm    Post subject: Reply with quote

General use flags are set in make.conf. If most of your packages need alsa, but some don't, set alsa in make.conf and -alsa in package.use per package. Or vice versa. If it's an equal split, I would set alsa in make.conf and set -alsa per package in package.use.

Hope that helps.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Wed Jan 09, 2013 2:06 pm    Post subject: Re: question about use flag alsa Reply with quote

fpemud wrote:
I use pulseaudio, so the best sound data flow should be:
application -> pulseaudio -> alsa_driver.
or
application -> pulseaudio_alsa_emulation_layer -> pulseaudio -> alsa_driver

Of course you understand that you mean the best as the best you think for you on this system here and now.

Well I mean, is there some possibility opened that you change your mind and decide that whatever through pulse is no longer the best solution ?

In other words, if there is some possibility opened to change your mind then really... the work of maintaining a per package assignment of the alsa use flag might well be overkill.

What do you expect winning in disabling the alsa use flag for one package that, because of your configuration, does not actually need it ?

- Reducing the RAM eaten by your system loading unneeded code ?
Well well... most of alsa code is in-kernel and the alsa-lib (that packages such as qemu, libao... would load if built with the alsa use flag set) will have already been loaded to satisfy pulseaudio's requirements anyway...
- Limiting the number of packages to rebuild when the alsa-lib changes and revdep-rebuild suggests to rebuild the packages that depend on it ?
Hmmm... I can't even recall if that need happened only once in the last 3 years on my system...

So... of course, if you are already used to maintaining a regularly updated package.use defining all your useflags for all your packages, be coherent and go on... but really, if this is not the case then, you might find the task somewhere... absolutely... worthless!
_________________
Back to top
View user's profile Send private message
fpemud
Apprentice
Apprentice


Joined: 15 Feb 2012
Posts: 173

PostPosted: Thu Jan 10, 2013 12:45 am    Post subject: Reply with quote

Thanks you two.

So what my understanding is:
it's not neccessary to make my system crystal clean, so select all the alsa use-flag should be good enough.

I don't take position between pa and alsa.

I read in some docs that:
1. alsa-driver in kernel is good and all the sound data will and should be eventually going to it.
2. alsa-lib has some limitations in design (I don't know exactly what) which pa doesn't have
3. pa doesn't have any limitation for ordinal desktop user (any counter-example?)
4. pa has an alsa-emu-layer but alsa don't, and there're some apps only support pa

That's why I use pulseaudio.
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Thu Jan 10, 2013 8:17 am    Post subject: Reply with quote

fpemud wrote:
So what my understanding is:
it's not neccessary to make my system crystal clean

8O I never meant that sort of thing !

I just meant that, among all the efforts needed to make some system crystal clean, removing the alsa use flag setting from make.conf and setting it on a per package basis will require an effort which is actually, and by far, not the most rewarding.

Taking the packages you gave as examples, what impacts does the setting of the alsa use flag get ?:
qemu, libao ebuilds wrote:
RDEPEND="...
alsa? ( >=media-libs/alsa-lib-1.0.13 )
..."

That is to say that these packages, when built will push alsa-lib as a dependency and when started will ask for the libasound to be loaded in ram.
But, because you use pulseaudio and because
pûlseaudio ebuild wrote:
RDEPEND="...
alsa? ( >=media-libs/alsa-lib-1.0.13 )
..."

You necessarily already get the alsa-lib package installed on your system and libasound will have been already loaded in ram.

Therefore, not setting the alsa use flag for qemu, libao... will neither make your set of installed packages cleaner nor make your ram cleaner...

But I do insist ! If you care a lot for being formally correct then... you are necessarily right when thinking of a per package assignment for all use flags including globals.
_________________
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Thu Jan 10, 2013 3:56 pm    Post subject: Reply with quote

Other people disagree with me (and that's OK!) but I recommend compiling ALSA as modules. I guess because it makes it easier to load and unload them whenever you run into sound issues and you're trying to troubleshoot. It'll save you some rebooting.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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