diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-22 14:28:25 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-22 14:28:25 +0100 |
commit | 6234eabf84d6dcb2e28d4fdae43029c04c1bbc46 (patch) | |
tree | 3d451ebd41c9cabb206fd3033f135e943de04da6 /sound/soc/soc-core.c | |
parent | ece59528fa0318825a23a7c297b2fe8cddfca0a2 (diff) | |
parent | 92bb4c32708ee3e1d6eb0e185d678dab35152daf (diff) | |
download | linux-6234eabf84d6dcb2e28d4fdae43029c04c1bbc46.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index b5c91f9aa160..046f8778f2b8 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2452,6 +2452,22 @@ static int snd_soc_add_controls(struct snd_card *card, struct device *dev, return 0; } +struct snd_kcontrol *snd_soc_card_get_kcontrol(struct snd_soc_card *soc_card, + const char *name) +{ + struct snd_card *card = soc_card->snd_card; + struct snd_kcontrol *kctl; + + if (unlikely(!name)) + return NULL; + + list_for_each_entry(kctl, &card->controls, list) + if (!strncmp(kctl->id.name, name, sizeof(kctl->id.name))) + return kctl; + return NULL; +} +EXPORT_SYMBOL_GPL(snd_soc_card_get_kcontrol); + /** * snd_soc_add_codec_controls - add an array of controls to a codec. * Convenience function to add a list of controls. Many codecs were |