Harman Kardon Allure: Open Source Software and Boards

6 min read #hardware #electronics #linux

Contents

This is part 3 of three posts about the Harman Kardon Allure: the open-source release. Part 1 is the teardown, part 2 covers allure-os.

Introduction#

Two Allures in my house run allure-os on a carrier board I first drew by hand. Everything needed to build a third is now public, in three repositories:

RepositoryContentsLicense
allure-osthe system image, the speaker service, the setup page, the DSP players, documentationMIT
harman-kardon-allure-kernelthe Raspberry Pi kernel 6.18 with the CX2092x driver, the machine driver and the overlayGPL-2.0
allure-boardsthe Pi Zero carrier and an A88 breakout board, as KiCad projects with GerbersCERN-OHL-P-2.0

Harman’s files#

Two parts of allure-os are not mine: Harman’s DSP plugin and the frame data of the stock light animations. They are not in the repository. The release images carry them as they come from the stock firmware, so the speaker keeps the sound and light it was sold with. A build from source takes them from the owner’s own speaker. The speaker’s MSP430 and CX20924 keep their stock firmware; allure-os does not change them.

The boards#

Both boards copy the outline and card edge of the LinkPlay A88: a 42.5 × 63.3 mm board with an M.2 key A card edge. The edge has 67 contacts of 0.35 mm, 0.5 mm apart on each side and staggered by 0.25 mm between the sides; they are numbered 1 to 75, and the key takes the place of 8 to 15. Odd numbers are on the top side, even numbers on the bottom. The boards plug into the A88’s slot on the Allure’s mainboard.

Pi Zero carrier#

The carrier holds a Raspberry Pi Zero 2 W on a 2x20 socket and connects the few signals the speaker uses. The Zero 2 W is small enough for the top section and fast enough for the DSP and the voice assistant. It has a quad-core 64-bit Cortex-A53 at 1 GHz with 512 MB of RAM in Raspberry Pi’s RP3A0 package, 2.4 GHz Wi-Fi and Bluetooth 4.2, on a board of 65 × 30 mm (product brief [pdf]). Its 40-pin header carries everything the speaker uses: I2C, a UART, I2S (PCM) and two GPIOs.

3D render of the carrier board: the M.2 card edge at the bottom and a 2x20 socket for the Raspberry Pi
Pi Zero carrier, Rev B (KiCad render)
Pi pinPi functionA88 contactConnects to
2, 45 V2, 4, 6supply
3 / 5I2C1 SDA / SCL24 / 22, joined to 51 / 49CX20924 and PCM5121
8 / 10UART TX / RX30 / 32MSP430
11GPIO177CX20924 reset
16GPIO2317CX20924 wake-word interrupt pin (unused)
12PCM clock70I2S bit clock
35PCM frame72I2S word clock
38PCM data in60I2S from the CX20924
40PCM data out66I2S to the PCM5121
8 pinsgroundall 18 ground contactsground pour on both sides

The A88 has two I2C buses on its card edge; the carrier joins them, because the Pi needs only one. The master clock contact stays open: the Pi provides no master clock, and the PCM5121’s PLL derives its clock from the I2S bit clock (see part 1).

A88 breakout#

The breakout brings every signal of the card edge to a 2x20 header, with its name on the silkscreen. Plugged into the speaker in place of the module, it makes every bus of the mainboard reachable: for a logic analyzer, a bench supply or other hardware wired to the speaker.

3D render of the breakout board: the M.2 card edge and a 2x20 pin header with signal names
A88 breakout, Rev B (KiCad render)

Status#

The Rev A carrier runs in my two speakers. It was drawn by hand, without a schematic.

The green Rev A carrier board with an M.2 card edge and a 2x20 socket labeled with signal names, next to a Raspberry Pi Zero 2 W
Rev A carrier next to a Raspberry Pi Zero 2 W
The Rev A carrier with the Raspberry Pi plugged into the M.2 slot of the Allure's mainboard, standing upright behind the amplifier board and its heat spreader
Rev A in the speaker, in place of the A88

For the release I redrew both boards as Rev B:

  • schematics, so every connection has a name and KiCad can check it;
  • all ground and supply contacts of the card edge, and all of the Pi’s ground and 5 V pins;
  • ground pours on both sides with stitching vias;
  • a 0.8 mm board, the thickness the M.2 socket expects;
  • more clearance where Rev A’s I2C vias sat 0.1 mm apart.

ERC, DRC and the schematic-to-board parity check pass, but Rev B is not built yet.

The pin names come from the A88 specification in the FCC database; the connections were traced from Rev A. The pinout in the repository lists all 67 contacts and what each board does with them.

Building one#

Whoever builds one now is the first to test Rev B. The parts:

  • a Raspberry Pi Zero 2 W with a soldered 2x20 pin header (or the Zero 2 WH, which comes with one);
  • a carrier board and a 2x20 SMD socket with 2.54 mm pitch, soldered by hand;
  • a microSD card of 16 GB or more, rated A1;
  • Home Assistant with an MQTT broker; Music Assistant is optional.

The boards are 2-layer and 0.8 mm thick. The Gerber files leave the surface finish open, so the finish (ENIG, or hard gold on the card edge) and the 20° bevel of the edge have to be chosen when ordering. The ordering notes list all settings. The speaker opens as shown in part 1; keep the A88, because a build of the image from source needs files from its firmware.

The release images are ready to write to the card after unpacking them with zstd -d. On the first start the system grows its data partition to the end of the card. With no Wi-Fi known, it opens its own setup network after 2 minutes (part 2 shows the setup). After Home Assistant is connected, the speaker downloads its voice assistant once, about 1.8 GB. The install guide has all steps, including Music Assistant.

A self-built image is made in podman from Debian trixie. The kernel, the DSP players, the AirPlay and Spotify receivers and the Bluetooth AAC codec are built from pinned sources, and the image boots in QEMU for testing before it reaches a speaker.

Limits#

  • The Pi Zero 2 W has 2.4 GHz Wi-Fi only, where the A88 had 5 GHz as well (see part 2).
  • Alexa is gone; voice goes to Home Assistant.
  • The direction shown on the top ring after a wake word is not calibrated yet.
  • The sync between the two speakers of a stereo pair has not been measured yet.
  • A kernel that hangs during the trial boot of an update needs a power cycle, because no watchdog runs before the kernel starts.
  • Deeper Bass and Room correction are still in the developer page’s Sound lab.

Conclusion#

The hardware outlived its software; now the software is open. With allure-os and a board in the A88’s format, the Allure becomes a local speaker for Home Assistant and Music Assistant that keeps Harman’s sound. Rev B is waiting for its first builder, and issues and pull requests are welcome in the repositories.

Sources#

cd ~/projects