wireplumber/0001-alsa-monitor-handle-snd_aloop-devices-better.patch
Antonio Larrosa 0978c7828b Accepting request 1057777 from home:alarrosa:branches:multimedia:libs
- Add upstream patches to fix glfo#pipewire/pipewire#2214 and to
  handle better non-null terminated strings: 
  * 0001-alsa-monitor-handle-snd_aloop-devices-better.patch
  * 0001-spa-json-make-sure-we-only-add-encoded-string-data.patch
  * 0001-m-lua-scripting-ignore-string-integer-table-keys-when-constructing-a-JSON-Array-Object.patch

OBS-URL: https://build.opensuse.org/request/show/1057777
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=55
2023-01-11 12:47:03 +00:00

33 lines
1.0 KiB
Diff

From f6dc1b3347967948cf876c62fa597b803052cb3b Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Tue, 13 Dec 2022 15:19:06 +0100
Subject: [PATCH] alsa-monitor: handle snd_aloop devices better
Place Loopback as the device description for snd_aloop devices.
Fixes pipewire#2214
---
src/scripts/monitors/alsa.lua | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/scripts/monitors/alsa.lua b/src/scripts/monitors/alsa.lua
index 195c0916..b959a4a2 100644
--- a/src/scripts/monitors/alsa.lua
+++ b/src/scripts/monitors/alsa.lua
@@ -228,8 +228,11 @@ function prepareDevice(parent, id, obj_type, factory, properties)
local d = nil
local f = properties["device.form-factor"]
local c = properties["device.class"]
+ local n = properties["api.alsa.card.name"]
- if f == "internal" then
+ if n == "Loopback" then
+ d = I18n.gettext("Loopback")
+ elseif f == "internal" then
d = I18n.gettext("Built-in Audio")
elseif c == "modem" then
d = I18n.gettext("Modem")
--
GitLab