wireplumber/0002-alsa-monitor-set-period-size-and-headroom-props-if-running-in-virtual-machine.patch

32 lines
918 B
Diff
Raw Normal View History

From ba2cd1cfd74de346ccc88028b6e1d6e95f055ba1 Mon Sep 17 00:00:00 2001
From: Julian Bouzas <julian.bouzas@collabora.com>
Date: Fri, 14 Jan 2022 14:35:58 -0500
Subject: [PATCH] alsa-monitor: set period-size and headroom props if running
in virtual machine
Fixes #162
---
src/scripts/monitors/alsa.lua | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
index 3e8eda83..592a250d 100644
--- a/src/scripts/monitors/alsa.lua
+++ b/src/scripts/monitors/alsa.lua
@@ -166,6 +166,12 @@ function createNode(parent, id, type, factory, properties)
end
end
+ -- apply virtual machine properties
+ if Core.is_guest() then
+ properties["api.alsa.period-size"] = 256
+ properties["api.alsa.headroom"] = 8192
+ end
+
-- apply properties from config.rules
rulesApplyProperties(properties)
if properties["node.disabled"] then
--
GitLab