modules: use NODE_WANT_DRIVER=true instead of NODE_GROUP

For the modules that require a driver, don't add ourselves to
the pipewire.dummy group but instead just use the NODE_WANT_DRIVER
property to be assigned to a driver.

This makes it possible for the nodes to move to another driver than the
dummy driver (which has very high priority) and it avoids resampling in
cases where the nodes are linked to an audio source or sink.
This commit is contained in:
Wim Taymans 2022-03-30 14:56:28 +02:00
parent 01b4c4fa64
commit 4ae94a6ca6
9 changed files with 22 additions and 18 deletions

View file

@ -406,8 +406,8 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
impl->context = context;
impl->work = pw_context_get_work_queue(context);
if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL)
pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy");
if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL)
pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true");
if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL)
pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true");
@ -429,6 +429,7 @@ int pipewire__module_init(struct pw_impl_module *module, const char *args)
copy_props(impl, props, PW_KEY_NODE_NAME);
copy_props(impl, props, PW_KEY_NODE_DESCRIPTION);
copy_props(impl, props, PW_KEY_NODE_GROUP);
copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER);
copy_props(impl, props, PW_KEY_NODE_LATENCY);
copy_props(impl, props, PW_KEY_NODE_VIRTUAL);
copy_props(impl, props, PW_KEY_MEDIA_CLASS);