|
@@ -769,13 +769,15 @@ qpw_audio_init(Audiodev *dev, Error **errp)
|
|
pw->core = pw_context_connect(pw->context, NULL, 0);
|
|
pw->core = pw_context_connect(pw->context, NULL, 0);
|
|
if (pw->core == NULL) {
|
|
if (pw->core == NULL) {
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
- goto fail_error;
|
|
|
|
|
|
+ error_setg_errno(errp, errno, "Failed to connect to PipeWire instance");
|
|
|
|
+ goto fail;
|
|
}
|
|
}
|
|
|
|
|
|
if (pw_core_add_listener(pw->core, &pw->core_listener,
|
|
if (pw_core_add_listener(pw->core, &pw->core_listener,
|
|
&core_events, pw) < 0) {
|
|
&core_events, pw) < 0) {
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
- goto fail_error;
|
|
|
|
|
|
+ error_setg(errp, "Failed to add PipeWire listener");
|
|
|
|
+ goto fail;
|
|
}
|
|
}
|
|
if (wait_resync(pw) < 0) {
|
|
if (wait_resync(pw) < 0) {
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
pw_thread_loop_unlock(pw->thread_loop);
|
|
@@ -785,8 +787,6 @@ qpw_audio_init(Audiodev *dev, Error **errp)
|
|
|
|
|
|
return g_steal_pointer(&pw);
|
|
return g_steal_pointer(&pw);
|
|
|
|
|
|
-fail_error:
|
|
|
|
- error_setg(errp, "Failed to initialize PW context");
|
|
|
|
fail:
|
|
fail:
|
|
if (pw->thread_loop) {
|
|
if (pw->thread_loop) {
|
|
pw_thread_loop_stop(pw->thread_loop);
|
|
pw_thread_loop_stop(pw->thread_loop);
|