summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-02-03 14:43:55 +0000
committerMark Brown <broonie@kernel.org>2023-02-03 14:43:55 +0000
commitcfe4585d7f5a6eaa56b7cebaed04bdcd4a7cab86 (patch)
tree178b10daafadcaf72bedab253c1b481bccaba439
parent96ebccb2356da5f28726746e53719c5f494e08a7 (diff)
parentdd184c400e10295631e5742fc7318ba071c67007 (diff)
ASoC: (SOF) topology: Regression fixes for next
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: Today I came across two regressions in next with SOF: The topology would not load with a failure of creating playback DAI the first patch is fixing this which was caused by a missing 'else' in the patch After fixing the topology loading, the module unloading caused kernel panic. The second patch is correcting that which is I likely caused by copy-paste to set wrong unload callback for the graph element. With these patches applied SOF is working on next and modules can be unloaded
-rw-r--r--sound/soc/soc-topology.c2
-rw-r--r--sound/soc/sof/topology.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index caf547816ea7..78223603088e 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1081,7 +1081,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
/* add route dobj to dobj_list */
route->dobj.type = SND_SOC_DOBJ_GRAPH;
if (tplg->ops)
- route->dobj.unload = tplg->ops->control_unload;
+ route->dobj.unload = tplg->ops->dapm_route_unload;
route->dobj.index = tplg->index;
list_add(&route->dobj.list, &tplg->comp->dobj_list);
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 3cfdf782afca..4a62ccc71fcb 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1065,7 +1065,7 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
if (w->id == snd_soc_dapm_dai_out)
stream = SNDRV_PCM_STREAM_CAPTURE;
- if (w->id == snd_soc_dapm_dai_in)
+ else if (w->id == snd_soc_dapm_dai_in)
stream = SNDRV_PCM_STREAM_PLAYBACK;
else
goto end;