diff --git a/modules/module-si-convert.c b/modules/module-si-convert.c index 6bfc17bf..919a88ab 100644 --- a/modules/module-si-convert.c +++ b/modules/module-si-convert.c @@ -269,16 +269,24 @@ si_convert_activate_execute_step (WpSessionItem * item, /* Create the convert properties based on the adapter properties */ node_props = wp_proxy_get_properties (WP_PROXY (node)); - props = wp_properties_copy (node_props); + props = wp_properties_new ( + PW_KEY_MEDIA_CLASS, "Audio/Convert", + PW_KEY_FACTORY_NAME, SPA_NAME_AUDIO_CONVERT, + /* make it a driver, so that it activates when linked */ + PW_KEY_NODE_DRIVER, "true", + /* the default mode is 'split', which breaks audio in this case */ + "factory.mode", "convert", + NULL); wp_properties_setf (props, PW_KEY_OBJECT_PATH, "%s:%s", - wp_properties_get(props, PW_KEY_OBJECT_PATH), + wp_properties_get (node_props, PW_KEY_OBJECT_PATH), self->name); - wp_properties_setf (props, PW_KEY_NODE_NAME, "%s/%s/%s", + wp_properties_setf (props, PW_KEY_NODE_NAME, "%s.%s.%s", SPA_NAME_AUDIO_CONVERT, - wp_properties_get(props, PW_KEY_NODE_NAME), + wp_properties_get (node_props, PW_KEY_NODE_NAME), self->name); - wp_properties_set (props, PW_KEY_MEDIA_CLASS, "Audio/Convert"); - wp_properties_set (props, PW_KEY_FACTORY_NAME, SPA_NAME_AUDIO_CONVERT); + wp_properties_setf (props, PW_KEY_NODE_DESCRIPTION, + "Stream volume for %s: %s", + wp_properties_get (node_props, PW_KEY_NODE_DESCRIPTION), self->name); /* Create the node */ self->node = wp_node_new_from_factory (core, "spa-node-factory", diff --git a/tests/modules/config-endpoint.c b/tests/modules/config-endpoint.c index 62b8ff0b..c2b70a5b 100644 --- a/tests/modules/config-endpoint.c +++ b/tests/modules/config-endpoint.c @@ -24,6 +24,8 @@ config_endpoint_setup (TestConfigEndpointFixture *f, gconstpointer data) g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, "audiotestsrc", "audiotestsrc/libspa-audiotestsrc"), ==, 0); + g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, + "audio.convert", "audioconvert/libspa-audioconvert"), ==, 0); g_assert_nonnull (pw_context_load_module (f->base.server.context, "libpipewire-module-spa-node-factory", NULL, NULL)); g_assert_nonnull (pw_context_load_module (f->base.server.context, diff --git a/tests/modules/config-policy.c b/tests/modules/config-policy.c index 5c33117e..9e8dbb1f 100644 --- a/tests/modules/config-policy.c +++ b/tests/modules/config-policy.c @@ -165,6 +165,8 @@ config_policy_setup (TestFixture *f, gconstpointer user_data) "fake*", "test/libspa-test"), ==, 0); g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, "audiotestsrc", "audiotestsrc/libspa-audiotestsrc"), ==, 0); + g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, + "audio.convert", "audioconvert/libspa-audioconvert"), ==, 0); g_assert_nonnull (pw_context_load_module (f->base.server.context, "libpipewire-module-spa-node-factory", NULL, NULL)); g_assert_nonnull (pw_context_load_module (f->base.server.context, diff --git a/tests/modules/si-audio-softdsp-endpoint.c b/tests/modules/si-audio-softdsp-endpoint.c index fd955a80..00218781 100644 --- a/tests/modules/si-audio-softdsp-endpoint.c +++ b/tests/modules/si-audio-softdsp-endpoint.c @@ -26,6 +26,8 @@ test_si_audio_softdsp_endpoint_setup (TestFixture * f, gconstpointer user_data) "fake*", "test/libspa-test"), ==, 0); g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, "audiotestsrc", "audiotestsrc/libspa-audiotestsrc"), ==, 0); + g_assert_cmpint (pw_context_add_spa_lib (f->base.server.context, + "audio.convert", "audioconvert/libspa-audioconvert"), ==, 0); g_assert_nonnull (pw_context_load_module (f->base.server.context, "libpipewire-module-spa-node-factory", NULL, NULL)); g_assert_nonnull (pw_context_load_module (f->base.server.context,