summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/atom/sst/sst.h
diff options
context:
space:
mode:
authorHans de Goede2018-02-18 23:01:43 +0100
committerMark Brown2018-03-01 17:22:48 +0100
commitbf642bf57398572327072d306e26e38aebd94fa7 (patch)
treec9ca9bd88ebd9f577fe82540a0779953c50d779a /sound/soc/intel/atom/sst/sst.h
parentASoC: Intel: sst: Add sst_realloc_stream() function (diff)
downloadkernel-qcow2-linux-bf642bf57398572327072d306e26e38aebd94fa7.tar.gz
kernel-qcow2-linux-bf642bf57398572327072d306e26e38aebd94fa7.tar.xz
kernel-qcow2-linux-bf642bf57398572327072d306e26e38aebd94fa7.zip
ASoC: Intel: sst: Free streams on suspend, re-alloc on resume
The Bay Trail SST-DSP firmware version looses track of all streams over a suspend/resume, failing any attempts to resume and/or free streams, with a SST_ERR_INVALID_STREAM_ID error. This commit adds support for free-ing the streams on suspend and re-allocating them on resume, fixing suspend/resume issues on devices using this firmware version. This new behavior gets triggered by a new flag in sst_platform_info which only gets set on Bay Trail platforms. This has been tested on the following devices: -Asus T100TA, Bay Trail + ALC5642 codec -Ployer MOMO7W, Bay Trail CR + ALC5652 codec Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/atom/sst/sst.h')
-rw-r--r--sound/soc/intel/atom/sst/sst.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/intel/atom/sst/sst.h b/sound/soc/intel/atom/sst/sst.h
index a357cd615b59..b2a705dc9304 100644
--- a/sound/soc/intel/atom/sst/sst.h
+++ b/sound/soc/intel/atom/sst/sst.h
@@ -179,6 +179,8 @@ struct sst_block {
*
* @status : stream current state
* @prev : stream prev state
+ * @resume_status : stream current state to restore on resume
+ * @resume_prev : stream prev state to restore on resume
* @lock : stream mutex for protecting state
* @alloc_param : parameters used for stream (re-)allocation
* @pcm_substream : PCM substream
@@ -189,6 +191,8 @@ struct sst_block {
struct stream_info {
unsigned int status;
unsigned int prev;
+ unsigned int resume_status;
+ unsigned int resume_prev;
struct mutex lock;
struct snd_sst_alloc_mrfld alloc_param;