From patchwork Tue Jun 6 14:42:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 9768997 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 C0F8460364 for ; Tue, 6 Jun 2017 14:43:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE95A2040D for ; Tue, 6 Jun 2017 14:43:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A346E274D0; Tue, 6 Jun 2017 14:43: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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE 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 C57B127E71 for ; Tue, 6 Jun 2017 14:43:33 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 93E53266EAF; Tue, 6 Jun 2017 16:43:31 +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 409602664EB; Tue, 6 Jun 2017 16:43:30 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by alsa0.perex.cz (Postfix) with ESMTP id 67F5F2664EB for ; Tue, 6 Jun 2017 16:43:25 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2017 07:43:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,306,1493708400"; d="scan'208";a="96174397" Received: from tlandman-mobl.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.15.29]) by orsmga002.jf.intel.com with ESMTP; 06 Jun 2017 07:43:15 -0700 From: Liam Girdwood To: Takashi Iwai Date: Tue, 6 Jun 2017 15:42:56 +0100 Message-Id: <1496760178-6028-1-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.9.1 Cc: Liam Girdwood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/3] topology: Add support for new widget types 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 topology support for new DSP widget types. This allows the new widgets to be added to the driver and firmware DAPM graphs. Signed-off-by: Liam Girdwood --- include/sound/asoc.h | 9 ++++++++- src/topology/dapm.c | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/include/sound/asoc.h b/include/sound/asoc.h index 082c5429..14ba30ff 100644 --- a/include/sound/asoc.h +++ b/include/sound/asoc.h @@ -70,7 +70,14 @@ #define SND_SOC_TPLG_DAPM_DAI_IN 13 #define SND_SOC_TPLG_DAPM_DAI_OUT 14 #define SND_SOC_TPLG_DAPM_DAI_LINK 15 -#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DAI_LINK +#define SND_SOC_TPLG_DAPM_BUFFER 16 +#define SND_SOC_TPLG_DAPM_PIPELINE 17 +#define SND_SOC_TPLG_DAPM_EFFECT 18 +#define SND_SOC_TPLG_DAPM_SIGGEN 19 +#define SND_SOC_TPLG_DAPM_SRC 20 +#define SND_SOC_TPLG_DAPM_ASRC 21 +#define SND_SOC_TPLG_DAPM_CODEC 22 +#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_CODEC /* Header magic number and string sizes */ #define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ diff --git a/src/topology/dapm.c b/src/topology/dapm.c index 6af750b9..23908821 100644 --- a/src/topology/dapm.c +++ b/src/topology/dapm.c @@ -38,6 +38,13 @@ static const struct map_elem widget_map[] = { {"dai_in", SND_SOC_TPLG_DAPM_DAI_IN}, {"dai_out", SND_SOC_TPLG_DAPM_DAI_OUT}, {"dai_link", SND_SOC_TPLG_DAPM_DAI_LINK}, + {"buffer", SND_SOC_TPLG_DAPM_BUFFER}, + {"pipeline", SND_SOC_TPLG_DAPM_PIPELINE}, + {"effect", SND_SOC_TPLG_DAPM_EFFECT}, + {"siggen", SND_SOC_TPLG_DAPM_SIGGEN}, + {"src", SND_SOC_TPLG_DAPM_SRC}, + {"asrc", SND_SOC_TPLG_DAPM_ASRC}, + {"codec", SND_SOC_TPLG_DAPM_CODEC}, }; static int lookup_widget(const char *w)