diff options
author | Feng Tang <feng.tang@intel.com> | 2011-07-08 09:59:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-08 14:02:25 -0700 |
commit | 26af13f15ab281c9e20f8027bc556111644662ae (patch) | |
tree | fca3d799477812ec81312f1baedbbc9bfe4b5c43 /drivers/staging/intel_sst/intel_sst_drv_interface.c | |
parent | 35b5ddb6466f66c511217abd8b3f490e759dae3e (diff) | |
download | linux-26af13f15ab281c9e20f8027bc556111644662ae.tar.bz2 |
sst: avoid unnecessary firmware reloading for MRST
SST HW on MRST doesn't need to reload the firmware during suspend/resume
cycle, so remove the extra workload. This also fix a bug that the firmware
sample rate can't be modified when there is no active playback/capture
stream.
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/intel_sst/intel_sst_drv_interface.c')
-rw-r--r-- | drivers/staging/intel_sst/intel_sst_drv_interface.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/drivers/staging/intel_sst/intel_sst_drv_interface.c index 1021477f238d..69daa1404b68 100644 --- a/drivers/staging/intel_sst/intel_sst_drv_interface.c +++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c @@ -53,6 +53,13 @@ int sst_download_fw(void) if (sst_drv_ctx->sst_state != SST_UN_INIT) return -EPERM; + /* Reload firmware is not needed for MRST */ + if ( (sst_drv_ctx->pci_id == SST_MRST_PCI_ID) && sst_drv_ctx->fw_downloaded) { + pr_debug("FW already downloaded, skip for MRST platform\n"); + sst_drv_ctx->sst_state = SST_FW_RUNNING; + return 0; + } + snprintf(name, sizeof(name), "%s%04x%s", "fw_sst_", sst_drv_ctx->pci_id, ".bin"); @@ -71,6 +78,9 @@ int sst_download_fw(void) retval = sst_wait_timeout(sst_drv_ctx, &sst_drv_ctx->alloc_block[0]); if (retval) pr_err("fw download failed %d\n" , retval); + else + sst_drv_ctx->fw_downloaded = 1; + end_restore: release_firmware(fw_sst); sst_drv_ctx->alloc_block[0].sst_id = BLOCK_UNINIT; |