diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..fd27726dcf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Ubuntu HWE 6.17 kernel tree from `apt source` / `dpkg-source -x` (large; not vendored) +kernel-src/linux-hwe-6.17-*/ +kernel-src/*.orig.tar.* +kernel-src/*.diff.gz \ No newline at end of file diff --git a/README.md b/README.md index 9539991779..8e3cfc779e 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,6 @@ - Windows 3.5mm / CoolStar:[audio_topology/OPERATION_Windows_Audio.md](audio_topology/OPERATION_Windows_Audio.md) - Linux SOF / intel-signed 固件:[audio_topology/OPERATION_Force_Intel_Signed_Firmware.md](audio_topology/OPERATION_Force_Intel_Signed_Firmware.md) - 三平台对比分析:[audio_topology/ANALYSIS_Audio.md](audio_topology/ANALYSIS_Audio.md) -- Ubuntu HWE 6.17 内核:打补丁与编译(需本机 `sudo apt` 一次)— [scripts/ubuntu-hwe-617-build.sh](scripts/ubuntu-hwe-617-build.sh)、依赖列表 [scripts/ubuntu-hwe-617-deps-packages.txt](scripts/ubuntu-hwe-617-deps-packages.txt) +- Ubuntu HWE 6.17 内核:源码目录 **`kernel-src/linux-hwe-6.17-6.17.0/`**(大文件不提交,见 [kernel-src/README.md](kernel-src/README.md));实验补丁 `patches/ubuntu-hwe-6.17/0002-*.patch`、脚本 [scripts/ubuntu-hwe-617-build.sh](scripts/ubuntu-hwe-617-build.sh)、依赖 [scripts/ubuntu-hwe-617-deps-packages.txt](scripts/ubuntu-hwe-617-deps-packages.txt)、摘要 [patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt](patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt) - **换机交接 / 进度与两处内核源码下载**:[docs/WORK_PROGRESS.md](docs/WORK_PROGRESS.md) diff --git a/audio_topology/README.md b/audio_topology/README.md index 7c7d282cb6..4f110a2064 100644 --- a/audio_topology/README.md +++ b/audio_topology/README.md @@ -23,8 +23,6 @@ sudo ./audio_topology/collect_linux_audio_topology.sh /path/to/output.txt ## Windows 用法 -`/home/jack/kernel-src/linux-hwe-6.17-6.17.0/sound/soc/intel/boards/sof_board_helpers.c` - ```powershell # 在 PowerShell 中运行(建议以管理员身份运行以获取完整驱动信息) cd audio_topology diff --git a/audio_topology/REPAIR_Plan_Audio.md b/audio_topology/REPAIR_Plan_Audio.md index 4e7cb5c450..5d3379d8f2 100644 --- a/audio_topology/REPAIR_Plan_Audio.md +++ b/audio_topology/REPAIR_Plan_Audio.md @@ -33,34 +33,28 @@ Coreboot 刷机后,Linux 与 Windows 的音频问题**表现相反**,需** 1. **确认物理口与 ALSA 设备** `aplay -L`,用 `speaker-test -D plughw:卡号,设备号` 逐个试 HDMI(pcm2/3/4 与物理 HDMI1/2/3 对应关系以实测为准)。 -2. **用 5.15 内核验证是否为 6.x 回归(优先)** - Ubuntu 22.04 **较早点版本** Live ISO(建议 [old-releases](https://old-releases.ubuntu.com/releases/22.04/) 的 22.04.1 / 22.04.2,避免 22.04.5 自带 HWE 6.x),「试用」后测 HDMI。 - 若 5.15 上 HDMI 正常 → 本机可考虑安装/长期运行 **5.15 LTS** 内核或等待上游修复。 - 详见 [ANALYSIS_Audio.md](ANALYSIS_Audio.md) 第六节。 +2. **以 ChromeOS 5.15 为「有声」参照(优先)** + 同机 **ChromeOS 上 HDMI 已验证正常**,对照意义大于通用发行版 Live。开发上:用仓库中的 **ChromiumOS 5.15 内核源码**(`chromiumos_kernel/v5.15`,克隆说明见 [WORK_PROGRESS.md](../docs/WORK_PROGRESS.md))与当前 **Ubuntu HWE 6.17** 源码(如 `kernel-src/linux-hwe-6.17-6.17.0/`,见 [kernel-src/README.md](../kernel-src/README.md))对 `sound/soc/sof/`、`sound/soc/intel/boards/` 等做 diff,定位 iDisp/HDMI 与 SOF IPC 差异;必要时再 **git bisect** 或向 SOF 上游反馈。详见 [ANALYSIS_Audio.md](ANALYSIS_Audio.md) 第六节。 3. **固件实验(预期有限)** 用 intel-signed 覆盖 community 的 `sof-cnl.ri.zst` **在本项目已实测不能单独恢复 HDMI**;若仍要试参数/路径,见 [OPERATION_Force_Intel_Signed_Firmware.md](OPERATION_Force_Intel_Signed_Firmware.md),并注意回退清单。 -4. **自行维护内核(进阶 / 目前最小补丁候选)** - 当前对照 ChromeOS 5.15 与 Ubuntu HWE 6.17 源码时,发现 iDisp HDMI 的 BE link 配置存在一个很可疑差异: - Ubuntu 6.17 的 `sound/soc/intel/boards/sof_board_helpers.c` 中 iDisp HDMI link 使用 `playback_only`,而同文件中其他 BE link 使用 `dpcm_*`,ChromeOS 5.15 也使用 `dpcm_playback`。 - 仓库内提供了一个“最小实验补丁”用于验证该差异是否与 `STREAM_PCM_PARAMS ipc failed (-5)` 相关: - - `patches/ubuntu-hwe-6.17/0001-ASoC-intel-sof-fix-idisp-hdmi-dpcm-playback.patch` +4. **自行维护内核(进阶 / 当前实验补丁)** + 对照 ChromeOS 5.15 与 Ubuntu HWE 6.17:`set_idisp_hdmi_link()` 在 ChromeOS 使用 `dpcm_playback`,在 6.17 使用 **`playback_only`**——这是上游对 `struct snd_soc_dai_link` 的重命名,**不能**再把 `dpcm_playback` 写回 6.17(会编译失败)。历史说明见 `patches/ubuntu-hwe-6.17/0001-*.patch`(**勿在 6.17 上应用**)。 + 当前可在 6.17 上应用的实验补丁为 **0002**:在 iDisp HDMI BE 上显式设置 **`link->trigger[] = SND_SOC_DPCM_TRIGGER_POST`**(与部分 Intel 板级驱动一致),用于真机验证能否缓解 `STREAM_PCM_PARAMS ipc failed (-5)`。摘要见 [patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt](../patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt)。 - 应用与编译(在你已拉取的 `~/kernel-src/linux-hwe-6.17-6.17.0/` 下执行): + 应用与编译(在已解压的 `kernel-src/linux-hwe-6.17-6.17.0/` 下;或用脚本,默认 `SRC` 已指向该路径): ```bash -cd ~/kernel-src/linux-hwe-6.17-6.17.0 -patch -p1 < /home/jack/chromebox_10th_audio_driver/patches/ubuntu-hwe-6.17/0001-ASoC-intel-sof-fix-idisp-hdmi-dpcm-playback.patch +cd /path/to/chromebox_10th_audio_driver/kernel-src/linux-hwe-6.17-6.17.0 +patch -p1 < /path/to/chromebox_10th_audio_driver/patches/ubuntu-hwe-6.17/0002-ASoC-intel-sof-idisp-hdmi-dpcm-trigger-post.patch +# 或:在仓库根目录执行 ./scripts/ubuntu-hwe-617-build.sh apply -# Ubuntu 源码的构建方式很多,这里只给“验证用”的最小提示: -# 1) 用你当前系统的配置作为起点:/boot/config-$(uname -r) -# 2) 保持 CONFIG_SND_SOC_SOF_* 与显卡音频相关选项一致 -# 3) 编译并安装内核/模块后重启,再复测 HDMI +# 出包(需足够磁盘与 apt build-dep):见 scripts/ubuntu-hwe-617-build.sh deps / build ``` - 若此补丁能让 HDMI 打开(或错误码/日志明显变化),下一步就能进一步收敛为上游可接受的修复(或定位到更精确的回归提交)。 + 若 HDMI 打开或 dmesg 中 IPC 错误明显变化,可再收敛为上游可接受的修复或 bisect。 5. **自行维护内核(进阶 / 回归定位)** - 在 v5.15 与当前内核之间对 `sound/soc/sof/` 与 `sound/soc/intel/boards/` 做 **git bisect**,定位回归后 revert 或打最小补丁;适合能自行编译内核的维护者。 -5. **上游协同** + 在 ChromeOS 5.15 参照树与当前发行版内核之间对 `sound/soc/sof/` 与 `sound/soc/intel/boards/` 做 **git bisect**(或跨树人工对比),定位回归后 revert 或打最小补丁;适合能自行编译内核的维护者。 +6. **上游协同** 向 [thesofproject/sof](https://github.com/thesofproject/sof) / alsa-devel 反馈:机型(Google Kaisa)、内核版本、dmesg 中 IPC 错误、ChromeOS 对照正常。 ### 1.3 若「原来有声现在无声」 @@ -110,7 +104,7 @@ patch -p1 < /home/jack/chromebox_10th_audio_driver/patches/ubuntu-hwe-6.17/0001- | 文档 | 内容 | | ------------------------------------------------------------------------------------ | -------------------------- | -| [ANALYSIS_Audio.md](ANALYSIS_Audio.md) | 三平台对比、原因分析、Live CD、第八节无声排查 | +| [ANALYSIS_Audio.md](ANALYSIS_Audio.md) | 三平台对比、原因分析、ChromeOS 对照与第六节排查、第八节无声排查 | | [OPERATION_Force_Intel_Signed_Firmware.md](OPERATION_Force_Intel_Signed_Firmware.md) | Linux SOF 固件路径与回退 | | [OPERATION_Windows_Audio.md](OPERATION_Windows_Audio.md) | Windows CoolStar / ALC5682 | | [README.md](../README.md) | 仓库任务列表 | diff --git a/docs/WORK_PROGRESS.md b/docs/WORK_PROGRESS.md index 1063bbdb79..74396bf9f0 100644 --- a/docs/WORK_PROGRESS.md +++ b/docs/WORK_PROGRESS.md @@ -10,7 +10,7 @@ |------|------| | 固件(intel-signed vs community) | 已实验:**单独换固件不能恢复 HDMI**;可能影响插拔检测,需按 OPERATION 文档回退 | | 拓扑 | 与 ChromeOS **等效**(采集结论见 `audio_topology/ANALYSIS_Audio.md`) | -| Ubuntu HWE 6.17 实验补丁 `patches/ubuntu-hwe-6.17/0001-*.patch` | **勿在 6.17 上应用**:`struct snd_soc_dai_link` 已无 `dpcm_playback` 成员,会编译失败;保留作历史记录 | +| Ubuntu HWE 6.17 补丁 | `0001-*.patch`:**勿在 6.17 上应用**(已无 `dpcm_playback` 成员)。可试 **`0002-*.patch`**(iDisp HDMI DPCM trigger POST);摘要见 `patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt` | | 全量内核编译 `fakeroot debian/rules binary-generic` | 进行中遇阻:**磁盘空间不足**(建议单独分区空闲 **≥35~50GB**);勿在同一源码树混用裸 `make` 与 `debian/rules`(需 `make mrproper` 清根目录) | | Windows 侧 | 以 **CoolStar / Chrultrabook 成套驱动** 与设备管理器排错为主;见 `audio_topology/OPERATION_Windows_Audio.md` | @@ -67,17 +67,17 @@ apt-cache showsrc linux-hwe-6.17 | grep -E '^Package:|^Version:' | head **下载源码(把 `Version:` 换成 `apt-cache showsrc` 里与当前内核一致的那一行)**: ```bash -mkdir -p ~/kernel-src && cd ~/kernel-src +mkdir -p /path/to/chromebox_10th_audio_driver/kernel-src && cd /path/to/chromebox_10th_audio_driver/kernel-src apt source linux-hwe-6.17=6.17.0-19.19~24.04.2 ``` -解压得到目录类似:`linux-hwe-6.17-6.17.0/`,以及 `.dsc` / `.orig.tar.gz` / `.diff.gz`。 +解压得到目录类似:`linux-hwe-6.17-6.17.0/`,以及 `.dsc` / `.orig.tar.gz` / `.diff.gz`(大文件已被 `.gitignore` 忽略,不提交仓库;见 `kernel-src/README.md`)。 **编译 generic 包(需足够磁盘与依赖)**: ```bash sudo apt build-dep linux-hwe-6.17 -cd ~/kernel-src/linux-hwe-6.17-6.17.0 +cd /path/to/chromebox_10th_audio_driver/kernel-src/linux-hwe-6.17-6.17.0 export CONCURRENCY_LEVEL="$(nproc)" fakeroot debian/rules clean fakeroot debian/rules binary-generic @@ -90,7 +90,7 @@ fakeroot debian/rules binary-generic ## 四、换机后建议最短路径 1. 克隆本仓库 `chromebox_10th_audio_driver`。 -2. 按需重新拉取 **Ubuntu 源码**(用新机器上的 `uname -r` / `dpkg -s` / `apt-cache showsrc` 核对版本号)。 +2. 按需在本仓库 **`kernel-src/`** 下重新拉取 **Ubuntu 源码**(用新机器上的 `uname -r` / `dpkg -s` / `apt-cache showsrc` 核对版本号;**24.04** 上可直接 `apt build-dep linux-hwe-6.17`)。 3. 按需重新克隆 **ChromiumOS kernel** 分支(或从旧机拷贝 `chromiumos_kernel/` 目录)。 4. 阅读:`audio_topology/REPAIR_Plan_Audio.md`、`audio_topology/ANALYSIS_Audio.md`。 diff --git a/kernel-src/README.md b/kernel-src/README.md new file mode 100644 index 0000000000..814125465d --- /dev/null +++ b/kernel-src/README.md @@ -0,0 +1,35 @@ +# Ubuntu HWE 6.17 内核源码(本机目录,不随仓库提交) + +若旧环境把解压树放在 `~/kernel-src/linux-hwe-6.17-6.17.0/`,可迁入本仓库: + +```bash +mkdir -p kernel-src +mv ~/kernel-src/linux-hwe-6.17-6.17.0 kernel-src/ +# 可选:一并移动同目录下的 .dsc / .orig.tar.gz / .diff.gz 后再删空 ~/kernel-src +``` + +解压后的目录应为: + +`linux-hwe-6.17-6.17.0/` + +在 **Ubuntu 24.04 (Noble)** 上推荐在本目录下拉源码(与 `docs/WORK_PROGRESS.md` 一致): + +```bash +cd /path/to/chromebox_10th_audio_driver/kernel-src +sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources 2>/dev/null || true +sudo apt update +apt-cache showsrc linux-hwe-6.17 | grep -E '^Version:' | head -5 +apt source linux-hwe-6.17=<与当前内核一致的 Version> +# 或: dpkg-source -x linux-hwe-6.17_*.dsc +``` + +打 HDMI 实验补丁与编译: + +```bash +export SRC="$PWD/linux-hwe-6.17-6.17.0" +../scripts/ubuntu-hwe-617-build.sh apply +../scripts/ubuntu-hwe-617-build.sh deps # Noble 上建议先 build-dep +../scripts/ubuntu-hwe-617-build.sh build +``` + +根目录 `.gitignore` 已忽略 `linux-hwe-6.17-*` 与 `*.orig.tar.*` 等,换机后请在本目录重新 `apt source`。 diff --git a/kernel-src/linux-hwe-6.17_6.17.0-20.20~24.04.1.dsc b/kernel-src/linux-hwe-6.17_6.17.0-20.20~24.04.1.dsc new file mode 100644 index 0000000000..c6b69848be --- /dev/null +++ b/kernel-src/linux-hwe-6.17_6.17.0-20.20~24.04.1.dsc @@ -0,0 +1,78 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +Format: 1.0 +Source: linux-hwe-6.17 +Binary: linux-hwe-6.17-headers-6.17.0-20, linux-hwe-6.17-tools-6.17.0-20, linux-hwe-6.17-cloud-tools-6.17.0-20, linux-image-unsigned-6.17.0-20-generic, linux-image-unsigned-6.17.0-20-generic-dbgsym, linux-image-6.17.0-20-generic, linux-image-6.17.0-20-generic-dbgsym, linux-modules-6.17.0-20-generic, linux-modules-extra-6.17.0-20-generic, linux-headers-6.17.0-20-generic, linux-lib-rust-6.17.0-20-generic, linux-tools-6.17.0-20-generic, linux-cloud-tools-6.17.0-20-generic, linux-buildinfo-6.17.0-20-generic, linux-modules-ipu6-6.17.0-20-generic, linux-modules-ipu7-6.17.0-20-generic, linux-modules-iwlwifi-6.17.0-20-generic, linux-modules-usbio-6.17.0-20-generic, linux-modules-vision-6.17.0-20-generic, linux-image-unsigned-6.17.0-20-generic-64k, linux-image-unsigned-6.17.0-20-generic-64k-dbgsym, linux-modules-6.17.0-20-generic-64k, linux-modules-extra-6.17.0-20-generic-64k, linux-headers-6.17.0-20-generic-64k, linux-lib-rust-6.17.0-20-generic-64k, + linux-tools-6.17.0-20-generic-64k, linux-cloud-tools-6.17.0-20-generic-64k, linux-buildinfo-6.17.0-20-generic-64k, linux-modules-ipu6-6.17.0-20-generic-64k, linux-modules-ipu7-6.17.0-20-generic-64k, linux-modules-iwlwifi-6.17.0-20-generic-64k, linux-modules-usbio-6.17.0-20-generic-64k, + linux-modules-vision-6.17.0-20-generic-64k +Architecture: all amd64 armhf arm64 ppc64el s390x +Version: 6.17.0-20.20~24.04.1 +Maintainer: Ubuntu Kernel Team +Standards-Version: 3.9.4.0 +Vcs-Git: git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble -b hwe-6.17 +Testsuite: autopkgtest +Testsuite-Triggers: @builddeps@, build-essential, fakeroot, fuse-overlayfs, gcc-multilib, gdb, git, python3, snapd +Build-Depends: gcc-13, gcc-13-aarch64-linux-gnu [arm64] , gcc-13-arm-linux-gnueabihf [armhf] , gcc-13-powerpc64le-linux-gnu [ppc64el] , gcc-13-riscv64-linux-gnu [riscv64] , gcc-13-s390x-linux-gnu [s390x] , gcc-13-x86-64-linux-gnu [amd64] , autoconf , automake , bc , bindgen-0.65 [amd64 arm64 armhf ppc64el riscv64 s390x], bison , clang-19 [amd64 arm64 armhf ppc64el riscv64 s390x], cpio, curl , debhelper-compat (= 10), default-jdk-headless , dkms , flex , gawk , java-common , kmod , libaudit-dev , libcap-dev , libdebuginfod-dev [amd64 arm64 armhf ppc64el s390x riscv64] , libdw-dev , libelf-dev , libiberty-dev , liblzma-dev , libnewt-dev , libnuma-dev [amd64 arm64 ppc64el s390x] , libpci-dev , libssl-dev , libstdc++-13-dev, libtool , libtraceevent-dev [amd64 arm64 armhf ppc64el s390x riscv64] , libtracefs-dev [amd64 arm64 armhf ppc64el s390x riscv64] , libudev-dev , libunwind8-dev [amd64 arm64 armhf ppc64el] , makedumpfile [amd64] , openssl , pahole [amd64 arm64 armhf ppc64el s390x riscv64] | dwarves (>= 1.21) [amd64 arm64 armhf ppc64el s390x riscv64] , pkg-config , python3 , python3-dev , python3-setuptools, rsync [!i386] , rust-1.82-src [amd64 arm64 armhf ppc64el riscv64 s390x], rustc-1.82 [amd64 arm64 armhf ppc64el riscv64 s390x], rustfmt-1.82 [amd64 arm64 armhf ppc64el riscv64 s390x], uuid-dev , zstd +Build-Depends-Indep: asciidoc , bzip2 , python3-docutils , sharutils , xmlto +Package-List: + linux-buildinfo-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-buildinfo-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-cloud-tools-6.17.0-20-generic deb devel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-cloud-tools-6.17.0-20-generic-64k deb devel optional arch=arm64 profile=!stage1 + linux-headers-6.17.0-20-generic deb devel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-headers-6.17.0-20-generic-64k deb devel optional arch=arm64 profile=!stage1 + linux-hwe-6.17-cloud-tools-6.17.0-20 deb devel optional arch=amd64,armhf profile=!stage1 + linux-hwe-6.17-headers-6.17.0-20 deb devel optional arch=all profile=!stage1 + linux-hwe-6.17-tools-6.17.0-20 deb devel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-image-6.17.0-20-generic deb kernel optional arch=armhf,ppc64el profile=!stage1 + linux-image-6.17.0-20-generic-dbgsym deb devel optional arch=armhf,ppc64el profile=!stage1 + linux-image-unsigned-6.17.0-20-generic deb kernel optional arch=amd64,arm64,s390x profile=!stage1 + linux-image-unsigned-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-image-unsigned-6.17.0-20-generic-64k-dbgsym deb devel optional arch=arm64 profile=!stage1 + linux-image-unsigned-6.17.0-20-generic-dbgsym deb devel optional arch=amd64,arm64,s390x profile=!stage1 + linux-lib-rust-6.17.0-20-generic deb devel optional arch=amd64 profile=!stage1 + linux-lib-rust-6.17.0-20-generic-64k deb devel optional arch=amd64 profile=!stage1 + linux-modules-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-extra-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-extra-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-ipu6-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-ipu6-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-ipu7-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-ipu7-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-iwlwifi-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-iwlwifi-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-usbio-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-usbio-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-modules-vision-6.17.0-20-generic deb kernel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-modules-vision-6.17.0-20-generic-64k deb kernel optional arch=arm64 profile=!stage1 + linux-tools-6.17.0-20-generic deb devel optional arch=amd64,armhf,arm64,ppc64el,s390x profile=!stage1 + linux-tools-6.17.0-20-generic-64k deb devel optional arch=arm64 profile=!stage1 +Checksums-Sha1: + 4628a8ca90eb9ae3b9edc9054c4e187fa5b05472 248671329 linux-hwe-6.17_6.17.0.orig.tar.gz + 16319d40ad3017c96e337c06c4e5851941830902 2357814 linux-hwe-6.17_6.17.0-20.20~24.04.1.diff.gz +Checksums-Sha256: + a5623ec5af79da8807e1467e43a1888461c7a445fb1e17533fe45f0fdf4394e3 248671329 linux-hwe-6.17_6.17.0.orig.tar.gz + 513deadb3db89721905445c5b0e0785c9ac6803ce531de02f55f333fd091f205 2357814 linux-hwe-6.17_6.17.0-20.20~24.04.1.diff.gz +Files: + 9987e29d84285075cf506ddd403dd887 248671329 linux-hwe-6.17_6.17.0.orig.tar.gz + 4c1b0772cc6c094c6bca7e071211536e 2357814 linux-hwe-6.17_6.17.0-20.20~24.04.1.diff.gz +Ubuntu-Compatible-Signing: ubuntu/4 pro/3 + +-----BEGIN PGP SIGNATURE----- + +iQIzBAEBCgAdFiEEOdMBrFJziXWR5e+rkdhqW2QaBCYFAmm7BpkACgkQkdhqW2Qa +BCbKaBAAi8HPORxU+9+qb8nBLNzL6/toBCR7u0U/oOguQp2jmzlYLDz9Vf/FMTEn +ZjP0uUBPtGtNnHrjrqnGpXjbvw8hbPP6PG7UXEbU44qwRET3ZvzgXTrd2On1MY8o +MSxiREeHtuVRIlIP6Vadclf8GmeJsCzCraDx15Ycw8XW5+la0rsKZr2pdBXU+8mf +CVkMwynPVBWBIg00N8mJxw0duESbie7sJbSPpQOf73kPNyxpa3Li/7RDkH4rPp6F +Lv7kOXs9Eb8c4EfCP9HEjJnXo1PagGN979Ypkg9knP4ftpDRranIjf+fsq/Kz5a9 +mbG3Nlqxn8o7+NsakzDRBoxn6GOFDqL+MvXSHf0GHr+tvvozLJK64M+BF3pZhgrP +7L/nbH9uFG7ZsYZ8Nerod9keMkrWY7n+CRSVfUilwFpwPmhUYO8Ye2v5V+ng1pIs +Dn1L3EKnAoHXS7YbqEZ+O/FEnUkaa0UZxMJEIc3xUiBbl9Vx0ngE2khCJEeQRW8f +PhyHIPpDvRZc3K7upqZXhGLhTgiAhLT2aZhQzsqIBeHI8lg9942TIWxBLrWlGWiS +9h+r22IKuxMyON9fKNA1pzl6yeNkXjdyiCROOi+bUXgqpEt+SD/U4GcBuUSG1sLu +MHNxNO8DWsKK+7F1G040/VOVGTubgSjlB3dIXTvL7VmqF09cYEw= +=iVVM +-----END PGP SIGNATURE----- diff --git a/patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt b/patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt new file mode 100644 index 0000000000..556641a042 --- /dev/null +++ b/patches/ubuntu-hwe-6.17/DIFF_SUMMARY.txt @@ -0,0 +1,34 @@ +Default source tree (not in git): ../kernel-src/linux-hwe-6.17-6.17.0/ + +ChromeOS v5.15 vs Ubuntu HWE 6.17 (sound/soc/intel/boards/sof_board_helpers.c) +================================================================================ + +Key upstream renames (not bugs by themselves): +- dpcm_playback / dpcm_capture on DAI links -> playback_only / capture_only + (see include/sound/soc.h). ChromeOS set_idisp_hdmi used dpcm_playback=1; + 6.17 uses playback_only=1 for the same iDisp HDMI BE link. + +Other 6.17 deltas in this file: HDA external codec widgets/routes, EXPORT_SYMBOL_NS +string form, enum snd_soc_acpi_intel_codec renames, DMIC capture_only, etc. + +sof_rt5682.c differs heavily by DMI quirks and API; no Kaisa-specific string in +either tree (board selection is via ACPI / machine driver data). + +Experiment patch 0002 (applies on 6.17): +- Adds link->trigger[0/1] = SND_SOC_DPCM_TRIGGER_POST in set_idisp_hdmi_link, + similar to older Intel boards (e.g. bdw_rt286). + +Build smoke-test (object file only, not full deb): +- make x86_64_defconfig && make prepare SKIP_STACK_VALIDATION=1 +- make sound/soc/intel/boards/sof_board_helpers.o + +Full Ubuntu package: fakeroot debian/rules binary-generic (needs apt build-dep +linux-hwe-6.17, large disk/time). Install linux-image-* / linux-modules-* on Kaisa. + +Kaisa 真机验证(安装新 deb 并重启后) +------------------------------------ +1. uname -r +2. aplay -L | head -80 +3. speaker-test -D plughw:卡号,设备号 -c 2 -l 1 # 对照 HDMI 对应 PCM +4. sudo dmesg | grep -iE 'sof|STREAM_PCM|ipc failed|pcm[0-9]' | tail -60 +5. 将输出保存到 audio_topology/collected/ 便于前后对比 diff --git a/scripts/ubuntu-hwe-617-build.sh b/scripts/ubuntu-hwe-617-build.sh index e2d64a51d1..e4ae73614c 100755 --- a/scripts/ubuntu-hwe-617-build.sh +++ b/scripts/ubuntu-hwe-617-build.sh @@ -1,19 +1,22 @@ #!/usr/bin/env bash -# Ubuntu HWE 6.17: apply SOF HDMI experiment patch, build generic kernel debs, optional install. -# Run from your machine (requires sudo for apt/dpkg). Do NOT edit the plan file. +# Ubuntu HWE 6.17: apply SOF iDisp HDMI experiment patch (0002), build generic debs, optional install. +# Run on Ubuntu (Noble or host with linux-hwe-6.17 sources); requires sudo for apt/dpkg. set -euo pipefail -PATCH="${PATCH:-/home/jack/chromebox_10th_audio_driver/patches/ubuntu-hwe-6.17/0001-ASoC-intel-sof-fix-idisp-hdmi-dpcm-playback.patch}" -SRC="${SRC:-$HOME/kernel-src/linux-hwe-6.17-6.17.0}" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +PATCH="${PATCH:-$REPO_ROOT/patches/ubuntu-hwe-6.17/0002-ASoC-intel-sof-idisp-hdmi-dpcm-trigger-post.patch}" +SRC="${SRC:-$REPO_ROOT/kernel-src/linux-hwe-6.17-6.17.0}" JOBS="${CONCURRENCY_LEVEL:-$(nproc)}" usage() { echo "Usage: $0 [apply|deps|build|install|all]" - echo " apply - patch -p1 in SRC (default: $SRC)" + echo " apply - patch -p1 in SRC (PATCH=$PATCH)" echo " deps - sudo apt build-dep linux-hwe-6.17 + build tools" echo " build - fakeroot debian/rules clean && binary-generic" echo " install- sudo dpkg -i newest linux-image-* and linux-modules-* in parent of SRC" echo " all - apply deps build (install is manual: run install after reviewing debs)" + echo "Env: PATCH=path SRC=path to linux-hwe-6.17-6.17.0 tree" } if [[ ! -f "$SRC/debian/rules" ]]; then @@ -24,19 +27,19 @@ fi cmd_apply() { cd "$SRC" local f="sound/soc/intel/boards/sof_board_helpers.c" - if grep -q 'link->dpcm_playback = 1' "$f" 2>/dev/null; then + if grep -q 'link->trigger\[0\] = SND_SOC_DPCM_TRIGGER_POST' "$f" 2>/dev/null; then echo "Already patched: $f" else patch -p1 < "$PATCH" fi - grep -n 'set_idisp_hdmi_link\|dpcm_playback\|playback_only' "$f" | head -20 || true + grep -n 'set_idisp_hdmi_link\|playback_only\|trigger\[0\]' "$f" | head -25 || true } cmd_deps() { sudo apt-get update sudo apt-get build-dep -y linux-hwe-6.17 sudo apt-get install -y fakeroot build-essential libncurses-dev libssl-dev ccache \ - gawk debhelper libelf-dev + gawk debhelper libelf-dev flex bison bc python3-dev } cmd_build() { @@ -49,7 +52,6 @@ cmd_build() { cmd_install() { parent="$(dirname "$SRC")" cd "$parent" - # Pick debs matching this source tree version (newest mtime) mapfile -t imgs < <(ls -t linux-image-*.deb 2>/dev/null || true) mapfile -t mods < <(ls -t linux-modules-*.deb 2>/dev/null || true) if [[ ${#imgs[@]} -eq 0 || ${#mods[@]} -eq 0 ]]; then