Gentoo Archives: gentoo-dev

From: "Diego 'Flameeyes' Pettenò" <flameeyes@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] USE_EXPAND variable to choose ALSA PCM plugins
Date: Wed, 13 Dec 2006 15:16:31
Message-Id: 200612131610.01862@enterprise.flameeyes.is-a-geek.org
1 Not sure if anybody here knows, but alsa-plugins is not the only set of
2 plugins an user installs in its system, many others are installed by alsa-lib
3 itself, they are the basic plugins like dmix, dsnoop, iec958, plug... the
4 ones that many asoundrc already make use of.
5
6 Now of course, most of the users need them, and disabling them would be pretty
7 bad, but again, there are reasons to disable some of them at least,
8 especially when targetting small embedded devices.
9
10 If nobody has anything against this, I'll add an ALSA_PCM_PLUGINS variable
11 where users can choose the plugins they want built, to reduce the amount of
12 code installed by alsa-lib:
13
14 Calculating dependencies... done!
15 [ebuild R ] media-libs/alsa-lib-1.0.14_rc1 USE="-alisp -debug -doc -midi"
16 ALSA_PCM_PLUGINS="-adpcm -alaw -asym -copy -dmix -dshare -dsnoop -empty -extplug -file -hooks
17 iec958 -ioplug -ladspa -lfloat -linear -meter -mulaw -multi -null
18 plug -rate -route -share -shm -softvol" 0 kB
19
20 As you can see, my system even if it's not an embedded system is skipping most
21 of them, as I don't use dmix or dsnoop (I'd rather leave it to PulseAudio,
22 that for me had better results) and I don't have much more use for my
23 soundcard but playing music and DVDs.
24
25 The default for them, in base/ profile directly, should be of _all_ of them.
26 There's not the problem as for ALSA_CARDS that some of them have dependencies
27 or that they might change between versions, as this configure is smarter and
28 filters them already.
29
30 As you can see, the modified ebuild I'm currently using also has two more
31 useflags, midi and alisp: the first disable all the support for sequencer,
32 rawmidi, instrumentation and samples loading, I think that nowadays most of
33 the people simply don't care about that it so it might be worth having it as
34 useflag (SuSE seems to disable at least sampleloading), while the latter
35 disables alisp interpreter for advanced (and complex) configuration (SuSE
36 also disable this).
37
38 The result is quite good after all; with a -ggdb compiled alsa-lib packages, I
39 get this change in the size of the package:
40
41 flame@enterprise ~/devel/gentoo-x86/media-libs/alsa-lib % qsize alsa-lib
42 media-libs/alsa-lib-1.0.14_rc1: 133 files, 25 non-files, 6608.758 KB
43 flame@enterprise ~/devel/gentoo-x86/media-libs/alsa-lib % qsize alsa-lib
44 media-libs/alsa-lib-1.0.14_rc1: 127 files, 22 non-files, 3666.628 KB
45
46 it is almost the half.
47
48 So, anybody has reasons not to pursue this road?
49
50 --
51 Diego "Flameeyes" Pettenò - http://farragut.flameeyes.is-a-geek.org/
52 Gentoo/Alt lead, Gentoo/FreeBSD, Video, Sound, ALSA, PAM, KDE, CJK, Ruby ...

Replies