From: Eric Blake <eblake@redhat.com>
To: Brad Smith <brad@comstyle.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] audio: Add sndio backend
Date: Thu, 5 Mar 2020 14:46:49 -0600 [thread overview]
Message-ID: <bfddf01e-ef79-5eb6-eec1-ee81a175882f@redhat.com> (raw)
In-Reply-To: <20200304145003.GB15649@humpty.home.comstyle.com>
On 3/4/20 8:50 AM, Brad Smith wrote:
> Add a sndio backend.
>
> sndio is the native API used by OpenBSD, although it has been ported to
> other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.).
>
> The C code is from Alexandre Ratchov <alex@caoua.org> and the rest of
> the bits are from me.
>
>
> Signed-off-by: Alexandre Ratchov <alex@caoua.org>
> Signed-off-by: Brad Smith <brad@comstyle.com>
>
> diff --git a/audio/Makefile.objs b/audio/Makefile.objs
Your patch lacks the usual --- separator and diffstat that 'git
format-patch' (and therefore 'git send-email') uses. This makes it
harder to see at a glance the approximate impact of your patch, and
whether it touches a file I'm interested in.
> +++ b/qapi/audio.json
> @@ -248,6 +248,28 @@
> '*out': 'AudiodevPaPerDirectionOptions',
> '*server': 'str' } }
>
> +##
> +# @AudiodevSndioOptions:
> +#
> +# Options of the sndio audio backend.
> +#
> +# @in: options of the capture stream
> +#
> +# @out: options of the playback stream
> +#
> +# @dev: the name of the sndio device to use (default 'default')
> +#
> +# @latency: play buffer size (in microseconds)
> +#
> +# Since: 4.0
You've missed 4.0 by a long shot; the next release is 5.0.
> +##
> +{ 'struct': 'AudiodevSndioOptions',
> + 'data': {
> + '*in': 'AudiodevPerDirectionOptions',
> + '*out': 'AudiodevPerDirectionOptions',
> + '*dev': 'str',
> + '*latency': 'uint32'} }
> +
> ##
> # @AudiodevWavOptions:
> #
> @@ -287,7 +309,7 @@
> ##
> { 'enum': 'AudiodevDriver',
> 'data': [ 'none', 'alsa', 'coreaudio', 'dsound', 'oss', 'pa', 'sdl',
> - 'spice', 'wav' ] }
> + 'sndio', 'spice', 'wav' ] }
It's also customary to document enum options, something like:
# @sndio (since 5.0)
Furthermore, since:
> +++ b/qemu-options.hx
> @@ -566,6 +566,9 @@ DEF("audiodev", HAS_ARG, QEMU_OPTION_audiodev,
> #ifdef CONFIG_AUDIO_SDL
> "-audiodev sdl,id=id[,prop[=value][,...]]\n"
> #endif
> +#ifdef CONFIG_AUDIO_SNDIO
> + "-audiodev sndio,id=id[,prop[=value][,...]]\n"
> +#endif
the option is only useful based on configure-time decisions, it seems
like the new enum element should be:
{ 'name': 'sndio', 'if': 'defined(CONFIG_AUDIO_SNDIO)' }
to make it introspectible whether support is compiled in to a given
binary. True, there are existing enum members that should do likewise,
so maybe it's worth a cleanup patch first.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-03-05 20:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-04 14:50 [PATCH] audio: Add sndio backend Brad Smith
2020-03-04 15:04 ` no-reply
2020-03-05 8:50 ` Gerd Hoffmann
2020-03-05 17:07 ` Brad Smith
2020-03-06 8:23 ` Gerd Hoffmann
2020-03-05 20:46 ` Eric Blake [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-07 5:19 Brad Smith
2021-11-08 13:03 ` Christian Schoenebeck
2021-11-13 20:40 ` Brad Smith
2021-11-14 13:18 ` Christian Schoenebeck
2021-11-18 19:25 ` Brad Smith
2021-11-08 14:58 ` Paolo Bonzini
2021-11-09 21:53 ` Brad Smith
2021-11-13 11:38 ` Paolo Bonzini
2021-11-13 20:41 ` Brad Smith
2021-11-10 6:22 ` WANG Xuerui
2021-11-13 21:09 ` Brad Smith
2021-11-13 15:55 ` Volker Rümelin
2021-11-19 20:23 ` Volker Rümelin
2021-12-09 19:08 ` Volker Rümelin
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=bfddf01e-ef79-5eb6-eec1-ee81a175882f@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=brad@comstyle.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).