alsa: handle the release-requested signal

Handle the release-requested signal by destroying the device and
then calling release.

Fixes pipewire/pipewire#1846
This commit is contained in:
Wim Taymans 2021-11-23 13:17:29 +01:00
parent c88fbd20e6
commit efd2458418

View file

@ -287,6 +287,12 @@ function prepareDevice(parent, id, type, factory, properties)
end
end)
rd:connect("release-requested", function (rd)
Log.info("release requested")
parent:store_managed_object(id, nil)
rd:call("release")
end)
if jack_device then
rd:connect("notify::owner-name-changed", function (rd, pspec)
if rd["state"] == "busy" and