Skip to content

TrimUI Brick Pro (tg4040): idle speaker amp not muted → constant switching noise through speaker #1616

Description

@bindike

Device

TrimUI Brick Pro (tg4040)

Tested on

Reproduced on BOTH stable v4.3.4 AND nightly v4.3.6-20260826 (not nightly-only).
Root cause below confirmed on nightly v4.3.6-20260906.

Problem

With nothing playing (menus/idle, and especially under load: box-art scraping, SD
writes, WiFi) a constant electrical noise is audible through the speaker. It scales
with system load and with the volume setting (volume 0 = completely silent), so it
is amplified analog noise on the speaker amp, not a digital/sample-rate issue.
In-game audio itself is clean.

Root cause (confirmed)

The speaker amplifier is left enabled at idle. In ALSA this is the
HpSpeaker Switch (numid=15), which stays on in the menu, so the board's
switching noise (CPU governor / SD / WiFi) couples into the always-on amp and is
amplified. It is only audible outside games because in-game the amp is doing real
work and the noise is masked.

Confirmed directly:

amixer cset numid=15 off   # idle noise gone completely
amixer cset numid=15 on    # noise returns; needed for speaker audio

Ruled out

  • Volume 0 silences it entirely (amp path).
  • Not the mic path: disabling ADCL/ADCR MIC1/MIC2 Boost (numid 12/13), MIC1/MIC2
    gain (numid 5/6) and ADC volume (numid 9) via amixer made no difference.

Suggested fix

Gate the speaker amp (HpSpeaker Switch / numid=15) to playback: mute it when
nothing is playing (menu/idle) and unmute it when a game/stream is active.
(Not observed on stock TrimUI OS, which appears to keep the amp gated.)

Working stopgap on my device — a small background watchdog:

# off when no emulator/RetroArch is running, on when one is
if pgrep -f 'ra32|ra64|retroarch|/Emu/' >/dev/null; then
    amixer -q cset numid=15 on
else
    amixer -q cset numid=15 off
fi

Silent menu, normal in-game speaker audio.

Codec

Card 0 = sun50iw10codec (SUNXI-CODEC), playback S16_LE / 48000 Hz / stereo.
Mixer: HpSpeaker Switch = numid=15, Headphone Switch = numid=14
(both were on simultaneously at idle).### Device
TrimUI Brick Pro (tg4040)

Tested on

Reproduced on BOTH stable v4.3.4 AND nightly v4.3.6-20260826 (not nightly-only).

Problem

With nothing playing (menus/idle, and especially under load: box-art scraping, SD
writes, WiFi) a constant electrical noise is audible through the speaker. It scales
with system load and with the volume setting (volume 0 = completely silent), so it
is amplified analog noise on the speaker amp, not a digital/sample-rate issue.
In-game audio itself is clean.

Ruled out

  • Volume 0 silences it entirely (amp path).
  • Not the mic path: disabling ADCL/ADCR MIC1/MIC2 Boost (numid 12/13), MIC1/MIC2
    gain (numid 5/6) and ADC volume (numid 9) via amixer made no difference.

Hypothesis / suggested fix

Likely the speaker amp (and/or DAC output) is left enabled while idle, so board
switching noise (WiFi/SD/CPU) couples in and is amplified. Muting/disabling the amp
when no stream is active would likely fix it. (Not observed on the stock TrimUI OS.)

Codec

Card 0 = sun50iw10codec (SUNXI-CODEC), playback S16_LE / 48000 Hz / stereo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions