diff options
-rw-r--r-- | sound/soc/intel/sst-mfld-platform-compress.c | 11 | ||||
-rw-r--r-- | 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 16d79fb25e59..5c3e23492fe5 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) | |||
38 | snd_compr_fragment_elapsed(cstream); | 38 | snd_compr_fragment_elapsed(cstream); |
39 | } | 39 | } |
40 | 40 | ||
41 | static void sst_drain_notify(void *arg) | ||
42 | { | ||
43 | struct snd_compr_stream *cstream = (struct snd_compr_stream *)arg; | ||
44 | |||
45 | pr_debug("drain notify by driver\n"); | ||
46 | if (cstream) | ||
47 | snd_compr_drain_notify(cstream); | ||
48 | } | ||
49 | |||
41 | static int sst_platform_compr_open(struct snd_compr_stream *cstream) | 50 | static int sst_platform_compr_open(struct snd_compr_stream *cstream) |
42 | { | 51 | { |
43 | 52 | ||
@@ -143,6 +152,8 @@ static int sst_platform_compr_set_params(struct snd_compr_stream *cstream, | |||
143 | 152 | ||
144 | cb.param = cstream; | 153 | cb.param = cstream; |
145 | cb.compr_cb = sst_compr_fragment_elapsed; | 154 | cb.compr_cb = sst_compr_fragment_elapsed; |
155 | cb.drain_cb_param = cstream; | ||
156 | cb.drain_notify = sst_drain_notify; | ||
146 | 157 | ||
147 | retval = stream->compr_ops->open(&str_params, &cb); | 158 | retval = stream->compr_ops->open(&str_params, &cb); |
148 | if (retval < 0) { | 159 | if (retval < 0) { |
diff --git a/sound/soc/intel/sst-mfld-platform.h b/sound/soc/intel/sst-mfld-platform.h index 3ea4fee0ba0d..6c5e7dc49e3c 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 { | |||
104 | struct sst_compress_cb { | 104 | struct sst_compress_cb { |
105 | void *param; | 105 | void *param; |
106 | void (*compr_cb)(void *param); | 106 | void (*compr_cb)(void *param); |
107 | void *drain_cb_param; | ||
108 | void (*drain_notify)(void *param); | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | struct compress_sst_ops { | 111 | struct compress_sst_ops { |