Skip to content

Commit

Permalink
audio/pw: add more details on error
Browse files Browse the repository at this point in the history
PipeWire uses errno to report error details.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20230506163735.3481387-8-marcandre.lureau@redhat.com>
  • Loading branch information
elmarco committed Jul 17, 2023
1 parent 87048d2 commit 24a9095
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions audio/pwaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ static int wait_resync(pwaudio *pw)
}
return 0;
}

static void
on_core_error(void *data, uint32_t id, int seq, int res, const char *message)
{
Expand Down Expand Up @@ -793,19 +794,19 @@ qpw_audio_init(Audiodev *dev)
pw->dev = dev;
pw->thread_loop = pw_thread_loop_new("PipeWire thread loop", NULL);
if (pw->thread_loop == NULL) {
error_report("Could not create PipeWire loop");
error_report("Could not create PipeWire loop: %s", g_strerror(errno));
goto fail;
}

pw->context =
pw_context_new(pw_thread_loop_get_loop(pw->thread_loop), NULL, 0);
if (pw->context == NULL) {
error_report("Could not create PipeWire context");
error_report("Could not create PipeWire context: %s", g_strerror(errno));
goto fail;
}

if (pw_thread_loop_start(pw->thread_loop) < 0) {
error_report("Could not start PipeWire loop");
error_report("Could not start PipeWire loop: %s", g_strerror(errno));
goto fail;
}

Expand Down

0 comments on commit 24a9095

Please sign in to comment.