ASoC: dapm - Add API call to query valid DAPM paths.
PATCH v2 1/1 ASoC: dapm - Add API call to query valid DAPM paths.
In preparation for ASoC DSP support.
Add a DAPM API call to determine whether a DAPM audio path is valid between source and sink widgets. This also takes into account all kcontrol mux and mixer settings in between the source and sink widgets to validate the audio path.
This will be used by the DSP core to determine the runtime DAI mappings between FE and BE DAIs in order to run PCM operations.
---
Changes since V1:-
Now uses new DAPM mutex.
Tracepoint used for path debug.
include/sound/soc-dapm.h | 5 ++ include/trace/events/asoc.h | 80 ++++++++++++++++++++++++++++ sound/soc/soc-dapm.c | 122 +++++++++++++++++++++++++++++++++++++++---- 3 files changed, 197 insertions(+), 10 deletions(-)
include/sound/soc-dapm.h +5 -0
@@ -321,6 +321,7 @@ struct snd_soc_dapm_pin;struct snd_soc_dapm_route ;struct snd_soc_dapm_context ;struct regulator ; +struct snd_soc_dapm_widget_list ;int dapm_reg_event (struct snd_soc_dapm_widget *w,struct snd_kcontrol *kcontrol,int event);
@@ -403,6 +404,10 @@ void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);/* Mostly internal - should not normally be used */ void dapm_mark_dirty (struct snd_soc_dapm_widget *w,const char *reason); +/* dapm path query */ +int snd_soc_dapm_dai_get_connected_widgets (struct snd_soc_dai *dai,int stream, +struct snd_soc_dapm_widget_list **list); +/* dapm widget types */ enum snd_soc_dapm_type { snd_soc_dapm_input =0 ,/* input pin */
include/trace/events/asoc.h +80 -0
92 lines not on this page · raw message
sound/soc/soc-dapm.c +112 -10
186 lines not on this page · raw message
Signature · 1 line
1.7.5.4
Mark Brown
AppliedQuoted 5 lines · Liam Girdwood
In preparation for ASoC DSP support.
Add a DAPM API call to determine whether a DAPM audio path is valid between source and sink widgets. This also takes into account all kcontrol mux and mixer settings in between the source and sink widgets to validate the audio path.
Applied, thanks.