Difference between revisions of "ALSA Utilities"

From CBLFS
Jump to navigationJump to search
(Configuration Information)
(Configuration Information)
 
(23 intermediate revisions by 10 users not shown)
Line 2: Line 2:
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.13.tar.bz2
+
| ftp://ftp.alsa-project.org/pub/utils/alsa-utils-{{ALSA Utilities-Version}}.tar.bz2
 
|}
 
|}
  
 
----
 
----
 +
 +
{{Package-Introduction|The ALSA Utilities package contains the command line utilities for the ALSA project. This package can be compiled only with the installed ALSA driver and the ALSA C library.|http://www.alsa-project.org/}}
  
 
== Dependencies ==
 
== Dependencies ==
Line 11: Line 13:
 
=== Required ===
 
=== Required ===
 
* [[ALSA Library]]
 
* [[ALSA Library]]
 +
 +
=== Optional ===
 +
* [[Dialog]] (used by alsaconf)
 +
* [[xmlto]]
  
 
== Non-Multilib ==
 
== Non-Multilib ==
 +
 +
If you do not have [[xmlto]] add --disable-xmlto to the configure command.
 +
If building with systemd add --with-systemdsystemunitdir=/lib/systemd/system to
 +
the configure command.
  
 
Compile the package:
 
Compile the package:
Line 26: Line 36:
 
'''''This package does not provide any libraries so only one installation is needed.'''''
 
'''''This package does not provide any libraries so only one installation is needed.'''''
  
=== 32Bit ===
+
=== 64Bit ===
 
 
Compile the package:
 
 
 
CC="gcc ${BUILD32}" ./configure &&
 
make
 
 
 
Install the package
 
 
 
make install
 
 
 
=== N32 ===
 
 
 
Compile the package:
 
 
 
CC="gcc ${BUILDN32}" ./configure &&
 
make
 
 
 
Install the package
 
  
make install
+
If you do not have [[xmlto]] add --disable-xmlto to the configure command.
 +
If building with systemd add --with-systemdsystemunitdir=/lib/systemd/system to the configure command.
  
=== 64Bit ===
 
  
 
Compile the package:
 
Compile the package:
Line 60: Line 52:
  
 
== Configuration Information ==
 
== Configuration Information ==
 +
If using systemd, no configuration is needed and you can safely skip the rest of this page.
 +
Else, use a bootscript to store the values at shutdown.
  
Use a bootscript to store the values at shutdown.
+
As the root user, install the init script /etc/rc.d/init.d/alsa included in the [[bootscripts]] package.
 
 
As the root user, install the init script /etc/rc.d/init.d/alsa included in the [[blfs-bootscripts]] package.
 
  
 
  make install-alsa
 
  make install-alsa
  
Note that all channels of your sound card are muted by default. You can use the alsamixer program from the ALSA Utilities to change this.
+
{{Note|All channels of your sound card are muted by default. You can use the alsamixer program from the ALSA Utilities to change this.}}
 
 
The first time the alsactl program is run from the udev rule below, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands as the root user:
 
 
 
touch /etc/asound.state &&
 
alsactl store
 
  
 
As the root user, install a new Udev rules file to create the audio device nodes and run the restore script:
 
As the root user, install a new Udev rules file to create the audio device nodes and run the restore script:
Line 91: Line 78:
 
  EOF
 
  EOF
 
  chmod 644 /etc/udev/rules.d/15-alsa.rules
 
  chmod 644 /etc/udev/rules.d/15-alsa.rules
 +
 +
udevtrigger /etc/udev/rules.d/15-alsa.rules
 +
 +
Using Newer udev, udevtrigger is removed from the install, use
 +
 +
udevadm trigger /etc/udev/rules.d/15-alsa.rules
  
 
* Note for users with multiple soundcards
 
* Note for users with multiple soundcards
You can chose which soundcard is your primary soundcard when adding something like the following to modules.conf:
+
[http://alsa.opensrc.org/MultipleCards Alsa tutorial for multiple soundcards]
  
  alias snd-card-0 snd-emu10k1
+
The first time the alsactl program is run from the udev rule above, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands as the root user:
   
+
 
alias snd-card-1 snd-intel8x0
+
  touch /etc/asound.state &&
 +
  alsactl store
 +
 
 +
= Contents =
  
In this case, an internal nForce3 soundcard and a SoundBlaster Audigy.
+
{| style="text-align: left;"
 +
|-valign="top"
 +
! Installed Programs:
 +
| alsactl, alsaconf, alsamixer, amidi, amixer, aplay, iecset, aconnect, aplaymidi, arecordmidi, aseqdump, aseqnet, speaker-test
 +
|-valign="top"
 +
! Installed Libraries:
 +
| None
 +
|-valign="top"
 +
! Installed Directory:
 +
| /usr/share/alsa/speaker-test, /ut/share/sounds/alsa
 +
|}
  
== Contents ==
+
=== Short Descriptions ===
  
* Installed Programs: alsactl, alsaconf, alsamixer, amidi, amixer, aplay, iecset, aconnect, aplaymidi, arecordmidi, aseqdump, aseqnet, speaker-test
+
{| style="text-align: left;"
* Installed Directories: /usr/share/alsa/speaker-test, /usr/share/sounds/alsa
+
|-valign="top"
 +
! alsactl
 +
| is a utility for soundcard settings management.
 +
|-valign="top"
 +
! alsaconf
 +
| is the ALSA driver configurator script.
 +
|-valign="top"
 +
! aplay/arecord
 +
| is a utility for the playback/capture of .wav,.voc,.au files.
 +
|-valign="top"
 +
! amixer
 +
| is a command line mixer.
 +
|-valign="top"
 +
! alsamixer
 +
| is an ncurses mixer.
 +
|-valign="top"
 +
! amidi
 +
| is a utility to send/receive sysex dumps or other MIDI data.
 +
|-valign="top"
 +
! iecset
 +
| is a utility to show/set the IEC958 status bits.
 +
|-valign="top"
 +
! aconnect
 +
| ???
 +
|-valign="top"
 +
! aplaymidi
 +
| ???
 +
|-valign="top"
 +
! arecordmidi
 +
| ???
 +
|-valign="top"
 +
! aseqdump
 +
| ???
 +
|-valign="top"
 +
! aseqnet
 +
| ???
 +
|-valign="top"
 +
! speaker-test
 +
| ???
 +
|}

Latest revision as of 02:36, 24 May 2014

Download Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.27.2.tar.bz2

Introduction to ALSA Utilities

The ALSA Utilities package contains the command line utilities for the ALSA project. This package can be compiled only with the installed ALSA driver and the ALSA C library.

Project Homepage: http://www.alsa-project.org/

Dependencies

Required

Optional

Non-Multilib

If you do not have xmlto add --disable-xmlto to the configure command. If building with systemd add --with-systemdsystemunitdir=/lib/systemd/system to the configure command.

Compile the package:

./configure &&
make

Install the package

make install

Multilib

This package does not provide any libraries so only one installation is needed.

64Bit

If you do not have xmlto add --disable-xmlto to the configure command. If building with systemd add --with-systemdsystemunitdir=/lib/systemd/system to the configure command.


Compile the package:

CC="gcc ${BUILD64}" ./configure &&
make

Install the package

make install

Configuration Information

If using systemd, no configuration is needed and you can safely skip the rest of this page. Else, use a bootscript to store the values at shutdown.

As the root user, install the init script /etc/rc.d/init.d/alsa included in the bootscripts package.

make install-alsa
Caution.png

Note

All channels of your sound card are muted by default. You can use the alsamixer program from the ALSA Utilities to change this.

As the root user, install a new Udev rules file to create the audio device nodes and run the restore script:

cat > /etc/udev/rules.d/15-alsa.rules << "EOF"
# Give the audio group ownership of sound devices
SUBSYSTEM=="sound",       GROUP="audio"
SUBSYSTEM=="snd",         GROUP="audio"

# ALSA Devices
# When a sound device is detected, restore the volume settings
KERNEL=="controlC[0-9]*",  NAME="snd/%k", ACTION=="add", RUN+="/usr/sbin/alsactl restore %n"
KERNEL=="hw[CD0-9]*",      NAME="snd/%k"
KERNEL=="pcm[CD0-9cp]*",   NAME="snd/%k"
KERNEL=="midiC[D0-9]*",    NAME="snd/%k"
KERNEL=="timer",           NAME="snd/%k"
KERNEL=="seq",             NAME="snd/%k"
EOF
chmod 644 /etc/udev/rules.d/15-alsa.rules
udevtrigger /etc/udev/rules.d/15-alsa.rules

Using Newer udev, udevtrigger is removed from the install, use

udevadm trigger /etc/udev/rules.d/15-alsa.rules
  • Note for users with multiple soundcards

Alsa tutorial for multiple soundcards

The first time the alsactl program is run from the udev rule above, it will complain that there is no state in /etc/asound.state. You can prevent this by running the following commands as the root user:

touch /etc/asound.state &&
alsactl store

Contents

Installed Programs: alsactl, alsaconf, alsamixer, amidi, amixer, aplay, iecset, aconnect, aplaymidi, arecordmidi, aseqdump, aseqnet, speaker-test
Installed Libraries: None
Installed Directory: /usr/share/alsa/speaker-test, /ut/share/sounds/alsa

Short Descriptions

alsactl is a utility for soundcard settings management.
alsaconf is the ALSA driver configurator script.
aplay/arecord is a utility for the playback/capture of .wav,.voc,.au files.
amixer is a command line mixer.
alsamixer is an ncurses mixer.
amidi is a utility to send/receive sysex dumps or other MIDI data.
iecset is a utility to show/set the IEC958 status bits.
aconnect ???
aplaymidi ???
arecordmidi ???
aseqdump ???
aseqnet ???
speaker-test ???