From nobody Sun Apr 12 06:13:33 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1771405831; cv=none; d=zohomail.com; s=zohoarc; b=DR/s0bvV3CMdE3QRTDfRqwkiNdptEyW7N433uwc1LULZc8ePAr9ksjDM9fSeNA0XX0Ah2ivHqWe82xnz3g/ze15omFPhEAKMWiI3JmP6YW44OGpaaa0Um9SAasWT3coSs5UnrmI/lPgZsGhl0T+rIZhVcOnRTgaxZihju/JHxgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771405831; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LGq+VCEW90rvm6mfQdjwX9Xt4WycZSlTKQAB6s+z0Ro=; b=m1aKwGlVNJPbRFKu/+leYesIAPZHjqFEF5U/Ova2igBUjNNGuVk7Dex2xD4PFI55UXC52s2f3iCkohh2scRg/Ud+lWJqhaYq3iCY7Q6R0cUC0dm8W8GN1tBFZAGxqw8Lb+gsPxGFu6/0/Rq7k+MZBt3w+vdnLfkiv8hHHOzNs7A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1771405831872696.1803720898832; Wed, 18 Feb 2026 01:10:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vsdXN-0002qD-Dc; Wed, 18 Feb 2026 04:08:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vsdX6-0001IM-PN for qemu-devel@nongnu.org; Wed, 18 Feb 2026 04:07:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vsdX3-0002VS-CO for qemu-devel@nongnu.org; Wed, 18 Feb 2026 04:07:44 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-104-T8Dl6c_hNDSGSw6EU1n4rA-1; Wed, 18 Feb 2026 04:07:39 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5D4F01800464; Wed, 18 Feb 2026 09:07:38 +0000 (UTC) Received: from localhost (unknown [10.45.242.26]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B43C91800351; Wed, 18 Feb 2026 09:07:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771405660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LGq+VCEW90rvm6mfQdjwX9Xt4WycZSlTKQAB6s+z0Ro=; b=UHgkR5LMr5BFmbxBXIM78GS9uzy1OhTISvfkRsm66jwIYssTFJW+CMR59QhS7p8dgAAKME 8wTXVZXquLXS7K+ydifUaQM1LgNOc1rEPyFYGbFbqDKavH6KvH5jYpeO3UKf+kDCJGtEOD ntbaofisPcNfJdHSQB6ESlgnrNpFvdw= X-MC-Unique: T8Dl6c_hNDSGSw6EU1n4rA-1 X-Mimecast-MFC-AGG-ID: T8Dl6c_hNDSGSw6EU1n4rA_1771405658 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Subject: [PULL 82/85] audio: replace remaining dolog() and AUD_log Date: Wed, 18 Feb 2026 10:03:22 +0100 Message-ID: <20260218090330.1476169-83-marcandre.lureau@redhat.com> In-Reply-To: <20260218090330.1476169-1-marcandre.lureau@redhat.com> References: <20260218090330.1476169-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.043, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1771405832330158500 From: Marc-Andr=C3=A9 Lureau Use warn_report/error_report and trace instead. Reviewed-by: Mark Cave-Ayland Reviewed-by: Akihiko Odaki Signed-off-by: Marc-Andr=C3=A9 Lureau --- audio/audio_template.h | 19 ++++++++----------- audio/audio-mixeng-be.c | 14 ++++++-------- audio/trace-events | 1 + 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/audio/audio_template.h b/audio/audio_template.h index 9dde36738bc..760aaf5f31f 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -47,21 +47,19 @@ static void glue(audio_init_nb_voices_, TYPE)(AudioMixe= ngBackend *s, if (glue(s->nb_hw_voices_, TYPE) > max_voices) { if (!max_voices) { #ifdef DAC - dolog("Driver `%s' does not support " NAME "\n", k->name); + warn_report("audio: Driver '%s' does not support " NAME, k->na= me); #endif } else { - dolog("Driver `%s' does not support %d " NAME " voices, max %d= \n", - k->name, - glue(s->nb_hw_voices_, TYPE), - max_voices); + warn_report("audio: Driver '%s' does not support %d " NAME " v= oices, max %d", + k->name, glue(s->nb_hw_voices_, TYPE), max_voices); } glue(s->nb_hw_voices_, TYPE) =3D max_voices; } =20 if (glue(s->nb_hw_voices_, TYPE) < min_voices) { - dolog("Bogus number of " NAME " voices %d, setting to %d\n", - glue(s->nb_hw_voices_, TYPE), - min_voices); + warn_report("audio: Bogus number of " NAME " voices %d, setting to= %d", + glue(s->nb_hw_voices_, TYPE), + min_voices); } =20 if (!voice_size && max_voices) { @@ -443,7 +441,7 @@ static SW *glue(audio_pcm_create_voice_pair_, TYPE)( =20 hw =3D glue(audio_pcm_hw_add_, TYPE)(s, &hw_as); if (!hw) { - dolog("Could not create a backend for voice `%s'\n", sw_name); + error_report("audio: Could not create a backend for voice '%s'", s= w_name); goto err1; } =20 @@ -537,8 +535,7 @@ static SW *glue(audio_mixeng_backend_open_, TYPE) ( HW *hw =3D sw->hw; =20 if (!hw) { - dolog("Internal logic error: voice `%s' has no backend\n", - SW_NAME(sw)); + audio_bug("Internal logic error: voice '%s' has no backend", S= W_NAME(sw)); goto fail; } =20 diff --git a/audio/audio-mixeng-be.c b/audio/audio-mixeng-be.c index 45bcfb74338..87e5a2fc3af 100644 --- a/audio/audio-mixeng-be.c +++ b/audio/audio-mixeng-be.c @@ -654,7 +654,7 @@ static size_t audio_mixeng_backend_write(AudioBackend *= be, SWVoiceOut *sw, hw =3D sw->hw; =20 if (!hw->enabled) { - dolog("Writing to disabled voice %s\n", SW_NAME(sw)); + warn_report("audio: Writing to disabled voice %s", SW_NAME(sw)); return 0; } =20 @@ -677,7 +677,7 @@ static size_t audio_mixeng_backend_read(AudioBackend *b= e, hw =3D sw->hw; =20 if (!hw->enabled) { - dolog("Reading from disabled voice %s\n", SW_NAME(sw)); + warn_report("audio: Reading from disabled voice %s", SW_NAME(sw)); return 0; } =20 @@ -874,9 +874,8 @@ static void audio_capture_mix_and_clear(HWVoiceOut *hw,= size_t rpos, sw->empty =3D sw->total_hw_samples_mixed =3D=3D 0; =20 if (to_read - frames_in) { - dolog("Could not mix %zu frames into a capture " - "buffer, mixed %zu\n", - to_read, frames_in); + audio_bug("Could not mix %zu frames into a capture " + "buffer, mixed %zu", to_read, frames_in); break; } n -=3D to_read; @@ -1561,7 +1560,7 @@ static CaptureVoiceOut *audio_mixeng_backend_add_capt= ure( } =20 if (!audio_get_pdo_out(s->dev)->mixing_engine) { - dolog("Can't capture with mixeng disabled\n"); + error_report("audio: Can't capture with mixeng disabled"); return NULL; } =20 @@ -1754,8 +1753,7 @@ size_t audio_rate_peek_bytes(RateCtl *rate, struct au= dio_pcm_info *info) void audio_rate_add_bytes(RateCtl *rate, size_t bytes_used) { if (rate->peeked_frames < 0 || rate->peeked_frames > 65536) { - AUD_log(NULL, "Resetting rate control (%" PRId64 " frames)\n", - rate->peeked_frames); + trace_audio_rate_reset(rate->peeked_frames); audio_rate_start(rate); } =20 diff --git a/audio/trace-events b/audio/trace-events index ed04792d508..222e73c7e88 100644 --- a/audio/trace-events +++ b/audio/trace-events @@ -70,6 +70,7 @@ audio_sw_write(const char *name, size_t size, size_t writ= ten, size_t total_mixed audio_get_free(const char *name, size_t live, size_t dead, uint32_t fronte= nd_frames) "%s: get_free live %zu dead %zu frontend frames %u" audio_out_disable(void) "Disabling voice" audio_out_played(size_t played) "played=3D%zu" +audio_rate_reset(int64_t frames) "Resetting rate control (%" PRId64 " fram= es)" =20 # audio_template.h audio_open_out(const char *name, int freq, int nchannels, int fmt) "open %= s, freq %d, nchannels %d, fmt %d" --=20 2.53.0