From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> simple-card is supporting widgets. This patch makes this method simple style standard. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- include/sound/simple_card_core.h | 2 ++ sound/soc/generic/simple-card-core.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/include/sound/simple_card_core.h b/include/sound/simple_card_core.h index 89172aa..d66b536 100644 --- a/include/sound/simple_card_core.h +++ b/include/sound/simple_card_core.h @@ -37,5 +37,7 @@ int asoc_simple_card_parse_card_prefix(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link, struct snd_soc_codec_conf *codec_conf, char *prefix); +int asoc_simple_card_parse_card_route(struct snd_soc_card *card, + char *prefix); #endif /* __SIMPLE_CARD_CORE_H */ diff --git a/sound/soc/generic/simple-card-core.c b/sound/soc/generic/simple-card-core.c index bc1f2a9..bfe3bf4 100644 --- a/sound/soc/generic/simple-card-core.c +++ b/sound/soc/generic/simple-card-core.c @@ -142,3 +142,19 @@ int asoc_simple_card_parse_card_prefix(struct snd_soc_card *card, return 0; } EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_prefix); + +int asoc_simple_card_parse_card_route(struct snd_soc_card *card, + char *prefix) +{ + struct device_node *np = card->dev->of_node; + char prop[128]; + int ret = 0; + + snprintf(prop, sizeof(prop), "%srouting", prefix); + + if (of_property_read_bool(np, prop)) + ret = snd_soc_of_parse_audio_routing(card, prop); + + return ret; +} +EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_route); -- 1.9.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel