ASoC: Intel: sst: Add sst_realloc_stream() function

Move the struct snd_sst_alloc_mrfld alloc parameters from the stack
into struct stream_info and add a new sst_realloc_stream() function which
can re-alloc a stream with the same parameters as before.

This is a preparation patch for fixing suspend/resume issues with some
SST / DSP firmware versions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
Hans de Goede
2018-02-18 23:01:42 +01:00
提交者 Mark Brown
父節點 de9833476d
當前提交 473858cad1
共有 2 個檔案被更改,包括 58 行新增37 行删除

查看文件

@@ -180,6 +180,7 @@ struct sst_block {
* @status : stream current state
* @prev : stream prev state
* @lock : stream mutex for protecting state
* @alloc_param : parameters used for stream (re-)allocation
* @pcm_substream : PCM substream
* @period_elapsed : PCM period elapsed callback
* @sfreq : stream sampling freq
@@ -189,6 +190,7 @@ struct stream_info {
unsigned int status;
unsigned int prev;
struct mutex lock;
struct snd_sst_alloc_mrfld alloc_param;
void *pcm_substream;
void (*period_elapsed)(void *pcm_substream);
@@ -429,6 +431,7 @@ struct intel_sst_ops {
void (*post_download)(struct intel_sst_drv *sst);
};
int sst_realloc_stream(struct intel_sst_drv *sst_drv_ctx, int str_id);
int sst_pause_stream(struct intel_sst_drv *sst_drv_ctx, int id);
int sst_resume_stream(struct intel_sst_drv *sst_drv_ctx, int id);
int sst_drop_stream(struct intel_sst_drv *sst_drv_ctx, int id);