Lines Matching refs:dlc
257 static inline int snd_soc_dlc_component_is_empty(struct snd_soc_dai_link_component *dlc) in snd_soc_dlc_component_is_empty() argument
259 return !(dlc->dai_args || dlc->name || dlc->of_node); in snd_soc_dlc_component_is_empty()
262 static inline int snd_soc_dlc_component_is_invalid(struct snd_soc_dai_link_component *dlc) in snd_soc_dlc_component_is_invalid() argument
264 return (dlc->name && dlc->of_node); in snd_soc_dlc_component_is_invalid()
267 static inline int snd_soc_dlc_dai_is_empty(struct snd_soc_dai_link_component *dlc) in snd_soc_dlc_dai_is_empty() argument
269 return !(dlc->dai_args || dlc->dai_name); in snd_soc_dlc_dai_is_empty()
272 static int snd_soc_is_matching_dai(const struct snd_soc_dai_link_component *dlc, in snd_soc_is_matching_dai() argument
275 if (!dlc) in snd_soc_is_matching_dai()
278 if (dlc->dai_args) in snd_soc_is_matching_dai()
279 return snd_soc_is_match_dai_args(dai->driver->dai_args, dlc->dai_args); in snd_soc_is_matching_dai()
281 if (!dlc->dai_name) in snd_soc_is_matching_dai()
286 if (strcmp(dlc->dai_name, dai->name) == 0) in snd_soc_is_matching_dai()
290 strcmp(dai->driver->name, dlc->dai_name) == 0) in snd_soc_is_matching_dai()
294 strcmp(dlc->dai_name, dai->component->name) == 0) in snd_soc_is_matching_dai()
826 const struct snd_soc_dai_link_component *dlc, in snd_soc_is_matching_component() argument
831 if (!dlc) in snd_soc_is_matching_component()
834 if (dlc->dai_args) { in snd_soc_is_matching_component()
838 if (snd_soc_is_matching_dai(dlc, dai)) in snd_soc_is_matching_component()
845 if (dlc->of_node && component_of_node != dlc->of_node) in snd_soc_is_matching_component()
847 if (dlc->name && strcmp(component->name, dlc->name)) in snd_soc_is_matching_component()
854 const struct snd_soc_dai_link_component *dlc) in soc_find_component() argument
869 if (snd_soc_is_matching_component(dlc, component)) in soc_find_component()
887 const struct snd_soc_dai_link_component *dlc) in snd_soc_find_dai() argument
896 if (snd_soc_is_matching_component(dlc, component)) in snd_soc_find_dai()
898 if (snd_soc_is_matching_dai(dlc, dai)) in snd_soc_find_dai()
906 const struct snd_soc_dai_link_component *dlc) in snd_soc_find_dai_with_mutex() argument
911 dai = snd_soc_find_dai(dlc); in snd_soc_find_dai_with_mutex()
922 struct snd_soc_dai_link_component *dlc; in soc_dai_link_sanity_check() local
925 for_each_link_codecs(link, i, dlc) { in soc_dai_link_sanity_check()
930 if (snd_soc_dlc_component_is_invalid(dlc)) in soc_dai_link_sanity_check()
933 if (snd_soc_dlc_component_is_empty(dlc)) in soc_dai_link_sanity_check()
937 if (snd_soc_dlc_dai_is_empty(dlc)) in soc_dai_link_sanity_check()
944 if (!soc_find_component(dlc)) in soc_dai_link_sanity_check()
949 for_each_link_platforms(link, i, dlc) { in soc_dai_link_sanity_check()
955 if (snd_soc_dlc_component_is_invalid(dlc)) in soc_dai_link_sanity_check()
958 if (snd_soc_dlc_component_is_empty(dlc)) in soc_dai_link_sanity_check()
965 if (!soc_find_component(dlc)) in soc_dai_link_sanity_check()
970 for_each_link_cpus(link, i, dlc) { in soc_dai_link_sanity_check()
976 if (snd_soc_dlc_component_is_invalid(dlc)) in soc_dai_link_sanity_check()
980 if (snd_soc_dlc_component_is_empty(dlc)) { in soc_dai_link_sanity_check()
984 if (snd_soc_dlc_dai_is_empty(dlc)) in soc_dai_link_sanity_check()
990 if (!soc_find_component(dlc)) in soc_dai_link_sanity_check()
1006 dev_dbg(card->dev, "ASoC: Component %s not found for link %s\n", dlc->name, link->name); in soc_dai_link_sanity_check()
1407 if (snd_soc_is_matching_component(&map->dlc, component) && in soc_set_name_prefix()
1634 component = soc_find_component(&aux->dlc); in soc_bind_aux_dev()
3053 codec_conf->dlc.of_node = of_node; in snd_soc_of_parse_node_prefix()
3131 aux->dlc.of_node = of_parse_phandle(node, propname, i); in snd_soc_of_parse_aux_devs()
3132 if (!aux->dlc.of_node) in snd_soc_of_parse_aux_devs()
3344 struct snd_soc_dai_link_component dlc = { in snd_soc_get_dai_id() local
3358 component = soc_find_component(&dlc); in snd_soc_get_dai_id()
3363 of_node_put(dlc.of_node); in snd_soc_get_dai_id()
3369 int snd_soc_get_dlc(const struct of_phandle_args *args, struct snd_soc_dai_link_component *dlc) in snd_soc_get_dlc() argument
3381 ret = snd_soc_component_of_xlate_dai_name(pos, args, &dlc->dai_name); in snd_soc_get_dlc()
3412 dlc->dai_name = snd_soc_dai_name_get(dai); in snd_soc_get_dlc()
3427 dlc->of_node = args->np; in snd_soc_get_dlc()
3436 struct snd_soc_dai_link_component *dlc, in snd_soc_of_get_dlc() argument
3450 return snd_soc_get_dlc(args, dlc); in snd_soc_of_get_dlc()
3457 struct snd_soc_dai_link_component dlc; in snd_soc_get_dai_name() local
3458 int ret = snd_soc_get_dlc(args, &dlc); in snd_soc_get_dai_name()
3461 *dai_name = dlc.dai_name; in snd_soc_get_dai_name()
3470 struct snd_soc_dai_link_component dlc; in snd_soc_of_get_dai_name() local
3471 int ret = snd_soc_of_get_dlc(of_node, NULL, &dlc, index); in snd_soc_of_get_dai_name()
3474 *dai_name = dlc.dai_name; in snd_soc_of_get_dai_name()