From patchwork Thu Nov 3 23:06:53 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: 9412037 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 261156022E for ; Fri, 4 Nov 2016 07:44:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 171B92B012 for ; Fri, 4 Nov 2016 07:44:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AEB32B03E; Fri, 4 Nov 2016 07:44:42 +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 26B4D2B012 for ; Fri, 4 Nov 2016 07:44:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9A1D3267198; Fri, 4 Nov 2016 08:44:38 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 6E004266BF3; Fri, 4 Nov 2016 08:42:06 +0100 (CET) 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 C072926736C; Fri, 4 Nov 2016 00:05:33 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id E6376266B8C for ; Fri, 4 Nov 2016 00:05:27 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP; 03 Nov 2016 16:05:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,440,1473145200"; d="scan'208"; a="1063655670" Received: from amanda-haswell-pc.sh.intel.com ([10.239.159.21]) by fmsmga001.fm.intel.com with ESMTP; 03 Nov 2016 16:05:25 -0700 From: mengdong.lin@linux.intel.com To: alsa-devel@alsa-project.org Date: Fri, 4 Nov 2016 07:06:53 +0800 Message-Id: <449c3b100730b9f73897084b9736ede91553dcdf.1478212626.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 2/6] 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)