mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Bluetooth and Sound work, reverse latency changes
This commit is contained in:
parent
bddafe34e3
commit
cbcf987180
2 changed files with 38 additions and 70 deletions
|
|
@ -17,80 +17,21 @@
|
||||||
config = {
|
config = {
|
||||||
pipewire = {
|
pipewire = {
|
||||||
"context.properties" = {
|
"context.properties" = {
|
||||||
"link.max-buffers" = 16;
|
|
||||||
"log.level" = 2;
|
"log.level" = 2;
|
||||||
"default.clock.rate" = 48000;
|
"default.clock.min-quantum" =
|
||||||
"default.clock.quantum" = 32;
|
32; # default; going lower may cause crackles and distorted audio
|
||||||
"default.clock.min-quantum" = 32;
|
|
||||||
"default.clock.max-quantum" = 32;
|
|
||||||
"core.daemon" = true;
|
|
||||||
"core.name" = "pipewire-0";
|
|
||||||
};
|
};
|
||||||
"context.modules" = [
|
pipewire-pulse = {
|
||||||
{
|
"context.modules" = [{
|
||||||
name = "libpipewire-module-rtkit";
|
|
||||||
args = {
|
|
||||||
"nice.level" = -15;
|
|
||||||
"rt.prio" = 88;
|
|
||||||
"rt.time.soft" = 200000;
|
|
||||||
"rt.time.hard" = 200000;
|
|
||||||
};
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-protocol-native"; }
|
|
||||||
{ name = "libpipewire-module-profiler"; }
|
|
||||||
{ name = "libpipewire-module-metadata"; }
|
|
||||||
{ name = "libpipewire-module-spa-device-factory"; }
|
|
||||||
{ name = "libpipewire-module-spa-node-factory"; }
|
|
||||||
{ name = "libpipewire-module-client-node"; }
|
|
||||||
{ name = "libpipewire-module-client-device"; }
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-portal";
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-access";
|
|
||||||
args = {};
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-adapter"; }
|
|
||||||
{ name = "libpipewire-module-link-factory"; }
|
|
||||||
{ name = "libpipewire-module-session-manager"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
pipewire-pulse = {
|
|
||||||
"context.properties" = {
|
|
||||||
"log.level" = 2;
|
|
||||||
};
|
|
||||||
"context.modules" = [
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-rtkit";
|
|
||||||
args = {
|
|
||||||
"nice.level" = -15;
|
|
||||||
"rt.prio" = 88;
|
|
||||||
"rt.time.soft" = 200000;
|
|
||||||
"rt.time.hard" = 200000;
|
|
||||||
};
|
|
||||||
flags = [ "ifexists" "nofail" ];
|
|
||||||
}
|
|
||||||
{ name = "libpipewire-module-protocol-native"; }
|
|
||||||
{ name = "libpipewire-module-client-node"; }
|
|
||||||
{ name = "libpipewire-module-adapter"; }
|
|
||||||
{ name = "libpipewire-module-metadata"; }
|
|
||||||
{
|
|
||||||
name = "libpipewire-module-protocol-pulse";
|
name = "libpipewire-module-protocol-pulse";
|
||||||
args = {
|
args = {
|
||||||
"pulse.min.req" = "32/48000";
|
"pulse.min.quantum" = 32; # controls minimum playback quant
|
||||||
"pulse.default.req" = "32/48000";
|
"pulse.min.req" = 32; # controls minimum recording quant
|
||||||
"pulse.max.req" = "32/48000";
|
"pulse.min.frag" = 32; # controls minimum fragment size
|
||||||
"pulse.min.quantum" = "32/48000";
|
"server.address" =
|
||||||
"pulse.max.quantum" = "32/48000";
|
[ "unix:native" ]; # the default address of the server
|
||||||
"server.address" = [ "unix:native" ];
|
|
||||||
};
|
};
|
||||||
}
|
}];
|
||||||
];
|
|
||||||
"stream.properties" = {
|
|
||||||
"node.latency" = "32/48000";
|
|
||||||
"resample.quality" = 1;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,35 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
services.pipewire.media-session.config.bluez-monitor = {
|
||||||
|
properties = { };
|
||||||
|
rules = [
|
||||||
|
{
|
||||||
|
actions = {
|
||||||
|
update-props = {
|
||||||
|
"bluez5.a2dp-source-role" = "input";
|
||||||
|
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" "a2dp_source" "hsp_ag" "hfp_ag" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
matches = [ { "device.name" = "~bluez_card.*"; } ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
actions = {
|
||||||
|
update-props = { "node.pause-on-idle" = false; };
|
||||||
|
};
|
||||||
|
matches = [ { "node.name" = "~bluez_input.*"; } { "node.name" = "~bluez_output.*"; } ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue