[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/12] audio/pw: simplify error reporting in stream creation
From: |
marcandre . lureau |
Subject: |
[PATCH 10/12] audio/pw: simplify error reporting in stream creation |
Date: |
Sat, 6 May 2023 20:37:33 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
create_stream() now reports on all error paths.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
audio/pwaudio.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/audio/pwaudio.c b/audio/pwaudio.c
index 5c706a9fde..38905f5be2 100644
--- a/audio/pwaudio.c
+++ b/audio/pwaudio.c
@@ -486,8 +486,6 @@ static int
qpw_stream_new(pwaudio *c, PWVoice *v, const char *stream_name,
const char *name, enum spa_direction dir)
{
- int r;
-
switch (v->info.channels) {
case 8:
v->info.position[0] = SPA_AUDIO_CHANNEL_FL;
@@ -540,13 +538,7 @@ qpw_stream_new(pwaudio *c, PWVoice *v, const char
*stream_name,
}
/* create a new unconnected pwstream */
- r = create_stream(c, v, stream_name, name, dir);
- if (r < 0) {
- AUD_log(AUDIO_CAP, "Failed to create stream.");
- return -1;
- }
-
- return r;
+ return create_stream(c, v, stream_name, name, dir);
}
static int
@@ -577,7 +569,6 @@ qpw_init_out(HWVoiceOut *hw, struct audsettings *as, void
*drv_opaque)
r = qpw_stream_new(c, v, ppdo->stream_name ? : c->dev->id,
ppdo->name, SPA_DIRECTION_OUTPUT);
if (r < 0) {
- error_report("qpw_stream_new for playback failed");
pw_thread_loop_unlock(c->thread_loop);
return -1;
}
@@ -621,7 +612,6 @@ qpw_init_in(HWVoiceIn *hw, struct audsettings *as, void
*drv_opaque)
r = qpw_stream_new(c, v, ppdo->stream_name ? : c->dev->id,
ppdo->name, SPA_DIRECTION_INPUT);
if (r < 0) {
- error_report("qpw_stream_new for recording failed");
pw_thread_loop_unlock(c->thread_loop);
return -1;
}
--
2.40.1
- Re: [PATCH 05/12] audio/pw: needless check for NULL, (continued)
- [PATCH 06/12] audio/pw: trace during init before calling pipewire API, marcandre . lureau, 2023/05/06
- [PATCH 07/12] audio/pw: add more details on error, marcandre . lureau, 2023/05/06
- [PATCH 08/12] audio/pw: factorize some common code, marcandre . lureau, 2023/05/06
- [PATCH 09/12] audio/pw: add more error reporting, marcandre . lureau, 2023/05/06
- [PATCH 10/12] audio/pw: simplify error reporting in stream creation,
marcandre . lureau <=
- [PATCH 11/12] audio/pw: remove wrong comment, marcandre . lureau, 2023/05/06
- [PATCH 12/12] audio/pw: improve channel position code, marcandre . lureau, 2023/05/06