Add AMD Cezanne (czn) SOF firmware support - #432
Conversation
get_platform() already detects google_guybrush boards as "czn", but platform_config() had no case for it and check_kernel_config() had a TODO stub, so the script silently did nothing on these boards and PipeWire only ever offered "Dummy Output". Add czn_config(), mirroring mdn_config(): installs the AMD SOF DSP firmware (sof-rn.ri/sof-rn.ldc) and topology (sof-acp.tplg) that ChromeOS ships for guybrush, and symlinks the topology under both names the kernel's ACP machine driver may ask for depending on which amp it matches (rt5682-max98360 vs rt5682-rt1019). Also fills in the check_kernel_config module list for czn. Verified on an HP Elite c645 G2 (nipperkin, AMD Cezanne, sof-rt5682s-max card). Fixes WeirdTreeThing#165. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
koluckirafal
left a comment
There was a problem hiding this comment.
Maintainers don't have policy for AI-generated contributions nor I want to make a statement in their name, but I'll review this PR anyway as a commentary.
Python part looks fine for me, while topology blob is seemingly already in sof-bin repository, so the script should ideally just ask for updated firmware-sof package version.
As for firmware blobs, I couldn't find any public/non-Google upstream for sof-rn.ri and sof-rn.ldc - preferably it should land in linux-firmware, but that would be a task for AMD.
| # ChromeOS ships one tplg and points both amp variants' topology names at | ||
| # it; the kernel asks for whichever name matches the amp it detected. | ||
| symlink_tplg("/lib/firmware/amd/sof-tplg", "sof-acp", "sof-rn-rt5682-max98360") | ||
| symlink_tplg("/lib/firmware/amd/sof-tplg", "sof-acp", "sof-rn-rt5682-rt1019") |
There was a problem hiding this comment.
should be already in firmware-sof: https://github.com/thesofproject/sof-bin/blob/main/v2.2.x/sof-tplg-v2.2.1/sof-rn-rt5682-rt1019.tplg
| cpdir("blobs/czn/tplg", "/lib/firmware/amd/sof-tplg") | ||
| # ChromeOS ships one tplg and points both amp variants' topology names at | ||
| # it; the kernel asks for whichever name matches the amp it detected. | ||
| symlink_tplg("/lib/firmware/amd/sof-tplg", "sof-acp", "sof-rn-rt5682-max98360") |
There was a problem hiding this comment.
should be already in firmware-sof: https://github.com/thesofproject/sof-bin/blob/main/v2.2.x/sof-tplg-v2.2.1/sof-rn-rt5682-max98360.tplg
|
BTW, Python wersion of the script (branch |
Summary
get_platform()already detectsgoogle_guybrushboards asczn(Cezanne), butplatform_config()had no case for it, so the script silently did nothing on these boards — audio never worked and PipeWire only ever offered "Dummy Output".check_kernel_config()also had a# TODO: fill this outstub forczn.This adds
czn_config(), following the same pattern as the existingmdn_config():sof-rn.ri/sof-rn.ldc) and topology (sof-acp.tplg) that ChromeOS ships for guybrush, committed underblobs/czn/the same wayblobs/mdn/already is.sof-rn-rt5682-max98360.tplg/sof-rn-rt5682-rt1019.tplg), mirroring howadl_sof_config()handles ADL/RPL topology aliasing."czn"intoplatform_config().check_kernel_configmodule list forczn(SND_SOC_SOF_AMD_RENOIR,SND_AMD_ASOC_RENOIR).A companion PR for the matching UCM profile is at WeirdTreeThing/alsa-ucm-conf-cros#1 — without it PipeWire still only shows "Dummy Output" even with this firmware installed.
Closes #165.
Test plan
sof-rn.ri/sof-rn.ldc/sof-acp.tplgblobs are the exact files running in production on an HP Elite c645 G2 (nipperkin, AMD Cezanne):/proc/asound/cardsshows thesof-rt5682s-maxcard and the firmware loads perjournalctl -k.czn_config()reproduces the same install/symlink steps that put them there. See ashikmeerankutty/guybrush-linux-audio for the original investigation.python3 -c "import ast; ast.parse(open('functions.py').read())"— syntax check passes.