@samitouri / QOSamiQemu / commits / a6d2b24bbf

audio/pw: replace custom logging with error_report

Replace the custom audio logging infrastructure (dolog macro) with standard QEMU error reporting (error_report). Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Marc-André Lureau committed Jan 20, 2026 at 20:02 UTC a6d2b24bbf60c2cc2ced5490e7d93bc0aa51fd1b
1 file changed +5 -6
audio/pwaudio.c
+5 -6
@@ -20,14 +20,13 @@
20 #include <spa/param/props.h>
21
22 #include <pipewire/pipewire.h>
23 +
24 +#include "audio_int.h"
25 #include "trace.h"
26
25 -#define AUDIO_CAP "pipewire"
27 #define RINGBUFFER_SIZE (1u << 22)
28 #define RINGBUFFER_MASK (RINGBUFFER_SIZE - 1)
29
29 -#include "audio_int.h"
30 -
30 #define TYPE_AUDIO_PW "audio-pipewire"
31 OBJECT_DECLARE_SIMPLE_TYPE(AudioPw, AUDIO_PW)
32
@@ -358,7 +357,7 @@ audfmt_to_pw(AudioFormat fmt, bool big_endian)
357 format = big_endian ? SPA_AUDIO_FORMAT_F32_BE : SPA_AUDIO_FORMAT_F32_LE;
358 break;
359 default:
361 - dolog("Internal logic error: Bad audio format %d\n", fmt);
360 + error_report("pipewire: internal logic error: bad audio format %d", fmt);
361 format = SPA_AUDIO_FORMAT_U8;
362 break;
363 }
@@ -418,7 +417,7 @@ pw_to_audfmt(enum spa_audio_format fmt, int *endianness,
417 return AUDIO_FORMAT_F32;
418 default:
419 *sample_size = 1;
421 - dolog("Internal logic error: Bad spa_audio_format %d\n", fmt);
420 + error_report("pipewire: internal logic error: bad spa_audio_format %d", fmt);
421 return AUDIO_FORMAT_U8;
422 }
423 }
@@ -518,7 +517,7 @@ qpw_set_position(uint32_t channels, uint32_t position[SPA_AUDIO_MAX_CHANNELS])
517 position[0] = SPA_AUDIO_CHANNEL_MONO;
518 break;
519 default:
521 - dolog("Internal error: unsupported channel count %d\n", channels);
520 + error_report("pipewire: unsupported channel count %d", channels);
521 }
522 }
523