alsalib: topology: Add support for new widget types
diff mbox

Message ID 1498828496-28897-1-git-send-email-liam.r.girdwood@linux.intel.com
State New
Headers show

Commit Message

Liam Girdwood June 30, 2017, 1:14 p.m. UTC
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 <liam.r.girdwood@linux.intel.com>
---

Kernel part now upstream in Mark's ASoC for-next branch.

 include/sound/asoc.h | 10 +++++++++-
 src/topology/dapm.c  |  8 ++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

Comments

Takashi Iwai June 30, 2017, 2:34 p.m. UTC | #1
On Fri, 30 Jun 2017 15:14:55 +0200,
Liam Girdwood wrote:
> 
> 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 <liam.r.girdwood@linux.intel.com>

Applied, thanks.


Takashi

> ---
> 
> Kernel part now upstream in Mark's ASoC for-next branch.
> 
>  include/sound/asoc.h | 10 +++++++++-
>  src/topology/dapm.c  |  8 ++++++++
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/include/sound/asoc.h b/include/sound/asoc.h
> index 082c5429..0f5d9f9a 100644
> --- a/include/sound/asoc.h
> +++ b/include/sound/asoc.h
> @@ -70,7 +70,15 @@
>  #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_SCHEDULER	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_ENCODER	22
> +#define SND_SOC_TPLG_DAPM_DECODER	23
> +#define SND_SOC_TPLG_DAPM_LAST		SND_SOC_TPLG_DAPM_DECODER
>  
>  /* 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..66892a66 100644
> --- a/src/topology/dapm.c
> +++ b/src/topology/dapm.c
> @@ -38,6 +38,14 @@ 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},
> +	{"scheduler", SND_SOC_TPLG_DAPM_SCHEDULER},
> +	{"effect", SND_SOC_TPLG_DAPM_EFFECT},
> +	{"siggen", SND_SOC_TPLG_DAPM_SIGGEN},
> +	{"src", SND_SOC_TPLG_DAPM_SRC},
> +	{"asrc", SND_SOC_TPLG_DAPM_ASRC},
> +	{"encoder", SND_SOC_TPLG_DAPM_ENCODER},
> +	{"decoder", SND_SOC_TPLG_DAPM_DECODER},
>  };
>  
>  static int lookup_widget(const char *w)
> -- 
> 2.11.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

Patch
diff mbox

diff --git a/include/sound/asoc.h b/include/sound/asoc.h
index 082c5429..0f5d9f9a 100644
--- a/include/sound/asoc.h
+++ b/include/sound/asoc.h
@@ -70,7 +70,15 @@ 
 #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_SCHEDULER	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_ENCODER	22
+#define SND_SOC_TPLG_DAPM_DECODER	23
+#define SND_SOC_TPLG_DAPM_LAST		SND_SOC_TPLG_DAPM_DECODER
 
 /* 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..66892a66 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -38,6 +38,14 @@  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},
+	{"scheduler", SND_SOC_TPLG_DAPM_SCHEDULER},
+	{"effect", SND_SOC_TPLG_DAPM_EFFECT},
+	{"siggen", SND_SOC_TPLG_DAPM_SIGGEN},
+	{"src", SND_SOC_TPLG_DAPM_SRC},
+	{"asrc", SND_SOC_TPLG_DAPM_ASRC},
+	{"encoder", SND_SOC_TPLG_DAPM_ENCODER},
+	{"decoder", SND_SOC_TPLG_DAPM_DECODER},
 };
 
 static int lookup_widget(const char *w)