TLDR: solitude, U-Boot 2024.10+, nixos-unstable, kernel 6.15.0
-
No soundcard detected on mainline linux (no UCM2 upstream?)
-
3.5mm audio out, possible hardware issue, test sinewave sent to Left channel over TRS present on both L/R channels.
-
3.5mm audio out, possible hardware issue, test sinewave sent to Left channel over TRRS (CTIA) present on both L/R AND Composite Video channels.
I have 4 Solitude (aml-s905d3-cc) boards I’m using with NixOS. I have only tested two so far, addressing their quirks as I come across them.
On the audio side, no cards are detected out of the box (alsa/pipewire). I’m on nixos-unstable w/ kernel 6.15.0, and all the latest packages. UCM2 profiles don’t appear to be upstreamed (can’t find any mention of solitude or amlogic s905d3 in upstream patch notes). Are there efforts to have audio working out of the box using generic aarch64 isos/images?
The fix was simple enough:
# FRDDR A to TDMOUT C
amixer sset -c 0 'FRDDR_A SINK 1 SEL' 'OUT 2'
amixer sset -c 0 'FRDDR_A SRC 1 EN' on
amixer sset -c 0 'TDMOUT_C SRC SEL' 'IN 0'
# TDM C to TOHDMITX
amixer sset -c 0 'TOHDMITX I2S SRC' 'I2S C'
amixer sset -c 0 'TOHDMITX' on
# FRDDR B to TDMOUT B
amixer sset -c 0 'FRDDR_B SINK 1 SEL' 'OUT 1'
amixer sset -c 0 'FRDDR_B SRC 1 EN' on
amixer sset -c 0 'TDMOUT_B SRC SEL' 'IN 1'
# TDMOUT B to ACODEC
amixer sset -c 0 'TOACODEC SRC' 'I2S C'
amixer sset -c 0 'TOACODEC OUT EN' on
amixer sset -c 0 'ACODEC' 90%
Then save asound.state by running:
sudo alsactl store
and add:
hardware.alsa.enablePersistence = true;
to configuration.nix if you’re on nixos.
Soundcard is now detected, “LC-SOLITUDE”, and I set both HDMI / 3.5mm to “I2S C” for simultaneous playback/testing both outputs.
Whenever audio isn’t playing there’s a lot of static/hissing/popping coming from the 3.5mm output. You can solve this on alsa/pipewire (wireplumber) by disabling alsa timeout (nixos way):
services = {
pipewire = {
wireplumber.extraConfig = {
"LC-SOLITUDE" = {
"monitor.alsa.rules" = [
{
matches = [
{
"node.name" = "~alsa_input.*";
}
{
"node.name" = "~alsa_output.*";
}
];
actions = {
update-props = {
"session.suspend-timeout-seconds" = "0";
};
};
}
];
};
};
};
};
Now there’s silence from 3.5mm output when nothing is playing.
So now we have working audio from both HDMI and 3.5mm… mostly.
HDMI audio has no apparent issues at this point.
I bought these boards for the 3.5mm audio though so I’m really hoping this is a firmware/dtb/software routing issue:
When audio output is in stereo and you send a sinewave to the left speaker you get audio from both left and right speakers, if you send a sinewave to the right speaker you get audio on just the right speaker as expected.
speaker-test -c2 -t sine
Far from ideal. The documentation and schematic note this is a CVBS TRRS jack wired in CTIA standard so when using TRS headphones Composite/Ground will be shorted. This is normal and there should be short detection to make sure Composite/Mic is disabled and regular TRS L/R audio can be used.
I have a CTIA TRRS to Left/Right/Composite RCA cable plugged into receiver so Composite/Ground are no longer shorted and send sinewive to Left Channel and it is sent to Both L and R channels. Send sinewave to Right channel and it plays on only Right channel as it should. Same as with the headphones.
What makes me think this may be a hardware issue? When I send a sinewave to the left channel using CTIA TRRS-RCA, not only do I get a sinewave on L/R channels I also get audio sinewave out on Composite Video connector! Again if I send a sinewave to R channel no sinewave is present on L or Composite connector.
I’m not sure how audio signals are getting routed over the composite video connector if everything is laid out correctly in hardware, is short detection working when using TRS?
I tested this on two Solitude boards, and I tested CVBS output on CRT TV and I do get Composite video output (didn’t test video and audio at same time). I testing the cable and pinout with my meter and scope, and with a RPi 2B, everything works fine, cable is not the issue.
I picked up these boards for use with true stereo audio over the 3.5mm out, HDMI audio can not be used, USB DAC isn’t an option either. Any help would be appreciated.
Anyone else with a Solitude or Alta care to test 3.5mm audio playback with speaker-test (alsa-utils) and report back?
Thank you.