Skip to content

v1.6.1 — TAS5713 audio fixed (2× speed bug) + Spotify Connect baked in

Choose a tag to compare

@petronijus petronijus released this 30 Jun 06:17

Highlights

🔊 TAS5713 speaker audio fixed — it played exactly 2× too fast. Root cause:
simple-audio-card drove the McBSP2→TAS5713 I2S link as bit/frame master but never
set the McBSP bit-clock divider, so omap-mcbsp left CLKGDV = 0 (the undivided
24.576 MHz functional clock as BCLK) and sized the frame as in_freq/rate = 256
BCLK → FSYNC = 96 kHz for a 48 kHz stream = 2× too fast. Kernel patch 0022
derives CLKGDV from the real func-clock rate and uses a minimal wlen*channels
I2S frame → CLKGDV 15, BCLK 1.536 MHz, FSYNC 48 kHz, bit-identical to the factory
kernel. Verified on hardware: 60 s of audio now plays in 60.00 s (was ~30 s).
This 2× is also why librespot auto-skipped tracks ~40 s in. (The "B7 MCLK 16 vs
12.288 MHz" theory was a red herring — mainline tas571x has no .set_sysclk.)

🎵 Spotify Connect (librespot) baked into the build. The image now ships
librespot — advertising as "Nexus Q" — with an enabled systemd unit, an ALSA
nexusq PCM that resamples to the device's clean 48 kHz and addresses the speaker
by name (hw:CARD=NexusQSpeaker,0 — card numbers race TAS5713/HDMI across
boots), and an nftables drop-in opening mDNS + the zeroconf port. Discovery + auth

  • streaming verified over 5 GHz WiFi, audio at correct pitch.

🛠 Build fixes (docker-build.sh): the fakeroot-as-root patch re-targeted for
pmbootstrap 3.10.1 (env-dict format changed → patch was silently skipped → fakeroot
hang); firmware-google-steelhead now built explicitly so cold builds don't fail
at install.

Verified end-to-end from a clean flash: uname #26-postmarketOS, python3 -S
rc 0, audio 60.00 s, librespot advertising, WiFi, dual-core SMP @ 1.2 GHz.

Install

See INSTALL.md. Decompress the rootfs first, then flash:

zstd -d nexusq-rootfs-v1.6.1-sparse.img.zst
fastboot flash boot nexusq-boot-v1.6.1.img
fastboot -S 100M flash userdata nexusq-rootfs-v1.6.1-sparse.img

After first boot the Spotify "Nexus Q" target appears on your phone (same WiFi);
WiFi is configured per-device (a flash wipes it).

Assets

  • nexusq-boot-v1.6.1.img (5.0 MiB) — kernel + appended SMP DTB, ramdisk-less
  • nexusq-rootfs-v1.6.1-sparse.img.zst (447 MiB; ~2.08 GiB raw) — zstd-compressed
    all-RAW Android-sparse rootfs (byte-exact on the non-erased eMMC)
  • nexusq-v1.6.1.sha256 — checksums