Skip to content
Snippets Groups Projects
  1. Mar 10, 2023
  2. Mar 06, 2023
    • Peter Maydell's avatar
      Merge tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging · 817fd338
      Peter Maydell authored
      Audio patches for QEMU 8.0
      
      Cleanups and improvements from Volker Rümelin.
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmQFjUccHG1hcmNhbmRy
      # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5ZLMD/sFWmVYccRqvOfOJvuC
      # dJ7EtABmC6b4MxLkMyP5WLMoCezSha0vgcYwAL3oZX1dIBoGfaUXXdxIM8IK8rAv
      # J2Fe2p9D+6tqzqc8jkbx0DmY040A3Gb18P60jL3NeQfmqCt7KmzuQoCMn6htPyyy
      # NMgSRG3wy+esglmeU2majhxQZh2Vmwsi6i37A5Fg8b27oWLYHxeS6Lgp3PNAwJsA
      # k/RKJeZDMjDh0f0wSHZN+8w0VVFQa3BjqoNV4UAgqSjsPaRlnQxppG2FEXNNrtLb
      # bJ4rbXgSO68wrcweHgC2L7qWhLnYwdcdQFAPotmt2V1jtH4xx6f+ovwCdf0vZ5Fo
      # YhHixpP41gFvF7sJWSZO0wUFKXTyLSdWIPaUKP9iMTZfXpBxo5H6rkPsZ6v5yyG2
      # tLFlL0Rv/h3liEkngmRbw81gB9te92ZGXOjkB2Q69tGQl/tXRkhrn5VT2mufb7BV
      # WUsdtSFl6P231lDuzQkFp85PkoRtr8eDPkkZW8/xgRx5h8j5I2bc6LRMd63w2tE6
      # TGdUfiaqH396r1T87ynBdBWSc4H6YuImTouy27rAv/50x8w4cgk66wY+UGB7D8FX
      # Eg4rU5Dzco2D+1RY50zSqZgPxIWjnC4xtYQXLaJURe0Way1HQqt/Pvp/aVFKUOef
      # snYV1FLDvHg2Cf9LCGqvpW8b/w==
      # =d4LY
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 06 Mar 2023 06:50:47 GMT
      # gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
      # gpg:                issuer "marcandre.lureau@redhat.com"
      # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
      # gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
      # Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5
      
      * tag 'audio-pull-request' of https://gitlab.com/marcandre.lureau/qemu
      
      : (27 commits)
        audio: remove sw->ratio
        audio/audio_template: substitute sw->hw with hw
        audio: handle leftover audio frame from upsampling
        audio: make recording packet length calculation exact
        audio: rename variables in audio_pcm_sw_read()
        audio: replace the resampling loop in audio_pcm_sw_read()
        audio: make playback packet length calculation exact
        audio: remove unused noop_conv() function
        audio: don't misuse audio_pcm_sw_write()
        audio: rename variables in audio_pcm_sw_write()
        audio: remove sw == NULL check
        audio: replace the resampling loop in audio_pcm_sw_write()
        audio: make the resampling code greedy
        audio: change type and name of the resample buffer
        audio: change type of mix_buf and conv_buf
        alsaaudio: reintroduce default recording settings
        alsaaudio: change default playback settings
        audio: remove audio_calloc() function
        audio/audio_template: use g_new0() to replace audio_calloc()
        audio/audio_template: use g_malloc0() to replace audio_calloc()
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      817fd338
    • Peter Maydell's avatar
      Merge tag 'pull-tcg-20230305' of https://gitlab.com/rth7680/qemu into staging · f003dd8d
      Peter Maydell authored
      tcg: Merge two sequential labels
      accel/tcg: Retain prot flags from tlb_fill
      accel/tcg: Honor TLB_DISCARD_WRITE in atomic_mmu_lookup
      accel/tcg: Honor TLB_WATCHPOINTS in atomic_mmu_lookup
      target/sparc: Use tlb_set_page_full
      include/qemu/cpuid: Introduce xgetbv_low
      tcg/i386: Mark Win64 call-saved vector regs as reserved
      tcg: Decode the operand to INDEX_op_mb in dumps
      
      Portion of the target/ patchset which eliminates use of tcg_temp_free*
      Portion of the target/ patchset which eliminates use of tcg_const*
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmQFNegdHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9WsQf+Ljs3WA5lvMPlpaSn
      # Li35ay/A1f2cU6FYspl81su4/c7Ft9Q8rkPF4K1n1rwuvqR91G25WTQIrw8NFPXZ
      # VU9GNGQc1qIVYO/hAH3fvgDmPxUF+tJDgT/BTNc1ldy6/v7QM3GWcEy8+O3H9S+K
      # uj6vIuWke0ukq6ZGmSAZnXEaJFq3HU26mcP4KxDxfIUcezMtDVp6QevqzVxM65aa
      # pUDh3qtsLGOxIYwthvu6avMQXORBhSB75awCuYH4QPJRpr3ahigcGsCr2gdVAQ8p
      # R7BbpUUdK5Huos971oouJrt5FwwbVgGEx78eF27sl0H8QMoNhsfyn6PcN8nPENLJ
      # MZYd+w==
      # =8goQ
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Mon 06 Mar 2023 00:38:00 GMT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-tcg-20230305' of https://gitlab.com/rth7680/qemu
      
      : (84 commits)
        target/xtensa: Avoid tcg_const_i32
        target/xtensa: Split constant in bit shift
        target/xtensa: Use tcg_gen_subfi_i32 in translate_sll
        target/xtensa: Avoid tcg_const_i32 in translate_l32r
        target/xtensa: Tidy translate_clamps
        target/xtensa: Tidy translate_bb
        target/sparc: Avoid tcg_const_{tl,i32}
        target/s390x: Split out gen_ri2
        target/riscv: Avoid tcg_const_*
        target/microblaze: Avoid tcg_const_* throughout
        target/i386: Simplify POPF
        target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op
        target/hexagon/idef-parser: Use gen_tmp for gen_rvalue_pred
        target/hexagon/idef-parser: Use gen_tmp for gen_pred_assign
        target/hexagon/idef-parser: Use gen_tmp for LPCFG
        target/hexagon: Use tcg_constant_* for gen_constant_from_imm
        docs/devel/tcg-ops: Drop recommendation to free temps
        tracing: remove transform.py
        include/exec/gen-icount: Drop tcg_temp_free in gen_tb_start
        target/tricore: Drop tcg_temp_free
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      f003dd8d
    • Volker Rümelin's avatar
      audio: remove sw->ratio · 2f886a34
      Volker Rümelin authored
      
      Simplify the resample buffer size calculation.
      
      For audio playback we have
      sw->ratio = ((int64_t)sw->hw->info.freq << 32) / sw->info.freq;
      samples = ((int64_t)sw->HWBUF.size << 32) / sw->ratio;
      
      This can be simplified to
      samples = muldiv64(sw->HWBUF.size, sw->info.freq, sw->hw->info.freq);
      
      For audio recording we have
      sw->ratio = ((int64_t)sw->info.freq << 32) / sw->hw->info.freq;
      samples = (int64_t)sw->HWBUF.size * sw->ratio >> 32;
      
      This can be simplified to
      samples = muldiv64(sw->HWBUF.size, sw->info.freq, sw->hw->info.freq);
      
      With hw = sw->hw this becomes in both cases
      samples = muldiv64(HWBUF.size, sw->info.freq, hw->info.freq);
      
      Now that sw->ratio is no longer needed, remove sw->ratio.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-15-vr_qemu@t-online.de>
      2f886a34
    • Volker Rümelin's avatar
      audio/audio_template: substitute sw->hw with hw · 148392ab
      Volker Rümelin authored
      
      Substitute sw->hw with hw in the audio_pcm_sw_alloc_resources_*
      functions.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-14-vr_qemu@t-online.de>
      148392ab
    • Volker Rümelin's avatar
      audio: handle leftover audio frame from upsampling · e1e6a6fc
      Volker Rümelin authored
      
      Upsampling may leave one remaining audio frame in the input
      buffer. The emulated audio playback devices are currently
      resposible to write this audio frame again in the next write
      cycle. Push that task down to audio_pcm_sw_write.
      
      This is another step towards an audio callback interface that
      guarantees that when audio frontends are told they can write
      n audio frames, they can actually do so.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-13-vr_qemu@t-online.de>
      e1e6a6fc
    • Volker Rümelin's avatar
      audio: make recording packet length calculation exact · a9ea5678
      Volker Rümelin authored
      
      Introduce the new function st_rate_frames_out() to calculate the
      exact number of audio output frames the resampling code can
      generate from a given number of audio input frames. When upsampling,
      this function returns the maximum number of output frames.
      
      This new function replaces the audio_frontend_frames_in()
      function, which calculated the average number of output frames
      rounded down to the nearest integer. The audio_frontend_frames_in()
      function was additionally used to limit the number of output frames
      to the resample buffer size. In audio_pcm_sw_read() the variable
      resample_buf.size replaces the open coded audio_frontend_frames_in()
      function. In audio_run_in() an additional MIN() function is
      necessary.
      
      After this patch the audio packet length calculation for audio
      recording is exact.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-12-vr_qemu@t-online.de>
      a9ea5678
    • Volker Rümelin's avatar
      audio: rename variables in audio_pcm_sw_read() · fbde1edf
      Volker Rümelin authored
      
      The audio_pcm_sw_read() function uses a few very unspecific
      variable names. Rename them for better readability.
      
      ret => total_out
      total => total_in
      size => buf_len
      samples => frames_out_max
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-11-vr_qemu@t-online.de>
      fbde1edf
    • Volker Rümelin's avatar
      audio: replace the resampling loop in audio_pcm_sw_read() · 1c49c5f1
      Volker Rümelin authored
      
      Replace the resampling loop in audio_pcm_sw_read() with the new
      function audio_pcm_sw_resample_in(). Unlike the old resample
      loop the new function will try to consume input frames even if
      the output buffer is full. This is necessary when downsampling
      to avoid reading less audio frames than calculated in advance.
      The loop was unrolled to avoid complicated loop control conditions
      in this case.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-10-vr_qemu@t-online.de>
      1c49c5f1
    • Volker Rümelin's avatar
      audio: make playback packet length calculation exact · 1a01df3d
      Volker Rümelin authored
      
      Introduce the new function st_rate_frames_in() to calculate the
      exact number of audio input frames needed to get a given number
      of audio output frames. The exact number of frames depends only
      on the difference of opos - ipos and the number of output frames.
      When downsampling, this function returns the maximum number of
      input frames needed.
      
      This new function replaces the audio_frontend_frames_out() function,
      which calculated the average number of input frames rounded down
      to the nearest integer. Because audio_frontend_frames_out() also
      limited the number of input frames to the size of the resample
      buffer, st_rate_frames_in() is not a direct replacement and two
      additional MIN() functions are needed. One to prevent resample
      buffer overflows and one to limit the available bytes for the audio
      frontends.
      
      After this patch the audio packet length calculation for playback is
      exact. When upsampling, it's still possible that the audio frontends
      can't write the last audio frame. This will be fixed later.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-9-vr_qemu@t-online.de>
      1a01df3d
    • Volker Rümelin's avatar
      audio: remove unused noop_conv() function · 1fe3cae3
      Volker Rümelin authored
      
      The function audio_capture_mix_and_clear() no longer uses
      audio_pcm_sw_write() to resample audio frames from one internal
      buffer to another. For this reason, the noop_conv() function is
      now unused. Remove it.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-8-vr_qemu@t-online.de>
      1fe3cae3
    • Volker Rümelin's avatar
      audio: don't misuse audio_pcm_sw_write() · 671cca35
      Volker Rümelin authored
      
      The audio_pcm_sw_write() function is intended to convert a
      PCM audio stream to the internal representation, adjust the
      volume, and then mix it with the other audio streams with a
      possibly changed sample rate in mix_buf. In order for the
      audio_capture_mix_and_clear() function to use audio_pcm_sw_write(),
      it must bypass the first two tasks of audio_pcm_sw_write().
      
      Since patch "audio: split out the resampling loop in
      audio_pcm_sw_write()" this is no longer necessary, because now
      the audio_pcm_sw_resample_out() function can be used instead of
      audio_pcm_sw_write().
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-7-vr_qemu@t-online.de>
      671cca35
    • Volker Rümelin's avatar
      audio: rename variables in audio_pcm_sw_write() · d5647bd9
      Volker Rümelin authored
      
      The audio_pcm_sw_write() function uses a lot of very unspecific
      variable names. Rename them for better readability.
      
      ret => total_in
      total => total_out
      size => buf_len
      hwsamples => hw->mix_buf.size
      samples => frames_in_max
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-6-vr_qemu@t-online.de>
      d5647bd9
    • Volker Rümelin's avatar
      audio: remove sw == NULL check · b8fc5638
      Volker Rümelin authored
      
      All call sites of audio_pcm_sw_write() guarantee that sw is not
      NULL. Remove the unnecessary NULL check.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-5-vr_qemu@t-online.de>
      b8fc5638
    • Volker Rümelin's avatar
      audio: replace the resampling loop in audio_pcm_sw_write() · 8a81abee
      Volker Rümelin authored
      
      Replace the resampling loop in audio_pcm_sw_write() with the new
      function audio_pcm_sw_resample_out(). Unlike the old resample
      loop the new function will try to consume input frames even if
      the output buffer is full. This is necessary when downsampling
      to avoid reading less audio frames than calculated in advance.
      The loop was unrolled to avoid complicated loop control conditions
      in this case.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-4-vr_qemu@t-online.de>
      8a81abee
    • Volker Rümelin's avatar
      audio: make the resampling code greedy · 8933882d
      Volker Rümelin authored
      
      Read the maximum possible number of audio frames instead of the
      minimum necessary number of frames when the audio stream is
      downsampled and the output buffer is limited. This makes the
      function symmetrical to upsampling when the input buffer is
      limited. The maximum possible number of frames is written here.
      
      With this change it's easier to calculate the exact number of
      audio frames the resample function will read or write. These two
      functions will be introduced later.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Acked-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-3-vr_qemu@t-online.de>
      8933882d
    • Volker Rümelin's avatar
      audio: change type and name of the resample buffer · 2c3f9a0a
      Volker Rümelin authored
      
      Change the type of the resample buffer from struct st_sample *
      to STSampleBuffer. Also change the name from buf to resample_buf
      for better readability.
      
      The new variables resample_buf.size and resample_buf.pos will be
      used after the next patches. There is no functional change.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-2-vr_qemu@t-online.de>
      2c3f9a0a
    • Volker Rümelin's avatar
      audio: change type of mix_buf and conv_buf · 8dbd3d17
      Volker Rümelin authored
      
      Change the type of mix_buf in struct HWVoiceOut and conv_buf
      in struct HWVoiceIn from STSampleBuffer * to STSampleBuffer.
      However, a buffer pointer is still needed. For this reason in
      struct STSampleBuffer samples[] is changed to *buffer.
      
      This is a preparation for the next patch. The next patch will
      add this line, which is not possible with the current struct
      STSampleBuffer definition.
      
      +        sw->resample_buf.buffer = hw->mix_buf.buffer + rpos2;
      
      There are no functional changes.
      
      Acked-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Message-Id: <20230224190555.7409-1-vr_qemu@t-online.de>
      8dbd3d17
    • Volker Rümelin's avatar
      alsaaudio: reintroduce default recording settings · 5140ad82
      Volker Rümelin authored
      
      Audio recording with ALSA default settings currently doesn't
      work. The debug log shows updates every 0.75s and 1.5s.
      
      audio: Elapsed since last alsa run (running): 0.743030
      audio: Elapsed since last alsa run (running): 1.486048
      audio: Elapsed since last alsa run (running): 0.743008
      audio: Elapsed since last alsa run (running): 1.485878
      audio: Elapsed since last alsa run (running): 1.486040
      audio: Elapsed since last alsa run (running): 1.485886
      
      The time between updates should be in the 10ms range. Audio
      recording with ALSA has the same timing contraints as playback.
      Reintroduce the default recording settings and use the same
      default settings for recording as for playback.
      
      The term "reintroduce" is correct because commit a93f3281
      ("alsaaudio: port to -audiodev config") removed the default
      settings for recording.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20230121094735.11644-11-vr_qemu@t-online.de>
      5140ad82
    • Volker Rümelin's avatar
      alsaaudio: change default playback settings · 46744732
      Volker Rümelin authored
      
      The currently used default playback settings in the ALSA audio
      backend are a bit unfortunate. With a few emulated audio devices,
      audio playback does not work properly. Here is a short part of
      the debug log while audio is playing (elapsed time in seconds).
      
      audio: Elapsed since last alsa run (running): 0.046244
      audio: Elapsed since last alsa run (running): 0.023137
      audio: Elapsed since last alsa run (running): 0.023170
      audio: Elapsed since last alsa run (running): 0.023650
      audio: Elapsed since last alsa run (running): 0.060802
      audio: Elapsed since last alsa run (running): 0.031931
      
      For some audio devices the time of more than 23ms between updates
      is too long.
      
      Set the period time to 5.8ms so that the maximum time between
      two updates typically does not exceed 11ms. This roughly matches
      the 10ms period time when doing playback with the audio timer.
      After this patch the debug log looks like this.
      
      audio: Elapsed since last alsa run (running): 0.011919
      audio: Elapsed since last alsa run (running): 0.005788
      audio: Elapsed since last alsa run (running): 0.005995
      audio: Elapsed since last alsa run (running): 0.011069
      audio: Elapsed since last alsa run (running): 0.005901
      audio: Elapsed since last alsa run (running): 0.006084
      
      Acked-by: default avatarChristian Schoenebeck <qemu_oss@crudebyte.com>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20230121094735.11644-10-vr_qemu@t-online.de>
      46744732
    • Volker Rümelin's avatar
      audio: remove audio_calloc() function · 2d2ccb60
      Volker Rümelin authored
      
      Now that the last call site of audio_calloc() was removed, remove
      the unused audio_calloc() function.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20230121094735.11644-9-vr_qemu@t-online.de>
      2d2ccb60
    • Volker Rümelin's avatar
      audio/audio_template: use g_new0() to replace audio_calloc() · c6b69a81
      Volker Rümelin authored
      
      Replace audio_calloc() with the equivalent g_new0().
      
      With a n_structs argument >= 1, g_new0() never returns NULL.
      Also remove the unnecessary NULL checks.
      
      Signed-off-by: default avatarVolker Rümelin <vr_qemu@t-online.de>
      Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20230121094735.11644-8-vr_qemu@t-online.de>
      c6b69a81
Loading