Fix WCD 48 kHz interpolators, CAJON analog codec, PipeWire mono downmix, and gain staging for a1125 (ampere)

- Add patches/kernel/0015-msm8909-wcd-digital-interpolator-cajon-analog.patch
  and rebuild kernel + audio codec modules (prebuilt/ + overlay/rootfs/)
  so REGCACHE_FLAT keeps 48 kHz POR interpolator/decimator defaults
  (RX1/2/3_B5_CTL=0x68, TX1/2_CLK_FS_CTL=0x03) and PM8909 CAJON_2_0
  analog defaults, non-boost Class-D SPK PA, HPH DAC/PA sequencing,
  EAR +6 dB headroom, and pm8909_s2 wakeup restore apply cleanly.
- Add WirePlumber create-item.lua item.features.mono = true support and
  PipeWire client drop-ins so Speaker and Earpiece present a positioned
  [ MONO ] PortConfig (0.5 * FL + 0.5 * FR with channelmix.normalize = true
  and triangular TPDF dithering) over 2 ch 48 kHz S16LE hardware while
  keeping Headphones and Bluetooth A2DP sinks stereo.
- Sync unity 100% PipeWire software sink volume when card0 is present
  and cap UCM2/plugin digital ALSA playback ceiling at <= 84 (0 dB).
- Add scripts/test-audio-quality.py wired into scripts/check-rebuild.sh,
  pin all 7 rebuilt a1125 (ampere) image SHA-256 hashes, and update
  CHANGELOG.md, MANUAL.md, and AGENTS.md.
This commit is contained in:
Luxferre committed 2026-11-23 19:53:06 +02:00
1 parent 1a229b0587
commit 4f73c28e5e
39 files changed
+1398 -55

No files matched your search

@@ -177,7 +177,7 @@ ring() {
if [ "${SXMO_RINGVOL:-100}" -le 0 ] || [ -z "${SXMO_RINGTONE:-}" ] || [ ! -f "$SXMO_RINGTONE" ]; then
return 0
fi
ring_rx3=$(( 56 + (SXMO_RINGVOL * 32 + 50) / 100 ))
ring_rx3=$(( 52 + (SXMO_RINGVOL * 32 + 50) / 100 ))
out_dev="$(cat /tmp/sxmo_audio_out_device 2>/dev/null || printf 'Speaker')"
(
@@ -190,7 +190,7 @@ ring() {
pactl set-sink-mute @DEFAULT_SINK@ 0 >/dev/null 2>&1 || true
pactl set-sink-volume @DEFAULT_SINK@ "${SXMO_RINGVOL}%" >/dev/null 2>&1 || true
elif [ "$out_dev" = "Headphones" ]; then
ring_hp=$(( 52 + (SXMO_RINGVOL * 32 + 50) / 100 ))
ring_hp=$(( 51 + (SXMO_RINGVOL * 32 + 50) / 100 ))
amixer -c 0 -s >/dev/null 2>&1 <<EOF || true
cset "name='SPK DAC Switch'" 0
cset "name='RX3 MIX1 INP1'" 0