PipeWire: Difference between revisions

m grammar
Hey (talk | contribs)
troubleshooting - audio crackling fix section
Line 377: Line 377:
This configuration prevents audio popping and keeps the audio pipeline active, effectively reducing startup delay from ~5s to ~1s. Adding the dither settings further eliminates the remaining delay.
This configuration prevents audio popping and keeps the audio pipeline active, effectively reducing startup delay from ~5s to ~1s. Adding the dither settings further eliminates the remaining delay.
</li>
</li>
</ol>


=== Audio Crackling Fix===
Increasing buffer size for the audio will reduce crackling but increase latency.
More details can be found in [https://docs.pipewire.org/page_man_pipewire_conf_5.html pipewire docs] and [https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/alsa.html wireplumber docs]


<syntaxhighlight lang="nix">
services.pipewire.enable = true;
services.pipewire.extraConfig.pipewire = {
  "98-crackling-fix" = {
    "context.properties" = {
      "default.clock.quantum" = 1024;
      "default.clock.min-quantum" = 1024;
      "default.clock.max-quantum" = 8192;
    };
  };
};


# additional fix for very bad devices or VM.
services.pipewire.wireplumber.extraConfig = {
  "99-crackling-fix" = {
    "api.alsa.period-size" = 1024;
    "api.alsa.headroom" = 8192;
  };
};
</syntaxhighlight>


==See also==
==See also==