- 新增 OPERATION_PipeWire_Kaisa_ProAudio / UCM_HiFi,核心问题复盘与恢复 Ubuntu 重测手顺;HDMI 旧文改为 stub。 - 脚本:apply / verify-pro-audio、strip default-profile、reapply-session、remove deb 与 UCM overlay、verify-audio-environment。 - systemd-user:kaisa-pro-audio-reapply.service 示例。 - README、docs 索引、REPO_INDEX、REPRO deb 存档说明;deb 标为未来计划;reference/ucm2 与采集脚本小改。 - debian 与 _bmad-output 规划文件随本次工作区一并更新。 Made-with: Cursor
56 lines
1.8 KiB
Bash
Executable File
56 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
# 卸载本仓库安装的 Kaisa UCM2 overlay 与系统级 60-kaisa-ucm.lua(需 sudo)。
|
||
# 不卸载 alsa-ucm-conf 整包;仅删除 install-kaisa-ucm-overlay.sh 写入的路径。
|
||
# 用法:在仓库根目录执行 ./scripts/remove-kaisa-ucm-overlay.sh
|
||
# 卸载后若走 pro-audio,请再执行 ./scripts/apply-kaisa-pro-audio.sh
|
||
set -euo pipefail
|
||
|
||
if ! command -v sudo &>/dev/null; then
|
||
echo "需要 sudo。" >&2
|
||
exit 1
|
||
fi
|
||
|
||
removed=0
|
||
|
||
echo ">>> 删除 /usr/share/alsa/ucm2/GoogleKaisa/(若存在)"
|
||
if [[ -d /usr/share/alsa/ucm2/GoogleKaisa ]]; then
|
||
sudo rm -rf -- /usr/share/alsa/ucm2/GoogleKaisa
|
||
removed=1
|
||
echo " 已删除。"
|
||
else
|
||
echo " (不存在,跳过)"
|
||
fi
|
||
|
||
echo ">>> 删除 /usr/share/alsa/ucm2/conf.d/sof-rt5682/(若存在)"
|
||
if [[ -d /usr/share/alsa/ucm2/conf.d/sof-rt5682 ]]; then
|
||
sudo rm -rf -- /usr/share/alsa/ucm2/conf.d/sof-rt5682
|
||
removed=1
|
||
echo " 已删除。"
|
||
else
|
||
echo " (不存在,跳过)"
|
||
fi
|
||
|
||
LUA="/usr/share/wireplumber/main.lua.d/60-kaisa-ucm.lua"
|
||
echo ">>> 禁用 $LUA(若存在)"
|
||
if [[ -f "$LUA" ]]; then
|
||
sudo mv -n -- "$LUA" "${LUA}.disabled"
|
||
removed=1
|
||
echo " 已移至 ${LUA}.disabled"
|
||
elif [[ -f "${LUA}.disabled" ]]; then
|
||
echo " (已是 .disabled,跳过)"
|
||
else
|
||
echo " (不存在,跳过)"
|
||
fi
|
||
|
||
if systemctl --user is-system-running &>/dev/null; then
|
||
echo ">>> systemctl --user restart wireplumber pipewire pipewire-pulse"
|
||
systemctl --user restart wireplumber pipewire pipewire-pulse
|
||
else
|
||
echo "(无 user 会话,请登录后执行: systemctl --user restart wireplumber pipewire pipewire-pulse)" >&2
|
||
fi
|
||
|
||
echo "完成。sof-rt5682 将不再使用本仓库的 HiFi UCM(HDMI1/2/3 等端口名来自该 overlay)。"
|
||
if [[ "$removed" -eq 1 ]]; then
|
||
echo "建议:走 pro-audio 时在仓库根执行 ./scripts/apply-kaisa-pro-audio.sh"
|
||
fi
|