Initial commit

This commit is contained in:
jack
2026-04-06 21:59:41 +08:00
commit 760bdf2c9b
28 changed files with 2310 additions and 0 deletions

64
debian/changelog vendored Normal file
View File

@@ -0,0 +1,64 @@
kaisa-hdmi-pipewire-fix (0.3.0) unstable; urgency=medium
* Remove /usr/bin helper scripts and user systemd units from the package;
delivery is UCM2 + WirePlumber conf only until automation is validated.
-- chromebox_10th_audio_driver <maintainers@local> Sun, 06 Apr 2026 22:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.7) unstable; urgency=medium
* postinst: systemctl disable --global for kaisa user units (clears stale global enables on upgrade).
-- chromebox_10th_audio_driver <maintainers@local> Sun, 05 Apr 2026 12:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.6) unstable; urgency=medium
* user preset: disable kaisa-hdmi-auto-default-sink.service by default (opt-in only).
-- chromebox_10th_audio_driver <maintainers@local> Sat, 04 Apr 2026 23:30:00 +0800
kaisa-hdmi-pipewire-fix (0.2.5) unstable; urgency=medium
* kaisa-hdmi-auto-default-sink-watch: skip pcm when aplay reports 0 playback subdevices (avoids set_hw_params EIO).
-- chromebox_10th_audio_driver <maintainers@local> Sat, 04 Apr 2026 22:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.4) unstable; urgency=medium
* kaisa-hdmi-auto-default-sink-watch: poll HDMI Jack, set-default-sink + IEC958.
* user systemd preset: enable auto-sink, disable kaisa-hdmi-iec958-pipewire (pro-audio oneshot).
-- chromebox_10th_audio_driver <maintainers@local> Sat, 04 Apr 2026 20:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.3) unstable; urgency=medium
* kaisa-restore-iec958-ucm: match HiFi__hw_sofrt5682_N__ sink names (Kaisa pactl).
* next.md OPERATION: troubleshooting when IEC958 on but silent (wpctl, HDMI port).
-- chromebox_10th_audio_driver <maintainers@local> Mon, 07 Apr 2026 12:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.2) unstable; urgency=medium
* kaisa-restore-iec958-ucm: hdmi/displayport sink heuristics; reject pcm 0/1 with hint.
* next.md / OPERATION / postinst: apt upgrade may reinstall 50-kaisa; diagnostic block.
-- chromebox_10th_audio_driver <maintainers@local> Sun, 06 Apr 2026 22:00:00 +0800
kaisa-hdmi-pipewire-fix (0.2.1) unstable; urgency=medium
* Add kaisa-restore-iec958-ucm: open IEC958 without forcing pro-audio (UCM/HiFi).
-- chromebox_10th_audio_driver <maintainers@local> Sun, 06 Apr 2026 23:59:00 +0800
kaisa-hdmi-pipewire-fix (0.2.0) unstable; urgency=medium
* Ship reference UCM2 overlay (conf.d/sof-rt5682, GoogleKaisa/sof-rt5682).
* Depends on alsa-ucm-conf; document UCM vs pro-audio mutex in postinst/README.
-- chromebox_10th_audio_driver <maintainers@local> Sun, 06 Apr 2026 22:30:00 +0800
kaisa-hdmi-pipewire-fix (0.1.0) unstable; urgency=medium
* Initial packaging: system WirePlumber drop-in, restore script, user systemd unit.
-- chromebox_10th_audio_driver <maintainers@local> Sat, 04 Apr 2026 12:00:00 +0800

25
debian/control vendored Normal file
View File

@@ -0,0 +1,25 @@
Source: kaisa-hdmi-pipewire-fix
Section: sound
Priority: optional
Maintainer: chromebox_10th_audio_driver <maintainers@local>
Build-Depends: debhelper-compat (= 13)
Rules-Requires-Root: no
Standards-Version: 4.6.2
Package: kaisa-hdmi-pipewire-fix
Architecture: all
Depends: wireplumber, alsa-utils, alsa-ucm-conf, ${misc:Depends}
Recommends: pipewire-pulse | pipewire-pulseaudio
Suggests: pulseaudio-utils
Description: Google Kaisa HDMI audio fix (PipeWire / sof-rt5682, UCM2)
Installs UCM2 overlay under /usr/share/alsa/ucm2/ (conf.d/sof-rt5682,
GoogleKaisa/sof-rt5682) for Jack-driven HDMI routes plus IEC958 sequences,
and a system-wide WirePlumber drop-in (pro-audio profile, HDMI sink
priorities). Does not ship helper binaries or user systemd units yet —
use manual pactl/amixer steps in OPERATION until automated restore is ready.
UCM-first and pro-audio WirePlumber are mutually exclusive — see
/usr/share/doc/kaisa-hdmi-pipewire-fix/README.md and OPERATION.
.
PCI path in the WirePlumber fragment targets BDF 0000:00:1f.3; edit under
/etc/wireplumber/ if needed. See OPERATION_PipeWire_Kaisa_HDMI.md.gz in
/usr/share/doc/.

17
debian/kaisa-hdmi-pipewire-fix.postinst vendored Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -e
case "$1" in
configure)
echo "kaisa-hdmi-pipewire-fix: UCM2 已安装至 /usr/share/alsa/ucm2/sof-rt5682 + GoogleKaisa"
echo "kaisa-hdmi-pipewire-fix: WirePlumber 片段: /etc/wireplumber/wireplumber.conf.d/"
echo " 重要UCM产品目标无 Jack 不误导)与强制 pro-audio 片段二选一。"
echo " 若优先 UCM请移走 50-kaisa-sof-rt5682-hdmi.conf 后执行:"
echo " systemctl --user restart wireplumber pipewire pipewire-pulse"
echo " 注意: apt upgrade 本包后若该文件曾被删/改名, 可能被再次装入; UCM 用户请再移走。"
echo " 否则保留 pro-audio 过渡时,可暂叠 UCM 但行为以 OPERATION 互斥说明为准。"
echo " 详见: /usr/share/doc/kaisa-hdmi-pipewire-fix/README.md.gz"
echo " 本包当前仅含 UCM2 + WirePlumber 片段;自动 restore / IEC958 / Jack 轮询工具尚未随 deb 提供,见 OPERATION 手顺。"
;;
esac
#DEBHELPER#
exit 0

View File

@@ -0,0 +1,21 @@
Package: kaisa-hdmi-pipewire-fix
Version: 0.3.0
Architecture: all
Maintainer: chromebox_10th_audio_driver <maintainers@local>
Installed-Size: 56
Depends: wireplumber, alsa-utils, alsa-ucm-conf, init-system-helpers (>= 1.52)
Recommends: pipewire-pulse | pipewire-pulseaudio
Section: sound
Priority: optional
Description: Google Kaisa HDMI audio fix (PipeWire / sof-rt5682, UCM2)
Installs UCM2 overlay under /usr/share/alsa/ucm2/ (conf.d/sof-rt5682,
GoogleKaisa/sof-rt5682) for Jack-driven HDMI routes plus IEC958 sequences,
and a system-wide WirePlumber drop-in (pro-audio profile, HDMI sink
priorities). Does not ship helper binaries or user systemd units yet —
use manual pactl/amixer steps in OPERATION until automated restore is ready.
UCM-first and pro-audio WirePlumber are mutually exclusive — see
/usr/share/doc/kaisa-hdmi-pipewire-fix/README.md and OPERATION.
.
PCI path in the WirePlumber fragment targets BDF 0000:00:1f.3; edit under
/etc/wireplumber/ if needed. See OPERATION_PipeWire_Kaisa_HDMI.md.gz in
/usr/share/doc/.

View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -e
case "$1" in
configure)
echo "kaisa-hdmi-pipewire-fix: UCM2 已安装至 /usr/share/alsa/ucm2/sof-rt5682 + GoogleKaisa"
echo "kaisa-hdmi-pipewire-fix: WirePlumber 片段: /etc/wireplumber/wireplumber.conf.d/"
echo " 重要UCM产品目标无 Jack 不误导)与强制 pro-audio 片段二选一。"
echo " 若优先 UCM请移走 50-kaisa-sof-rt5682-hdmi.conf 后执行:"
echo " systemctl --user restart wireplumber pipewire pipewire-pulse"
echo " 注意: apt upgrade 本包后若该文件曾被删/改名, 可能被再次装入; UCM 用户请再移走。"
echo " 否则保留 pro-audio 过渡时,可暂叠 UCM 但行为以 OPERATION 互斥说明为准。"
echo " 详见: /usr/share/doc/kaisa-hdmi-pipewire-fix/README.md.gz"
echo " 本包当前仅含 UCM2 + WirePlumber 片段;自动 restore / IEC958 / Jack 轮询工具尚未随 deb 提供,见 OPERATION 手顺。"
;;
esac
#DEBHELPER#
exit 0

View File

@@ -0,0 +1,4 @@
#!/bin/sh
set -e
#DEBHELPER#
exit 0

View File

@@ -0,0 +1,49 @@
# Kaisa UCM2 overlay`sof-rt5682`
本目录为 **alsa-ucm-conf** 风格的 **UCM2** 草稿,目标:**Jack off 时 HDMI 路由对 ACP/桌面不表现为可随意可用的输出**(与强制 **`pro-audio`** 的 WirePlumber 策略不同,见 [docs/linux-hdmi/OPERATION_PipeWire_Kaisa_HDMI.md](../../../../../../docs/linux-hdmi/OPERATION_PipeWire_Kaisa_HDMI.md)「UCM 模式 vs pro-audio 模式」)。
## 布局
| 路径(相对 `ucm2/` 根) | 说明 |
|-------------------------|------|
| `conf.d/sof-rt5682/sof-rt5682.conf` | 卡入口,匹配 ALSA **card name** `sof-rt5682` |
| `GoogleKaisa/sof-rt5682/HiFi.conf` | HiFi`Port1` + **HDMI1/2/3****JackControl** + **`IEC958',N`** |
上游 **alsa-ucm-conf** 若日后增加同名 `conf.d/sof-rt5682/`,与本仓库 **deb 同时安装会冲突** — 优先 **合并上游****改名/拆包**(与 [OPERATION](../../../../../../docs/linux-hdmi/OPERATION_PipeWire_Kaisa_HDMI.md) 中 UCM / pro-audio 互斥说明一致)。
## 手工安装(调试)
```bash
sudo cp -a reference/ucm2/conf.d/sof-rt5682 /usr/share/alsa/ucm2/conf.d/
sudo cp -a reference/ucm2/GoogleKaisa /usr/share/alsa/ucm2/
sudo alsactl init # 或重登 / 重启 pipewire
systemctl --user restart wireplumber pipewire pipewire-pulse
```
## 与 WirePlumber **`50-kaisa-sof-rt5682-hdmi.conf` 的互斥**
- **UCM 模式(本 overlay**:依赖 **ACP** 的 profile/端口;**请勿**再使用强制 **`device.profile = pro-audio`** 的片段,否则仍易出现 **多路 `pro-output-*` 常驻**
- **过渡 pro-audio 模式**:保留现有 `wireplumber.conf.d` 片段;**不要**同时叠加本 UCM 覆盖(二选一)。
## 校验(可选)
若已安装 **`alsa-utils`**
```bash
alsaucm -c sof-rt5682 list _verbs
alsaucm -c sof-rt5682 set _verb HiFi list _devices
```
插拔 HDMI 时对照 **`amixer -c0`** 中 **`HDMI/DP,pcm=N` Jack** 与 **`IEC958',N`**。
## 实机验收表(勾选)
| 步骤 | 预期 |
|------|------|
| 仅接模拟 / 不接 HDMI | HDMI 相关输出不对「可用路由」误导(依桌面实现) |
| 接 HDMIJack on | 对应 **IEC958** on 后有声 |
| 拔线 Jack off | 该路不应再被选为有效 HDMI 输出 |
---
_控件名以本机 `amixer` 为准;若 `Headphone`/`IEC958` 命名不同,需改 `HiFi.conf` 后重测。_

3
debian/rules vendored Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/make -f
%:
dh $@