From patchwork Fri Apr 13 22:24:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ruslan Bilovol X-Patchwork-Id: 10340849 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 1244A60153 for ; Fri, 13 Apr 2018 22:25:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21D50287C1 for ; Fri, 13 Apr 2018 22:25:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1581128A22; Fri, 13 Apr 2018 22:25:09 +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 48303287C1 for ; Fri, 13 Apr 2018 22:25:08 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0F6E3267380; Sat, 14 Apr 2018 00:24:51 +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 7FB34267265; Sat, 14 Apr 2018 00:24:45 +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 D2484267079 for ; Sat, 14 Apr 2018 00:24:43 +0200 (CEST) Received: by mail-lf0-f67.google.com with SMTP id o102-v6so14554327lfg.8 for ; Fri, 13 Apr 2018 15:24:43 -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=PBeWgduKkJ3Gi7ghkV7V8WKYZ1mBzRf4Kpunnnr66bz6+C2iLfYGkvYNIUKalgh7WK /0k2e3vQVy9cYfuvTXon2hCiz7s3265rPb6x/17/wqpO6YOgiuJwYPDlt6Km77wUXQ85 O8muop58sHEFVioTSoEOEIpiZ5WhPta5//8UQ88AwVqxCQagJp31EgwiNO4tX7s2hg/D wmCDNn5JSE3pzngYCLtoeSCTiNXAqdZ03uKwJx/tVIWsayhP/BkmuNgo8LQmHbLQb7XP 3PrDxFhTNOf5GRDTNWC4FcHKN3IVzvzyP/L7uBPWpe6IZqmXsccTBA7iO6bBRS69Ayh0 hmGg== 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=ITDDAT8JN1vjMwxv+k2XrcCYtnOeaYvh9N8WJDmSIjCFIfPKHRpqEVkUPqEYFoXnZs SxZmPIYc1V7PpL2RPBDEOfcRynxWNc0fg8XIIB3xSkNQpECUCFrzGS8aeDhyNeuwhbu3 n4RTr8GMP9bnQ8hHy+wpdQqGngrmeatU7/TvXAqI0WnSug3pMLKvMBVVOhk9WkoDYBn6 KboUIZ775V+L3wszifF61mKQGFoLchkRUspkfrBIvpL3T5oAlA+AockXbXwLeEd9+ocx 9gKaahJezc/Li+fJFzZ+qHuPPCtpZc7J+ZA9nQe0t3dHYBzn02QrksbX8CdjJexdGxKK PD9Q== X-Gm-Message-State: ALQs6tCFOUWtpdTuxElSWt7BJlGZtXuwPKdHHoQyDGhP4nGTKAjdJIMD l16hviGxSeKYPiEyNKswr/0= X-Google-Smtp-Source: AIpwx4/kzQ4iptw0uEr45D1EpjG9lcs4NDaJyueOKG2N8cdKeWbJENBH18MZkhT3UXW8MzXpoNvCJQ== X-Received: by 10.46.32.91 with SMTP id g88mr435855ljg.105.1523658283118; Fri, 13 Apr 2018 15:24:43 -0700 (PDT) Received: from localhost ([62.216.62.149]) by smtp.gmail.com with ESMTPSA id 66-v6sm1439152lfp.1.2018.04.13.15.24.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 13 Apr 2018 15:24:42 -0700 (PDT) From: Ruslan Bilovol To: Takashi Iwai Date: Sat, 14 Apr 2018 01:24:24 +0300 Message-Id: <1523658266-2259-3-git-send-email-ruslan.bilovol@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523658266-2259-1-git-send-email-ruslan.bilovol@gmail.com> References: <1523658266-2259-1-git-send-email-ruslan.bilovol@gmail.com> Cc: Jorge , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: [alsa-devel] [PATCH 2/4] 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 */