From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FA76C3F2D1 for ; Thu, 5 Mar 2020 20:47:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5308F2072D for ; Thu, 5 Mar 2020 20:47:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jWrzNahJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5308F2072D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:56056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9xPR-0007aE-Hd for qemu-devel@archiver.kernel.org; Thu, 05 Mar 2020 15:47:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46757) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9xOW-0006mH-TC for qemu-devel@nongnu.org; Thu, 05 Mar 2020 15:47:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9xOV-0000kU-8L for qemu-devel@nongnu.org; Thu, 05 Mar 2020 15:47:00 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:22888 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j9xOU-0000iy-Uf for qemu-devel@nongnu.org; Thu, 05 Mar 2020 15:46:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583441218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FjfrmKKHOo3R+HpDVWc7rakk7Fd0fB3Tr8N2RxlD1tQ=; b=jWrzNahJ5FFLTsCeYUYPPLemPjXBqcciiFkmjXJdxLP3DLhqRcm2sJcnxzYX6Ar6sdIzSx aQgMu7STuZiepjcZ7qI/rwkz8ureNyPMhce0QA40DuOAZHI4a6Bj3sqL4XFK3wpKnaZnuu sy1wsTKME1d50/RoK0daMISkIYzOI2g= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-tdYhLZFNNLOe-DqcP_Gw3Q-1; Thu, 05 Mar 2020 15:46:54 -0500 X-MC-Unique: tdYhLZFNNLOe-DqcP_Gw3Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 149C418C8C02; Thu, 5 Mar 2020 20:46:53 +0000 (UTC) Received: from [10.3.117.177] (ovpn-117-177.phx2.redhat.com [10.3.117.177]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F07795D9C9; Thu, 5 Mar 2020 20:46:49 +0000 (UTC) Subject: Re: [PATCH] audio: Add sndio backend To: Brad Smith , qemu-devel@nongnu.org References: <20200304145003.GB15649@humpty.home.comstyle.com> From: Eric Blake Organization: Red Hat, Inc. Message-ID: Date: Thu, 5 Mar 2020 14:46:49 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200304145003.GB15649@humpty.home.comstyle.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 and the rest of > the bits are from me. > > > Signed-off-by: Alexandre Ratchov > Signed-off-by: Brad Smith > > 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