alsalib: topology: Add support for new widget types
PATCH 1/1 alsalib: topology: Add support for new widget types
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 <[email protected]>
---
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(-)
include/sound/asoc.h +9 -1
@@ -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 */
src/topology/dapm.c +8 -0
@@ -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)
Signature · 1 line
2.11.0
PATCH 1/1 alsa-lib: topology: improve verbose output for block output.
Show index and full DAPm route in verbose output.
Signed-off-by Liam Girdwood <[email protected]>
--- src/topology/builder.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
src/topology/builder.c +8 -5
@@ -67,9 +67,10 @@ static int write_block_header(snd_tplg_t *tplg, unsigned int type,exit (-EINVAL ); } -verbose (tplg," header type %d size 0x%lx/%ld vendor %d " -"version %d\n" , type, (long unsigned int )payload_size, - (long int )payload_size, vendor_type, version); +verbose (tplg," header index %d type %d count %d size 0x%lx/%ld vendor %d " +"version %d\n" , index, type, count, + (long unsigned int )payload_size, (long int )payload_size, + vendor_type, version); tplg->next_hdr_pos += hdr.payload_size +sizeof (hdr);
@@ -119,8 +120,10 @@ static int write_elem_block(snd_tplg_t *tplg,verbose (tplg," %s '%s': write %d bytes\n" , obj_name, elem->id, elem->size); else - verbose(tplg, " %s '%s': write %d bytes\n", - obj_name, elem->route->source, elem->size); + verbose(tplg, " %s '%s -> %s -> %s': write %d bytes\n", + obj_name, elem->route->source, + elem->route->control, + elem->route->sink, elem->size); wsize =write (tplg->out_fd, elem->obj, elem->size);if (wsize <0 ) {
Signature · 1 line
2.11.0
Takashi Iwai
AppliedRe: [PATCH] alsa-lib: topology: improve verbose output for block output.
Quoted 4 lines · Liam Girdwood
Show index and full DAPm route in verbose output.
Signed-off-by Liam Girdwood <[email protected]>
Applied, thanks.
Takashi
Quoted 43 lines
--- src/topology/builder.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)src/topology/builder.c +8
-5@@ -67,9 +67,10 @@ static int write_block_header(snd_tplg_t *tplg, unsigned int type,exit (-EINVAL ); } -verbose (tplg," header type %d size 0x%lx/%ld vendor %d " -"version %d\n" , type, (long unsigned int )payload_size, - (long int )payload_size, vendor_type, version); +verbose (tplg," header index %d type %d count %d size 0x%lx/%ld vendor %d " +"version %d\n" , index, type, count, + (long unsigned int )payload_size, (long int )payload_size, + vendor_type, version); tplg->next_hdr_pos += hdr.payload_size +sizeof (hdr);@@ -119,8 +120,10 @@ static int write_elem_block(snd_tplg_t *tplg,verbose (tplg," %s '%s': write %d bytes\n" , obj_name, elem->id, elem->size); else - verbose(tplg, " %s '%s': write %d bytes\n", - obj_name, elem->route->source, elem->size); + verbose(tplg, " %s '%s -> %s -> %s': write %d bytes\n", + obj_name, elem->route->source, + elem->route->control, + elem->route->sink, elem->size); wsize =write (tplg->out_fd, elem->obj, elem->size);if (wsize <0 ) {Signature · 6 lines
2.11.0 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Takashi Iwai
AppliedQuoted 5 lines · Liam Girdwood
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 <[email protected]>
Applied, thanks.
Takashi
Quoted 56 lines
---
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(-)include/sound/asoc.h +9
-1@@ -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 */ src/topology/dapm.c +8
-0@@ -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)Signature · 6 lines
2.11.0 _______________________________________________ Alsa-devel mailing list [email protected] http://mailman.alsa-project.org/mailman/listinfo/alsa-devel