Skip to content

Commit 409c759

Browse files
ranj063plbossart
authored andcommitted
fixup! ASoC: SOF: topology: Add ops for setting up and tearing down pipelines
The buffer <-> component restriction only applies to IPC3. So move it to the IPC-specific code. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent 20601ca commit 409c759

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

sound/soc/sof/ipc3-topology.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,6 +2112,14 @@ static int sof_ipc3_set_up_all_pipelines(struct snd_sof_dev *sdev, bool verify)
21122112
sroute->sink_widget->dynamic_pipeline_widget))
21132113
continue;
21142114

2115+
/*
2116+
* For virtual routes, both sink and source are not buffer. IPC3 only supports
2117+
* connections between a buffer and a component. Ignore the rest.
2118+
*/
2119+
if (sroute->src_widget->id != snd_soc_dapm_buffer &&
2120+
sroute->sink_widget->id != snd_soc_dapm_buffer)
2121+
continue;
2122+
21152123
ret = sof_route_setup(sdev, sroute->src_widget->widget,
21162124
sroute->sink_widget->widget);
21172125
if (ret < 0) {

sound/soc/sof/topology.c

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,29 +1782,15 @@ static int sof_route_load(struct snd_soc_component *scomp, int index,
17821782
sink_swidget->id == snd_soc_dapm_output)
17831783
goto err;
17841784

1785-
/*
1786-
* For virtual routes, both sink and source are not
1787-
* buffer. Since only buffer linked to component is supported by
1788-
* FW, others are reported as error, add check in route function,
1789-
* do not send it to FW when both source and sink are not buffer
1790-
*/
1791-
if (source_swidget->id != snd_soc_dapm_buffer &&
1792-
sink_swidget->id != snd_soc_dapm_buffer) {
1793-
dev_dbg(scomp->dev, "warning: neither Linked source component %s nor sink component %s is of buffer type, ignoring link\n",
1794-
route->source, route->sink);
1795-
goto err;
1796-
} else {
1797-
sroute->route = route;
1798-
dobj->private = sroute;
1799-
sroute->src_widget = source_swidget;
1800-
sroute->sink_widget = sink_swidget;
1785+
sroute->route = route;
1786+
dobj->private = sroute;
1787+
sroute->src_widget = source_swidget;
1788+
sroute->sink_widget = sink_swidget;
18011789

1802-
/* add route to route list */
1803-
list_add(&sroute->list, &sdev->route_list);
1804-
1805-
return 0;
1806-
}
1790+
/* add route to route list */
1791+
list_add(&sroute->list, &sdev->route_list);
18071792

1793+
return 0;
18081794
err:
18091795
kfree(sroute);
18101796
return ret;

0 commit comments

Comments
 (0)