summaryrefslogtreecommitdiff
path: root/sound/soc/intel/sst/sst.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2014-10-30 13:50:56 +0300
committerMark Brown <broonie@kernel.org>2014-10-31 15:50:38 +0300
commit6e9b05607fe896627ab7c15efff01b6dcae71a56 (patch)
tree4505194fbd6b1c37749b1785813e028af3c61d18 /sound/soc/intel/sst/sst.c
parent45f31bfcda0c6e5f11168de10c85f3dd20337bdf (diff)
downloadlinux-6e9b05607fe896627ab7c15efff01b6dcae71a56.tar.xz
ASoC: Intel: sst: load firmware using async callback
We would like the DSP firmware to be available in driver as soon as possible. So use the async callback in driver to probe to load the firmware as soon as usermode is up Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/sst/sst.c')
-rw-r--r--sound/soc/intel/sst/sst.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/intel/sst/sst.c b/sound/soc/intel/sst/sst.c
index 04af2460f9cc..fdada405eda7 100644
--- a/sound/soc/intel/sst/sst.c
+++ b/sound/soc/intel/sst/sst.c
@@ -364,6 +364,21 @@ static int intel_sst_probe(struct pci_dev *pci,
sst_set_fw_state_locked(sst_drv_ctx, SST_RESET);
+ snprintf(sst_drv_ctx->firmware_name, sizeof(sst_drv_ctx->firmware_name),
+ "%s%04x%s", "fw_sst_",
+ sst_drv_ctx->dev_id, ".bin");
+ dev_dbg(sst_drv_ctx->dev,
+ "Requesting FW %s now...\n", sst_drv_ctx->firmware_name);
+ ret = request_firmware_nowait(THIS_MODULE, 1,
+ sst_drv_ctx->firmware_name, sst_drv_ctx->dev,
+ GFP_KERNEL, sst_drv_ctx, sst_firmware_load_cb);
+
+ if (ret) {
+ dev_err(sst_drv_ctx->dev,
+ "Firmware load failed with error: %d\n", ret);
+ goto do_release_regions;
+ }
+
sst_drv_ctx->irq_num = pci->irq;
/* Register the ISR */
ret = devm_request_threaded_irq(&pci->dev, pci->irq,