No Sound Troubleshooting in Linux/Ubuntu using Firewire Audio Interface

Two months ago, I wrote a tutorial on configuring a Firewire audio interface as the default sound device in Linux, specifically using Ubuntu distribution.

It works well until Ubuntu release version 12.04 LTS where I encounter some playback issues. The following are some symptoms:

a.) Unable to stream audio when watching Youtube or any audio stream from a web browser.
b.) Unable to route ALSA (Advanced Linux Sound Architecture ) to JACK. This was temporarily fixed by setting “JACK” in the audio output of GNOME Mplayer.

However, being unable to listen to any audio when browsing the web is a serious problem. Hopefully I was able to sort out the problem completely and I would like to share it with you in this troubleshooting tutorial.

Preliminary Confirmation of the Problem

If you are unable to play audio when streaming using ALSA output, you need to confirm if you have correctly routed ALSA to JACK.

Step1.) Launch terminal (Control -ALT- T) and type this command:

vim .asoundrc

Confirm if its there and contain the code as stated here.

.asoundrc is basically located in your Ubuntu home directory, for example:

/home/emerson/.asoundrc

If it’s there and the code is correct, proceed to Step2

Step2.) In this step, you will confirm that ALSA will be able to output audio to JACK when “pcm.jack” is directly called or utilized:

aplay -D pcm.jack /home/your_Ubuntu_username/Desktop/filenameofyourwav.wav

You need to have a WAV file (16-bit/44.1KHz) placed in your Ubuntu desktop to run this test.

If you are able to hear some audio output, it means ALSA routing to JACK is OK when called directly. However software applications that outputs audio to ALSA may not be routed correctly to JACK because of some possible conflict.

Checking for possible conflict

When you are using Firewire audio interface in Linux, you are basically using FFADO drivers for the OS to communicate with the hardware. These drivers will accept JACK at its input and output audio to the sound device via Firewire connection:

JACK === > FFADO === > Firewire audio interface

Meanwhile JACK is a low latency sound server ideal for professional music production. In this tutorial, JACK is configured to received ALSA output.

Or in flow diagram:

ALSA === > JACK

ALSA can also output to PulseAudio instead of using JACK:

ALSA === > PulseAudio

Browsers such as Firefox uses ALSA plug-in when outputting audio. PulseAudio is the sound server used by Ubuntu 12.04. It is most likely installed by your package. The best way to confirm if this is installed is to launch Ubuntu software center and type this word in the search box: pulseaudio

If you see a green check mark on the package, it is installed such as shown below:

Installed PulseAudio

Installed PulseAudio

Now you need to check the existing ALSA configuration to see where the audio output goes. In the terminal, type this command to access the alsa configuration folder in Ubuntu:

cd /usr/share/alsa

Display the existing files in that directory by typing this command:

ls -l -a

Check if there is file named “pulse-alsa.conf” and “alsa.conf”. These are ALSA configuration files. Specifically, “pulse-alsa.conf” will only exist if PulseAudio is installed in the system.

To understand how they work is to read the configuration file by entering the command:

vim alsa.conf

This is an important part:

Code

Code

It says that ALSA will actually load .asoundrc (the configuration file created in your home directory) and the configuration in the directory named as “alsa.conf.d”.