[Qemu-devel] [PATCH v6 00/14] Audio patches

Kővágó, Zoltán posted 14 patches 5 years, 1 month ago
Test asan failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1552083282.git.DirtY.iCE.hu@gmail.com
qemu-deprecated.texi      |   7 +
qapi/audio.json           | 304 ++++++++++++++
qapi/qapi-schema.json     |   1 +
audio/audio.h             |  30 +-
audio/audio_int.h         |  37 +-
audio/audio_template.h    |  42 +-
audio/dsound_template.h   |   6 +-
audio/alsaaudio.c         | 368 ++++++----------
audio/audio.c             | 859 +++++++++++++-------------------------
audio/audio_legacy.c      | 544 ++++++++++++++++++++++++
audio/audio_win_int.c     |  18 +-
audio/coreaudio.c         |  51 +--
audio/dsoundaudio.c       |  61 +--
audio/noaudio.c           |   3 +-
audio/ossaudio.c          | 191 +++------
audio/paaudio.c           | 111 ++---
audio/sdlaudio.c          |  50 +--
audio/spiceaudio.c        |  11 +-
audio/wavaudio.c          |  75 +---
audio/wavcapture.c        |   2 +-
hw/arm/omap2.c            |   2 +-
hw/audio/ac97.c           |   2 +-
hw/audio/adlib.c          |   2 +-
hw/audio/cs4231a.c        |   6 +-
hw/audio/es1370.c         |   4 +-
hw/audio/gus.c            |   2 +-
hw/audio/hda-codec.c      |  18 +-
hw/audio/lm4549.c         |   6 +-
hw/audio/milkymist-ac97.c |   2 +-
hw/audio/pcspk.c          |   2 +-
hw/audio/sb16.c           |  14 +-
hw/audio/wm8750.c         |   6 +-
hw/display/xlnx_dp.c      |   2 +-
hw/input/tsc210x.c        |   2 +-
hw/usb/dev-audio.c        |   2 +-
ui/vnc.c                  |  26 +-
vl.c                      |   7 +-
audio/Makefile.objs       |   2 +-
qapi/Makefile.objs        |   6 +-
qemu-options.hx           | 236 ++++++++++-
40 files changed, 1834 insertions(+), 1286 deletions(-)
create mode 100644 qapi/audio.json
create mode 100644 audio/audio_legacy.c
[Qemu-devel] [PATCH v6 00/14] Audio patches
Posted by Kővágó, Zoltán 5 years, 1 month ago
Hi,

Here's an updated version of my audio patches.  Changes from v5:

* small qapi fixes
* fixed a bug in audio_create_pdos [1]

Regards,
Zoltan

[1]: https://lists.nongnu.org/archive/html/qemu-devel/2019-02/msg06842.html

Kővágó, Zoltán (14):
  qapi: qapi for audio backends
  audio: use qapi AudioFormat instead of audfmt_e
  audio: -audiodev command line option: documentation
  audio: -audiodev command line option basic implementation
  alsaaudio: port to -audiodev config
  coreaudio: port to -audiodev config
  dsoundaudio: port to -audiodev config
  noaudio: port to -audiodev config
  ossaudio: port to -audiodev config
  paaudio: port to -audiodev config
  sdlaudio: port to -audiodev config
  spiceaudio: port to -audiodev config
  wavaudio: port to -audiodev config
  audio: -audiodev command line option: cleanup

 qemu-deprecated.texi      |   7 +
 qapi/audio.json           | 304 ++++++++++++++
 qapi/qapi-schema.json     |   1 +
 audio/audio.h             |  30 +-
 audio/audio_int.h         |  37 +-
 audio/audio_template.h    |  42 +-
 audio/dsound_template.h   |   6 +-
 audio/alsaaudio.c         | 368 ++++++----------
 audio/audio.c             | 859 +++++++++++++-------------------------
 audio/audio_legacy.c      | 544 ++++++++++++++++++++++++
 audio/audio_win_int.c     |  18 +-
 audio/coreaudio.c         |  51 +--
 audio/dsoundaudio.c       |  61 +--
 audio/noaudio.c           |   3 +-
 audio/ossaudio.c          | 191 +++------
 audio/paaudio.c           | 111 ++---
 audio/sdlaudio.c          |  50 +--
 audio/spiceaudio.c        |  11 +-
 audio/wavaudio.c          |  75 +---
 audio/wavcapture.c        |   2 +-
 hw/arm/omap2.c            |   2 +-
 hw/audio/ac97.c           |   2 +-
 hw/audio/adlib.c          |   2 +-
 hw/audio/cs4231a.c        |   6 +-
 hw/audio/es1370.c         |   4 +-
 hw/audio/gus.c            |   2 +-
 hw/audio/hda-codec.c      |  18 +-
 hw/audio/lm4549.c         |   6 +-
 hw/audio/milkymist-ac97.c |   2 +-
 hw/audio/pcspk.c          |   2 +-
 hw/audio/sb16.c           |  14 +-
 hw/audio/wm8750.c         |   6 +-
 hw/display/xlnx_dp.c      |   2 +-
 hw/input/tsc210x.c        |   2 +-
 hw/usb/dev-audio.c        |   2 +-
 ui/vnc.c                  |  26 +-
 vl.c                      |   7 +-
 audio/Makefile.objs       |   2 +-
 qapi/Makefile.objs        |   6 +-
 qemu-options.hx           | 236 ++++++++++-
 40 files changed, 1834 insertions(+), 1286 deletions(-)
 create mode 100644 qapi/audio.json
 create mode 100644 audio/audio_legacy.c

-- 
2.20.1


Re: [Qemu-devel] [PATCH v6 00/14] Audio patches
Posted by no-reply@patchew.org 5 years, 1 month ago
Patchew URL: https://patchew.org/QEMU/cover.1552083282.git.DirtY.iCE.hu@gmail.com/



Hi,

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

Type: series
Message-id: cover.1552083282.git.DirtY.iCE.hu@gmail.com
Subject: [Qemu-devel] [PATCH v6 00/14] Audio patches

=== 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
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/cover.1552083282.git.DirtY.iCE.hu@gmail.com -> patchew/cover.1552083282.git.DirtY.iCE.hu@gmail.com
Switched to a new branch 'test'
77a2fc41d3 audio: -audiodev command line option: cleanup
a08295d4a4 wavaudio: port to -audiodev config
2b8db3b1b8 spiceaudio: port to -audiodev config
b13a98214e sdlaudio: port to -audiodev config
f32d4ec566 paaudio: port to -audiodev config
60ef81ebee ossaudio: port to -audiodev config
9361aaae4c noaudio: port to -audiodev config
956b77bf8d dsoundaudio: port to -audiodev config
fd47b30266 coreaudio: port to -audiodev config
b2e94202ed alsaaudio: port to -audiodev config
92e91a2161 audio: -audiodev command line option basic implementation
7597a04f3e audio: -audiodev command line option: documentation
9df02ffc44 audio: use qapi AudioFormat instead of audfmt_e
454e5ebb1c qapi: qapi for audio backends

=== OUTPUT BEGIN ===
1/14 Checking commit 454e5ebb1c11 (qapi: qapi for audio backends)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#51: 
new file mode 100644

total: 0 errors, 1 warnings, 320 lines checked

Patch 1/14 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/14 Checking commit 9df02ffc443d (audio: use qapi AudioFormat instead of audfmt_e)
ERROR: space prohibited between function name and open parenthesis '('
#36: FILE: audio/alsaaudio.c:297:
+static snd_pcm_format_t aud_to_alsafmt (AudioFormat fmt, int endianness)

ERROR: space prohibited between function name and open parenthesis '('
#84: FILE: audio/alsaaudio.c:347:
+static int alsa_to_audfmt (snd_pcm_format_t alsafmt, AudioFormat *fmt,

ERROR: space prohibited between function name and open parenthesis '('
#205: FILE: audio/audio.c:260:
+static const char *audio_audfmt_to_string (AudioFormat fmt)

ERROR: space prohibited between function name and open parenthesis '('
#241: FILE: audio/audio.c:289:
+static AudioFormat audio_string_to_audfmt (const char *s, AudioFormat defval,

ERROR: space prohibited between function name and open parenthesis '('
#282: FILE: audio/audio.c:324:
+static AudioFormat audio_get_conf_fmt (const char *envname,

ERROR: space prohibited between function name and open parenthesis '('
#523: FILE: audio/ossaudio.c:151:
+static int aud_to_ossfmt (AudioFormat fmt, int endianness)

ERROR: space prohibited between function name and open parenthesis '('
#553: FILE: audio/ossaudio.c:185:
+static int oss_to_audfmt (int ossfmt, AudioFormat *fmt, int *endianness)

ERROR: space prohibited between function name and open parenthesis '('
#620: FILE: audio/paaudio.c:388:
+static pa_sample_format_t audfmt_to_pa (AudioFormat afmt, int endianness)

ERROR: space prohibited between function name and open parenthesis '('
#649: FILE: audio/paaudio.c:413:
+static AudioFormat pa_to_audfmt (pa_sample_format_t fmt, int *endianness)

ERROR: space prohibited between function name and open parenthesis '('
#687: FILE: audio/sdlaudio.c:71:
+static int aud_to_sdlfmt (AudioFormat fmt)

ERROR: trailing statements should be on next line
#954: FILE: hw/audio/hda-codec.c:102:
+    case AC_FMT_BITS_8:  as->fmt = AUDIO_FORMAT_S8;  break;

ERROR: trailing statements should be on next line
#955: FILE: hw/audio/hda-codec.c:103:
+    case AC_FMT_BITS_16: as->fmt = AUDIO_FORMAT_S16; break;

ERROR: trailing statements should be on next line
#956: FILE: hw/audio/hda-codec.c:104:
+    case AC_FMT_BITS_32: as->fmt = AUDIO_FORMAT_S32; break;

ERROR: space prohibited after that open square bracket '['
#970: FILE: hw/audio/hda-codec.c:137:
+    [ AUDIO_FORMAT_U8  ] = "PCM-U8",

ERROR: space prohibited before that close square bracket ']'
#970: FILE: hw/audio/hda-codec.c:137:
+    [ AUDIO_FORMAT_U8  ] = "PCM-U8",

ERROR: space prohibited after that open square bracket '['
#971: FILE: hw/audio/hda-codec.c:138:
+    [ AUDIO_FORMAT_S8  ] = "PCM-S8",

ERROR: space prohibited before that close square bracket ']'
#971: FILE: hw/audio/hda-codec.c:138:
+    [ AUDIO_FORMAT_S8  ] = "PCM-S8",

ERROR: space prohibited after that open square bracket '['
#972: FILE: hw/audio/hda-codec.c:139:
+    [ AUDIO_FORMAT_U16 ] = "PCM-U16",

ERROR: space prohibited before that close square bracket ']'
#972: FILE: hw/audio/hda-codec.c:139:
+    [ AUDIO_FORMAT_U16 ] = "PCM-U16",

ERROR: space prohibited after that open square bracket '['
#973: FILE: hw/audio/hda-codec.c:140:
+    [ AUDIO_FORMAT_S16 ] = "PCM-S16",

ERROR: space prohibited before that close square bracket ']'
#973: FILE: hw/audio/hda-codec.c:140:
+    [ AUDIO_FORMAT_S16 ] = "PCM-S16",

ERROR: space prohibited after that open square bracket '['
#974: FILE: hw/audio/hda-codec.c:141:
+    [ AUDIO_FORMAT_U32 ] = "PCM-U32",

ERROR: space prohibited before that close square bracket ']'
#974: FILE: hw/audio/hda-codec.c:141:
+    [ AUDIO_FORMAT_U32 ] = "PCM-U32",

ERROR: space prohibited after that open square bracket '['
#975: FILE: hw/audio/hda-codec.c:142:
+    [ AUDIO_FORMAT_S32 ] = "PCM-S32",

ERROR: space prohibited before that close square bracket ']'
#975: FILE: hw/audio/hda-codec.c:142:
+    [ AUDIO_FORMAT_S32 ] = "PCM-S32",

ERROR: trailing statements should be on next line
#1197: FILE: ui/vnc.c:2372:
+                case 0: vs->as.fmt = AUDIO_FORMAT_U8; break;

ERROR: trailing statements should be on next line
#1198: FILE: ui/vnc.c:2373:
+                case 1: vs->as.fmt = AUDIO_FORMAT_S8; break;

ERROR: trailing statements should be on next line
#1199: FILE: ui/vnc.c:2374:
+                case 2: vs->as.fmt = AUDIO_FORMAT_U16; break;

ERROR: trailing statements should be on next line
#1200: FILE: ui/vnc.c:2375:
+                case 3: vs->as.fmt = AUDIO_FORMAT_S16; break;

ERROR: trailing statements should be on next line
#1201: FILE: ui/vnc.c:2376:
+                case 4: vs->as.fmt = AUDIO_FORMAT_U32; break;

ERROR: trailing statements should be on next line
#1202: FILE: ui/vnc.c:2377:
+                case 5: vs->as.fmt = AUDIO_FORMAT_S32; break;

total: 31 errors, 0 warnings, 1028 lines checked

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

3/14 Checking commit 7597a04f3e28 (audio: -audiodev command line option: documentation)
4/14 Checking commit 92e91a2161ed (audio: -audiodev command line option basic implementation)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#703: FILE: audio/audio.c:1822:
+#define CASE(DRIVER, driver, pdo_name)                              \
+    case AUDIODEV_DRIVER_##DRIVER:                                  \
+        if (!dev->u.driver.has_in) {                                \
+            dev->u.driver.in = g_malloc0(                           \
+                sizeof(Audiodev##pdo_name##PerDirectionOptions));   \
+            dev->u.driver.has_in = true;                            \
+        }                                                           \
+        if (!dev->u.driver.has_out) {                               \
+            dev->u.driver.out = g_malloc0(                          \
+                sizeof(AudiodevAlsaPerDirectionOptions));           \
+            dev->u.driver.has_out = true;                           \
+        }                                                           \
+        break

ERROR: externs should be avoided in .c files
#715: FILE: audio/audio.c:1834:
+        break

ERROR: space prohibited before that close parenthesis ')'
#717: FILE: audio/audio.c:1836:
+        CASE(NONE, none, );

ERROR: space prohibited before that close parenthesis ')'
#720: FILE: audio/audio.c:1839:
+        CASE(DSOUND, dsound, );

ERROR: space prohibited before that close parenthesis ')'
#723: FILE: audio/audio.c:1842:
+        CASE(SDL, sdl, );

ERROR: space prohibited before that close parenthesis ')'
#724: FILE: audio/audio.c:1843:
+        CASE(SPICE, spice, );

ERROR: space prohibited before that close parenthesis ')'
#725: FILE: audio/audio.c:1844:
+        CASE(WAV, wav, );

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#970: 
new file mode 100644

total: 7 errors, 1 warnings, 1346 lines checked

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

5/14 Checking commit b2e94202edce (alsaaudio: port to -audiodev config)
6/14 Checking commit fd47b30266b0 (coreaudio: port to -audiodev config)
7/14 Checking commit 956b77bf8deb (dsoundaudio: port to -audiodev config)
8/14 Checking commit 9361aaae4c0c (noaudio: port to -audiodev config)
9/14 Checking commit 60ef81ebee86 (ossaudio: port to -audiodev config)
10/14 Checking commit f32d4ec5660e (paaudio: port to -audiodev config)
11/14 Checking commit b13a98214e5d (sdlaudio: port to -audiodev config)
12/14 Checking commit 2b8db3b1b8a0 (spiceaudio: port to -audiodev config)
13/14 Checking commit a08295d4a4c6 (wavaudio: port to -audiodev config)
14/14 Checking commit 77a2fc41d3b9 (audio: -audiodev command line option: cleanup)
=== OUTPUT END ===

Test command exited with code: 1


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