ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
Subsystems (3)
PATCH v4 1/1 ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
Add some DAPM widget types to better support the construction of DAPM graphs within DSPs.
---
Chnages V3.
o Go back to the original widget type plan and replace pipeline with scheduler widget.
Changes V2.
o No need for multiple types since core does not care.
Changes v1.
o Added some documentation.
o Split codec widget into encoder and decoder to avoid confusion with HW CODECS.
Documentation/sound/soc/dapm.rst | 18 ++++++++++++++++++ include/sound/soc-dapm.h | 7 +++++++ include/uapi/sound/asoc.h | 10 +++++++++- sound/soc/soc-topology.c | 8 ++++++++ 4 files changed, 42 insertions(+), 1 deletion(-)
Documentation/sound/soc/dapm.rst +18 -0
@@ -105,6 +105,24 @@ Pre Special PRE widget (exec before all others) Post Special POST widget (exec after all others) +Buffer + Inter widget audio data buffer within a DSP. +Scheduler + DSP internal scheduler that schedules component/pipeline processing + work. +Effect + Widget that performs an audio processing effect. +SRC + Sample Rate Converter within DSP or CODEC +ASRC + Asynchronous Sample Rate Converter within DSP or CODEC +Encoder + Widget that encodes audio data from one format (usually PCM) to another + usually more compressed format. +Decoder + Widget that decodes audio data from a compressed format to an + uncompressed format like PCM. + (Widgets are defined in include/sound/soc-dapm.h)
include/sound/soc-dapm.h +7 -0
@@ -510,6 +510,13 @@ 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_scheduler,/* DSP/CODEC internal scheduler */ + 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_encoder,/* FW/SW audio encoder component */ + snd_soc_dapm_decoder, /* FW/SW audio decoder component */ }; enum snd_soc_dapm_subclass {
include/uapi/sound/asoc.h +9 -1
@@ -73,7 +73,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 */
sound/soc/soc-topology.c +8 -0
@@ -242,6 +242,14 @@ 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_SCHEDULER, snd_soc_dapm_scheduler}, + {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_ENCODER, snd_soc_dapm_encoder}, + {SND_SOC_TPLG_DAPM_DECODER, snd_soc_dapm_decoder}, }; static int tplc_chan_get_reg(struct soc_tplg *tplg,
Signature · 1 line
2.11.0
PATCH 1/1 ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during load
SND_SOC_TPLG_INDEX_ALL is used by drivers to tell the core to load all topology component indexes, not just the index in the header. Fix this so that SND_SOC_TPLG_INDEX_ALL will load all components no matter their index.
--- sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-topology.c +1 -1
@@ -2389,7 +2389,7 @@ static int soc_tplg_load_header(struct soc_tplg *tplg,/* check for matching ID */ if (hdr->index != tplg->req_index && - hdr->index !=SND_SOC_TPLG_INDEX_ALL ) + tplg->req_index !=SND_SOC_TPLG_INDEX_ALL )return 0 ; tplg->index = hdr->index;
Signature · 1 line
2.11.0
Mark Brown
maintainerApplied "ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during load" to the asoc tree
The patch
ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during load
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
bb97142bcf8c042103e87d035a120f522d12e788Mon Sep 17 00:00:00 2001
From: Liam Girdwood <[email protected]>
Date: Thu, 29 Jun 2017 14:22:25 +0100
Subject: [PATCH] ASoC: topology: Fix usage of SND_SOC_TPLG_INDEX_ALL during
load
SND_SOC_TPLG_INDEX_ALL is used by drivers to tell the core to load all topology component indexes, not just the index in the header. Fix this so that SND_SOC_TPLG_INDEX_ALL will load all components no matter their index.
--- sound/soc/soc-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-topology.c +1 -1
@@ -2381,7 +2381,7 @@ static int soc_tplg_load_header(struct soc_tplg *tplg,/* check for matching ID */ if (hdr->index != tplg->req_index && - hdr->index !=SND_SOC_TPLG_INDEX_ALL ) + tplg->req_index !=SND_SOC_TPLG_INDEX_ALL )return 0 ; tplg->index = hdr->index;
Signature · 1 line
2.13.2
PATCH 1/1 ASoC: topology: show index in debug when adding DAPM routes
In reply to Liam GirdwoodMakes the debug output much more useful.
--- sound/soc/soc-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/soc-topology.c +2 -1
@@ -1171,7 +1171,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,return -EINVAL ; } -dev_dbg (tplg->dev,"ASoC: adding %d DAPM routes\n" , count); +dev_dbg (tplg->dev,"ASoC: adding %d DAPM routes for index %d\n" , count, + hdr->index);for (i =0 ; i < count; i++) { elem = (struct snd_soc_tplg_dapm_graph_elem *)tplg->pos;
Signature · 1 line
2.11.0
Mark Brown
maintainerApplied "ASoC: topology: show index in debug when adding DAPM routes" to the asoc tree
The patch
ASoC: topology: show index in debug when adding DAPM routes
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
b75a65118d287aadeade8b106ed0da7b5e42c167Mon Sep 17 00:00:00 2001
From: Liam Girdwood <[email protected]>
Date: Thu, 29 Jun 2017 14:22:26 +0100
Subject: [PATCH] ASoC: topology: show index in debug when adding DAPM routes
Makes the debug output much more useful.
--- sound/soc/soc-topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/soc-topology.c +2 -1
@@ -1163,7 +1163,8 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,return -EINVAL ; } -dev_dbg (tplg->dev,"ASoC: adding %d DAPM routes\n" , count); +dev_dbg (tplg->dev,"ASoC: adding %d DAPM routes for index %d\n" , count, + hdr->index);for (i =0 ; i < count; i++) { elem = (struct snd_soc_tplg_dapm_graph_elem *)tplg->pos;
Signature · 1 line
2.13.2
Mark Brown
maintainerApplied "ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs." to the asoc tree
In reply to Liam GirdwoodThe patch
ASoC: dapm: Add new widget type for constructing DAPM graphs on DSPs.
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 1 line
From
8a70b4544ef4f094cc2c52734e097cc358f56603Mon Sep 17 00:00:00 2001
From: Liam Girdwood <[email protected]>
Date: Thu, 29 Jun 2017 14:22:24 +0100
Subject: [PATCH] ASoC: dapm: Add new widget type for constructing DAPM graphs
on DSPs.
Add some DAPM widget types to better support the construction of DAPM graphs within DSPs.
--- Documentation/sound/soc/dapm.rst | 18 ++++++++++++++++++ include/sound/soc-dapm.h | 7 +++++++ include/uapi/sound/asoc.h | 10 +++++++++- sound/soc/soc-topology.c | 8 ++++++++ 4 files changed, 42 insertions(+), 1 deletion(-)
Documentation/sound/soc/dapm.rst +18 -0
@@ -105,6 +105,24 @@ Pre Special PRE widget (exec before all others) Post Special POST widget (exec after all others) +Buffer + Inter widget audio data buffer within a DSP. +Scheduler + DSP internal scheduler that schedules component/pipeline processing + work. +Effect + Widget that performs an audio processing effect. +SRC + Sample Rate Converter within DSP or CODEC +ASRC + Asynchronous Sample Rate Converter within DSP or CODEC +Encoder + Widget that encodes audio data from one format (usually PCM) to another + usually more compressed format. +Decoder + Widget that decodes audio data from a compressed format to an + uncompressed format like PCM. + (Widgets are defined in include/sound/soc-dapm.h)
include/sound/soc-dapm.h +7 -0
@@ -510,6 +510,13 @@ 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_scheduler,/* DSP/CODEC internal scheduler */ + 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_encoder,/* FW/SW audio encoder component */ + snd_soc_dapm_decoder, /* FW/SW audio decoder component */ }; enum snd_soc_dapm_subclass {
include/uapi/sound/asoc.h +9 -1
@@ -73,7 +73,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 */
sound/soc/soc-topology.c +8 -0
@@ -242,6 +242,14 @@ 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_SCHEDULER, snd_soc_dapm_scheduler}, + {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_ENCODER, snd_soc_dapm_encoder}, + {SND_SOC_TPLG_DAPM_DECODER, snd_soc_dapm_decoder}, }; static int tplc_chan_get_reg(struct soc_tplg *tplg,
Signature · 1 line
2.13.2