diff options
author | 2018-01-12 12:28:47 +0000 | |
---|---|---|
committer | 2018-01-12 12:28:47 +0000 | |
commit | 3e4555ab2f5a667a4a79f03e81a34cd8b5b3eb0c (patch) | |
tree | c1cd96f70fbec0677537931d812f3190a0275e67 /sound/soc/intel/skylake/skl-messages.c | |
parent | Merge remote-tracking branch 'asoc/topic/core' into asoc-next (diff) | |
parent | ASoC: sn95031: remove this code (diff) | |
download | wireguard-linux-3e4555ab2f5a667a4a79f03e81a34cd8b5b3eb0c.tar.xz wireguard-linux-3e4555ab2f5a667a4a79f03e81a34cd8b5b3eb0c.zip |
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
Diffstat (limited to '')
-rw-r--r-- | sound/soc/intel/skylake/skl-messages.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 61b5bfa79d13..8cbf080c38b3 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -55,6 +55,19 @@ static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab) return 0; } +#define SKL_ASTATE_PARAM_ID 4 + +void skl_dsp_set_astate_cfg(struct skl_sst *ctx, u32 cnt, void *data) +{ + struct skl_ipc_large_config_msg msg = {0}; + + msg.large_param_id = SKL_ASTATE_PARAM_ID; + msg.param_data_size = (cnt * sizeof(struct skl_astate_param) + + sizeof(cnt)); + + skl_ipc_set_large_config(&ctx->ipc, &msg, data); +} + #define NOTIFICATION_PARAM_ID 3 #define NOTIFICATION_MASK 0xf @@ -404,11 +417,20 @@ int skl_resume_dsp(struct skl *skl) if (skl->skl_sst->is_first_boot == true) return 0; + /* disable dynamic clock gating during fw and lib download */ + ctx->enable_miscbdcge(ctx->dev, false); + ret = skl_dsp_wake(ctx->dsp); + ctx->enable_miscbdcge(ctx->dev, true); if (ret < 0) return ret; skl_dsp_enable_notification(skl->skl_sst, false); + + if (skl->cfg.astate_cfg != NULL) { + skl_dsp_set_astate_cfg(skl->skl_sst, skl->cfg.astate_cfg->count, + skl->cfg.astate_cfg); + } return ret; } |