禁用声音休眠,避免播放后n秒才出现声音

This commit is contained in:
2025-04-30 15:14:32 +08:00
parent 5d43285e9e
commit 057beb27e2

View File

@@ -8,7 +8,10 @@
# If you want to use JACK applications, uncomment this
#jack.enable = true;
wireplumber.extraConfig.bluetoothEnhancements = {
wireplumber = {
enable = true;
extraConfig = {
"80-bluetooth-enhancements" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
@@ -16,10 +19,56 @@
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
# Disable suspend for all ALSA nodes
"99-disable-suspend" = {
# ALSA Rules: Separate rule for input and output
"monitor.alsa.rules" = [
# Rule for ALSA outputs
{
matches = [
{
# Matches all sinks (outputs)
"node.name" = "~alsa_output.*";
}
{
# Matches all sources (inputs)
"node.name" = "~alsa_input.*";
}
];
actions = {
"update-props" = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
# Bluez Rules: Separate rule for input and output
"monitor.bluez.rules" = [
# Rule for Bluez outputs
{
matches = [
{
"node.name" = "~bluez_output.*";
}
{
"node.name" = "~bluez_input.*";
}
];
actions = {
"update-props" = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
};
};
};
};
};
environment.systemPackages = with pkgs;[
environment.systemPackages = with pkgs; [
# audio control software
pamixer
];