[PATCH 0/7] audio: Spring cleaning

Philippe Mathieu-Daudé posted 7 patches 5 years, 6 months ago
Test docker-mingw@fedora failed
Test checkpatch failed
Test asan failed
Test docker-quick@centos7 failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200505132603.8575-1-f4bug@amsat.org
audio/audio_int.h                | 25 +++++++++++++++++++------
{audio => include/audio}/audio.h | 14 ++++----------
audio/alsaaudio.c                |  8 ++++----
audio/audio.c                    | 19 ++++++++++---------
audio/audio_legacy.c             |  2 +-
audio/audio_win_int.c            |  2 +-
audio/coreaudio.c                |  7 ++++---
audio/dsoundaudio.c              |  4 ++--
audio/mixeng.c                   |  6 +++---
audio/noaudio.c                  |  4 ++--
audio/ossaudio.c                 | 10 +++++-----
audio/paaudio.c                  |  6 +++---
audio/sdlaudio.c                 |  8 +++++---
audio/spiceaudio.c               |  4 ++--
audio/wavaudio.c                 |  4 ++--
audio/wavcapture.c               |  4 ++--
ui/vnc.c                         |  2 +-
MAINTAINERS                      |  1 +
18 files changed, 71 insertions(+), 59 deletions(-)
rename {audio => include/audio}/audio.h (95%)
[PATCH 0/7] audio: Spring cleaning
Posted by Philippe Mathieu-Daudé 5 years, 6 months ago
Cleaning old branches, salvaging what seems worthwhile...
This series is from the time I wanted cleaner buffer handling
to avoid abuses, started with chardev/ but got lost with reviews.
audio/ is smaller, so easier.

- Convert various prototypes to use const buffers
- Expose 'audio/audio.h' via public include directory.

Philippe Mathieu-Daudé (7):
  audio: Let audio_sample_to_uint64() use const samples argument
  audio: Let capture_callback handler use const buffer argument
  audio: Move advance() helper to 'audio_int.h'
  audio: Split advance() helper as in() and out()
  audio: Let HWVoice write() handlers take a const buffer
  audio: Let AUD_write() use a const buffer argument
  audio: Expose 'audio/audio.h' under the include/ directory

 audio/audio_int.h                | 25 +++++++++++++++++++------
 {audio => include/audio}/audio.h | 14 ++++----------
 audio/alsaaudio.c                |  8 ++++----
 audio/audio.c                    | 19 ++++++++++---------
 audio/audio_legacy.c             |  2 +-
 audio/audio_win_int.c            |  2 +-
 audio/coreaudio.c                |  7 ++++---
 audio/dsoundaudio.c              |  4 ++--
 audio/mixeng.c                   |  6 +++---
 audio/noaudio.c                  |  4 ++--
 audio/ossaudio.c                 | 10 +++++-----
 audio/paaudio.c                  |  6 +++---
 audio/sdlaudio.c                 |  8 +++++---
 audio/spiceaudio.c               |  4 ++--
 audio/wavaudio.c                 |  4 ++--
 audio/wavcapture.c               |  4 ++--
 ui/vnc.c                         |  2 +-
 MAINTAINERS                      |  1 +
 18 files changed, 71 insertions(+), 59 deletions(-)
 rename {audio => include/audio}/audio.h (95%)

-- 
2.21.3


Re: [PATCH 0/7] audio: Spring cleaning
Posted by Philippe Mathieu-Daudé 5 years, 5 months ago
On 5/5/20 3:25 PM, Philippe Mathieu-Daudé wrote:
> Cleaning old branches, salvaging what seems worthwhile...
> This series is from the time I wanted cleaner buffer handling
> to avoid abuses, started with chardev/ but got lost with reviews.
> audio/ is smaller, so easier.
> 
> - Convert various prototypes to use const buffers
> - Expose 'audio/audio.h' via public include directory.
> 
> Philippe Mathieu-Daudé (7):
>   audio: Let audio_sample_to_uint64() use const samples argument
>   audio: Let capture_callback handler use const buffer argument

Ping for 1 & 2 maybe?

>   audio: Move advance() helper to 'audio_int.h'
>   audio: Split advance() helper as in() and out()
>   audio: Let HWVoice write() handlers take a const buffer
>   audio: Let AUD_write() use a const buffer argument
>   audio: Expose 'audio/audio.h' under the include/ directory
> 
>  audio/audio_int.h                | 25 +++++++++++++++++++------
>  {audio => include/audio}/audio.h | 14 ++++----------
>  audio/alsaaudio.c                |  8 ++++----
>  audio/audio.c                    | 19 ++++++++++---------
>  audio/audio_legacy.c             |  2 +-
>  audio/audio_win_int.c            |  2 +-
>  audio/coreaudio.c                |  7 ++++---
>  audio/dsoundaudio.c              |  4 ++--
>  audio/mixeng.c                   |  6 +++---
>  audio/noaudio.c                  |  4 ++--
>  audio/ossaudio.c                 | 10 +++++-----
>  audio/paaudio.c                  |  6 +++---
>  audio/sdlaudio.c                 |  8 +++++---
>  audio/spiceaudio.c               |  4 ++--
>  audio/wavaudio.c                 |  4 ++--
>  audio/wavcapture.c               |  4 ++--
>  ui/vnc.c                         |  2 +-
>  MAINTAINERS                      |  1 +
>  18 files changed, 71 insertions(+), 59 deletions(-)
>  rename {audio => include/audio}/audio.h (95%)
> 

Re: [PATCH 0/7] audio: Spring cleaning
Posted by Philippe Mathieu-Daudé 5 years, 4 months ago
Hi Gerd,

On 5/5/20 3:25 PM, Philippe Mathieu-Daudé wrote:
> Cleaning old branches, salvaging what seems worthwhile...
> This series is from the time I wanted cleaner buffer handling
> to avoid abuses, started with chardev/ but got lost with reviews.
> audio/ is smaller, so easier.
> 
> - Convert various prototypes to use const buffers
> - Expose 'audio/audio.h' via public include directory.

You didn't commented on this series.

We might use a LPVOID in dsound_get_buffer_in() as suggested
by Volker but I don't like it much. What do you think otherwise?

> 
> Philippe Mathieu-Daudé (7):
>   audio: Let audio_sample_to_uint64() use const samples argument
>   audio: Let capture_callback handler use const buffer argument
>   audio: Move advance() helper to 'audio_int.h'
>   audio: Split advance() helper as in() and out()
>   audio: Let HWVoice write() handlers take a const buffer
>   audio: Let AUD_write() use a const buffer argument
>   audio: Expose 'audio/audio.h' under the include/ directory

Re: [PATCH 0/7] audio: Spring cleaning
Posted by Gerd Hoffmann 5 years, 4 months ago
On Mon, Jul 06, 2020 at 08:09:47PM +0200, Philippe Mathieu-Daudé wrote:
> Hi Gerd,
> 
> On 5/5/20 3:25 PM, Philippe Mathieu-Daudé wrote:
> > Cleaning old branches, salvaging what seems worthwhile...
> > This series is from the time I wanted cleaner buffer handling
> > to avoid abuses, started with chardev/ but got lost with reviews.
> > audio/ is smaller, so easier.
> > 
> > - Convert various prototypes to use const buffers
> > - Expose 'audio/audio.h' via public include directory.
> 
> You didn't commented on this series.
> 
> We might use a LPVOID in dsound_get_buffer_in() as suggested
> by Volker but I don't like it much. What do you think otherwise?

Well, your reply to Volker was "This is unfortunate, because a single
backend invalidates the whole series.", so I dropped it from my
TODO/review/merge list ...

Tagging the buffers as const, then cast the const away (even if only
in dsound) isn't a good idea IMHO.

take care,
  Gerd