From patchwork Wed Nov 16 06:43:07 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: 9431297 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 94C6B60469 for ; Wed, 16 Nov 2016 11:23:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92CCE28ECA for ; Wed, 16 Nov 2016 11:23:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8436D28F21; Wed, 16 Nov 2016 11:23:52 +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 85C5A28ECA for ; Wed, 16 Nov 2016 11:23:51 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id ED6A62670E6; Wed, 16 Nov 2016 12:23:49 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 670D9266D36; Wed, 16 Nov 2016 12:21:17 +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 960C2266C4D; Wed, 16 Nov 2016 07:41:39 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by alsa0.perex.cz (Postfix) with ESMTP id 222402665B6 for ; Wed, 16 Nov 2016 07:41:36 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 15 Nov 2016 22:41:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,646,1473145200"; d="scan'208"; a="1060048408" Received: from amanda-haswell-pc.sh.intel.com ([10.239.159.21]) by orsmga001.jf.intel.com with ESMTP; 15 Nov 2016 22:41:17 -0800 From: mengdong.lin@linux.intel.com To: alsa-devel@alsa-project.org Date: Wed, 16 Nov 2016 14:43:07 +0800 Message-Id: <178981456f027965d94e8e1a7eaeeab7de71dcf2.1479277829.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 7/7] topology: Revise document and comments for ABI v5 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 Revise the obsolete content in document and comments. Here are the major changes in implementation from early phase design: - PCM object is used to configure front end DAI & DAI links, not used by physical DAI or DAI links. - No longer use separate object for backend or codec<->codec links, but use physical links to cover them. Signed-off-by: Mengdong Lin diff --git a/include/topology.h b/include/topology.h index c5d0080..593eaa6 100644 --- a/include/topology.h +++ b/include/topology.h @@ -40,9 +40,10 @@ extern "C" { * currently recognises the following object types :- * * * Controls (mixer, enumerated and byte) including TLV data. - * * PCMs (FE and BE configurations and capabilities) + * * PCMs (Front End DAI & DAI link) * * DAPM widgets * * DAPM graph elements. + * * Physical DAI & DAI links * * Private data for each object type. * * Manifest (containing count of each object type) * @@ -511,8 +512,8 @@ extern "C" { * refer to section Control Private Data. * *

PCM Capabilities

- * Topology can also define the capabilities of FE and BE PCMs. Capabilities - * can be defined with the following section :- + * Topology can also define the PCM capabilities of front end or physical DAIs. + * Capabilities can be defined with the following section :- * *
  * SectionPCMCapabilities."name" {
@@ -525,8 +526,8 @@ extern "C" {
  * }
  * 
* The supported formats use the same naming convention as the driver macros. - * The PCM capabilities name can be referred to and included by BE, PCM and - * Codec <-> codec topology sections. + * The PCM capabilities name can be referred to and included by PCM and + * physical DAI sections. * *

PCM Configurations

* PCM runtime configurations can be defined for playback and capture stream @@ -552,31 +553,14 @@ extern "C" { * * * The supported formats use the same naming convention as the driver macros. - * The PCM configuration name can be referred to and included by BE, PCM and - * Codec <-> codec topology sections. + * The PCM configuration name can be referred to and included by PCM and + * physical link sections. * - *

PCM Configurations

- * PCM, BE and Codec to Codec link sections define the supported capabilities - * and configurations for supported playback and capture streams. The - * definitions and content for PCMs, BE and Codec links are the same with the - * exception of the section type :- - * - *
- * SectionPCM."name" {
- *	....
- * }
- * SectionBE."name" {
- *	....
- * }
- * SectionCC."name" {
- *	....
- * }
- * 
- * - * The section types above should be used for PCMs, Back Ends and Codec to Codec - * links respectively.
- * - * The data for each section is defined as follows :- + *

PCM (Front-end DAI & DAI link)

+ * PCM sections define the supported capabilities and configurations for + * supported playback and capture streams, names and flags for front end + * DAI & DAI links. Topology kernel driver will use a PCM object to create + * a pair of FE DAI & DAI links. * *
  * SectionPCM."name" {
@@ -1031,7 +1015,7 @@ struct snd_tplg_dai_template {
 };
 
 /** \struct snd_tplg_link_template
- * \brief Template type for BE and CC DAI Links.
+ * \brief Template type for physical DAI Links.
  */
 struct snd_tplg_link_template {
 	const char *name;	/*!< link name, used to match */
@@ -1065,7 +1049,7 @@ typedef struct snd_tplg_obj_template {
 		struct snd_tplg_enum_template *enum_ctl;	/*!< Enum control */
 		struct snd_tplg_graph_template *graph;		/*!< Graph elements */
 		struct snd_tplg_pcm_template *pcm;		/*!< PCM elements */
-		struct snd_tplg_link_template *link;		/*!< BE and CC Links */
+		struct snd_tplg_link_template *link;		/*!< physical DAI Links */
 		struct snd_tplg_dai_template *dai;		/*!< Physical DAI */
 	};
 } snd_tplg_obj_template_t;
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index d7c04c2..2e0a120 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -1198,7 +1198,6 @@ int tplg_add_link_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
 	    && t->type != SND_TPLG_TYPE_CC)
 		return -EINVAL;
 
-	/* here type can be either BE or CC. */
 	elem = tplg_elem_new_common(tplg, NULL, link_tpl->name, t->type);
 	if (!elem)
 		return -ENOMEM;