Main Content

ALSA Audio Playback

Send audio to sound card for playback using ALSA

Add-On Required: This feature requires the Embedded Coder Support Package for BeagleBone Black Hardware add-on.

Description

Send audio to the sound card for playback using the Advanced Linux Sound Architecture (ALSA) driver framework. The dimensions of the block input are N-by-2. N is the number of samples per frame and 2 is the number of audio channels. The data type of the block input must be int16. Use the Audio sampling frequency parameter to set the sampling rate in Hertz (Hz).

  • ALSA Audio Playback block

Parameters

Device name

To use the default sound device that the ALSA configuration file specifies, leave this parameter set to 'plughw:0,0'.

The ALSA configuration file, /usr/share/alsa/alsa.conf, on the BeagleBone® Black hardware defines this parameter value.

For more information, see Parametric Audio Equalizer

Audio sampling frequency (Hz)

Enter the sample frequency of the ALSA Audio Playback (output) device.

By default, the sample frequency of ALSA Audio Playback is the same as the sample frequency of ALSA Audio Capture.

This parameter value defaults to 44100 Hz (44.1 kHz). The maximum rate equals the sampling rate of the audio capture device.

Version History

Introduced in R2014b