qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Volker Rümelin" <vr_qemu@t-online.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v2 39/42] audio: cleanup, use bool for booleans
Date: Wed, 22 Oct 2025 09:05:00 +0200	[thread overview]
Message-ID: <35fc3048-85de-4f75-a967-f57c8cca58bd@linaro.org> (raw)
In-Reply-To: <20251022065640.1172785-40-marcandre.lureau@redhat.com>

On 22/10/25 08:56, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Use slightly better types for the job.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   audio/audio_int.h      | 12 ++++++------
>   audio/audio_template.h |  6 +++---
>   include/qemu/audio.h   |  8 ++++----
>   audio/audio.c          | 30 +++++++++++++++---------------
>   4 files changed, 28 insertions(+), 28 deletions(-)


> diff --git a/include/qemu/audio.h b/include/qemu/audio.h
> index 216b95eb4f..f5c32550dc 100644
> --- a/include/qemu/audio.h
> +++ b/include/qemu/audio.h
> @@ -98,8 +98,8 @@ SWVoiceOut *AUD_open_out (
>   void AUD_close_out (AudioBackend *be, SWVoiceOut *sw);
>   size_t AUD_write (SWVoiceOut *sw, void *pcm_buf, size_t size);
>   int  AUD_get_buffer_size_out (SWVoiceOut *sw);
> -void AUD_set_active_out (SWVoiceOut *sw, int on);
> -int  AUD_is_active_out (SWVoiceOut *sw);
> +void AUD_set_active_out (SWVoiceOut *sw, bool on);
> +bool AUD_is_active_out (SWVoiceOut *sw);
>   
>   void     AUD_init_time_stamp_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
>   uint64_t AUD_get_elapsed_usec_out (SWVoiceOut *sw, QEMUAudioTimeStamp *ts);
> @@ -128,8 +128,8 @@ SWVoiceIn *AUD_open_in (
>   
>   void AUD_close_in (AudioBackend *be, SWVoiceIn *sw);
>   size_t AUD_read (SWVoiceIn *sw, void *pcm_buf, size_t size);
> -void AUD_set_active_in (SWVoiceIn *sw, int on);
> -int  AUD_is_active_in (SWVoiceIn *sw);
> +void AUD_set_active_in (SWVoiceIn *sw, bool on);
> +bool AUD_is_active_in (SWVoiceIn *sw);
>   
>   void     AUD_init_time_stamp_in (SWVoiceIn *sw, QEMUAudioTimeStamp *ts);
>   uint64_t AUD_get_elapsed_usec_in (SWVoiceIn *sw, QEMUAudioTimeStamp *ts);
> diff --git a/audio/audio.c b/audio/audio.c
> index 5d3fb799f9..a9df7d73cd 100644
> --- a/audio/audio.c
> +++ b/audio/audio.c
> @@ -405,7 +405,7 @@ static void audio_notify_capture (CaptureVoiceOut *cap, audcnotification_e cmd)
>       }
>   }
>   
> -static void audio_capture_maybe_changed (CaptureVoiceOut *cap, int enabled)
> +static void audio_capture_maybe_changed (CaptureVoiceOut *cap, bool enabled)

Please fix checkpatch.pl errors while modifying these lines, otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



  reply	other threads:[~2025-10-22  7:06 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  6:55 [PATCH v2 00/42] Audio clean-ups marcandre.lureau
2025-10-22  6:55 ` [PATCH v2 01/42] hw/audio: improve error reports marcandre.lureau
2025-10-22  6:55 ` [PATCH v2 02/42] hw/audio: rename model list function marcandre.lureau
2025-10-22  6:55 ` [PATCH v2 03/42] hw/audio: remove global pcspk marcandre.lureau
2025-10-22  6:55 ` [PATCH v2 04/42] hw/pcspk: use explicitly the required PIT types marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 05/42] hw/pcspk: make 'pit' a class property marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 06/42] hw/pcspk: check the "pit" is set marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 07/42] docs: update -soundhw -> -device list marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 08/42] qdev: add qdev_find_default_bus() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 09/42] hw/audio: look up the default bus from the device class marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 10/42] audio: rename audio_define->audio_add_audiodev() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 11/42] hw/audio: use better naming for -audio model handling code marcandre.lureau
2025-10-22  8:04   ` Philippe Mathieu-Daudé
2025-10-22  6:56 ` [PATCH v2 12/42] hw/audio/virtio-snd-pci: remove custom model callback marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 13/42] hw/audio: simplify 'hda' audio init code marcandre.lureau
2025-10-22 11:41   ` BALATON Zoltan
2025-10-22 11:49     ` Marc-André Lureau
2025-10-22  6:56 ` [PATCH v2 14/42] hw/audio: generalize audio_model.init() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 15/42] hw/audio: drop audio_model.isa marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 16/42] audio: start making AudioState a QOM Object marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 17/42] audio: register backends in /audiodevs container marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 18/42] audio: use /audiodevs QOM container marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 19/42] audio/paaudio: remove needless return value marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 20/42] audio/dsound: simplify init() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 21/42] audio/dsound: report init error via **errp marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 22/42] audio: simplify audio_driver_init() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 23/42] audio: move period tick initialization marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 24/42] audio: drop needless error message marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 25/42] audio: clean-up vmstate change handler on finalize marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 26/42] audio: unregister vmstate description marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 27/42] audio: initialize card_head during object init marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 28/42] audio: remove some needless headers marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 29/42] audio: remove AUDIO_HOST_ENDIANNESS marcandre.lureau
2025-10-22  7:11   ` Philippe Mathieu-Daudé
2025-10-22  6:56 ` [PATCH v2 30/42] audio: introduce AUD_set_volume_{in,out}_lr() marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 31/42] hw/audio: replace AUD_log() usage marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 32/42] audio/replay: fix type punning marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 33/42] audio: move internal APIs to audio_int.h marcandre.lureau
2025-10-22  7:08   ` Philippe Mathieu-Daudé
2025-10-22  6:56 ` [PATCH v2 34/42] audio: rename AudioState -> AudioBackend marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 35/42] audio: remove QEMUSoundCard marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 36/42] audio/dbus: use a helper function to set the backend dbus server marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 37/42] audio: move audio.h under include/qemu/ marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 38/42] audio: remove dependency on spice header marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 39/42] audio: cleanup, use bool for booleans marcandre.lureau
2025-10-22  7:05   ` Philippe Mathieu-Daudé [this message]
2025-10-22 12:01   ` BALATON Zoltan
2025-10-22  6:56 ` [PATCH v2 40/42] audio: move capture API to own header marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 41/42] audio: drop needless audio_driver "descr" field marcandre.lureau
2025-10-22  6:56 ` [PATCH v2 42/42] docs: Update mentions of removed '-soundhw' command line option marcandre.lureau
2025-10-22  7:53 ` [PATCH v2 43/42] audio: Remove pointless local variables Philippe Mathieu-Daudé
2025-10-22  7:56   ` Marc-André Lureau
2025-10-22  7:53 ` [PATCH v2 44/42] audio: Rename @endianness argument as @big_endian for clarity Philippe Mathieu-Daudé
2025-10-22  7:59   ` Marc-André Lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35fc3048-85de-4f75-a967-f57c8cca58bd@linaro.org \
    --to=philmd@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vr_qemu@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).