Actions

ALSA

From The RadioReference Wiki

Revision as of 14:17, 19 July 2014 by Jawnah (talk | contribs)

This document provides a basic overview of configuring ALSA on a Debian system so that it is useful with things like liquidsoap and darkice.

These instructions are based on setup with Debian Jessie with a minimal installation.

To begin, you'll probably need to install alsa-utils if you're running a minimal system. To install alsa-utils, run this command as root:

  1. apt-get install alsa-utils

Once this package is installed, you'll have tools to make use of ALSA on your system. The first thing we need to do is determine which capture card you will be using for your audio input and output. Connect an input audio source (like a scanner) to the line-in on your sound card (do not use the mic input). Connect a set of headphones or speakers to the headphone jack on the same sound card. Make sure your scanner has enough traffic for good monitoring or temporarily switch it over to a weather station so that you have regular sound input. Once you're ready to monitor, run this command as root:

  1. alsamixer

This will produce a text-mode sound mixing console where you can configure the attributes of the sound card. We will be using this tool to determine which sound card you're using and what input should be selected. The tool shows channels across the screen with the various levels and selections made for each channel.

To begin, press F6 to select your sound card. If you only see three options, you most likely only have one sound card that is detected. If you only have one, just press escape. If not, select the card that contains your input devices and press Enter.

Once the correct device is selected, press F3 to ensure that we're in PLAYBACK mode. We'll locate the input device this way using monitoring. Next, we need to unmute the sound system generally speaking. Using your arrow keys, make sure that the Master is highlighted red as shown below:

ALSAMixer.png

Press M to unmute the channel (master is muted by default). The MM on the channel should change to 00 to indicate that it is unmuted. Using your up/down arrow keys, increase the level up to ~65. Next, use your left/right arrow keys to navigate over to the Line channel and ensure that it is unmuted as well. Bring the level of the Line channel up to ~65 as well.

If you're using a headphone jack and you have a headphone channel (as shown in the picture above), also unmute and set the level on this channel. Finally, scroll all the way to the right and keep pressing the right arrow to check for additional channels. If there is a channel named Loopback Mixing, use the up/down arrow keys to ensure that it shows Enabled (otherwise you'll never heard anything while monitoring).

At this point, you should now hear your input device through your monitoring device. If you do not, check your connections and validate that you have unmuted everything as instructed. If you still do not hear input, check for other channels on playback that may need to be unmuted. As a tip, you can unmute beep and then press Escape to exit alsamixer. If you press Tab at the command prompt with no data, you should hear a beep on your monitoring device. If not, your setup may require additional work outside of the scope of this article.

Once you've validated input through alsamixer, go ahead and set a good input volume for your feed by adjusting the Line channel volume up and down with the up/down arrow keys. Once you've set your desired volume, remember this value. Press F4 to switch to CAPTURE mode.

Locate the Line channel using your left/right arrow keys and, once it is selected, press the Space Bar to set this device for capture. The text above should change from dashes to CAPTURE. If you have a level on the Line device, set it to the same as what you found previously while monitoring. If not, check for a Capture device setting and set the level there.

If you wish the leave monitoring active, you can just press Escape to exit alsamixer. If you want to disable monitoring, press F3 to return to PLAYBACK mode. Select the Master channel and press M to mute the device. Press Escape to exit alsamixer.