Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

native: reduce dither to ±1 LSB — ±160 was audible as 24kHz fizz

At S32_LE, the ±160 int16 dither became ±10M int32 (~-46 dBFS)
which the MAX98360A amp reproduced as an audible high-frequency buzz.
Drop to ±1 LSB (±65536 int32 = -90 dBFS) — still prevents silence-
detect amp shutdown but completely inaudible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+8 -13
+8 -13
fedac/native/src/audio.c
··· 1494 1494 buffer[i * 2] = (int16_t)(mix_l * 26000); 1495 1495 buffer[i * 2 + 1] = (int16_t)(mix_r * 26000); 1496 1496 1497 - /* DAPM keepalive: inject low-level dither when the buffer 1498 - * would otherwise be silent. SOF DSP's internal silence 1499 - * detector uses an RMS threshold (not just zero-detect) 1500 - * and powers down the SSP1 BE DAI, dropping MAX98360A 1501 - * sdmode to 0. ±1 LSB extended amp-on from 23s to 96s 1502 - * but wasn't enough. ±160 LSB is -44 dBFS — still well 1503 - * below audibility at normal speaker levels (~0.6% of 1504 - * full scale) but gives the PGA enough RMS energy to 1505 - * keep the pipeline active. The alternating pattern 1506 - * averages to DC=0 so there's no pop/click risk. */ 1497 + /* DAPM keepalive: inject ±1 LSB when the buffer would 1498 + * otherwise be all zeros. At S32_LE (after <<16) this 1499 + * becomes ±65536 ≈ -90 dBFS — utterly inaudible. 1500 + * Previous ±160 was audible as 24kHz fizz through the 1501 + * amp. ±1 is enough to prevent the SOF DSP silence 1502 + * detector from powering down the SSP1 BE DAI. */ 1507 1503 if (buffer[i * 2] == 0 && buffer[i * 2 + 1] == 0) { 1508 - int16_t d = (i & 1) ? 160 : -160; 1509 - buffer[i * 2] = d; 1510 - buffer[i * 2 + 1] = -d; 1504 + buffer[i * 2] = (i & 1) ? 1 : -1; 1505 + buffer[i * 2 + 1] = (i & 1) ? -1 : 1; 1511 1506 } 1512 1507 1513 1508 // HDMI audio: 1-pole low-pass filter + downsample