feat(kaisa): UCM2 Jack-driven HDMI + WirePlumber UCM Lua

Add GoogleKaisa HiFi UCM with JackControl and IEC958 sequences for HDMI1/2/3,
card entry under conf.d/sof-rt5682, and main.lua.d rule to enable UCM/ACP on
sof-rt5682. Add install/disable helper scripts and OPERATION section for
verification; restore pro-audio wireplumber sample under docs.

Made-with: Cursor
This commit is contained in:
2026-04-08 00:12:17 +08:00
parent 543385a56e
commit 60f249773e
8 changed files with 282 additions and 1 deletions

View File

@@ -0,0 +1,86 @@
# Google Kaisa — sof-rt5682 / Intel Kabylake HDMI
# HDMI 逻辑名与 ALSA deviceHDMI1=hw:0,2 HDMI2=hw:0,3 HDMI3=hw:0,4以本机 aplay -l 为准)
# 可用性由 JackControl 驱动IEC958 在 Enable/Disable 时切换。
SectionVerb."HiFi" {
SectionDevice."Port1" {
Comment "Analog (Port1)"
EnableSequence [
cset "name='HPOL Playback Switch' 1"
cset "name='HPOR Playback Switch' 1"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1"
]
DisableSequence [
cset "name='HPOL Playback Switch' 0"
cset "name='HPOR Playback Switch' 0"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
]
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
PlaybackChannels 2
}
}
SectionDevice."HDMI1" {
Comment "HDMI1"
EnableSequence [
cset "numid=14 1"
]
DisableSequence [
cset "numid=14 0"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},2"
PlaybackChannels 2
JackControl "HDMI/DP,pcm=2 Jack"
}
}
SectionDevice."HDMI2" {
Comment "HDMI2"
EnableSequence [
cset "numid=20 1"
]
DisableSequence [
cset "numid=20 0"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},3"
PlaybackChannels 2
JackControl "HDMI/DP,pcm=3 Jack"
}
}
SectionDevice."HDMI3" {
Comment "HDMI3"
EnableSequence [
cset "numid=26 1"
]
DisableSequence [
cset "numid=26 0"
]
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},4"
PlaybackChannels 2
JackControl "HDMI/DP,pcm=4 Jack"
}
}
}

View File

@@ -13,9 +13,19 @@
## 手工安装(调试)
**推荐(仓库根目录)**:先禁用强制 pro-audio 的 WirePlumber 片段,再一键安装 UCM + Lua
```bash
./scripts/disable-kaisa-pro-audio-wireplumber.sh
./scripts/install-kaisa-ucm-overlay.sh
```
等价手工步骤:
```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 install -D -m0644 wireplumber/main.lua.d/60-kaisa-ucm.lua /usr/share/wireplumber/main.lua.d/60-kaisa-ucm.lua
sudo alsactl init # 或重登 / 重启 pipewire
systemctl --user restart wireplumber pipewire pipewire-pulse
```

View File

@@ -0,0 +1,9 @@
Syntax 4
SectionUseCase."HiFi" {
File "/GoogleKaisa/sof-rt5682/HiFi.conf"
Comment "Kaisa (sof-rt5682): Port1 + HDMI1/2/3 (Jack-driven)"
}
Include.card-init.File "/lib/card-init.conf"
Include.ctl-remap.File "/lib/ctl-remap.conf"