From patchwork Thu Oct 27 07:11:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mengdong.lin@linux.intel.com X-Patchwork-Id: 9399085 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 A2AD560231 for ; Thu, 27 Oct 2016 09:05:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 831002A0F6 for ; Thu, 27 Oct 2016 09:05:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 758342A0FC; Thu, 27 Oct 2016 09:05:49 +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 7846A2A0F6 for ; Thu, 27 Oct 2016 09:05:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id D9A4D26651B; Thu, 27 Oct 2016 11:05:42 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5882226651B; Thu, 27 Oct 2016 11:03:20 +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 2141826731C; Thu, 27 Oct 2016 09:10:17 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id F363826688A for ; Thu, 27 Oct 2016 09:10:13 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP; 27 Oct 2016 00:10:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="24291637" Received: from amanda-haswell-pc.sh.intel.com ([10.239.159.21]) by orsmga005.jf.intel.com with ESMTP; 27 Oct 2016 00:10:10 -0700 From: mengdong.lin@linux.intel.com To: alsa-devel@alsa-project.org Date: Thu, 27 Oct 2016 15:11:28 +0800 Message-Id: <86df240bbe358f40076bd8723fe81352f8d52052.1477549962.git.mengdong.lin@linux.intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: Cc: Mengdong Lin , tiwai@suse.de, hardik.t.shah@intel.com, guneshwor.o.singh@intel.com, liam.r.girdwood@linux.intel.com, vinod.koul@intel.com, broonie@kernel.org, mengdong.lin@intel.com Subject: [alsa-devel] [PATCH 02/22] topology: Parse sig_bits of stream caps 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 From: Mengdong Lin Add sig_bits to stream caps template of C API and parse it. Signed-off-by: Mengdong Lin diff --git a/include/topology.h b/include/topology.h index 0675b52..ccd8401 100644 --- a/include/topology.h +++ b/include/topology.h @@ -848,6 +848,7 @@ struct snd_tplg_stream_caps_template { unsigned int period_size_max; /*!< max period size bytes */ unsigned int buffer_size_min; /*!< min buffer size bytes */ unsigned int buffer_size_max; /*!< max buffer size bytes */ + unsigned int sig_bits; /*!< number of bits of content */ }; /** \struct snd_tplg_pcm_template diff --git a/src/topology/pcm.c b/src/topology/pcm.c index 0a90cb9..6fdf047 100644 --- a/src/topology/pcm.c +++ b/src/topology/pcm.c @@ -572,6 +572,7 @@ static void tplg_add_stream_caps(struct snd_soc_tplg_stream_caps *caps, caps->period_size_max = caps_tpl->period_size_max; caps->buffer_size_min = caps_tpl->buffer_size_min; caps->buffer_size_max = caps_tpl->buffer_size_max; + caps->sig_bits = caps_tpl->sig_bits; } int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)