Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2486884pxb; Sun, 24 Jan 2021 08:42:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJybJi8eGiCM8B3k4/qqsp4Pjdaac1nAXQcfTx/KbP/yXHo1rLYERUbh7PgZkRHV7noYWNOB X-Received: by 2002:a05:6402:304e:: with SMTP id bu14mr101535edb.60.1611506546049; Sun, 24 Jan 2021 08:42:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611506546; cv=none; d=google.com; s=arc-20160816; b=WJfwEbmwZuAXFWUiMIwxWSix8TPCgfX7byVC8GdB9rdI1HcjI9147CldgCtNv+A6h8 fCOyAwD3CoL8K4/64jpFpT2va7dmryqOeN7D2rUAnEeDxFrLU8a+2Q6KBQwwUkSOM8EV ZeVBfzX0uFx1XDJePKX3IxxxbMycPw6WZO5s9jjfOTiz069J4hEiRBR7BIVGLgqAz78n e2XY9l99oXIdK7+/sIwGvUto9VfS0ifnYTTqFNdZBS+LN/KHb2v8pKZkI6JT0YddAJlD CZah9G3rD10l6RNxk7/npEjKKpxm3kiGtTzvymt/jU63l2m30Yg7OiQegMlij5Wgam5+ 7zTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:date:message-id:from:references:cc:to :subject:dkim-signature; bh=p+BPGc/N3I/hVIpGKACrFrZZJnKElx12rE5dnaegO5o=; b=crfKt1FPXXavmh0yrcfBtwhI2q4DWM877eSYLSNWARDot4pPRX93AmrwvxrwXR0GjA G80iMORC7+/G0Ng2mQQjiry7xhVPgL2tiJ3U4asEo4yojF2YVzX6Em+4/wwL6571BBbs aT40kLBr+EtbgLs32KKTVd4nUb0FsLBKnmI9npqZbiLBr2xu2OHx2aefaskMwdbDywUS T4jDLrqOQ2cTqm8x222HYotkmHkg6w8VhffzdlZP1cUAxMGc1eilD03syVBKCoeSEohu 659dG3cwgdUfUUCimGOSGyVmih7R6NjXStBqtUyQI6gWoKBwrFwlB3BiRFtlBnSy/pVB K6Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@opensynergy.com header.s=srmailgate02 header.b=nX9pn1Uv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensynergy.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si6140047edi.284.2021.01.24.08.41.49; Sun, 24 Jan 2021 08:42:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@opensynergy.com header.s=srmailgate02 header.b=nX9pn1Uv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=opensynergy.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725986AbhAXQgv (ORCPT + 99 others); Sun, 24 Jan 2021 11:36:51 -0500 Received: from mx1.opensynergy.com ([217.66.60.4]:26380 "EHLO mx1.opensynergy.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbhAXQgu (ORCPT ); Sun, 24 Jan 2021 11:36:50 -0500 Received: from SR-MAILGATE-02.opensynergy.com (localhost.localdomain [127.0.0.1]) by mx1.opensynergy.com (Proxmox) with ESMTP id 4EDA0A146E; Sun, 24 Jan 2021 17:36:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=opensynergy.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:from:from:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=srmailgate02; bh=p+BPGc/N3I/h VIpGKACrFrZZJnKElx12rE5dnaegO5o=; b=nX9pn1UvQ5jFm35h3SsjJk7qE8Pl ZZi8+v3gfVvMx/m+wTaAgaWisHvmndD0eq5tkWFcVhsmrrQKbJ1G74r5qTi93vdj VnzHJ6p/gfWNn3xapv97Ln5BiUExgEMkGSl4HXsM4asrT5LCp+vnz92WeBot8D52 zG1j2N5lZEhYdSgdwbVqH5D9AdG6CSFbUsV45L9vmR1GRnFv0OlQYhSlo2fS0BYQ 48wXHTfwN9YJz0muRef2oc5ik5yqr8A9LCMEKmMJBRelgNgoDdBFFj1PwSnfCk3B eSRFHmS3LY6FX1MCqZ/XX1I6PVqFuWxTXz7RH4jU0Q0mP87Gnz7qP72k2Q== Subject: Re: [PATCH 2/7] uapi: virtio_snd: add the sound device header file To: "Michael S. Tsirkin" CC: , , , Jason Wang , References: <20210120003638.3339987-1-anton.yakovlev@opensynergy.com> <20210120003638.3339987-3-anton.yakovlev@opensynergy.com> <20210120031818-mutt-send-email-mst@kernel.org> From: Anton Yakovlev Message-ID: Date: Sun, 24 Jan 2021 17:36:03 +0100 MIME-Version: 1.0 In-Reply-To: <20210120031818-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SR-MAIL-02.open-synergy.com (10.26.10.22) To SR-MAIL-01.open-synergy.com (10.26.10.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Michael. Thanks you for your comments! On 20.01.2021 09:19, Michael S. Tsirkin wrote: > CAUTION: This email originated from outside of the organization. > Do not click links or open attachments unless you recognize the sender and know the content is safe. > > > On Wed, Jan 20, 2021 at 01:36:30AM +0100, Anton Yakovlev wrote: >> The file contains the definitions for the sound device from the OASIS >> virtio spec. >> >> Signed-off-by: Anton Yakovlev >> --- >> MAINTAINERS | 6 + >> include/uapi/linux/virtio_snd.h | 361 ++++++++++++++++++++++++++++++++ >> 2 files changed, 367 insertions(+) >> create mode 100644 include/uapi/linux/virtio_snd.h >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 00836f6452f0..6dfd59eafe82 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -18936,6 +18936,12 @@ W: https://virtio-mem.gitlab.io/ >> F: drivers/virtio/virtio_mem.c >> F: include/uapi/linux/virtio_mem.h >> >> +VIRTIO SOUND DRIVER >> +M: Anton Yakovlev >> +L: virtualization@lists.linux-foundation.org >> +S: Maintained >> +F: include/uapi/linux/virtio_snd.h >> + >> VIRTUAL BOX GUEST DEVICE DRIVER >> M: Hans de Goede >> M: Arnd Bergmann > > You want sound/virtio here too, right? > I'd just squash this with the next patch in series. Yes, I squashed these two in v2 and added you to the MAINTAINERS. >> diff --git a/include/uapi/linux/virtio_snd.h b/include/uapi/linux/virtio_snd.h >> new file mode 100644 >> index 000000000000..1ff6310e54d6 >> --- /dev/null >> +++ b/include/uapi/linux/virtio_snd.h >> @@ -0,0 +1,361 @@ >> +/* SPDX-License-Identifier: BSD-3-Clause */ >> +/* >> + * Copyright (C) 2020 OpenSynergy GmbH >> + * >> + * This header is BSD licensed so anyone can use the definitions to >> + * implement compatible drivers/servers. >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the distribution. >> + * 3. Neither the name of OpenSynergy GmbH nor the names of its contributors >> + * may be used to endorse or promote products derived from this software >> + * without specific prior written permission. >> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS >> + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >> + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS >> + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IBM OR >> + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, >> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT >> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF >> + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND >> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >> + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT >> + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> +#ifndef VIRTIO_SND_IF_H >> +#define VIRTIO_SND_IF_H >> + >> +#include >> + >> +/******************************************************************************* >> + * CONFIGURATION SPACE >> + */ >> +struct virtio_snd_config { >> + /* # of available physical jacks */ >> + __le32 jacks; >> + /* # of available PCM streams */ >> + __le32 streams; >> + /* # of available channel maps */ >> + __le32 chmaps; >> +}; >> + >> +enum { >> + /* device virtqueue indexes */ >> + VIRTIO_SND_VQ_CONTROL = 0, >> + VIRTIO_SND_VQ_EVENT, >> + VIRTIO_SND_VQ_TX, >> + VIRTIO_SND_VQ_RX, >> + /* # of device virtqueues */ >> + VIRTIO_SND_VQ_MAX >> +}; >> + >> +/******************************************************************************* >> + * COMMON DEFINITIONS >> + */ >> + >> +/* supported dataflow directions */ >> +enum { >> + VIRTIO_SND_D_OUTPUT = 0, >> + VIRTIO_SND_D_INPUT >> +}; >> + >> +enum { >> + /* jack control request types */ >> + VIRTIO_SND_R_JACK_INFO = 1, >> + VIRTIO_SND_R_JACK_REMAP, >> + >> + /* PCM control request types */ >> + VIRTIO_SND_R_PCM_INFO = 0x0100, >> + VIRTIO_SND_R_PCM_SET_PARAMS, >> + VIRTIO_SND_R_PCM_PREPARE, >> + VIRTIO_SND_R_PCM_RELEASE, >> + VIRTIO_SND_R_PCM_START, >> + VIRTIO_SND_R_PCM_STOP, >> + >> + /* channel map control request types */ >> + VIRTIO_SND_R_CHMAP_INFO = 0x0200, >> + >> + /* jack event types */ >> + VIRTIO_SND_EVT_JACK_CONNECTED = 0x1000, >> + VIRTIO_SND_EVT_JACK_DISCONNECTED, >> + >> + /* PCM event types */ >> + VIRTIO_SND_EVT_PCM_PERIOD_ELAPSED = 0x1100, >> + VIRTIO_SND_EVT_PCM_XRUN, >> + >> + /* common status codes */ >> + VIRTIO_SND_S_OK = 0x8000, >> + VIRTIO_SND_S_BAD_MSG, >> + VIRTIO_SND_S_NOT_SUPP, >> + VIRTIO_SND_S_IO_ERR >> +}; >> + >> +/* common header */ >> +struct virtio_snd_hdr { >> + __le32 code; >> +}; >> + >> +/* event notification */ >> +struct virtio_snd_event { >> + /* VIRTIO_SND_EVT_XXX */ >> + struct virtio_snd_hdr hdr; >> + /* optional event data */ >> + __le32 data; >> +}; >> + >> +/* common control request to query an item information */ >> +struct virtio_snd_query_info { >> + /* VIRTIO_SND_R_XXX_INFO */ >> + struct virtio_snd_hdr hdr; >> + /* item start identifier */ >> + __le32 start_id; >> + /* item count to query */ >> + __le32 count; >> + /* item information size in bytes */ >> + __le32 size; >> +}; >> + >> +/* common item information header */ >> +struct virtio_snd_info { >> + /* function group node id (High Definition Audio Specification 7.1.2) */ >> + __le32 hda_fn_nid; >> +}; >> + >> +/******************************************************************************* >> + * JACK CONTROL MESSAGES >> + */ >> +struct virtio_snd_jack_hdr { >> + /* VIRTIO_SND_R_JACK_XXX */ >> + struct virtio_snd_hdr hdr; >> + /* 0 ... virtio_snd_config::jacks - 1 */ >> + __le32 jack_id; >> +}; >> + >> +/* supported jack features */ >> +enum { >> + VIRTIO_SND_JACK_F_REMAP = 0 >> +}; >> + >> +struct virtio_snd_jack_info { >> + /* common header */ >> + struct virtio_snd_info hdr; >> + /* supported feature bit map (1 << VIRTIO_SND_JACK_F_XXX) */ >> + __le32 features; >> + /* pin configuration (High Definition Audio Specification 7.3.3.31) */ >> + __le32 hda_reg_defconf; >> + /* pin capabilities (High Definition Audio Specification 7.3.4.9) */ >> + __le32 hda_reg_caps; >> + /* current jack connection status (0: disconnected, 1: connected) */ >> + __u8 connected; >> + >> + __u8 padding[7]; >> +}; >> + >> +/* jack remapping control request */ >> +struct virtio_snd_jack_remap { >> + /* .code = VIRTIO_SND_R_JACK_REMAP */ >> + struct virtio_snd_jack_hdr hdr; >> + /* selected association number */ >> + __le32 association; >> + /* selected sequence number */ >> + __le32 sequence; >> +}; >> + >> +/******************************************************************************* >> + * PCM CONTROL MESSAGES >> + */ >> +struct virtio_snd_pcm_hdr { >> + /* VIRTIO_SND_R_PCM_XXX */ >> + struct virtio_snd_hdr hdr; >> + /* 0 ... virtio_snd_config::streams - 1 */ >> + __le32 stream_id; >> +}; >> + >> +/* supported PCM stream features */ >> +enum { >> + VIRTIO_SND_PCM_F_SHMEM_HOST = 0, >> + VIRTIO_SND_PCM_F_SHMEM_GUEST, >> + VIRTIO_SND_PCM_F_MSG_POLLING, >> + VIRTIO_SND_PCM_F_EVT_SHMEM_PERIODS, >> + VIRTIO_SND_PCM_F_EVT_XRUNS >> +}; >> + >> +/* supported PCM sample formats */ >> +enum { >> + /* analog formats (width / physical width) */ >> + VIRTIO_SND_PCM_FMT_IMA_ADPCM = 0, /* 4 / 4 bits */ >> + VIRTIO_SND_PCM_FMT_MU_LAW, /* 8 / 8 bits */ >> + VIRTIO_SND_PCM_FMT_A_LAW, /* 8 / 8 bits */ >> + VIRTIO_SND_PCM_FMT_S8, /* 8 / 8 bits */ >> + VIRTIO_SND_PCM_FMT_U8, /* 8 / 8 bits */ >> + VIRTIO_SND_PCM_FMT_S16, /* 16 / 16 bits */ >> + VIRTIO_SND_PCM_FMT_U16, /* 16 / 16 bits */ >> + VIRTIO_SND_PCM_FMT_S18_3, /* 18 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_U18_3, /* 18 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_S20_3, /* 20 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_U20_3, /* 20 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_S24_3, /* 24 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_U24_3, /* 24 / 24 bits */ >> + VIRTIO_SND_PCM_FMT_S20, /* 20 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_U20, /* 20 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_S24, /* 24 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_U24, /* 24 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_S32, /* 32 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_U32, /* 32 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_FLOAT, /* 32 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_FLOAT64, /* 64 / 64 bits */ >> + /* digital formats (width / physical width) */ >> + VIRTIO_SND_PCM_FMT_DSD_U8, /* 8 / 8 bits */ >> + VIRTIO_SND_PCM_FMT_DSD_U16, /* 16 / 16 bits */ >> + VIRTIO_SND_PCM_FMT_DSD_U32, /* 32 / 32 bits */ >> + VIRTIO_SND_PCM_FMT_IEC958_SUBFRAME /* 32 / 32 bits */ >> +}; >> + >> +/* supported PCM frame rates */ >> +enum { >> + VIRTIO_SND_PCM_RATE_5512 = 0, >> + VIRTIO_SND_PCM_RATE_8000, >> + VIRTIO_SND_PCM_RATE_11025, >> + VIRTIO_SND_PCM_RATE_16000, >> + VIRTIO_SND_PCM_RATE_22050, >> + VIRTIO_SND_PCM_RATE_32000, >> + VIRTIO_SND_PCM_RATE_44100, >> + VIRTIO_SND_PCM_RATE_48000, >> + VIRTIO_SND_PCM_RATE_64000, >> + VIRTIO_SND_PCM_RATE_88200, >> + VIRTIO_SND_PCM_RATE_96000, >> + VIRTIO_SND_PCM_RATE_176400, >> + VIRTIO_SND_PCM_RATE_192000, >> + VIRTIO_SND_PCM_RATE_384000 >> +}; >> + >> +struct virtio_snd_pcm_info { >> + /* common header */ >> + struct virtio_snd_info hdr; >> + /* supported feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */ >> + __le32 features; >> + /* supported sample format bit map (1 << VIRTIO_SND_PCM_FMT_XXX) */ >> + __le64 formats; >> + /* supported frame rate bit map (1 << VIRTIO_SND_PCM_RATE_XXX) */ >> + __le64 rates; >> + /* dataflow direction (VIRTIO_SND_D_XXX) */ >> + __u8 direction; >> + /* minimum # of supported channels */ >> + __u8 channels_min; >> + /* maximum # of supported channels */ >> + __u8 channels_max; >> + >> + __u8 padding[5]; >> +}; >> + >> +/* set PCM stream format */ >> +struct virtio_snd_pcm_set_params { >> + /* .code = VIRTIO_SND_R_PCM_SET_PARAMS */ >> + struct virtio_snd_pcm_hdr hdr; >> + /* size of the hardware buffer */ >> + __le32 buffer_bytes; >> + /* size of the hardware period */ >> + __le32 period_bytes; >> + /* selected feature bit map (1 << VIRTIO_SND_PCM_F_XXX) */ >> + __le32 features; >> + /* selected # of channels */ >> + __u8 channels; >> + /* selected sample format (VIRTIO_SND_PCM_FMT_XXX) */ >> + __u8 format; >> + /* selected frame rate (VIRTIO_SND_PCM_RATE_XXX) */ >> + __u8 rate; >> + >> + __u8 padding; >> +}; >> + >> +/******************************************************************************* >> + * PCM I/O MESSAGES >> + */ >> + >> +/* I/O request header */ >> +struct virtio_snd_pcm_xfer { >> + /* 0 ... virtio_snd_config::streams - 1 */ >> + __le32 stream_id; >> +}; >> + >> +/* I/O request status */ >> +struct virtio_snd_pcm_status { >> + /* VIRTIO_SND_S_XXX */ >> + __le32 status; >> + /* current device latency */ >> + __le32 latency_bytes; >> +}; >> + >> +/******************************************************************************* >> + * CHANNEL MAP CONTROL MESSAGES >> + */ >> +struct virtio_snd_chmap_hdr { >> + /* VIRTIO_SND_R_CHMAP_XXX */ >> + struct virtio_snd_hdr hdr; >> + /* 0 ... virtio_snd_config::chmaps - 1 */ >> + __le32 chmap_id; >> +}; >> + >> +/* standard channel position definition */ >> +enum { >> + VIRTIO_SND_CHMAP_NONE = 0, /* undefined */ >> + VIRTIO_SND_CHMAP_NA, /* silent */ >> + VIRTIO_SND_CHMAP_MONO, /* mono stream */ >> + VIRTIO_SND_CHMAP_FL, /* front left */ >> + VIRTIO_SND_CHMAP_FR, /* front right */ >> + VIRTIO_SND_CHMAP_RL, /* rear left */ >> + VIRTIO_SND_CHMAP_RR, /* rear right */ >> + VIRTIO_SND_CHMAP_FC, /* front center */ >> + VIRTIO_SND_CHMAP_LFE, /* low frequency (LFE) */ >> + VIRTIO_SND_CHMAP_SL, /* side left */ >> + VIRTIO_SND_CHMAP_SR, /* side right */ >> + VIRTIO_SND_CHMAP_RC, /* rear center */ >> + VIRTIO_SND_CHMAP_FLC, /* front left center */ >> + VIRTIO_SND_CHMAP_FRC, /* front right center */ >> + VIRTIO_SND_CHMAP_RLC, /* rear left center */ >> + VIRTIO_SND_CHMAP_RRC, /* rear right center */ >> + VIRTIO_SND_CHMAP_FLW, /* front left wide */ >> + VIRTIO_SND_CHMAP_FRW, /* front right wide */ >> + VIRTIO_SND_CHMAP_FLH, /* front left high */ >> + VIRTIO_SND_CHMAP_FCH, /* front center high */ >> + VIRTIO_SND_CHMAP_FRH, /* front right high */ >> + VIRTIO_SND_CHMAP_TC, /* top center */ >> + VIRTIO_SND_CHMAP_TFL, /* top front left */ >> + VIRTIO_SND_CHMAP_TFR, /* top front right */ >> + VIRTIO_SND_CHMAP_TFC, /* top front center */ >> + VIRTIO_SND_CHMAP_TRL, /* top rear left */ >> + VIRTIO_SND_CHMAP_TRR, /* top rear right */ >> + VIRTIO_SND_CHMAP_TRC, /* top rear center */ >> + VIRTIO_SND_CHMAP_TFLC, /* top front left center */ >> + VIRTIO_SND_CHMAP_TFRC, /* top front right center */ >> + VIRTIO_SND_CHMAP_TSL, /* top side left */ >> + VIRTIO_SND_CHMAP_TSR, /* top side right */ >> + VIRTIO_SND_CHMAP_LLFE, /* left LFE */ >> + VIRTIO_SND_CHMAP_RLFE, /* right LFE */ >> + VIRTIO_SND_CHMAP_BC, /* bottom center */ >> + VIRTIO_SND_CHMAP_BLC, /* bottom left center */ >> + VIRTIO_SND_CHMAP_BRC /* bottom right center */ >> +}; >> + >> +/* maximum possible number of channels */ >> +#define VIRTIO_SND_CHMAP_MAX_SIZE 18 >> + >> +struct virtio_snd_chmap_info { >> + /* common header */ >> + struct virtio_snd_info hdr; >> + /* dataflow direction (VIRTIO_SND_D_XXX) */ >> + __u8 direction; >> + /* # of valid channel position values */ >> + __u8 channels; >> + /* channel position values (VIRTIO_SND_CHMAP_XXX) */ >> + __u8 positions[VIRTIO_SND_CHMAP_MAX_SIZE]; >> +}; >> + >> +#endif /* VIRTIO_SND_IF_H */ >> -- >> 2.30.0 >> > > -- Anton Yakovlev Senior Software Engineer OpenSynergy GmbH Rotherstr. 20, 10245 Berlin Phone: +49 30 60 98 54 0 E-Mail: anton.yakovlev@opensynergy.com www.opensynergy.com Handelsregister/Commercial Registry: Amtsgericht Charlottenburg, HRB 108616B Geschäftsführer/Managing Director: Regis Adjamah