Lines Matching refs:routes
438 /* remove a widget and it's kcontrols - routes must be removed first */
1199 struct snd_soc_dapm_route **routes;
1209 dev_err(tplg->dev, "ASoC: invalid count %d for DAPM routes\n",
1214 dev_dbg(tplg->dev, "ASoC: adding %d DAPM routes for index %d\n", count,
1217 /* allocate memory for pointer to array of dapm routes */
1218 routes = kcalloc(count, sizeof(struct snd_soc_dapm_route *),
1220 if (!routes)
1229 routes[i] = kzalloc(sizeof(*routes[i]), GFP_KERNEL);
1230 if (!routes[i]) {
1233 kfree(routes[j]);
1235 kfree(routes);
1244 /* validate routes */
1261 routes[i]->source = elem->source;
1262 routes[i]->sink = elem->sink;
1265 routes[i]->connected = NULL;
1267 routes[i]->control = NULL;
1269 routes[i]->control = elem->control;
1272 routes[i]->dobj.type = SND_SOC_DOBJ_GRAPH;
1273 routes[i]->dobj.ops = tplg->ops;
1274 routes[i]->dobj.index = tplg->index;
1275 list_add(&routes[i]->dobj.list, &tplg->comp->dobj_list);
1277 ret = soc_tplg_add_route(tplg, routes[i]);
1291 snd_soc_dapm_add_routes(dapm, routes[i], 1);
1295 * free memory allocated for all dapm routes not added to the
1300 kfree(routes[i++]);
1304 * free pointer to array of dapm routes as this is no longer needed.
1308 kfree(routes);