ASoC: dsp: Workaround to prevent incidental activation of back-end link
It was found that when a front-end link is being derouted from a
back-end. DSP framework errorneously starts of other front-end
link if there is a path linking this particular front-end link to
back-end link. This workaround checks runtime pointer. Only if
front end link runtime pointer is allocated will linking process
go through
Signed-off-by: Patrick Lai <plai@codeaurora.org>
diff --git a/sound/soc/soc-dsp.c b/sound/soc/soc-dsp.c
index 77eda32..7f78213 100644
--- a/sound/soc/soc-dsp.c
+++ b/sound/soc/soc-dsp.c
@@ -43,6 +43,11 @@
{
struct snd_soc_dsp_params *dsp_params;
+ if (!fe->dsp[stream].runtime) {
+ dev_err(&fe->dev, "%s no runtime\n", fe->dai_link->name);
+ return -ENODEV;
+ }
+
/* only add new dsp_paramss */
list_for_each_entry(dsp_params, &fe->dsp[stream].be_clients, list_be) {
if (dsp_params->be == be && dsp_params->fe == fe)