topology: Revise document and comments for ABI v5

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 <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2016-11-16 14:43:07 +08:00 committed by Takashi Iwai
parent 75626fec50
commit fa7a52e636
2 changed files with 15 additions and 32 deletions

View file

@ -40,9 +40,10 @@ extern "C" {
* currently recognises the following object types :- * currently recognises the following object types :-
* *
* * Controls (mixer, enumerated and byte) including TLV data. * * Controls (mixer, enumerated and byte) including TLV data.
* * PCMs (FE and BE configurations and capabilities) * * PCMs (Front End DAI & DAI link)
* * DAPM widgets * * DAPM widgets
* * DAPM graph elements. * * DAPM graph elements.
* * Physical DAI & DAI links
* * Private data for each object type. * * Private data for each object type.
* * Manifest (containing count of each object type) * * Manifest (containing count of each object type)
* *
@ -511,8 +512,8 @@ extern "C" {
* refer to section Control Private Data. * refer to section Control Private Data.
* *
* <h4>PCM Capabilities</h4> * <h4>PCM Capabilities</h4>
* Topology can also define the capabilities of FE and BE PCMs. Capabilities * Topology can also define the PCM capabilities of front end or physical DAIs.
* can be defined with the following section :- * Capabilities can be defined with the following section :-
* *
* <pre> * <pre>
* SectionPCMCapabilities."name" { * SectionPCMCapabilities."name" {
@ -525,8 +526,8 @@ extern "C" {
* } * }
* </pre> * </pre>
* The supported formats use the same naming convention as the driver macros. * 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 * The PCM capabilities name can be referred to and included by PCM and
* Codec <-> codec topology sections. * physical DAI sections.
* *
* <h4>PCM Configurations</h4> * <h4>PCM Configurations</h4>
* PCM runtime configurations can be defined for playback and capture stream * PCM runtime configurations can be defined for playback and capture stream
@ -552,31 +553,14 @@ extern "C" {
* </pre> * </pre>
* *
* The supported formats use the same naming convention as the driver macros. * 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 * The PCM configuration name can be referred to and included by PCM and
* Codec <-> codec topology sections. * physical link sections.
* *
* <h4>PCM Configurations</h4> * <h4>PCM (Front-end DAI & DAI link) </h4>
* PCM, BE and Codec to Codec link sections define the supported capabilities * PCM sections define the supported capabilities and configurations for
* and configurations for supported playback and capture streams. The * supported playback and capture streams, names and flags for front end
* definitions and content for PCMs, BE and Codec links are the same with the * DAI & DAI links. Topology kernel driver will use a PCM object to create
* exception of the section type :- * a pair of FE DAI & DAI links.
*
* <pre>
* SectionPCM."name" {
* ....
* }
* SectionBE."name" {
* ....
* }
* SectionCC."name" {
* ....
* }
* </pre>
*
* The section types above should be used for PCMs, Back Ends and Codec to Codec
* links respectively.<br>
*
* The data for each section is defined as follows :-
* *
* <pre> * <pre>
* SectionPCM."name" { * SectionPCM."name" {
@ -1031,7 +1015,7 @@ struct snd_tplg_dai_template {
}; };
/** \struct snd_tplg_link_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 { struct snd_tplg_link_template {
const char *name; /*!< link name, used to match */ 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_enum_template *enum_ctl; /*!< Enum control */
struct snd_tplg_graph_template *graph; /*!< Graph elements */ struct snd_tplg_graph_template *graph; /*!< Graph elements */
struct snd_tplg_pcm_template *pcm; /*!< PCM 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 */ struct snd_tplg_dai_template *dai; /*!< Physical DAI */
}; };
} snd_tplg_obj_template_t; } snd_tplg_obj_template_t;

View file

@ -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) && t->type != SND_TPLG_TYPE_CC)
return -EINVAL; return -EINVAL;
/* here type can be either BE or CC. */
elem = tplg_elem_new_common(tplg, NULL, link_tpl->name, t->type); elem = tplg_elem_new_common(tplg, NULL, link_tpl->name, t->type);
if (!elem) if (!elem)
return -ENOMEM; return -ENOMEM;