Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

native: bump dither keepalive to ±160 LSB (±1 extended to 96s, not enough)

±1 LSB extended sdmode-on from 23s to 96s but SOF's silence detector
uses RMS threshold, not zero-detect. ±160 LSB is -44 dBFS (~0.6% FS),
still inaudible at normal speaker levels, but well above the DSP's
silence gate. Should keep the speaker amp permanently powered.

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

+13 -9
+13 -9
fedac/native/src/audio.c
··· 1489 1489 buffer[i * 2] = (int16_t)(mix_l * 26000); 1490 1490 buffer[i * 2 + 1] = (int16_t)(mix_r * 26000); 1491 1491 1492 - /* DAPM keepalive: inject ±1 LSB dither when the buffer 1493 - * would otherwise be pure zeros. SOF DSP's internal 1494 - * silence detector powers down the SSP1 BE DAI after 1495 - * ~20-40s of all-zero frames, which drops MAX98360A 1496 - * sdmode to 0 (speaker amp off). ±1 at 16-bit S16_LE 1497 - * is -96 dBFS — utterly inaudible, but keeps the 1498 - * pipeline alive and the amp powered. */ 1492 + /* DAPM keepalive: inject low-level dither when the buffer 1493 + * would otherwise be silent. SOF DSP's internal silence 1494 + * detector uses an RMS threshold (not just zero-detect) 1495 + * and powers down the SSP1 BE DAI, dropping MAX98360A 1496 + * sdmode to 0. ±1 LSB extended amp-on from 23s to 96s 1497 + * but wasn't enough. ±160 LSB is -44 dBFS — still well 1498 + * below audibility at normal speaker levels (~0.6% of 1499 + * full scale) but gives the PGA enough RMS energy to 1500 + * keep the pipeline active. The alternating pattern 1501 + * averages to DC=0 so there's no pop/click risk. */ 1499 1502 if (buffer[i * 2] == 0 && buffer[i * 2 + 1] == 0) { 1500 - buffer[i * 2] = (i & 1) ? 1 : -1; 1501 - buffer[i * 2 + 1] = (i & 1) ? -1 : 1; 1503 + int16_t d = (i & 1) ? 160 : -160; 1504 + buffer[i * 2] = d; 1505 + buffer[i * 2 + 1] = -d; 1502 1506 } 1503 1507 1504 1508 // HDMI audio: 1-pole low-pass filter + downsample