Solitude 3.5mm Audio Issues/Fixes possible hardware issue?

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.

GPIOX_0 needs to output low to disable the DIO amp when it is not in use.

Short detection is a function of the driver and I’m not sure the upstream driver currently takes it into account. This needs to be checked in the device tree and driver side.

DIO2133 is the amplifier.

The firmware bits for the board still have to be overhauled in line with the compute module that will be released soon so the software bits will be reviewed. The hardware looks OK, most likely some audio channel select issue. The CVBS signal is curious though as that’s from an unrelated subsystem. There should be a Test Point (TP) that you can scope.

Thanks for the quick response.

GPIOX_0 needs to output low to disable the DIO amp when it is not in use.

This should be implemented driver side correct?

Short detection is a function of the driver and I’m not sure the upstream driver currently takes it into account. This needs to be checked in the device tree and driver side.

I don’t believe it currently does, where can I monitor status of this and potentially report bugs and test fixes? Mailing list, git, etc.

The firmware bits for the board still have to be overhauled in line with the compute module that will be released soon so the software bits will be reviewed. The hardware looks OK, most likely some audio channel select issue.

Firmware bits as in the dtb, dts files like this?

The dts I generated from my board dtb is ~4000 lines and has quite a few sections relating to sound/audio routing. Is this likely where the L/R audio issues need to be sorted?

The CVBS signal is curious though as that’s from an unrelated subsystem. There should be a Test Point (TP) that you can scope.

I did a quick look over of the board, didn’t see any TP for CVBS at first glance.

I tested Composite video out (NTSC) and simultaneous audio playback. Picture isn’t great but it works, sync signal works, playing test sinewave interfere with the picture, causes wavy distortions whenever audio output is present (even when only the Composite Video RCA (Yellow) is connected.

Different subsystem, but same conductor as CTIA Mic. I didn’t think Solitude had any audio input but maybe the CVBS and Audio systems are interfering with each other through that conductor and ground?

Currently I’m unable to use these boards (4x Solitude) for their intended purpose mainly due to lack of 3.5mm audio (though composite video was planned for one project but that isn’t working either).

Does the Alta (a311d) have the same issues?

Can I get a response to this?

According to:
https://linux-meson.com/hardware.html#support-matrix

Audio and CVBS is supposedly supported upstream for both a311d and s905d3.

3.5mm audio and CVBS is broken on the Solitude for sure, probably the Alta as well, but you haven’t responded so I’m not sure.

I wouldn’t be surprised if your boards have hardware design flaws, how the hell are audio sinewaves sent to an audio channel being routed over composite video connector. How is this not caught in QC? Do you even have QC? I just received a board from you the other day with corrupted spi flash out of the box…

Please manage your expectations on the level of support you will receive here. Everything is done on a best effort basis. The hardware does not come with a support contract for software consulting. Per the schematic, the two are not intermingled but analog blocks improperly driven in software may cause the issue you’re experiencing. There’s hundreds of IP blocks on the chip, not every one of the IP blocks will be fully supported upstream. Open a ticket on GitHub for tracking.

If you think the board is defective, a continuity test with a multimeter on the pins will confirm if it’s a SMT issue.

I’m pretty sure the problems are in hardware, either a batch of bad DACs or layout/design/placement issue etc.

(In my first post I had the channels reversed, the bulk of the issues are when signals are sent to RIGHT Channel.)

I just tested two A-S905D3-CC V1.1C (QC 2024.9) boards. Checking the pins of the TRRS jack with my ohm meter. I didn’t have any continuity between the pins but the resistance values are interesting and explain some of the behavior I’ve witnessed.

The following measurements are near identical on both boards:

Left Channel to Ground: 5.9kΩ
Right Channel to Ground: 2.9kΩ
Composite to Ground: 3.0kΩ

Left Channel to Right Channel: 2.9kΩ
Left Channel to Composite: 3.0kΩ
Right Channel to Composite: 76Ω ???

So apparently there’s only 76Ω resistance between the Right Channel and Composite Video… so when I send an audio rate sinewave to the right channel it is present both on the oscilloscope and via distortion in the Composite Video signal on a CRT TV. The sinewave is also present (audibly) if Composite Video connector is connected to speakers.

There is also an amplitude difference when comparing L/R channels.

76 ohms is pretty low but not a short. There could be several reasons for this.

  • One is close proximity of traces.
  • Two is the SoC analog blocks was designed this way as audio and video frequencies do not overlap and the respective equipment have high/low pass filters. This is the more likely scenario.
    CVBS is 1VPP and over 1MHz while audio output is very low voltage and frequency that is going to an DIO amplifier. Their frequency ranges do not overlap. Do you have a picture of the distortion on the CRT?