Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: Vinod Koul <vinod.koul@intel.com>,
	jeeja.kp@intel.com, broonie@kernel.org,
	subhransu.s.prusty@intel.com, lgirdwood@gmail.com
Subject: [PATCH v2 6/8] ASoC: Intel: add drain_notify support
Date: Mon,  5 May 2014 22:19:23 +0530	[thread overview]
Message-ID: <1399308565-14620-7-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1399308565-14620-1-git-send-email-vinod.koul@intel.com>

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/sst-mfld-platform-compress.c |   11 +++++++++++
 sound/soc/intel/sst-mfld-platform.h          |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/sound/soc/intel/sst-mfld-platform-compress.c b/sound/soc/intel/sst-mfld-platform-compress.c
index 16d79fb..5c3e234 100644
--- a/sound/soc/intel/sst-mfld-platform-compress.c
+++ b/sound/soc/intel/sst-mfld-platform-compress.c
@@ -38,6 +38,15 @@ static void sst_compr_fragment_elapsed(void *arg)
 		snd_compr_fragment_elapsed(cstream);
 }
 
+static void sst_drain_notify(void *arg)
+{
+	struct snd_compr_stream *cstream = (struct snd_compr_stream *)arg;
+
+	pr_debug("drain notify by driver\n");
+	if (cstream)
+		snd_compr_drain_notify(cstream);
+}
+
 static int sst_platform_compr_open(struct snd_compr_stream *cstream)
 {
 
@@ -143,6 +152,8 @@ static int sst_platform_compr_set_params(struct snd_compr_stream *cstream,
 
 	cb.param = cstream;
 	cb.compr_cb = sst_compr_fragment_elapsed;
+	cb.drain_cb_param = cstream;
+	cb.drain_notify = sst_drain_notify;
 
 	retval = stream->compr_ops->open(&str_params, &cb);
 	if (retval < 0) {
diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h
index 3ea4fee..6c5e7dc 100644
--- a/sound/soc/intel/sst-mfld-platform.h
+++ b/sound/soc/intel/sst-mfld-platform.h
@@ -104,6 +104,8 @@ struct sst_stream_params {
 struct sst_compress_cb {
 	void *param;
 	void (*compr_cb)(void *param);
+	void *drain_cb_param;
+	void (*drain_notify)(void *param);
 };
 
 struct compress_sst_ops {
-- 
1.7.0.4

  parent reply	other threads:[~2014-05-05 17:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05 16:49 [PATCH v2 0/8] ASoC: Intel: rework the mfld platform driver Vinod Koul
2014-05-05 16:49 ` [PATCH v2 1/8] ASoC: Intel: remove FSF snail mail address Vinod Koul
2014-05-05 16:49 ` [PATCH v2 2/8] ASoc: Intel: rename sst-mfld-platform.c Vinod Koul
2014-05-05 16:49 ` [PATCH v2 3/8] ASoC: Intel: mark sst_set_stream_status as non static Vinod Koul
2014-05-05 16:49 ` [PATCH v2 4/8] ASoC: Intel: split the pcm and compress to different files Vinod Koul
2014-05-05 16:49 ` [PATCH v2 5/8] ASoC: Intel: remove unused sst-mfld platform dais Vinod Koul
2014-05-05 16:49 ` Vinod Koul [this message]
2014-05-05 16:49 ` [PATCH v2 7/8] ASoC: Intel: remove codec memeber from codec structs Vinod Koul
2014-05-05 16:49 ` [PATCH v2 8/8] ASoC: Intel: move component registration blob Vinod Koul
2014-05-05 19:47 ` [PATCH v2 0/8] ASoC: Intel: rework the mfld platform driver Mark Brown
2014-05-06 14:40 ` Liam Girdwood
2014-05-08 17:27 ` Mark Brown

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=1399308565-14620-7-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