From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>, Kp Jeeja <jeeja.kp@intel.com>,
broonie@kernel.org,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
lgirdwood@gmail.com
Subject: [PATCH 2/2] ASoC: dapm: Add a helper to get the platform for DAPM kcontrol
Date: Mon, 26 May 2014 17:38:56 +0530 [thread overview]
Message-ID: <1401106136-3745-2-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1401106136-3745-1-git-send-email-vinod.koul@intel.com>
From: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
commit eee5d7f9 introduced helper for getting codec for DAPM kcontrol, for DSPs
we need similar stuff for platforms as well
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 | 2 ++
sound/soc/soc-dapm.c | 11 +++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 9e826e9..9f47dee 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -460,6 +460,8 @@ int snd_soc_dapm_dai_get_connected_widgets(struct snd_soc_dai *dai, int stream,
struct snd_soc_dapm_widget_list **list);
struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol);
+struct snd_soc_platform *snd_soc_dapm_kcontrol_platform(
+ struct snd_kcontrol *kcontrol);
/* dapm widget types */
enum snd_soc_dapm_type {
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index b7dfa1a..f37ca16 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -373,6 +373,17 @@ struct snd_soc_codec *snd_soc_dapm_kcontrol_codec(struct snd_kcontrol *kcontrol)
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_codec);
+/**
+ * snd_soc_dapm_kcontrol_platform() - Returns the platform associated to a kcontrol
+ * @kcontrol: The kcontrol
+ */
+struct snd_soc_platform *snd_soc_dapm_kcontrol_platform(
+ struct snd_kcontrol *kcontrol)
+{
+ return dapm_kcontrol_get_wlist(kcontrol)->widgets[0]->platform;
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_platform);
+
static void dapm_reset(struct snd_soc_card *card)
{
struct snd_soc_dapm_widget *w;
--
1.7.0.4
next prev parent reply other threads:[~2014-05-26 12:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 12:08 [PATCH 1/2] ASoC: add api for dapm kcontrol configiuration Vinod Koul
2014-05-26 12:08 ` Vinod Koul [this message]
2014-05-26 12:44 ` [PATCH 2/2] ASoC: dapm: Add a helper to get the platform for DAPM kcontrol 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401106136-3745-2-git-send-email-vinod.koul@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jeeja.kp@intel.com \
--cc=lgirdwood@gmail.com \
--cc=subhransu.s.prusty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox