Alta AML-A311D-CC Audio issues, dummy output and no sound

Hi there. I recently purchased an Alta board and I have been having some issues with Audio. Under Audio Devices I get a Dummy Output and no sound under HDMI or 3.5mm jack.

I get the same issue with official Libre images (arm64+arm64) for Debian 12 GNOME, Ubuntu 22.04 GNOME, Ubuntu 23.04 GNOME and Raspbian Bookworm. Same issue with Fedora 39. I tried a Manjaro KDE Plasma image that booted up fine, but I had the same issue there.

Also tried a few Armbian images (Bookworm XFCE and GNOME), and the Audio actually did work there with both of those images through HDMI (no sound through 3.5mm). I think I’m using the right images since they boot up and seem functional otherwise. Everything else seems to work for the most part.

I can get audio through a USB sound card dongle working with every image, it’s plug and play but less than ideal. Since Audio works with Armbian, and the USB Audio card works I really don’t know if this is a hardware or software issue.

Is this normal? Or is something wrong with my board?

1 Like

I have the same problem. No audio via HDMI using Alta with Raspbian Bookworm image.

Same. Using the Ubuntu distribution provided.

I was able to get things working at least partially using a few workarounds. First involved getting a shell script that defines a lot of the outputs from g12_sound.sh · master · manjaro-arm / packages / community / on2-post-install · GitLab

Then I used a systemd service to run it at boot. It doesn’t work 100%, but can definitely get audio from it through HDMI.

sound.service
[Unit]
Description=Khadas Vim3 - Audio Script

[Service]
Type=simple
ExecStart=sh /usr/bin/g12_sound.sh

[Install]
Alias=sound.service
WantedBy=default.target

Thank you for this info. It works well enough so far, at least as well as Armbian or a little better. HDMI Audio is working under Ubuntu 22.04.3, nothing through the jack though. Dummy Output is gone and I now have “Analog Output - Built-in Audio”. The system sound test works as well which didn’t do anything in Armbian, I always had to check with browsers or audio apps to test it.

This makes sense considering the similarities to the the Khadas Vim3.

I will try this solution with a few other distros to see if it works there as well. Thanks again, much appreciated.

In armbian, you can try adding this device tree file. I think I needed it to get things working properly with armbian. Seems like I had to add a line to the armbianEnv.txt file to tell it where to find the dtb file.

https://boot.libre.computer/ci/aml-a311d-cc-v01

Thanks, I’m not sure if I did that right but it’s working fine either way. For Armbian, some images work fine but others might require some extra work. I couldn’t get the main Bookworm Cinnamon image to work. It would give me a black screen after the boot process. Bookworm XFCE worked ok, but my Desktop Wallpaper was always black and I couldn’t sort it out. Jammy XFCE and Bookworm GNOME worked well though. Haven’t tested the others.

This Audio fix works for Raspbian Bookworm for anyone that needs it. I have Bookworm running with KDE Plasma and it’s pretty decent. Youtube at 1080p is smoother than RPi4 @2.2Ghz/700MHz trying to run 720p. Don’t know about a stock system. Good option if you want Widevine.

Yeah. It seems to run YouTube better with using the Wayland backend instead of X, at least it does for me.

We have not preconfigured the alsamixer settings via alsa-ucm yet. You can run the following to setup the audio routing:

# FRDDR A to TDMOUT C
amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 2'
amixer sset 'FRDDR_A SRC 1 EN' on
amixer sset 'TDMOUT_C SRC SEL' 'IN 0'

# TDM C to TOHDMITX
amixer sset 'TOHDMITX I2S SRC' 'I2S C'
amixer sset 'TOHDMITX' on

# FRDDR B to TDMOUT B
amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 1'
amixer sset 'FRDDR_B SRC 1 EN' on
amixer sset 'TDMOUT_B SRC SEL' 'IN 1'

# TDMOUT B to ACODEC
amixer sset 'TOACODEC SRC' 'I2S B'
amixer sset 'TOACODEC OUT EN' on
amixer sset 'ACODEC' 90%
1 Like

Thank you! After running that, the sound worked nicely. Using the old script from Khadas, only one speaker played sound properly and the other was static-y. With this, the sound played evenly on both sides. It will be nice when this gets included by default. Overall, I’m very impressed with the Alta.

1 Like

Hi, I have also got no audio with HDMI and earphone connector with Debian Gnome. The system is on I changed the system to pulsaudio but it didn’t help. There is no output channel available.

There are repeating errors in the dmesg which I can’t place:

10.733502]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   10.734826]  fe.dai-link-0: ASoC: error at dpcm_fe_dai_prepare on fe.dai-link-0: -22
[   10.742633]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   10.749437]  fe.dai-link-0: ASoC: error at dpcm_fe_dai_prepare on fe.dai-link-0: -22
[   10.757192]  fe.dai-link-0: ASoC: no backend DAIs enabled for fe.dai-link-0
[   10.764000]  fe.dai-link-0: ASoC: error at dpcm_fe_dai_prepare on fe.dai-link-0: -22
[ 
...

I tried the last solution but amixer only gives errors:

amixer sset 'FRDDR_A SINK 1 SEL' 'OUT 2'
amixer sset 'FRDDR_A SRC 1 EN' on
amixer sset 'TDMOUT_C SRC SEL' 'IN 0'
# TDM C to TOHDMITX
amixer sset 'TOHDMITX I2S SRC' 'I2S C'
amixer sset 'TOHDMITX' on
# FRDDR B to TDMOUT B
amixer sset 'FRDDR_B SINK 1 SEL' 'OUT 1'
amixer sset 'FRDDR_B SRC 1 EN' on
amixer sset 'TDMOUT_B SRC SEL' 'IN 1'
# TDMOUT B to ACODEC
amixer sset 'TOACODEC SRC' 'I2S B'
amixer sset 'TOACODEC OUT EN' on
amixer sset 'ACODEC' 90%
amixer: Unable to find simple control 'FRDDR_A SINK 1 SEL',0
amixer: Unable to find simple control 'FRDDR_A SRC 1 EN',0
amixer: Unable to find simple control 'TDMOUT_C SRC SEL',0
amixer: Unable to find simple control 'TOHDMITX I2S SRC',0
amixer: Unable to find simple control 'TOHDMITX',0
amixer: Unable to find simple control 'FRDDR_B SINK 1 SEL',0
amixer: Unable to find simple control 'FRDDR_B SRC 1 EN',0
amixer: Unable to find simple control 'TDMOUT_B SRC SEL',0
amixer: Unable to find simple control 'TOACODEC SRC',0
amixer: Unable to find simple control 'TOACODEC OUT EN',0
amixer: Unable to find simple control 'ACODEC'

So I don’t know how to go forward, do you?

Double check that you have the latest firmware.

Hi, I checked the firmware. Current version from

U-Boot 2024.01-rc6+ (Jan 07 2024 - 18:42:47 -0500) Libre Computer AML-A311D-CC

changed to

U-Boot 2024.01+ (Jan 24 2024 - 00:10:13 -0500) Libre Computer AML-A311D-CC.

The errors from dmesg remain and there is no output sound channel available.

You have the wrong sound card selected. You need to first set the correct card.

Hi there,
I reinstalled Debian with the version of 2024-01-24. This because of the new version and starting from scratch with the pipewire installation which is the default for Debian.

Following the installation notes for pipewire I installed this as a user service with systemctl --user --now enable wireplumber.service. Further on I installed pipewire-pulse, pulseaudio-utils and pavucontrol. I did not use the wireplumber .

The pactl application shows that it used the pipewire-pulse:

Server Name: PulseAudio (on PipeWire 0.3.65)
hans@debian-12-arm64:~$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 58
Tile Size: 65472
User Name: hans
Host Name: debian-12-arm64
Server Name: PulseAudio (on PipeWire 0.3.65)
Server Version: 15.0.0
Default Sample Specification: float32le 2ch 48000Hz
Default Channel Map: front-left,front-right
Default Sink: auto_null
Default Source: auto_null.monitor
Cookie: 305f:fcda

The aplay application shows the LCALTA card which is from the AML-A311D.

hans@debian-12-arm64:~$ LANG=C aplay -L | grep -A 1 default
default
    Default ALSA Output (currently PipeWire Media Server)
--
sysdefault:CARD=LCALTA
    LC-ALTA, 

If you look further with this the LSALTA pops up as sysdefault:

hans@debian-12-arm64:~$ LANG=C aplay -L | grep -A 1 default
default
    Default ALSA Output (currently PipeWire Media Server)
--
sysdefault:CARD=LCALTA
    LC-ALTA, 

With the command pactl list you can see the pro-audio profile but it does not give any audio if I start a firefox webpage with an audio stream.

I noticed that with the command pactl list that the LCALSA hardware definitions pops up with card #45. Note that there is a new profile with pro-audio. If you look into pavucontrol it shows the profile but it does not change the output channels.

...
<LeftMouse>Card #45
	Name: alsa_card.platform-sound
	Driver: alsa
	Owner Module: n/a
	Properties:
		api.acp.auto-port = "false"
		api.acp.auto-profile = "false"
		api.alsa.card = "0"
		api.alsa.card.longname = "libre_computer-aml_a311d_cc-"
		api.alsa.card.name = "LC-ALTA"
		api.alsa.path = "hw:0"
		api.alsa.use-acp = "true"
		api.dbus.ReserveDevice1 = "Audio0"
		device.api = "alsa"
		device.bus_path = "platform-sound"
		device.description = "Built-in Audio"
		device.enum.api = "udev"
		device.form_factor = "internal"
		device.icon_name = "audio-card-analog"
		device.name = "alsa_card.platform-sound"
		device.nick = "LC-ALTA"
		device.plugged.usec = "8053490"
		device.subsystem = "sound"
		sysfs.path = "/devices/platform/sound/sound/card0"
		media.class = "Audio/Device"
		factory.id = "14"
		client.id = "33"
		object.id = "45"
		object.serial = "45"
		object.path = "alsa:pcm:0"
		alsa.card = "0"
		alsa.card_name = "LC-ALTA"
		alsa.long_card_name = "libre_computer-aml_a311d_cc-"
		alsa.driver_name = "snd_soc_meson_axg_sound_card"
		device.string = "0"
	Profiles:
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
		pro-audio: Pro Audio (sinks: 3, sources: 3, priority: 1, available: yes)

If I view the audio stream graph of pipewire with application gpwgraph it does not show LC ALTA own streams.

After this I set up the default hardware definition for the user with file ~.asoundrc with the contents:

pcm.!default {
    type hw
    card "LCALTA"
}

ctl.!default {
    type hw           
    card "LCALTA"
}

The result was that the amixer refers default to the LCALTA hardware

<LeftMouse>hans@debian-12-arm64:~$ amixer info
Card default 'LCALTA'/'libre_computer-aml_a311d_cc-'
  Mixer name	: ''
  Components	: ''
  Controls      : 61
  Simple ctrls  : 56

The amixer command gives the simple audio channels and controls:

Simple mixer control 'ACODEC',0
 Capabilities: pvolume pswitch pswitch-joined
 Playback channels: Front Left - Front Right
 Limits: Playback 0 - 255
 Mono:
 Front Left: Playback 224 [88%] [-11.58dB] [on]
 Front Right: Playback 224 [88%] [-11.58dB] [on]
Simple mixer control 'ACODEC Left DAC Sel',0
 Capabilities: enum
 Items: 'Left' 'Right'
 Item0: 'Right'
Simple mixer control 'ACODEC Mute Ramp',0
 Capabilities: pswitch pswitch-joined
 Playback channels: Mono
 Mono: Playback [off]
Simple mixer control 'ACODEC Playback Channel Mode',0
 Capabilities: enum
 Items: 'Stereo' 'Mono'
 Item0: 'Stereo'
...

I defined the amixer settings as written in this item on 14 jan.

I tried to play a pcm stream which works on another computer, it did gave an error:

hans@debian-12-arm64:~$ aplay --device=sysdefault:CARD=LCALTA output.wav
Playing WAVE 'output.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1416: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (124988 124989)
PERIOD_SIZE: 5512
PERIOD_BYTES: 22048
PERIODS: (4 5)
BUFFER_TIME: 500000
BUFFER_SIZE: 22050
BUFFER_BYTES: 88200
TICK_TIME: 0

So I was able to set up an ALSA default device but due to configurations of pipewire-alsa/pipewire I was not able to play any audio stream. Also the pipewire-pulse through the GUI pavucontrol an audio stream with LCALTA could not be set up.

I expect from a desktop distribution to setup simple audio playing from files or internet automaticaly without understanding how it set up.

So the question is: What is needed to configure a simple audio setup for this distribution. If this is not possible a desktop distribution is quiet crippled in my opinion.

I was able to get HDMI audio working by adding -c 0 to the commands provided by librecomputer, i.e.,

It does not appear to activate the 3.5mm jack in debian 12 gnome. I tried other cards (-c 1, -c 2, etc.) Only one card “LCALTA” is found. It shows up as Analog Output - Built in Audio. alsamixer does show it as a Pipewire card as Hans311 mentions.

Any further thoughts on getting the 3.5mm jack working?

Hi, the adding of -c 0 works fine with me. I got sound via HDMI. Don’t forget to log in after running the script. I tried Fedora Workstation and the script works as well. I expect that it will work for other distributions as well if you see Dummy Output as Output Device in pavucontrol.

I finally got it working with the amixer commands using the -c 0 option. I tested with Debian 12, but it wasn’t the latest image it was the earlier one from December I think. I was also getting the “Unable to find simple control” error on a fresh image and I couldn’t figure it out.

Also worked with my Raspbian+KDE setup that was using the script workaround. Tested with a clean Raspbian+Desktop image as well and the volume icon popped up after rebooting. Checked Ubuntu and it worked there too.

Thanks to everyone that helped, as this was something I hadn’t dealt with before and I couldn’t really make sense of it.

We are preparing new images to be released in a week. They should fix the audio issue for the new boards.

3 Likes

Any update on when those new images will be available for download and testing?