All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
@ 2017-06-06 14:44 Liam Girdwood
  2017-06-07 19:23 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Girdwood @ 2017-06-06 14:44 UTC (permalink / raw)
  To: Mark Brown; +Cc: Liam Girdwood, alsa-devel

Add some DAPM widget types to better support the construction of DAPM
graphs within DSPs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 include/sound/soc-dapm.h  | 6 ++++++
 include/uapi/sound/asoc.h | 9 ++++++++-
 sound/soc/soc-topology.c  | 7 +++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index a466f4bdc835..f142dace1c14 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -510,6 +510,12 @@ enum snd_soc_dapm_type {
 	snd_soc_dapm_dai_out,
 	snd_soc_dapm_dai_link,		/* link between two DAI structures */
 	snd_soc_dapm_kcontrol,		/* Auto-disabled kcontrol */
+	snd_soc_dapm_buffer,		/* DSP/CODEC internal buffer */
+	snd_soc_dapm_pipeline,		/* DSP/CODEC internal pipeline */
+	snd_soc_dapm_effect,		/* DSP/CODEC effect component */
+	snd_soc_dapm_src,		/* DSP/CODEC SRC component */
+	snd_soc_dapm_asrc,		/* DSP/CODEC ASRC component */
+	snd_soc_dapm_codec,		/* FW/SW coder/decoder component */
 };
 
 enum snd_soc_dapm_subclass {
diff --git a/include/uapi/sound/asoc.h b/include/uapi/sound/asoc.h
index 6702533c8bd8..b8993b3c55c6 100644
--- a/include/uapi/sound/asoc.h
+++ b/include/uapi/sound/asoc.h
@@ -73,7 +73,14 @@
 #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_PIPELINE	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_CODEC		22
+#define SND_SOC_TPLG_DAPM_LAST		SND_SOC_TPLG_DAPM_CODEC
 
 /* Header magic number and string sizes */
 #define SND_SOC_TPLG_MAGIC		0x41536F43 /* ASoC */
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index e10dc353621a..468e74640570 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -242,6 +242,13 @@ static const struct soc_tplg_map dapm_map[] = {
 	{SND_SOC_TPLG_DAPM_DAI_IN, snd_soc_dapm_dai_in},
 	{SND_SOC_TPLG_DAPM_DAI_OUT, snd_soc_dapm_dai_out},
 	{SND_SOC_TPLG_DAPM_DAI_LINK, snd_soc_dapm_dai_link},
+	{SND_SOC_TPLG_DAPM_BUFFER, snd_soc_dapm_buffer},
+	{SND_SOC_TPLG_DAPM_PIPELINE, snd_soc_dapm_pipeline},
+	{SND_SOC_TPLG_DAPM_EFFECT, snd_soc_dapm_effect},
+	{SND_SOC_TPLG_DAPM_SIGGEN, snd_soc_dapm_siggen},
+	{SND_SOC_TPLG_DAPM_SRC, snd_soc_dapm_src},
+	{SND_SOC_TPLG_DAPM_ASRC, snd_soc_dapm_asrc},
+	{SND_SOC_TPLG_DAPM_CODEC, snd_soc_dapm_codec},
 };
 
 static int tplc_chan_get_reg(struct soc_tplg *tplg,
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
  2017-06-06 14:44 [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs Liam Girdwood
@ 2017-06-07 19:23 ` Mark Brown
  2017-06-07 20:00   ` Liam Girdwood
  2017-06-07 21:23   ` Pierre-Louis Bossart
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2017-06-07 19:23 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 694 bytes --]

On Tue, Jun 06, 2017 at 03:44:42PM +0100, Liam Girdwood wrote:

> +	snd_soc_dapm_buffer,		/* DSP/CODEC internal buffer */
> +	snd_soc_dapm_pipeline,		/* DSP/CODEC internal pipeline */
> +	snd_soc_dapm_effect,		/* DSP/CODEC effect component */

What's the difference between a buffer and a pipeline, or between a
pipeline and an effect?  We should have clear documentation, if they're
different we're probably going to end up using them differently in the
core at some point and if people use the wrong widget type it might end
up breaking things.

> +	snd_soc_dapm_codec,		/* FW/SW coder/decoder component */

Can we call this a fmt_conv or something?  CODEC is unfortunately a bit
overloaded.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
  2017-06-07 19:23 ` Mark Brown
@ 2017-06-07 20:00   ` Liam Girdwood
  2017-06-07 21:23   ` Pierre-Louis Bossart
  1 sibling, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2017-06-07 20:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

On Wed, 2017-06-07 at 20:23 +0100, Mark Brown wrote:
> On Tue, Jun 06, 2017 at 03:44:42PM +0100, Liam Girdwood wrote:
> 
> > +	snd_soc_dapm_buffer,		/* DSP/CODEC internal buffer */
> > +	snd_soc_dapm_pipeline,		/* DSP/CODEC internal pipeline */
> > +	snd_soc_dapm_effect,		/* DSP/CODEC effect component */
> 
> What's the difference between a buffer and a pipeline, or between a
> pipeline and an effect?  We should have clear documentation, if they're
> different we're probably going to end up using them differently in the
> core at some point and if people use the wrong widget type it might end
> up breaking things.

Yes, that's a good point. I'll do a V2 that includes some documentation.

> 
> > +	snd_soc_dapm_codec,		/* FW/SW coder/decoder component */
> 
> Can we call this a fmt_conv or something?  CODEC is unfortunately a bit
> overloaded.

True, what about snd_soc_dapm_media_codec ? or _sw_codec ? or
_media_decoder ?

Liam

> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
  2017-06-07 19:23 ` Mark Brown
  2017-06-07 20:00   ` Liam Girdwood
@ 2017-06-07 21:23   ` Pierre-Louis Bossart
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2017-06-07 21:23 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel

On 6/7/17 2:23 PM, Mark Brown wrote:
> On Tue, Jun 06, 2017 at 03:44:42PM +0100, Liam Girdwood wrote:
>
>> +	snd_soc_dapm_buffer,		/* DSP/CODEC internal buffer */
>> +	snd_soc_dapm_pipeline,		/* DSP/CODEC internal pipeline */
>> +	snd_soc_dapm_effect,		/* DSP/CODEC effect component */
>
> What's the difference between a buffer and a pipeline, or between a
> pipeline and an effect?  We should have clear documentation, if they're
> different we're probably going to end up using them differently in the
> core at some point and if people use the wrong widget type it might end
> up breaking things.

it would be good to explain how those elements are organized. Usually an 
effect/src/asrc is part of a pipeline, it's almost a subgraph within the 
flat dapm structure

>
>> +	snd_soc_dapm_codec,		/* FW/SW coder/decoder component */
>
> Can we call this a fmt_conv or something?  CODEC is unfortunately a bit
> overloaded.
>
>
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-07 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06 14:44 [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs Liam Girdwood
2017-06-07 19:23 ` Mark Brown
2017-06-07 20:00   ` Liam Girdwood
2017-06-07 21:23   ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.