[alsa-devel] [PATCH 1/2] ASoC: dapm: Export dapm_kcontrol_set_value() so it can be used by drivers
Peter Ujfalusi
peter.ujfalusi at ti.com
Tue May 27 12:53:05 CEST 2014
Drivers needing special put dapm callbacks need to use this function to
update the state of the kcontrol associated with the widget.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
---
include/sound/soc-dapm.h | 3 +++
sound/soc/soc-dapm.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 6b59471cdf44..f31b323fe799 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -440,6 +440,9 @@ void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm);
int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
struct snd_soc_dapm_widget_list **list);
+bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
+ unsigned int value);
+
struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol);
/* dapm widget types */
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index a74b9bf23d9f..a3df05d1f22e 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -333,7 +333,7 @@ static unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol)
return data->value;
}
-static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
+bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
unsigned int value)
{
struct dapm_kcontrol_data *data = snd_kcontrol_chip(kcontrol);
@@ -348,6 +348,7 @@ static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
return true;
}
+EXPORT_SYMBOL_GPL(dapm_kcontrol_set_value);
/**
* snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol
--
1.9.3
More information about the Alsa-devel
mailing list