1 2 ALSA library installation 3 ========================= 4 5Installation from tarball 6------------------------- 7 8For installation you can use these commands: 9 10 ./configure 11 make install 12 13 14Compilation from Git-sources 15--------------------------- 16 17Requirements: 18 * automake 19 * libtool 20 21To compile alsa-lib from source: 22 23 ./gitcompile 24 25If you do not want to use the supplied gitcompile-script, you can 26compile alsa-lib manually by using these steps: 27 28 libtoolize --force --copy --automake 29 aclocal 30 autoheader 31 automake --foreign --copy --add-missing 32 autoconf 33 ./configure 34 make 35 36 37Note: Some automake packages have missing aclocal program. Use newer version 38 in the case. 39 40 41Compilation of static library 42----------------------------- 43 44If you would like to use the static ALSA library, you need to use these 45options for the configure script: 46 47 ./configure --enable-shared=no --enable-static=yes 48 49Unfortunately, due to bug in the libtool script, the shared and static 50library cannot be built together. 51 52 53Partial Builds 54-------------- 55 56You can choose the core components to build via --enable-* or --disable-* 57configure option for reducing the size of libasound. The selectable 58components are: pcm, mixer, rawmidi, hwdep, seq and instr. 59For example, --disable-rawmidi will prevent to build the stuff related 60with raw MIDI. As default, all components are enabled. 61 62The PCM plugins to build can be selected via --with-pcm-plugins 63configure option. Multiple plugins can be passed by separation with 64comma. For example, to select _only_ rate and linear plugins (and 65disable other plugins), pass 66 --with-pcm-plugins=rate,linear 67Note that "hw" plugin is always enabled. 68Passing "all" will select all available plugins (which is the default 69behavior). 70 71When you select "plug" plugin, copy and linear plugins will be 72automatically selected, too. That is, the linear-format and 73access-type conversions are always available with plug layer. 74The other conversions of plug (channel shrink/expansion, rate, 75non-linear and float conversions) are enabled when the corresponding 76plugin is selected, too. 77 78 79Configuration for cross-compilation 80----------------------------------- 81 82When you would like to cross-compile ALSA library (e.g. compile on 83i686 host but for arm architecture) you will need to call ./configure 84script with additional parameters: 85 86CC=arm-linux-gcc ./configure --host=arm-linux 87 88You can omit setting 'CC' variable and cross-compiler will be guessed too. 89 90So simplest version would be: 91 92./configure --host=arm-linux 93 94For platform names in the form cpu-vendor-os (or aliases for this) 95you should look in 'config.guess' script. Target and all paths 96used here are only examples and should not be directly applicable to 97your system. 98 99Configuration for machines without FPU 100-------------------------------------- 101 102If your machine does not have FP unit, you should use '--with-softfloat' 103option. This option disables usage of float numbers in PCM route plugin. 104ALSA could then leave much more CPU cycles for your applications, but you 105could still need some floating point emulator. 106 107Thread-safety option 108-------------------- 109 110As default, major PCM functions of alsa-lib are built to be 111thread-safe with pthread mutex (while this wasn't present in the 112versions earlier than 1.1.2). If you want to build without this 113thread-safety support but reduce the overhead, pass 114--disable-thread-safety configure option. 115 116Jack plugin 117----------- 118 119JACK plugin is moved to alsa-plugins package. 120 121Trouble Shooting 122---------------- 123 124* Install path on Fedora Core 3 125 126 FC3 installs its system ALSA library to /lib instead of /usr/lib. 127 Specify --libdir=/lib to configure to overwrite it with the new library, 128 or run like 129 130 # ln -sf /usr/lib/libasound.so.2.0.0 /lib/libasound.so.2.0.0 131 132 to make symlink to the new path. 133 Note that /lib might be /lib64 on 64bit architecture. 134