第7章 Sound

The Armadillo-440 LCD Model incorporates an audio codec and can both record and play sound. For the specifications of the audio driver, refer to "Audio" in the "Armadillo-400 Series Software Manual." This chapter explains how to record and play sound.

7.1. Sound Functionality With ALSA

There are two ways to provide audio functionality on Linux: ALSA[7] and OSS[8]. ALSA is used by default on the Armadillo-440 LCD Model.

7.1.1. Playing Back Sound

The aplay command is used to play sound with ALSA. See below for details on the options. For information on all available options, refer to the aplay help.

-M

Use memory mapped I/O for the audio stream.

-t

Specify the file type. Refer to the help for what file types can be specified.

-f

Specify the sample format. Refer to the help for what sample formats can be specified.

-d

End after the specified number of seconds.

-l

List all sound cards and audio devices.

-L

List all defined PCM.

-c

Specify the number of channels.

-r

Specify the sample rate.

-D

Specify the PCM.

-h

Display help.

[armadillo ~]# aplay -M -twav sample.wav

図7.1 Playing Back Sound


7.1.2. Recording

The arecord command is used to record sound with ALSA.

The arecord options are the same as those for aplay.

[armadillo ~]# arecord -M -twav -fS16_LE -r48000 sample.wav

図7.2 Recording Sound


7.1.3. Changing Volume

The amixer command is used to change the recording and playback volume with ALSA.

The control name to be changed should be specified for [control]. Refer to 表7.1「Control Names」 for the supported control names.

表7.1 Control Names

ControlDescription
'Headphone'Headphone volume
MicMicrophone volume

Enter the command below to check all of the controls and their values.

[armadillo ~]# amixer

図7.3 Checking Volumes


The volume is specified in place of [value] with a range of 0 (mute) to 63 (max).

[armadillo ~]# amixer set [control] [value] unmute

図7.4 Changing Volume




[7] Advanced Linux Sound Architecture http://alsa.sourceforge.net

[8] Open Sound System http://developer.opensound.com/