[Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends

Kővágó, Zoltán posted 14 patches 4 years, 8 months ago
Test FreeBSD passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch failed
Test s390x passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1563224628.git.DirtY.iCE.hu@gmail.com
There is a newer version of this series
audio/audio.h                    |  36 +--
audio/audio_int.h                |  43 ++--
audio/audio_template.h           |  62 +++--
audio/mixeng.h                   |   9 +-
audio/rate_template.h            |   2 +-
include/hw/qdev-properties.h     |   3 +
include/sysemu/replay.h          |   4 +-
ui/vnc.h                         |   2 +
audio/alsaaudio.c                |  49 ++--
audio/audio.c                    | 345 ++++++++++++++-----------
audio/coreaudio.c                |  18 +-
audio/dsoundaudio.c              |  25 +-
audio/noaudio.c                  |  39 +--
audio/ossaudio.c                 |  75 +++---
audio/paaudio.c                  | 421 ++++++++++++++++++-------------
audio/sdlaudio.c                 |  30 +--
audio/spiceaudio.c               |  34 +--
audio/wavaudio.c                 |  18 +-
audio/wavcapture.c               |   6 +-
hw/audio/ac97.c                  |  11 +-
hw/audio/adlib.c                 |   5 +-
hw/audio/cs4231a.c               |   5 +-
hw/audio/es1370.c                |  13 +-
hw/audio/gus.c                   |   7 +-
hw/audio/hda-codec.c             |  17 +-
hw/audio/milkymist-ac97.c        |  14 +-
hw/audio/pcspk.c                 |   3 +-
hw/audio/pl041.c                 |   1 +
hw/audio/sb16.c                  |   3 +-
hw/audio/wm8750.c                |  10 +-
hw/core/qdev-properties-system.c |  57 +++++
hw/usb/dev-audio.c               |   1 +
monitor/misc.c                   |  12 +-
replay/replay-audio.c            |  16 +-
replay/replay.c                  |   2 +-
ui/vnc.c                         |  15 +-
hmp-commands.hx                  |  13 +-
qemu-options.hx                  |   6 +
38 files changed, 790 insertions(+), 642 deletions(-)
[Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends
Posted by Kővágó, Zoltán 4 years, 8 months ago
Hello,

This is the v2 of my audio patches.  Copmpared to the previous version, the only
major change is the splitting of 2 commits ("basic support for multi backend
audio" and "audio: audiodev= parameters no longer optional when -audiodev
present") to ease review.

I also included a patch that fixes a memory leak reported by ASAN.

Regards,
Zoltan

Kővágó, Zoltán (14):
  audio: reduce glob_audio_state usage
  audio: basic support for multi backend audio
  audio: add audiodev property to vnc and wav_capture
  audio: add audiodev properties to frontends
  paaudio: prepare for multiple audiodev
  audio: audiodev= parameters no longer optional when -audiodev present
  paaudio: do not move stream when sink/source name is specified
  paaudio: properly disconnect streams in fini_*
  audio: remove audio_MIN, audio_MAX
  audio: do not run each backend in audio_run
  paaudio: fix playback glitches
  audio: remove read and write pcm_ops
  audio: use size_t where makes sense
  audio: fix memory leak reported by ASAN

 audio/audio.h                    |  36 +--
 audio/audio_int.h                |  43 ++--
 audio/audio_template.h           |  62 +++--
 audio/mixeng.h                   |   9 +-
 audio/rate_template.h            |   2 +-
 include/hw/qdev-properties.h     |   3 +
 include/sysemu/replay.h          |   4 +-
 ui/vnc.h                         |   2 +
 audio/alsaaudio.c                |  49 ++--
 audio/audio.c                    | 345 ++++++++++++++-----------
 audio/coreaudio.c                |  18 +-
 audio/dsoundaudio.c              |  25 +-
 audio/noaudio.c                  |  39 +--
 audio/ossaudio.c                 |  75 +++---
 audio/paaudio.c                  | 421 ++++++++++++++++++-------------
 audio/sdlaudio.c                 |  30 +--
 audio/spiceaudio.c               |  34 +--
 audio/wavaudio.c                 |  18 +-
 audio/wavcapture.c               |   6 +-
 hw/audio/ac97.c                  |  11 +-
 hw/audio/adlib.c                 |   5 +-
 hw/audio/cs4231a.c               |   5 +-
 hw/audio/es1370.c                |  13 +-
 hw/audio/gus.c                   |   7 +-
 hw/audio/hda-codec.c             |  17 +-
 hw/audio/milkymist-ac97.c        |  14 +-
 hw/audio/pcspk.c                 |   3 +-
 hw/audio/pl041.c                 |   1 +
 hw/audio/sb16.c                  |   3 +-
 hw/audio/wm8750.c                |  10 +-
 hw/core/qdev-properties-system.c |  57 +++++
 hw/usb/dev-audio.c               |   1 +
 monitor/misc.c                   |  12 +-
 replay/replay-audio.c            |  16 +-
 replay/replay.c                  |   2 +-
 ui/vnc.c                         |  15 +-
 hmp-commands.hx                  |  13 +-
 qemu-options.hx                  |   6 +
 38 files changed, 790 insertions(+), 642 deletions(-)

-- 
2.22.0


Re: [Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends
Posted by no-reply@patchew.org 4 years, 8 months ago
Patchew URL: https://patchew.org/QEMU/cover.1563224628.git.DirtY.iCE.hu@gmail.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Subject: [Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends
Message-id: cover.1563224628.git.DirtY.iCE.hu@gmail.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Submodule 'capstone' (https://git.qemu.org/git/capstone.git) registered for path 'capstone'
Submodule 'dtc' (https://git.qemu.org/git/dtc.git) registered for path 'dtc'
Submodule 'roms/QemuMacDrivers' (https://git.qemu.org/git/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers'
Submodule 'roms/SLOF' (https://git.qemu.org/git/SLOF.git) registered for path 'roms/SLOF'
Submodule 'roms/edk2' (https://git.qemu.org/git/edk2.git) registered for path 'roms/edk2'
Submodule 'roms/ipxe' (https://git.qemu.org/git/ipxe.git) registered for path 'roms/ipxe'
Submodule 'roms/openbios' (https://git.qemu.org/git/openbios.git) registered for path 'roms/openbios'
Submodule 'roms/openhackware' (https://git.qemu.org/git/openhackware.git) registered for path 'roms/openhackware'
Submodule 'roms/qemu-palcode' (https://git.qemu.org/git/qemu-palcode.git) registered for path 'roms/qemu-palcode'
Submodule 'roms/seabios' (https://git.qemu.org/git/seabios.git/) registered for path 'roms/seabios'
Submodule 'roms/seabios-hppa' (https://git.qemu.org/git/seabios-hppa.git) registered for path 'roms/seabios-hppa'
Submodule 'roms/sgabios' (https://git.qemu.org/git/sgabios.git) registered for path 'roms/sgabios'
Submodule 'roms/skiboot' (https://git.qemu.org/git/skiboot.git) registered for path 'roms/skiboot'
Submodule 'roms/u-boot' (https://git.qemu.org/git/u-boot.git) registered for path 'roms/u-boot'
Submodule 'roms/u-boot-sam460ex' (https://git.qemu.org/git/u-boot-sam460ex.git) registered for path 'roms/u-boot-sam460ex'
Submodule 'slirp' (https://git.qemu.org/git/libslirp.git) registered for path 'slirp'
Submodule 'tests/fp/berkeley-softfloat-3' (https://git.qemu.org/git/berkeley-softfloat-3.git) registered for path 'tests/fp/berkeley-softfloat-3'
Submodule 'tests/fp/berkeley-testfloat-3' (https://git.qemu.org/git/berkeley-testfloat-3.git) registered for path 'tests/fp/berkeley-testfloat-3'
Submodule 'ui/keycodemapdb' (https://git.qemu.org/git/keycodemapdb.git) registered for path 'ui/keycodemapdb'
Cloning into 'capstone'...
Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '88f18909db731a627456f26d779445f84e449536'
Cloning into 'roms/QemuMacDrivers'...
Submodule path 'roms/QemuMacDrivers': checked out '90c488d5f4a407342247b9ea869df1c2d9c8e266'
Cloning into 'roms/SLOF'...
Submodule path 'roms/SLOF': checked out 'ba1ab360eebe6338bb8d7d83a9220ccf7e213af3'
Cloning into 'roms/edk2'...
Submodule path 'roms/edk2': checked out '20d2e5a125e34fc8501026613a71549b2a1a3e54'
Submodule 'SoftFloat' (https://github.com/ucb-bar/berkeley-softfloat-3.git) registered for path 'ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3'
Submodule 'CryptoPkg/Library/OpensslLib/openssl' (https://github.com/openssl/openssl) registered for path 'CryptoPkg/Library/OpensslLib/openssl'
Cloning into 'ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3'...
Submodule path 'roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Cloning into 'CryptoPkg/Library/OpensslLib/openssl'...
Submodule path 'roms/edk2/CryptoPkg/Library/OpensslLib/openssl': checked out '50eaac9f3337667259de725451f201e784599687'
Submodule 'boringssl' (https://boringssl.googlesource.com/boringssl) registered for path 'boringssl'
Submodule 'krb5' (https://github.com/krb5/krb5) registered for path 'krb5'
Submodule 'pyca.cryptography' (https://github.com/pyca/cryptography.git) registered for path 'pyca-cryptography'
Cloning into 'boringssl'...
Submodule path 'roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl': checked out '2070f8ad9151dc8f3a73bffaa146b5e6937a583f'
Cloning into 'krb5'...
Submodule path 'roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5': checked out 'b9ad6c49505c96a088326b62a52568e3484f2168'
Cloning into 'pyca-cryptography'...
Submodule path 'roms/edk2/CryptoPkg/Library/OpensslLib/openssl/pyca-cryptography': checked out '09403100de2f6f1cdd0d484dcb8e620f1c335c8f'
Cloning into 'roms/ipxe'...
Submodule path 'roms/ipxe': checked out 'de4565cbe76ea9f7913a01f331be3ee901bb6e17'
Cloning into 'roms/openbios'...
Submodule path 'roms/openbios': checked out 'c79e0ecb84f4f1ee3f73f521622e264edd1bf174'
Cloning into 'roms/openhackware'...
Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5'
Cloning into 'roms/qemu-palcode'...
Submodule path 'roms/qemu-palcode': checked out 'bf0e13698872450164fa7040da36a95d2d4b326f'
Cloning into 'roms/seabios'...
Submodule path 'roms/seabios': checked out 'a5cab58e9a3fb6e168aba919c5669bea406573b4'
Cloning into 'roms/seabios-hppa'...
Submodule path 'roms/seabios-hppa': checked out '0f4fe84658165e96ce35870fd19fc634e182e77b'
Cloning into 'roms/sgabios'...
Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a'
Cloning into 'roms/skiboot'...
Submodule path 'roms/skiboot': checked out '261ca8e779e5138869a45f174caa49be6a274501'
Cloning into 'roms/u-boot'...
Submodule path 'roms/u-boot': checked out 'd3689267f92c5956e09cc7d1baa4700141662bff'
Cloning into 'roms/u-boot-sam460ex'...
Submodule path 'roms/u-boot-sam460ex': checked out '60b3916f33e617a815973c5a6df77055b2e3a588'
Cloning into 'slirp'...
Submodule path 'slirp': checked out 'f0da6726207b740f6101028b2992f918477a4b08'
Cloning into 'tests/fp/berkeley-softfloat-3'...
Submodule path 'tests/fp/berkeley-softfloat-3': checked out 'b64af41c3276f97f0e181920400ee056b9c88037'
Cloning into 'tests/fp/berkeley-testfloat-3'...
Submodule path 'tests/fp/berkeley-testfloat-3': checked out '5a59dcec19327396a011a17fd924aed4fec416b3'
Cloning into 'ui/keycodemapdb'...
Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
Switched to a new branch 'test'
9bd8bc6 audio: fix memory leak reported by ASAN
e8d23f6 audio: use size_t where makes sense
7035d9f audio: remove read and write pcm_ops
82038f1 paaudio: fix playback glitches
ad773f9 audio: do not run each backend in audio_run
e5bae54 audio: remove audio_MIN, audio_MAX
3f525e4 paaudio: properly disconnect streams in fini_*
e76429c paaudio: do not move stream when sink/source name is specified
232f925 audio: audiodev= parameters no longer optional when -audiodev present
0475ef4 paaudio: prepare for multiple audiodev
d0ccdb3 audio: add audiodev properties to frontends
b8bbf6b audio: add audiodev property to vnc and wav_capture
45bece9 audio: basic support for multi backend audio
b8ed8fa audio: reduce glob_audio_state usage

=== OUTPUT BEGIN ===
1/14 Checking commit b8ed8fa72e64 (audio: reduce glob_audio_state usage)
2/14 Checking commit 45bece9445ff (audio: basic support for multi backend audio)
3/14 Checking commit b8bbf6b1534a (audio: add audiodev property to vnc and wav_capture)
4/14 Checking commit d0ccdb31831d (audio: add audiodev properties to frontends)
5/14 Checking commit 0475ef4aa556 (paaudio: prepare for multiple audiodev)
6/14 Checking commit 232f925703f4 (audio: audiodev= parameters no longer optional when -audiodev present)
7/14 Checking commit e76429c12dda (paaudio: do not move stream when sink/source name is specified)
8/14 Checking commit 3f525e459011 (paaudio: properly disconnect streams in fini_*)
9/14 Checking commit e5bae54fc748 (audio: remove audio_MIN, audio_MAX)
ERROR: space prohibited between function name and open parenthesis '('
#23: FILE: audio/alsaaudio.c:637:
+        int len = MIN (alsa->pending, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#32: FILE: audio/alsaaudio.c:700:
+    decr = MIN (live, avail);

ERROR: space prohibited between function name and open parenthesis '('
#41: FILE: audio/alsaaudio.c:918:
+    decr = MIN (dead, avail);

ERROR: space prohibited between function name and open parenthesis '('
#54: FILE: audio/audio.c:536:
+            m = MIN (m, sw->total_hw_samples_acquired);

ERROR: space prohibited between function name and open parenthesis '('
#63: FILE: audio/audio.c:556:
+    int len = MIN (left, live);

ERROR: space prohibited between function name and open parenthesis '('
#71: FILE: audio/audio.c:563:
+        int samples_to_clip = MIN (len, samples_till_end_of_buf);

ERROR: space prohibited between function name and open parenthesis '('
#80: FILE: audio/audio.c:617:
+    swlim = MIN (swlim, samples);

ERROR: space prohibited between function name and open parenthesis '('
#89: FILE: audio/audio.c:665:
+            m = MIN (m, sw->total_hw_samples_mixed);

ERROR: space prohibited between function name and open parenthesis '('
#98: FILE: audio/audio.c:728:
+    swlim = MIN (swlim, samples);

ERROR: space prohibited between function name and open parenthesis '('
#107: FILE: audio/audio.c:740:
+        blck = MIN (dead, left);

ERROR: space prohibited between function name and open parenthesis '('
#116: FILE: audio/audio.c:1032:
+                int to_write = MIN (till_end_of_hw, n);

ERROR: space prohibited between function name and open parenthesis '('
#125: FILE: audio/audio.c:1050:
+    n = MIN (samples, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#134: FILE: audio/audio.c:1206:
+            int to_capture = MIN (live, left);

ERROR: space prohibited between function name and open parenthesis '('
#175: FILE: audio/coreaudio.c:416:
+    decr = MIN (core->decr, live);

ERROR: space prohibited between function name and open parenthesis '('
#188: FILE: audio/dsoundaudio.c:710:
+    len = MIN (len, dead);

ERROR: space prohibited between function name and open parenthesis '('
#206: FILE: audio/noaudio.c:59:
+    decr = MIN (live, samples);

ERROR: space prohibited between function name and open parenthesis '('
#215: FILE: audio/noaudio.c:114:
+        bytes = MIN (bytes, INT_MAX);

ERROR: space prohibited between function name and open parenthesis '('
#218: FILE: audio/noaudio.c:116:
+        samples = MIN (samples, dead);

ERROR: space prohibited between function name and open parenthesis '('
#227: FILE: audio/noaudio.c:127:
+    int to_clear = MIN (samples, total);

ERROR: space prohibited between function name and open parenthesis '('
#240: FILE: audio/ossaudio.c:391:
+        int samples_to_write = MIN (oss->pending, samples_till_end);

ERROR: space prohibited between function name and open parenthesis '('
#249: FILE: audio/ossaudio.c:440:
+        decr = MIN (bytes >> hw->info.shift, live);

ERROR: space prohibited between function name and open parenthesis '('
#258: FILE: audio/ossaudio.c:459:
+        decr = MIN (abinfo.bytes >> hw->info.shift, live);

ERROR: space prohibited between function name and open parenthesis '('
#280: FILE: audio/paaudio.c:247:
+            int chunk = MIN (to_mix, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#289: FILE: audio/paaudio.c:285:
+    decr = MIN (live, pa->decr);

ERROR: space prohibited between function name and open parenthesis '('
#307: FILE: audio/paaudio.c:339:
+            int chunk = MIN (to_grab, hw->samples - wpos);

ERROR: space prohibited between function name and open parenthesis '('
#316: FILE: audio/paaudio.c:378:
+    incr = MIN (dead, pa->incr);

ERROR: space prohibited between function name and open parenthesis '('
#342: FILE: audio/sdlaudio.c:239:
+    decr = MIN (sdl->decr, live);

ERROR: space prohibited between function name and open parenthesis '('
#355: FILE: audio/spiceaudio.c:167:
+    decr = MIN (live, decr);

ERROR: space prohibited between function name and open parenthesis '('
#362: FILE: audio/spiceaudio.c:173:
+        int len = MIN (samples, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#370: FILE: audio/spiceaudio.c:180:
+            len = MIN (len, out->fsize);

ERROR: space prohibited between function name and open parenthesis '('
#379: FILE: audio/spiceaudio.c:298:
+    num_samples = MIN (num_samples, delta_samp);

ERROR: space prohibited between function name and open parenthesis '('
#388: FILE: audio/spiceaudio.c:308:
+    num_samples = MIN (ready, num_samples);

ERROR: space prohibited between function name and open parenthesis '('
#401: FILE: audio/wavaudio.c:62:
+    decr = MIN (live, samples);

ERROR: space prohibited between function name and open parenthesis '('
#407: FILE: audio/wavaudio.c:67:
+        int convert_samples = MIN (samples, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#420: FILE: hw/audio/ac97.c:967:
+    temp = MIN (temp, max);

ERROR: space prohibited between function name and open parenthesis '('
#429: FILE: hw/audio/ac97.c:976:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#429: FILE: hw/audio/ac97.c:976:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#438: FILE: hw/audio/ac97.c:1022:
+        int temp = MIN (elapsed, sizeof (s->silence));

ERROR: space prohibited between function name and open parenthesis '('
#438: FILE: hw/audio/ac97.c:1022:
+        int temp = MIN (elapsed, sizeof (s->silence));

ERROR: space prohibited between function name and open parenthesis '('
#447: FILE: hw/audio/ac97.c:1043:
+    temp = MIN (temp, max);

ERROR: space prohibited between function name and open parenthesis '('
#456: FILE: hw/audio/ac97.c:1052:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#456: FILE: hw/audio/ac97.c:1052:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#469: FILE: hw/audio/adlib.c:198:
+    to_play = MIN (s->left, samples);

ERROR: space prohibited between function name and open parenthesis '('
#478: FILE: hw/audio/adlib.c:213:
+    samples = MIN (samples, s->samples - s->pos);

ERROR: space prohibited between function name and open parenthesis '('
#491: FILE: hw/audio/cs4231a.c:538:
+        to_copy = MIN (temp, left);

ERROR: space prohibited between function name and open parenthesis '('
#500: FILE: hw/audio/cs4231a.c:581:
+        copy = MIN (till, copy);

ERROR: space prohibited between function name and open parenthesis '('
#513: FILE: hw/audio/es1370.c:648:
+    int temp = MIN (max, MIN (left, csc_bytes));

ERROR: space prohibited between function name and open parenthesis '('
#513: FILE: hw/audio/es1370.c:648:
+    int temp = MIN (max, MIN (left, csc_bytes));

ERROR: space prohibited between function name and open parenthesis '('
#522: FILE: hw/audio/es1370.c:657:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#522: FILE: hw/audio/es1370.c:657:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#531: FILE: hw/audio/es1370.c:675:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#531: FILE: hw/audio/es1370.c:675:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#544: FILE: hw/audio/gus.c:120:
+    to_play = MIN (samples, s->left);

ERROR: space prohibited between function name and open parenthesis '('
#553: FILE: hw/audio/gus.c:135:
+    samples = MIN (samples, s->samples);

ERROR: space prohibited between function name and open parenthesis '('
#562: FILE: hw/audio/gus.c:195:
+        int to_copy = MIN ((size_t) left, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#562: FILE: hw/audio/gus.c:195:
+        int to_copy = MIN ((size_t) left, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#692: FILE: hw/audio/sb16.c:1171:
+        to_copy = MIN (temp, left);

total: 57 errors, 0 warnings, 559 lines checked

Patch 9/14 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

10/14 Checking commit ad773f9083fd (audio: do not run each backend in audio_run)
11/14 Checking commit 82038f13a873 (paaudio: fix playback glitches)
12/14 Checking commit 7035d9f79802 (audio: remove read and write pcm_ops)
13/14 Checking commit e8d23f670a27 (audio: use size_t where makes sense)
ERROR: space prohibited between function name and open parenthesis '('
#62: FILE: audio/alsaaudio.c:871:
+    size_t live = audio_pcm_hw_get_live_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#91: FILE: audio/audio.c:529:
+static size_t audio_pcm_hw_find_min_in (HWVoiceIn *hw)

ERROR: space prohibited between function name and open parenthesis '('
#109: FILE: audio/audio.c:544:
+    size_t live = hw->total_samples_captured - audio_pcm_hw_find_min_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#126: FILE: audio/audio.c:556:
+    size_t len = MIN (left, live);

ERROR: space prohibited between function name and open parenthesis '('
#135: FILE: audio/audio.c:563:
+        size_t samples_to_clip = MIN (len, samples_till_end_of_buf);

ERROR: space prohibited between function name and open parenthesis '('
#210: FILE: audio/audio.c:652:
+static size_t audio_pcm_hw_find_min_out (HWVoiceOut *hw, int *nb_livep)

ERROR: space prohibited between function name and open parenthesis '('
#223: FILE: audio/audio.c:669:
+static size_t audio_pcm_hw_get_live_out (HWVoiceOut *hw, int *nb_live)

WARNING: line over 80 characters
#253: FILE: audio/audio.c:696:
+    size_t hwsamples, samples, isamp, osamp, wpos, live, dead, left, swlim, blck;

ERROR: space prohibited between function name and open parenthesis '('
#301: FILE: audio/audio.c:964:
+static size_t audio_get_avail (SWVoiceIn *sw)

ERROR: space prohibited between function name and open parenthesis '('
#409: FILE: audio/audio.c:1066:
+            dolog ("live=%zu hw->samples=%zu\n", live, hw->samples);

ERROR: space prohibited between function name and open parenthesis '('
#795: FILE: audio/noaudio.c:109:
+        bytes = MIN (bytes, SIZE_MAX);

ERROR: space prohibited between function name and open parenthesis '('
#886: FILE: audio/ossaudio.c:723:
+    size_t live = audio_pcm_hw_get_live_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#981: FILE: audio/paaudio.c:247:
+            size_t chunk = MIN (to_mix, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#1011: FILE: audio/paaudio.c:334:
+            size_t chunk = MIN (to_grab, hw->samples - wpos);

ERROR: space prohibited between function name and open parenthesis '('
#1135: FILE: audio/spiceaudio.c:156:
+static size_t line_out_run (HWVoiceOut *hw, size_t live)

WARNING: line over 80 characters
#1201: FILE: include/sysemu/replay.h:184:
+void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t size);

total: 14 errors, 2 warnings, 1106 lines checked

Patch 13/14 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/14 Checking commit 9bd8bc6a283d (audio: fix memory leak reported by ASAN)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/cover.1563224628.git.DirtY.iCE.hu@gmail.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends
Posted by no-reply@patchew.org 4 years, 8 months ago
Patchew URL: https://patchew.org/QEMU/cover.1563224628.git.DirtY.iCE.hu@gmail.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: cover.1563224628.git.DirtY.iCE.hu@gmail.com
Type: series
Subject: [Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
9bd8bc6 audio: fix memory leak reported by ASAN
e8d23f6 audio: use size_t where makes sense
7035d9f audio: remove read and write pcm_ops
82038f1 paaudio: fix playback glitches
ad773f9 audio: do not run each backend in audio_run
e5bae54 audio: remove audio_MIN, audio_MAX
3f525e4 paaudio: properly disconnect streams in fini_*
e76429c paaudio: do not move stream when sink/source name is specified
232f925 audio: audiodev= parameters no longer optional when -audiodev present
0475ef4 paaudio: prepare for multiple audiodev
d0ccdb3 audio: add audiodev properties to frontends
b8bbf6b audio: add audiodev property to vnc and wav_capture
45bece9 audio: basic support for multi backend audio
b8ed8fa audio: reduce glob_audio_state usage

=== OUTPUT BEGIN ===
1/14 Checking commit b8ed8fa72e64 (audio: reduce glob_audio_state usage)
2/14 Checking commit 45bece9445ff (audio: basic support for multi backend audio)
3/14 Checking commit b8bbf6b1534a (audio: add audiodev property to vnc and wav_capture)
4/14 Checking commit d0ccdb31831d (audio: add audiodev properties to frontends)
5/14 Checking commit 0475ef4aa556 (paaudio: prepare for multiple audiodev)
6/14 Checking commit 232f925703f4 (audio: audiodev= parameters no longer optional when -audiodev present)
7/14 Checking commit e76429c12dda (paaudio: do not move stream when sink/source name is specified)
8/14 Checking commit 3f525e459011 (paaudio: properly disconnect streams in fini_*)
9/14 Checking commit e5bae54fc748 (audio: remove audio_MIN, audio_MAX)
ERROR: space prohibited between function name and open parenthesis '('
#23: FILE: audio/alsaaudio.c:637:
+        int len = MIN (alsa->pending, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#32: FILE: audio/alsaaudio.c:700:
+    decr = MIN (live, avail);

ERROR: space prohibited between function name and open parenthesis '('
#41: FILE: audio/alsaaudio.c:918:
+    decr = MIN (dead, avail);

ERROR: space prohibited between function name and open parenthesis '('
#54: FILE: audio/audio.c:536:
+            m = MIN (m, sw->total_hw_samples_acquired);

ERROR: space prohibited between function name and open parenthesis '('
#63: FILE: audio/audio.c:556:
+    int len = MIN (left, live);

ERROR: space prohibited between function name and open parenthesis '('
#71: FILE: audio/audio.c:563:
+        int samples_to_clip = MIN (len, samples_till_end_of_buf);

ERROR: space prohibited between function name and open parenthesis '('
#80: FILE: audio/audio.c:617:
+    swlim = MIN (swlim, samples);

ERROR: space prohibited between function name and open parenthesis '('
#89: FILE: audio/audio.c:665:
+            m = MIN (m, sw->total_hw_samples_mixed);

ERROR: space prohibited between function name and open parenthesis '('
#98: FILE: audio/audio.c:728:
+    swlim = MIN (swlim, samples);

ERROR: space prohibited between function name and open parenthesis '('
#107: FILE: audio/audio.c:740:
+        blck = MIN (dead, left);

ERROR: space prohibited between function name and open parenthesis '('
#116: FILE: audio/audio.c:1032:
+                int to_write = MIN (till_end_of_hw, n);

ERROR: space prohibited between function name and open parenthesis '('
#125: FILE: audio/audio.c:1050:
+    n = MIN (samples, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#134: FILE: audio/audio.c:1206:
+            int to_capture = MIN (live, left);

ERROR: space prohibited between function name and open parenthesis '('
#175: FILE: audio/coreaudio.c:416:
+    decr = MIN (core->decr, live);

ERROR: space prohibited between function name and open parenthesis '('
#188: FILE: audio/dsoundaudio.c:710:
+    len = MIN (len, dead);

ERROR: space prohibited between function name and open parenthesis '('
#206: FILE: audio/noaudio.c:59:
+    decr = MIN (live, samples);

ERROR: space prohibited between function name and open parenthesis '('
#215: FILE: audio/noaudio.c:114:
+        bytes = MIN (bytes, INT_MAX);

ERROR: space prohibited between function name and open parenthesis '('
#218: FILE: audio/noaudio.c:116:
+        samples = MIN (samples, dead);

ERROR: space prohibited between function name and open parenthesis '('
#227: FILE: audio/noaudio.c:127:
+    int to_clear = MIN (samples, total);

ERROR: space prohibited between function name and open parenthesis '('
#240: FILE: audio/ossaudio.c:391:
+        int samples_to_write = MIN (oss->pending, samples_till_end);

ERROR: space prohibited between function name and open parenthesis '('
#249: FILE: audio/ossaudio.c:440:
+        decr = MIN (bytes >> hw->info.shift, live);

ERROR: space prohibited between function name and open parenthesis '('
#258: FILE: audio/ossaudio.c:459:
+        decr = MIN (abinfo.bytes >> hw->info.shift, live);

ERROR: space prohibited between function name and open parenthesis '('
#280: FILE: audio/paaudio.c:247:
+            int chunk = MIN (to_mix, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#289: FILE: audio/paaudio.c:285:
+    decr = MIN (live, pa->decr);

ERROR: space prohibited between function name and open parenthesis '('
#307: FILE: audio/paaudio.c:339:
+            int chunk = MIN (to_grab, hw->samples - wpos);

ERROR: space prohibited between function name and open parenthesis '('
#316: FILE: audio/paaudio.c:378:
+    incr = MIN (dead, pa->incr);

ERROR: space prohibited between function name and open parenthesis '('
#342: FILE: audio/sdlaudio.c:239:
+    decr = MIN (sdl->decr, live);

ERROR: space prohibited between function name and open parenthesis '('
#355: FILE: audio/spiceaudio.c:167:
+    decr = MIN (live, decr);

ERROR: space prohibited between function name and open parenthesis '('
#362: FILE: audio/spiceaudio.c:173:
+        int len = MIN (samples, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#370: FILE: audio/spiceaudio.c:180:
+            len = MIN (len, out->fsize);

ERROR: space prohibited between function name and open parenthesis '('
#379: FILE: audio/spiceaudio.c:298:
+    num_samples = MIN (num_samples, delta_samp);

ERROR: space prohibited between function name and open parenthesis '('
#388: FILE: audio/spiceaudio.c:308:
+    num_samples = MIN (ready, num_samples);

ERROR: space prohibited between function name and open parenthesis '('
#401: FILE: audio/wavaudio.c:62:
+    decr = MIN (live, samples);

ERROR: space prohibited between function name and open parenthesis '('
#407: FILE: audio/wavaudio.c:67:
+        int convert_samples = MIN (samples, left_till_end_samples);

ERROR: space prohibited between function name and open parenthesis '('
#420: FILE: hw/audio/ac97.c:967:
+    temp = MIN (temp, max);

ERROR: space prohibited between function name and open parenthesis '('
#429: FILE: hw/audio/ac97.c:976:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#429: FILE: hw/audio/ac97.c:976:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#438: FILE: hw/audio/ac97.c:1022:
+        int temp = MIN (elapsed, sizeof (s->silence));

ERROR: space prohibited between function name and open parenthesis '('
#438: FILE: hw/audio/ac97.c:1022:
+        int temp = MIN (elapsed, sizeof (s->silence));

ERROR: space prohibited between function name and open parenthesis '('
#447: FILE: hw/audio/ac97.c:1043:
+    temp = MIN (temp, max);

ERROR: space prohibited between function name and open parenthesis '('
#456: FILE: hw/audio/ac97.c:1052:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#456: FILE: hw/audio/ac97.c:1052:
+        to_copy = MIN (temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#469: FILE: hw/audio/adlib.c:198:
+    to_play = MIN (s->left, samples);

ERROR: space prohibited between function name and open parenthesis '('
#478: FILE: hw/audio/adlib.c:213:
+    samples = MIN (samples, s->samples - s->pos);

ERROR: space prohibited between function name and open parenthesis '('
#491: FILE: hw/audio/cs4231a.c:538:
+        to_copy = MIN (temp, left);

ERROR: space prohibited between function name and open parenthesis '('
#500: FILE: hw/audio/cs4231a.c:581:
+        copy = MIN (till, copy);

ERROR: space prohibited between function name and open parenthesis '('
#513: FILE: hw/audio/es1370.c:648:
+    int temp = MIN (max, MIN (left, csc_bytes));

ERROR: space prohibited between function name and open parenthesis '('
#513: FILE: hw/audio/es1370.c:648:
+    int temp = MIN (max, MIN (left, csc_bytes));

ERROR: space prohibited between function name and open parenthesis '('
#522: FILE: hw/audio/es1370.c:657:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#522: FILE: hw/audio/es1370.c:657:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#531: FILE: hw/audio/es1370.c:675:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#531: FILE: hw/audio/es1370.c:675:
+            to_copy = MIN ((size_t) temp, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#544: FILE: hw/audio/gus.c:120:
+    to_play = MIN (samples, s->left);

ERROR: space prohibited between function name and open parenthesis '('
#553: FILE: hw/audio/gus.c:135:
+    samples = MIN (samples, s->samples);

ERROR: space prohibited between function name and open parenthesis '('
#562: FILE: hw/audio/gus.c:195:
+        int to_copy = MIN ((size_t) left, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#562: FILE: hw/audio/gus.c:195:
+        int to_copy = MIN ((size_t) left, sizeof (tmpbuf));

ERROR: space prohibited between function name and open parenthesis '('
#692: FILE: hw/audio/sb16.c:1171:
+        to_copy = MIN (temp, left);

total: 57 errors, 0 warnings, 559 lines checked

Patch 9/14 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

10/14 Checking commit ad773f9083fd (audio: do not run each backend in audio_run)
11/14 Checking commit 82038f13a873 (paaudio: fix playback glitches)
12/14 Checking commit 7035d9f79802 (audio: remove read and write pcm_ops)
13/14 Checking commit e8d23f670a27 (audio: use size_t where makes sense)
ERROR: space prohibited between function name and open parenthesis '('
#62: FILE: audio/alsaaudio.c:871:
+    size_t live = audio_pcm_hw_get_live_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#91: FILE: audio/audio.c:529:
+static size_t audio_pcm_hw_find_min_in (HWVoiceIn *hw)

ERROR: space prohibited between function name and open parenthesis '('
#109: FILE: audio/audio.c:544:
+    size_t live = hw->total_samples_captured - audio_pcm_hw_find_min_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#126: FILE: audio/audio.c:556:
+    size_t len = MIN (left, live);

ERROR: space prohibited between function name and open parenthesis '('
#135: FILE: audio/audio.c:563:
+        size_t samples_to_clip = MIN (len, samples_till_end_of_buf);

ERROR: space prohibited between function name and open parenthesis '('
#210: FILE: audio/audio.c:652:
+static size_t audio_pcm_hw_find_min_out (HWVoiceOut *hw, int *nb_livep)

ERROR: space prohibited between function name and open parenthesis '('
#223: FILE: audio/audio.c:669:
+static size_t audio_pcm_hw_get_live_out (HWVoiceOut *hw, int *nb_live)

WARNING: line over 80 characters
#253: FILE: audio/audio.c:696:
+    size_t hwsamples, samples, isamp, osamp, wpos, live, dead, left, swlim, blck;

ERROR: space prohibited between function name and open parenthesis '('
#301: FILE: audio/audio.c:964:
+static size_t audio_get_avail (SWVoiceIn *sw)

ERROR: space prohibited between function name and open parenthesis '('
#409: FILE: audio/audio.c:1066:
+            dolog ("live=%zu hw->samples=%zu\n", live, hw->samples);

ERROR: space prohibited between function name and open parenthesis '('
#795: FILE: audio/noaudio.c:109:
+        bytes = MIN (bytes, SIZE_MAX);

ERROR: space prohibited between function name and open parenthesis '('
#886: FILE: audio/ossaudio.c:723:
+    size_t live = audio_pcm_hw_get_live_in (hw);

ERROR: space prohibited between function name and open parenthesis '('
#981: FILE: audio/paaudio.c:247:
+            size_t chunk = MIN (to_mix, hw->samples - rpos);

ERROR: space prohibited between function name and open parenthesis '('
#1011: FILE: audio/paaudio.c:334:
+            size_t chunk = MIN (to_grab, hw->samples - wpos);

ERROR: space prohibited between function name and open parenthesis '('
#1135: FILE: audio/spiceaudio.c:156:
+static size_t line_out_run (HWVoiceOut *hw, size_t live)

WARNING: line over 80 characters
#1201: FILE: include/sysemu/replay.h:184:
+void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t size);

total: 14 errors, 2 warnings, 1106 lines checked

Patch 13/14 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

14/14 Checking commit 9bd8bc6a283d (audio: fix memory leak reported by ASAN)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/cover.1563224628.git.DirtY.iCE.hu@gmail.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com