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>
此提交包含在:
@@ -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);
|
||||
|
新增問題並參考
封鎖使用者