Commit bd17aa45 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: Intel: add drain_notify support

This patch adds the support to implement drain_notify in Intels mfld driver
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Acked-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 5106f5a1
...@@ -38,6 +38,15 @@ static void sst_compr_fragment_elapsed(void *arg) ...@@ -38,6 +38,15 @@ static void sst_compr_fragment_elapsed(void *arg)
snd_compr_fragment_elapsed(cstream); 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) 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, ...@@ -143,6 +152,8 @@ static int sst_platform_compr_set_params(struct snd_compr_stream *cstream,
cb.param = cstream; cb.param = cstream;
cb.compr_cb = sst_compr_fragment_elapsed; 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); retval = stream->compr_ops->open(&str_params, &cb);
if (retval < 0) { if (retval < 0) {
......
...@@ -104,6 +104,8 @@ struct sst_stream_params { ...@@ -104,6 +104,8 @@ struct sst_stream_params {
struct sst_compress_cb { struct sst_compress_cb {
void *param; void *param;
void (*compr_cb)(void *param); void (*compr_cb)(void *param);
void *drain_cb_param;
void (*drain_notify)(void *param);
}; };
struct compress_sst_ops { struct compress_sst_ops {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment