All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: alsa-devel@alsa-project.org
Cc: vinod.koul@intel.com, broonie@kernel.org,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	lgirdwood@gmail.com, Lars-Peter Clausen <lars@metafoo.de>
Subject: [v2 3/5] ASoC: Intel: sst: load firmware using async callback
Date: Tue, 19 Aug 2014 16:07:05 +0530	[thread overview]
Message-ID: <1408444627-28906-4-git-send-email-subhransu.s.prusty@intel.com> (raw)
In-Reply-To: <1408444627-28906-1-git-send-email-subhransu.s.prusty@intel.com>

From: Vinod Koul <vinod.koul@intel.com>

We would like the DSP firmware to be availble 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: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
---
 sound/soc/intel/sst/sst.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/soc/intel/sst/sst.c b/sound/soc/intel/sst/sst.c
index 2712e6cf99a9..3b31c5823662 100644
--- a/sound/soc/intel/sst/sst.c
+++ b/sound/soc/intel/sst/sst.c
@@ -377,6 +377,19 @@ 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->pci_id, ".bin");
+	pr_debug("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) {
+		pr_err("Firmware load failed with error: %d\n", ret);
+		goto do_unmap_dram;
+	}
+
 	sst_drv_ctx->irq_num = pci->irq;
 	/* Register the ISR */
 	ret = devm_request_threaded_irq(&pci->dev, pci->irq,
-- 
1.9.0

  parent reply	other threads:[~2014-08-19 10:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 10:37 [v2 0/5] ASoC: Intel: sst - add the merrifield DSP driver Subhransu S. Prusty
2014-08-19 10:37 ` [v2 1/5] ASoC: Intel: mrfld - add the dsp sst driver Subhransu S. Prusty
2014-08-19 16:11   ` Mark Brown
2014-08-19 16:02     ` Vinod Koul
2014-08-19 10:37 ` [v2 2/5] ASoC: Intel: sst: add power management handling Subhransu S. Prusty
2014-08-19 10:37 ` Subhransu S. Prusty [this message]
2014-08-19 10:37 ` [v2 4/5] ASoC: mfld-compress: Use dedicated function instead of ioctl Subhransu S. Prusty
2014-08-19 10:37 ` [v2 5/5] ASoC: Intel: sst - add compressed ops handling Subhransu S. Prusty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408444627-28906-4-git-send-email-subhransu.s.prusty@intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.