diff --git a/pkgs/by-name/pine64-alsa-ucm/package.nix b/pkgs/by-name/pine64-alsa-ucm/package.nix index 76481dfde..42bff96ca 100644 --- a/pkgs/by-name/pine64-alsa-ucm/package.nix +++ b/pkgs/by-name/pine64-alsa-ucm/package.nix @@ -39,6 +39,16 @@ stdenvNoCC.mkDerivation { ln -s ../../Rockchip/rk3399/PinePhonePro/PinePhonePro.conf $out/share/alsa/ucm2/conf.d/simple-card/PinePhonePro.conf ln -s ../../Allwinner/A64/PinePhone/PinePhone.conf $out/share/alsa/ucm2/conf.d/simple-card/PinePhone.conf + # XXX(2025-09-03): if booted via systemd-boot, the card will be named differently but otherwise function equivalently. + # this is because, if DMI (via EFI) is available, the kernel uses Vendor + Product Name fields to assign the card a long_name, + # instead of the device-tree fields. + # there seems no easy way to change that on the kernel side, nor to configure ALSA UCM to prefer the card short name. + # TODO: consider other ways to configure the card *besides* UCM: + # - smarter in-kernel driver/configs? + # - pipewire / pulseaudio card profiles? + # - particularly, expose the card on the kernel side in such a way that the generic pipewire profiles can configure it. + ln -s PinePhonePro.conf $out/share/alsa/ucm2/conf.d/simple-card/pine64-Pine64PinePhonePro-.conf + runHook postInstall '';