Difference between revisions of "ALSA"

From ArmadeusWiki
Jump to: navigation, search
(Test)
(Installation)
Line 21: Line 21:
 
==Installation==
 
==Installation==
 
* On your Host select ALSA compilation in Linux configuration:
 
* On your Host select ALSA compilation in Linux configuration:
  [armadeus] $ make linux-menuconfig
+
  [armadeus]$ make linux-menuconfig
 
   
 
   
 
  Device Drivers  ---> Sound  ---> <M> Sound card support  
 
  Device Drivers  ---> Sound  ---> <M> Sound card support  
Line 43: Line 43:
 
     USB devices  --->
 
     USB devices  --->
 
     System on Chip audio support  --->
 
     System on Chip audio support  --->
 +
 +
* in Buildroot configuration, select the user space package for ALSA:
 +
[armadeus]$ make menuconfig
 +
Package Selection for the target-> Audio libraries -> alsa-lib
  
 
* save your configuration and rebuild your rootfs:
 
* save your configuration and rebuild your rootfs:
  [armadeus] $ make
+
  [armadeus]$ make
  
 
* after reflashing your rootfs on your board, you can load ALSA drivers:
 
* after reflashing your rootfs on your board, you can load ALSA drivers:

Revision as of 17:22, 19 October 2008

This page will summarize the informations to use ALSA on your Armadeus boards.

Introduction

ALSA stands for Advanced Linux Sound Architecture and provides audio and MIDI functionality to the Linux operating system. Everyone wanting to write portable & state of the art Linux applications dealing with sound should consider using ALSA.

ALSA Soc

On the APF boards we are going to use Embedded version of ALSA: ALSA Soc ->

nodes creation

in /dev/snd

mknod controlC0 c 116 0
mknod pcmC0D0c c 116 24
mknod pcmC0D0p c 116 16

Installation

  • On your Host select ALSA compilation in Linux configuration:
[armadeus]$ make linux-menuconfig

Device Drivers  ---> Sound  ---> <M> Sound card support 
Device Drivers  ---> Sound  ---> Advanced Linux Sound Architecture  ---> <M> Advanced Linux Sound Architecture
Device Drivers  ---> Sound  ---> Advanced Linux Sound Architecture  --->     ALSA ARM devices  ---> <M> IMX TSC2102 alsa driver
<M> Advanced Linux Sound Architecture
< >   Sequencer support (NEW)
<M>   OSS Mixer API
<M>   OSS PCM (digital audio) API
[*]     OSS PCM (digital audio) API - Include plugin system (NEW)
[ ]   Dynamic device file minor numbers (NEW)
[*]   Support old ALSA API (NEW)
[ ]   Verbose procfs contents (NEW)
[ ]   Verbose printk
[ ]   Debug
[ ]     Debug detection
[ ]     Enable PCM ring buffer overrun/underrun debugging (NEW)
      Generic devices  --->
    ALSA ARM devices  --->
    USB devices  --->
    System on Chip audio support  --->
  • in Buildroot configuration, select the user space package for ALSA:
[armadeus]$ make menuconfig
Package Selection for the target-> Audio libraries -> alsa-lib
  • save your configuration and rebuild your rootfs:
[armadeus]$ make
  • after reflashing your rootfs on your board, you can load ALSA drivers:
modprobe soundcore
modprobe snd
modprobe snd-timer
modprobe snd-page-alloc
modprobe snd-pcm
modprobe snd-pcm-oss
modprobe snd-mixer-oss

Only if MIDI sequencer used:

modprobe snd-seq
modprobe snd-seq-device

Specific to DevFull:

modprobe spi_imx
modprobe snd-imx-alsa-tsc2102

Test

# aplay -lL
# aplay -vDhw:0,0 /usr/share/sounds/alsa/Side_Left.wav

Note: the audio file Side_Left.wav can be copied from your host PC

Links