From patchwork Fri May 4 01:24:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 10379609 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7333760159 for ; Fri, 4 May 2018 01:32:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 63DDB292E6 for ; Fri, 4 May 2018 01:32:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5903A292E9; Fri, 4 May 2018 01:32:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F7C8292E6 for ; Fri, 4 May 2018 01:32:33 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5751F267640; Fri, 4 May 2018 03:25:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 88B7E26760F; Fri, 4 May 2018 03:25:04 +0200 (CEST) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by alsa0.perex.cz (Postfix) with ESMTP id BE5B92675D4 for ; Fri, 4 May 2018 03:25:01 +0200 (CEST) Received: by mail-lf0-f67.google.com with SMTP id j16-v6so28647803lfb.7 for ; Thu, 03 May 2018 18:25:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uMtwz6KZeVeu/sRPAAhu7jGuHvvZczbRw4yeXDSlWGc=; b=LDGbkEGQyAfSoAacGTeGtJ/Fmrlz11C3nu0TDVRtrNCBKjUhErIBeq7Q+zgwwC+EHE 6Z9KwV5T6MSkpAdZCNNejHnGCOXdnG2JPGlnY0qUG9GyxNovOk3GfP+leUYACxy6Vmjp EzK64k4Mv8lgdDI0Vem93ZY9k+qIFXSh+YW8lmZK3f04+ADtTF2ErWyn6+Km2hZvZjJk Cg3J95Xz51HhSlo4JZxUR2FrGXCPWGyQhRUWj+LjCfjEsG3brWAvJdSyXr2gZ66EwtoV xiFxoPSLKhEKvhFeCN8zWaURcHEZtAru/2gIeiyv1feKfVeRt/kr2XbqDP6chTfnSct4 m39w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uMtwz6KZeVeu/sRPAAhu7jGuHvvZczbRw4yeXDSlWGc=; b=Gj1oiFsF08mqVRWEiMYVuU9OK7WkzymdZABL9pMaO+QVm9ZEeASuLN3v2Z2gsGBl4A yhpjelSfYWzhUCNNBhV/hKQG2LVJ7Vl9TbZRZ+EQcnGp03NV9Cn3r7oFfNJnI5fqtpo3 n5GozSqYx3B0mJ41KylJ+Y9gkqUh522u95CZ941TcE56cI0M8PUATukiC11XrV4MIwpt wB868Zxhv5czStj7QwNAbto3Tar3k4QYbrPFJ1L5SBnIcJ5v5zfAVoXadLqiL9xt2hve nC7IB1zyLavOvGm2xT3gvrp5KyNKj0asOcbN6vZ3rVelH73NBPEePSx4BmwjkH5fc/zo RCOA== X-Gm-Message-State: ALQs6tCHX6HOu8p39WujxQg3pI0mchmlEkeP1l+JE5Yq0Hz4glWhav5s JWOpDwyUuNY1KRruXczOzrM= X-Google-Smtp-Source: AB8JxZr3pj5QRIh9K3ba8sJmpkSmrMLISCRAn4mQaEXuaSrA2HzJXRMfbzpBZbfAhavkIb8HQINSNw== X-Received: by 2002:a2e:330c:: with SMTP id d12-v6mr18374940ljc.8.1525397101376; Thu, 03 May 2018 18:25:01 -0700 (PDT) Received: from localhost ([62.216.57.27]) by smtp.gmail.com with ESMTPSA id c89-v6sm3073785lfb.57.2018.05.03.18.25.00 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 03 May 2018 18:25:00 -0700 (PDT) From: Ruslan Bilovol To: Takashi Iwai Date: Fri, 4 May 2018 04:24:03 +0300 Message-Id: <1525397044-15080-7-git-send-email-ruslan.bilovol@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525397044-15080-1-git-send-email-ruslan.bilovol@gmail.com> References: <1525397044-15080-1-git-send-email-ruslan.bilovol@gmail.com> Cc: Jorge , alsa-devel@alsa-project.org, Andrew Chant , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [alsa-devel] [PATCH v2 6/7] include: usb: audio-v3: add BADD-specific values X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Add BADD-specific predefined values to audio-v3 so usb-audio in ALSA and UAC3 gadget can use them Signed-off-by: Ruslan Bilovol --- include/linux/usb/audio-v3.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/linux/usb/audio-v3.h b/include/linux/usb/audio-v3.h index a8959aa..38add1d 100644 --- a/include/linux/usb/audio-v3.h +++ b/include/linux/usb/audio-v3.h @@ -392,4 +392,30 @@ struct uac3_interrupt_data_msg { #define UAC3_AC_ACTIVE_INTERFACE_CONTROL 0x01 #define UAC3_AC_POWER_DOMAIN_CONTROL 0x02 +/* BADD predefined Unit/Terminal values */ +#define UAC3_BADD_IT_ID1 1 /* Input Terminal ID1: bTerminalID = 1 */ +#define UAC3_BADD_FU_ID2 2 /* Feature Unit ID2: bUnitID = 2 */ +#define UAC3_BADD_OT_ID3 3 /* Output Terminal ID3: bTerminalID = 3 */ +#define UAC3_BADD_IT_ID4 4 /* Input Terminal ID4: bTerminalID = 4 */ +#define UAC3_BADD_FU_ID5 5 /* Feature Unit ID5: bUnitID = 5 */ +#define UAC3_BADD_OT_ID6 6 /* Output Terminal ID6: bTerminalID = 6 */ +#define UAC3_BADD_FU_ID7 7 /* Feature Unit ID7: bUnitID = 7 */ +#define UAC3_BADD_MU_ID8 8 /* Mixer Unit ID8: bUnitID = 8 */ +#define UAC3_BADD_CS_ID9 9 /* Clock Source Entity ID9: bClockID = 9 */ +#define UAC3_BADD_PD_ID10 10 /* Power Domain ID10: bPowerDomainID = 10 */ +#define UAC3_BADD_PD_ID11 11 /* Power Domain ID11: bPowerDomainID = 11 */ + +/* BADD wMaxPacketSize of AS endpoints */ +#define UAC3_BADD_EP_MAXPSIZE_SYNC_MONO_16 0x0060 +#define UAC3_BADD_EP_MAXPSIZE_ASYNC_MONO_16 0x0062 +#define UAC3_BADD_EP_MAXPSIZE_SYNC_MONO_24 0x0090 +#define UAC3_BADD_EP_MAXPSIZE_ASYNC_MONO_24 0x0093 +#define UAC3_BADD_EP_MAXPSIZE_SYNC_STEREO_16 0x00C0 +#define UAC3_BADD_EP_MAXPSIZE_ASYNC_STEREO_16 0x00C4 +#define UAC3_BADD_EP_MAXPSIZE_SYNC_STEREO_24 0x0120 +#define UAC3_BADD_EP_MAXPSIZE_ASYNC_STEREO_24 0x0126 + +/* BADD sample rate is always fixed to 48kHz */ +#define UAC3_BADD_SAMPLING_RATE 48000 + #endif /* __LINUX_USB_AUDIO_V3_H */