alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, Misael Lopez Cruz <misael.lopez@ti.com>
Subject: [PATCH v3 1/3] ASoC: DAPM: Add private data pointer for DAPM widget
Date: Fri, 26 Aug 2011 16:33:21 +0300	[thread overview]
Message-ID: <1314365603-8947-2-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1314365603-8947-1-git-send-email-peter.ujfalusi@ti.com>

Support for using custom private data assigned
per DAPM widget.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 include/sound/soc-dapm.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index e0583b7..c10d4cc 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -474,6 +474,7 @@ struct snd_soc_dapm_widget {
 	unsigned char force:1;			/* force state */
 	unsigned char ignore_suspend:1;         /* kept enabled over suspend */
 	int subseq;				/* sort within widget type */
+	void *private_data;			/* for widget specific data */
 
 	int (*power_check)(struct snd_soc_dapm_widget *w);
 
@@ -535,4 +536,16 @@ struct snd_soc_dapm_widget_list {
 	struct snd_soc_dapm_widget *widgets[0];
 };
 
+/* Accessors for snd_soc_dapm_widget->private_data */
+static inline void *snd_soc_dapm_widget_get_pdata(struct snd_soc_dapm_widget *w)
+{
+	return w->private_data;
+}
+
+static inline void snd_soc_dapm_widget_set_pdata(struct snd_soc_dapm_widget *w,
+		void *data)
+{
+	w->private_data = data;
+}
+
 #endif
-- 
1.7.6.1

  reply	other threads:[~2011-08-26 13:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 13:33 [PATCH v3 0/3] ASoC: omap-mcpdm: New McPDM driver Peter Ujfalusi
2011-08-26 13:33 ` Peter Ujfalusi [this message]
2011-08-26 13:33 ` [PATCH v3 2/3] ASoC: soc-dapm: API to attach DAPM_SUPPLY to be used for dai Peter Ujfalusi
2011-08-26 19:05   ` Mark Brown
2011-08-29  8:22     ` Péter Ujfalusi
2011-08-29  9:16       ` Mark Brown
2011-08-29 11:41         ` Péter Ujfalusi
2011-09-03  6:31           ` Mark Brown
2011-09-06 10:21             ` Péter Ujfalusi
2011-09-06 15:09               ` Mark Brown
2011-08-26 13:33 ` [PATCH v3 3/3] ASoC: omap-mcpdm: Replace legacy driver Peter Ujfalusi

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=1314365603-8947-2-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=misael.lopez@ti.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;
as well as URLs for NNTP newsgroup(s).