Received: by 10.192.165.148 with SMTP id m20csp213298imm; Thu, 3 May 2018 18:26:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqGRwxl9c7kW7tCLpq17zzr0dHy6LpjXopichmJqWD6iOlOo781dIFaIq/pGH8mdgMRnO6B X-Received: by 2002:a63:bf44:: with SMTP id i4-v6mr20846498pgo.66.1525397190095; Thu, 03 May 2018 18:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525397190; cv=none; d=google.com; s=arc-20160816; b=M8Q3bQenGV90qz6bc3JUc8XnuDEaxTeDMSVTS1X6/GIlTSyhInKykzMmw5zu6Us/R+ BciJx/DdKXCehEpT215EPwupR+Odcd5dkCAXB752+xQni8UV6kld/oPvClizxlx9pWsu 1JAdJ9J44irOy98RuZ4t7RvuaePQP5iOFljTQ6HHoYDVLAF50UaNC7zGJ/ewOZydZIiL 11TvkknbAdH33nDaoGoxHAIUGqO/fIU6IOrbnD+8T/B2g/s3KUcRDXnobyStiKMVgsHN 7xsHjqleWZJrsakbapCyV99gdoAoAchboNioB9QebsvYFuVKeT0NqRH8q9SBsV69Ejik Qgfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=uMtwz6KZeVeu/sRPAAhu7jGuHvvZczbRw4yeXDSlWGc=; b=qti32f+YwaxkkP93NS97Ztu4syrZkmlLeu+rChqJSYnDbA6tvGHrj04O2plEeLi0F9 I5g7I1r5UTGfF52BOsQvTT8pH2Bsc4CGoRLamzmv2+7bcNwJZlA9hpDuWzdNt4lfo4TV +0/Ra1jJ6IPR/HkfS5qV7j+MkPGZWpM2e2RobNIPg5gIqIYI/BWFRmd2a1uAqpnj0sHp g9+DNa1mX4GFpQ0Ejbm2kJErRevF68atM8K1Lvqtg+b1VRQLCKlJA2QQzz7SLkDoJeHC vzoGyLDza9rZ1moA0ylLAO4vdcdDFhXYQfaBBoR35jA0gPO378VrSIuAZcSgZtXx4EDN t+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LDGbkEGQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si9266906plb.187.2018.05.03.18.25.46; Thu, 03 May 2018 18:26:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LDGbkEGQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582AbeEDBZG (ORCPT + 99 others); Thu, 3 May 2018 21:25:06 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:45651 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236AbeEDBZC (ORCPT ); Thu, 3 May 2018 21:25:02 -0400 Received: by mail-lf0-f66.google.com with SMTP id y14-v6so28282958lfy.12 for ; Thu, 03 May 2018 18:25:02 -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=QIx9sISl7ayhgv7A5/kU1CjFH3586RPiIKVAIHDExTN2NfsfyUBiwXO5wUFskexCiw gZRI7XHK1MQaiFiOKE1Hs5/gL6g5oHF86eeUzaK6qng71ooLBlyIvR6uFKUMiBG3v1XI AiUTDZL61hhvKb/IScnEmdA7bDBl1BOwCd0dmX7fK86pUnPI6iM9uYA/hIAc/TADgJ4Y ZCkqA84VXQfi23wyIl4CQv28rakuMnvHD1k8MCUnB2HixRbCAB0E9a5bW0mbq/+I51Jt SoEbkQngIMzSj8S6RwFtTepBJD1uCL5/n2Bz1vT1PI9rQh9+zW0u2yhX3yB6uU1PzqjS NXlA== X-Gm-Message-State: ALQs6tB8Ze+cFOFwrh1zbQKnOn/fGrnZmpJyeYfQ1k6UOC22rVsTxf3W 10jv/W7fj6hEP96eeOYBl9k= 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 Cc: Jorge , Andrew Chant , Greg Kroah-Hartman , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/7] include: usb: audio-v3: add BADD-specific values 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ -- 1.9.1