moby: ship alsa w/o the "voice call" configs, since they dont produce any audio
This commit is contained in:
@@ -110,7 +110,7 @@ in
|
||||
# this is only the username/endpoint: the actual password appears to be stored in gnome-keyring
|
||||
secrets.".config/calls/sip-account.cfg" = ../../../secrets/common/gnome_calls_sip-account.cfg.bin;
|
||||
suggestedPrograms = [
|
||||
"callaudiod" # runtime dependency (optional, but probably needed for mic muting?)
|
||||
"callaudiod" # runtime dependency (optional; without this the mute and speaker buttons do not work (ordinarily they function by changing the GLOBAL audio config))
|
||||
"feedbackd" # needs `phone-incoming-call`, in particular
|
||||
"gnome-keyring" # to remember the password
|
||||
];
|
||||
|
@@ -40,6 +40,9 @@ in
|
||||
sane.programs.swaynotificationcenter.config = {
|
||||
backlight = "backlight"; # /sys/class/backlight/*backlight*/brightness
|
||||
};
|
||||
# XXX(2024/10/18): callaudiod changes the global audio config; this requires alsa configs to be 100% right,
|
||||
# else it'll change to something which produces no sound (like the "Voice Call" use case)
|
||||
# sane.programs.callaudiod.enableFor.user.colin = lib.mkForce false;
|
||||
|
||||
boot.kernelPatches = [
|
||||
{
|
||||
|
@@ -1,6 +1,9 @@
|
||||
{
|
||||
fetchFromGitLab,
|
||||
gnused,
|
||||
lib,
|
||||
stdenv,
|
||||
withVoiceCall ? false, #< enable the "Voice Call" audio variants, which frequently don't work and idk what they're *supposed* to do
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "pine64-alsa-ucm";
|
||||
@@ -13,7 +16,17 @@ stdenv.mkDerivation {
|
||||
hash = "sha256-nsZXBB5VpF0YpfIS+/SSHMlPXSyIGLZSOkovjag8ifU=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
nativeBuildInputs = lib.optionals (!withVoiceCall) [
|
||||
gnused
|
||||
];
|
||||
|
||||
buildPhase = lib.optionalString (!withVoiceCall) ''
|
||||
sed -e '/SectionUseCase."Voice Call"/,+3d' -i ucm2/PinePhone/PinePhone.conf
|
||||
rm ucm2/PinePhone/VoiceCall.conf
|
||||
|
||||
sed -e '/SectionUseCase."Voice Call"/,+3d' -i ucm2/PinePhonePro/PinePhonePro.conf
|
||||
rm ucm2/PinePhonePro/VoiceCall.conf
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@@ -36,11 +49,11 @@ stdenv.mkDerivation {
|
||||
|
||||
substituteInPlace $out/share/alsa/ucm2/Allwinner/A64/PinePhone/PinePhone.conf \
|
||||
--replace-fail '"HiFi.conf"' '"/Allwinner/A64/PinePhone/HiFi.conf"' \
|
||||
--replace-fail '"VoiceCall.conf"' '"/Allwinner/A64/PinePhone/VoiceCall.conf"'
|
||||
${lib.optionalString withVoiceCall ''--replace-fail '"VoiceCall.conf"' '"/Allwinner/A64/PinePhone/VoiceCall.conf"' ''}
|
||||
|
||||
substituteInPlace $out/share/alsa/ucm2/Rockchip/rk3399/PinePhonePro/PinePhonePro.conf \
|
||||
--replace-fail '"HiFi.conf"' '"/Rockchip/rk3399/PinePhonePro/HiFi.conf"' \
|
||||
--replace-fail '"VoiceCall.conf"' '"/Rockchip/rk3399/PinePhonePro/VoiceCall.conf"'
|
||||
${lib.optionalString withVoiceCall ''--replace-fail '"VoiceCall.conf"' '"/Rockchip/rk3399/PinePhonePro/VoiceCall.conf"' ''}
|
||||
|
||||
runHook postFixup
|
||||
'';
|
||||
|
Reference in New Issue
Block a user