Skip to main content

Audio Out

Audio out is supported in Linux on all CPUs, but not in the U-Boot.

Carrier BoardAudio InAudio Out
COM Carrier Board V1No audio connectorsHeadphone jack
COM Carrier Board V2Microphone jack and Line In jackHeadphone jack and Line Out jack
uCOM Carrier Board V3No audio connectorsNo audio connectors

This test requires either headphones or speakers with a 3.5mm audio jack.

U-Boot

Audio out is currently not supported in U-Boot.

Linux

Use headphones in the jacket on the COM Carrier Board.

The alsa-utils package comes with a set of sample sound files available on the file system.

ls /usr/share/sounds/alsa/
Front_Center.wav   Noise.wav        Rear_Right.wav
Front_Left.wav Rear_Center.wav Side_Left.wav
Front_Right.wav Rear_Left.wav Side_Right.wav

The sound files can be played using the aplay command.

aplay /usr/share/sounds/alsa/Front_Left.wav

Note that even if the file is mono, it will be played as stereo. Another way to test the audio is with the speaker-test application.

speaker-test -c2 -l2 -twav

The speaker-test application has a lot of options to play with, but in our example the options are –c2 for stereo, -l2 to play each sound twice and –twav for wav-file testing.

If there is no sound at all, it is most likely because the output is off or muted. To get a long list of all mixer controls.

amixer
Simple mixer control 'Master',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0127
Mono:
Front Left: Playback 101 [80%] [-20.00dB]
Front Right: Playback 101 [80%] [-20.00dB]
...
Simple mixer control 'Output Mixer HiFi',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
...

Or a shorter list of the names.

amixer controls
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
numid=4,iface=MIXER,name='Line Capture Switch'
numid=5,iface=MIXER,name='Mic Boost Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='ADC High Pass Filter Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Deemphasis Switch'
numid=11,iface=MIXER,name='Input Mux'
numid=14,iface=MIXER,name='Output Mixer HiFi Playback Switch'
numid=12,iface=MIXER,name='Output Mixer Line Bypass Switch'
numid=13,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
numid=7,iface=MIXER,name='Sidetone Playback Volume'
numid=9,iface=MIXER,name='Store DC Offset Switch'

The only mixer setting that must be changed is the Output Mixer HiFi Playback Switch which is turned off by default. To enable it look for the numid=xx. In the list above to find that it is numid=14. Enable with the following commands.

amixer -q cset numid=14 on

If for some reason there is still no sound, repeat the amixer command for all channels that have the word Playback in the name.