|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
ALSA library installation
|
|
Packit Service |
db8eaa |
=========================
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Installation from tarball
|
|
Packit Service |
db8eaa |
-------------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
For installation you can use these commands:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
./configure
|
|
Packit Service |
db8eaa |
make install
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Compilation from Git-sources
|
|
Packit Service |
db8eaa |
---------------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Requirements:
|
|
Packit Service |
db8eaa |
* automake
|
|
Packit Service |
db8eaa |
* libtool
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
To compile alsa-lib from source:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
./gitcompile
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
If you do not want to use the supplied gitcompile-script, you can
|
|
Packit Service |
db8eaa |
compile alsa-lib manually by using these steps:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
libtoolize --force --copy --automake
|
|
Packit Service |
db8eaa |
aclocal
|
|
Packit Service |
db8eaa |
autoheader
|
|
Packit Service |
db8eaa |
automake --foreign --copy --add-missing
|
|
Packit Service |
db8eaa |
autoconf
|
|
Packit Service |
db8eaa |
./configure
|
|
Packit Service |
db8eaa |
make
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Note: Some automake packages have missing aclocal program. Use newer version
|
|
Packit Service |
db8eaa |
in the case.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Compilation of static library
|
|
Packit Service |
db8eaa |
-----------------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
If you would like to use the static ALSA library, you need to use these
|
|
Packit Service |
db8eaa |
options for the configure script:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
./configure --enable-shared=no --enable-static=yes
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Unfortunately, due to bug in the libtool script, the shared and static
|
|
Packit Service |
db8eaa |
library cannot be built together.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Partial Builds
|
|
Packit Service |
db8eaa |
--------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
You can choose the core components to build via --enable-* or --disable-*
|
|
Packit Service |
db8eaa |
configure option for reducing the size of libasound. The selectable
|
|
Packit Service |
db8eaa |
components are: pcm, mixer, rawmidi, hwdep, seq and instr.
|
|
Packit Service |
db8eaa |
For example, --disable-rawmidi will prevent to build the stuff related
|
|
Packit Service |
db8eaa |
with raw MIDI. As default, all components are enabled.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
The PCM plugins to build can be selected via --with-pcm-plugins
|
|
Packit Service |
db8eaa |
configure option. Multiple plugins can be passed by separation with
|
|
Packit Service |
db8eaa |
comma. For example, to select _only_ rate and linear plugins (and
|
|
Packit Service |
db8eaa |
disable other plugins), pass
|
|
Packit Service |
db8eaa |
--with-pcm-plugins=rate,linear
|
|
Packit Service |
db8eaa |
Note that "hw" plugin is always enabled.
|
|
Packit Service |
db8eaa |
Passing "all" will select all available plugins (which is the default
|
|
Packit Service |
db8eaa |
behavior).
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
When you select "plug" plugin, copy and linear plugins will be
|
|
Packit Service |
db8eaa |
automatically selected, too. That is, the linear-format and
|
|
Packit Service |
db8eaa |
access-type conversions are always available with plug layer.
|
|
Packit Service |
db8eaa |
The other conversions of plug (channel shrink/expansion, rate,
|
|
Packit Service |
db8eaa |
non-linear and float conversions) are enabled when the corresponding
|
|
Packit Service |
db8eaa |
plugin is selected, too.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Configuration for cross-compilation
|
|
Packit Service |
db8eaa |
-----------------------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
When you would like to cross-compile ALSA library (e.g. compile on
|
|
Packit Service |
db8eaa |
i686 host but for arm architecture) you will need to call ./configure
|
|
Packit Service |
db8eaa |
script with additional parameters:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
CC=arm-linux-gcc ./configure --host=arm-linux
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
You can omit setting 'CC' variable and cross-compiler will be guessed too.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
So simplest version would be:
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
./configure --host=arm-linux
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
For platform names in the form cpu-vendor-os (or aliases for this)
|
|
Packit Service |
db8eaa |
you should look in 'config.guess' script. Target and all paths
|
|
Packit Service |
db8eaa |
used here are only examples and should not be directly applicable to
|
|
Packit Service |
db8eaa |
your system.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Configuration for machines without FPU
|
|
Packit Service |
db8eaa |
--------------------------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
If your machine does not have FP unit, you should use '--with-softfloat'
|
|
Packit Service |
db8eaa |
option. This option disables usage of float numbers in PCM route plugin.
|
|
Packit Service |
db8eaa |
ALSA could then leave much more CPU cycles for your applications, but you
|
|
Packit Service |
db8eaa |
could still need some floating point emulator.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Thread-safety option
|
|
Packit Service |
db8eaa |
--------------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
As default, major PCM functions of alsa-lib are built to be
|
|
Packit Service |
db8eaa |
thread-safe with pthread mutex (while this wasn't present in the
|
|
Packit Service |
db8eaa |
versions earlier than 1.1.2). If you want to build without this
|
|
Packit Service |
db8eaa |
thread-safety support but reduce the overhead, pass
|
|
Packit Service |
db8eaa |
--disable-thread-safety configure option.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Jack plugin
|
|
Packit Service |
db8eaa |
-----------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
JACK plugin is moved to alsa-plugins package.
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
Trouble Shooting
|
|
Packit Service |
db8eaa |
----------------
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
* Install path on Fedora Core 3
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
FC3 installs its system ALSA library to /lib instead of /usr/lib.
|
|
Packit Service |
db8eaa |
Specify --libdir=/lib to configure to overwrite it with the new library,
|
|
Packit Service |
db8eaa |
or run like
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
# ln -sf /usr/lib/libasound.so.2.0.0 /lib/libasound.so.2.0.0
|
|
Packit Service |
db8eaa |
|
|
Packit Service |
db8eaa |
to make symlink to the new path.
|
|
Packit Service |
db8eaa |
Note that /lib might be /lib64 on 64bit architecture.
|