Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: add api for dapm kcontrol configiuration
@ 2014-05-26 12:08 Vinod Koul
  2014-05-26 12:08 ` [PATCH 2/2] ASoC: dapm: Add a helper to get the platform for DAPM kcontrol Vinod Koul
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Vinod Koul @ 2014-05-26 12:08 UTC (permalink / raw)
  To: alsa-devel; +Cc: Vinod Koul, Kp Jeeja, broonie, Subhransu S. Prusty, lgirdwood

From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>

For DSPs we need to set and get the value for snd_kcontrol. This is currently
done by dapm_kcontrol_set/get_value, so create a wrapper
snd_soc_dapm_kcontrol_get/set_value APIs to let drivers use this

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 include/sound/soc-dapm.h |    4 ++++
 sound/soc/soc-dapm.c     |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 75020f5..9e826e9 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -368,6 +368,10 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event);
 int dapm_clock_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event);
+bool snd_soc_dapm_kcontrol_set_value(
+		const struct snd_kcontrol *kcontrol, unsigned int value);
+unsigned int snd_soc_dapm_kcontrol_get_value(
+		const struct snd_kcontrol *kcontrol);
 
 /* dapm controls */
 int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 98c1dc6..b7dfa1a 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -333,6 +333,12 @@ static unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol)
 
 	return data->value;
 }
+unsigned int snd_soc_dapm_kcontrol_get_value(
+	const struct snd_kcontrol *kcontrol)
+{
+	dapm_kcontrol_get_value(kcontrol);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_get_value);
 
 static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
 	unsigned int value)
@@ -350,6 +356,13 @@ static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
 	return true;
 }
 
+bool snd_soc_dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol,
+	unsigned int value)
+{
+	return dapm_kcontrol_set_value(kcontrol, value);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_set_value);
+
 /**
  * snd_soc_dapm_kcontrol_codec() - Returns the codec associated to a kcontrol
  * @kcontrol: The kcontrol
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-05-26 18:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 12:08 [PATCH 1/2] ASoC: add api for dapm kcontrol configiuration Vinod Koul
2014-05-26 12:08 ` [PATCH 2/2] ASoC: dapm: Add a helper to get the platform for DAPM kcontrol Vinod Koul
2014-05-26 12:44   ` Jarkko Nikula
2014-05-26 12:51     ` Vinod Koul
2014-05-26 14:29       ` Mark Brown
2014-05-26 13:29   ` Lars-Peter Clausen
2014-05-26 16:23     ` Vinod Koul
2014-05-26 16:52       ` Lars-Peter Clausen
2014-05-26 16:47         ` Vinod Koul
2014-05-26 18:07           ` Lars-Peter Clausen
2014-05-26 18:54             ` Mark Brown
2014-05-26 13:26 ` [PATCH 1/2] ASoC: add api for dapm kcontrol configiuration Lars-Peter Clausen
2014-05-26 15:05 ` Mark Brown
2014-05-26 16:18   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox