Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions 02-stage-audiodriver-2michat-v2/01-driver/01-packages

This file was deleted.

5 changes: 0 additions & 5 deletions 02-stage-audiodriver-2michat-v2/01-driver/02-run.sh

This file was deleted.

44 changes: 0 additions & 44 deletions 02-stage-audiodriver-2michat-v2/01-driver/03-run-chroot.sh

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -e

# The package brings the device tree overlay and the boot configuration for the ReSpeaker 2-Mics Pi HAT V2.0
on_chroot << EOF2
apt-get update
apt-get install -y picompose-driver-2michat-v2
EOF2
10 changes: 0 additions & 10 deletions 02-stage-audiodriver-2michat-v2/02-set-audio-volume/01-run.sh

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Preinstalled projects: `example` (hello-world) from the package `picompose-core`
## Audio setup

- The package `picompose-core` ships the PipeWire drop-in config (clock rate, real-time scheduling module) and the WirePlumber rule for ALSA outputs (volume, no suspend). `01-stage-base/04-install-pipewire-audio` installs the PipeWire packages and sets the ALSA bridge, `pi` in the `pipewire` group for rtprio, and lingering for `pi` so services run without a login session.
- Hardware stages add a `configure_audio.service` plus script that waits (with a retry limit) for the card/control and sets the hardware volume through `wpctl`/`amixer`. The ReSpeaker Lite stage adds a keep-audio-alive service as a workaround for connectivity problems on the Pi Zero 2W.
- The hardware stages install their driver as a package from the APT repository and do not set the hardware volume themselves. The default volume of a sound card without a stored state comes from `picompose-core`. The package of the 2-Mic HAT V2.0 maps the sink volume to the DAC controls of the codec through an ACP profile set. The ReSpeaker Lite stage adds a keep-audio-alive service as a workaround for connectivity problems on the Pi Zero 2W.
- Some earlier file names in git history differ (for example `50-volume.conf`). Check `git log` before assuming a file never existed.
- Debugging notes for users: `docs/pipewire_debugging.md`.

Expand Down
2 changes: 2 additions & 0 deletions breaking_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ If you use the homeassistant image please also follow the snapcast and satellite
## Unreleased
The stage `02-stage-audiodriver-other` is removed, the images `PiCompose` and `PiCompose_Linux-Voice-Assistant` are built without a hardware stage and the package `picompose-driver-other` is no longer published. `configure_audio.service` and `/usr/bin/configure_audio.sh` are gone, which set the volume of the default sink to 100 % and ran `alsactl store` at every start. The default volume of a sound card without a stored state is now 100 % through `picompose-core` (`51-default-volume.conf`), a volume that WirePlumber has already stored for the card is kept. On an existing image, `apt upgrade` leaves a dangling `configure_audio.service` symlink behind.

The driver of the ReSpeaker 2-Mics Pi HAT V2.0 image is installed by the package `picompose-driver-2michat-v2` instead of the image build. The package brings the device tree overlay, the boot configuration and an ACP profile set for the sound card, which no longer turns ACP off (`51-disable-acp.conf` is gone). `configure_audio.service` and `/usr/bin/configure_audio.sh` are gone, which set the outputs of the TLV320 codec to 100 %, the input gain to 80 %, the volume of the default sink to 100 % and ran `alsactl store` at every start. The profile set of the package now puts `HP DAC` and `Line DAC` at 0 dB at a sink volume of 100 % and lets the sink volume change them. The other controls (`HP`, `HPCOM DAC`, and the input gain `PGA`, which was 80 % and is now left at the 27 % of the codec) are no longer set. On an existing image, `apt upgrade` leaves a dangling `configure_audio.service` symlink behind.

The audio setup of the Satellite1 image is installed from the APT repository instead of being downloaded from GitHub: the packages `satellite1-rpi-setup-trixie` and `satellite1-rpi-sdk` of FutureProofHomes are republished unchanged by PiCompose-Package-Driver-Satellite1. The image build no longer copies `51-disable-acp.conf`, `configure_audio.service` and `/usr/bin/configure_audio.sh`, and it no longer installs the custom kernel `linux-image-6.18.34-fusb302-rpi-v8`, the Satellite1 relies on the fusb302 driver of the Raspberry Pi kernel since 6.18. The microphone works with the ACP profile set of `satellite1-rpi-setup-trixie` 1.5-1, which replaces `51-disable-acp.conf`. On an existing image, `apt upgrade` does not remove the old `51-disable-acp.conf` and the dangling `configure_audio.service` symlink.

The audio setup of the ReSpeaker Lite image is installed by the package `picompose-driver-respeaker-lite` instead of the image build. `keep-audio-alive.service` stays. `configure_audio.service` and `/usr/bin/configure_audio.sh` are gone, which set the volume of the default sink to 100 % at every start. The default volume of a sound card without a stored state is now 100 % through `picompose-core` (`51-default-volume.conf`), a volume that WirePlumber has already stored for the card is kept. On an existing image, `apt upgrade` leaves a dangling `configure_audio.service` symlink behind.
Expand Down
4 changes: 2 additions & 2 deletions docs/hardware_2mic_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Unlike v1 — which needs an out-of-tree DKMS kernel module — v2 uses the main

1. The device-tree overlay `respeaker-2mic-v2_0.dtbo` (built from [Seeed-Studio/seeed-linux-dtoverlays](https://github.com/Seeed-Studio/seeed-linux-dtoverlays)), enabled via `dtoverlay=respeaker-2mic-v2_0` in `/boot/firmware/config.txt`.
2. `dtparam=i2c_arm=on` in `/boot/firmware/config.txt`.
3. Per-boot mixer tuning — the TLV320 ships with several attenuators well below 100 % (`HP DAC` at -23.5 dB in particular), producing a card that appears to work but is inaudible at typical application volumes.
3. Mixer tuning — the TLV320 ships with several attenuators well below 100 % (`HP DAC` at -23.5 dB in particular), producing a card that appears to work but is inaudible at typical application volumes.

The PiCompose `02-stage-audiodriver-2michat-v2` stage performs all three steps automatically. The mixer tuning is applied by `configure_audio.service` on every boot, the same pattern other audiodriver stages follow after #42: amixer on the codec-specific controls, then `wpctl set-volume @DEFAULT_AUDIO_SINK@ 1.0` to keep the PipeWire sink at unity. PipeWire / WirePlumber manage ALSA state per session and can reset the mixer between reboots, so a first-boot-only guard would let users end up stuck at 0%. Customization via `amixer` is still possible at runtime — it just won't survive a reboot.
The PiCompose `02-stage-audiodriver-2michat-v2` stage installs the package `picompose-driver-2michat-v2` from the APT repository ([PiCompose-Package-Driver-2MicHat-V2](https://github.com/florian-asche/PiCompose-Package-Driver-2MicHat-V2)), which does the first two steps. The package also does the mixer tuning of step 3. `configure_audio.service` is gone. Instead the package (version 0.2.0 and later) ships an ACP profile set for the sound card, selected by a udev rule. It merges `HP DAC` and `Line DAC` into the volume of the PipeWire sink, so the default volume of 100 % (`51-default-volume.conf` of `picompose-core`) puts both at 0 dB, and a lower sink volume lowers `HP DAC`. Checked on one device after a reboot: both controls at 100 %, and the sink volume changes `HP DAC`. How loud the card is has not been checked, and the other controls (`HP`, `HPCOM DAC`, the input gain `PGA`) are left as the codec starts. Raise them with `amixer` or `alsamixer` if you need more.

## Additional information

Expand Down
Loading