diff options
author | Mythri P K <mythri.p.k@intel.com> | 2015-10-20 19:00:08 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-10-22 16:23:23 +0200 |
commit | 93e39a11520c000c9086215460bf27b35b09c724 (patch) | |
tree | cfbda8eca521c3f84ebc79170d57c62991f877b3 /sound/soc/soc-dapm.c | |
parent | ASoC: dapm: Add startup & shutdown for dai_links (diff) | |
download | linux-93e39a11520c000c9086215460bf27b35b09c724.tar.xz linux-93e39a11520c000c9086215460bf27b35b09c724.zip |
ASoC: dapm: Add snd_soc_dapm_kcontrol_widget()
Given a kcontrol, we may want to access the parent widget
and it's associated data. So export function to return it.
Signed-off-by: Mythri P K <mythri.p.k@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index a28d6a10bad0..38281c2325ff 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -509,6 +509,18 @@ static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol, } /** + * snd_soc_dapm_kcontrol_widget() - Returns the widget associated to a + * kcontrol + * @kcontrol: The kcontrol + */ +struct snd_soc_dapm_widget *snd_soc_dapm_kcontrol_widget( + struct snd_kcontrol *kcontrol) +{ + return dapm_kcontrol_get_wlist(kcontrol)->widgets[0]; +} +EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_widget); + +/** * snd_soc_dapm_kcontrol_dapm() - Returns the dapm context associated to a * kcontrol * @kcontrol: The kcontrol |