Skip to content

Commit

Permalink
ASoC: Intel: add drain_notify support
Browse files Browse the repository at this point in the history
This patch adds the support to implement drain_notify in Intels mfld driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Vinod Koul authored and Mark Brown committed May 16, 2014
1 parent 5106f5a commit bd17aa4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sound/soc/intel/sst-mfld-platform-compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{

Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/intel/sst-mfld-platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bd17aa4

Please sign in to comment.