2019-03-29 14:12:17 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-10-16 02:05:43 +08:00
|
|
|
From: Guneshwor Singh <guneshwor.o.singh@intel.com>
|
|
|
|
Date: Thu, 14 Apr 2016 12:02:14 +0530
|
2019-03-29 14:12:17 +08:00
|
|
|
Subject: [PATCH] Load nhlt from firmware instead of debugfs
|
2018-10-16 02:05:43 +08:00
|
|
|
|
|
|
|
Change-Id: I316804db785699f28359b35455790c95cccacd10
|
|
|
|
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
|
|
|
|
Reviewed-on:
|
|
|
|
Reviewed-by: Shah, Hardik T <hardik.t.shah@intel.com>
|
|
|
|
Tested-by: Shah, Hardik T <hardik.t.shah@intel.com>
|
|
|
|
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
|
|
|
|
---
|
|
|
|
sound/soc/intel/skylake/skl.c | 23 ++++++++++++++++++++++-
|
|
|
|
1 file changed, 22 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
|
2020-10-27 02:14:06 +08:00
|
|
|
index 50f16a0f6535..e2b9c7ce2a75 100644
|
2018-10-16 02:05:43 +08:00
|
|
|
--- a/sound/soc/intel/skylake/skl.c
|
|
|
|
+++ b/sound/soc/intel/skylake/skl.c
|
|
|
|
@@ -886,6 +886,7 @@ static int skl_probe(struct pci_dev *pci,
|
|
|
|
{
|
|
|
|
struct skl *skl;
|
|
|
|
struct hdac_bus *bus = NULL;
|
|
|
|
+ const struct firmware __maybe_unused *nhlt_fw = NULL;
|
|
|
|
int err;
|
|
|
|
|
|
|
|
/* we use ext core ops, so provide NULL for ops here */
|
|
|
|
@@ -903,6 +904,8 @@ static int skl_probe(struct pci_dev *pci,
|
|
|
|
|
|
|
|
device_disable_async_suspend(bus->dev);
|
|
|
|
|
|
|
|
+#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_CNL_FPGA)
|
|
|
|
+ skl->nhlt_version = skl_get_nhlt_version(bus->dev);
|
|
|
|
skl->nhlt = skl_nhlt_init(bus->dev);
|
|
|
|
|
|
|
|
if (skl->nhlt == NULL) {
|
|
|
|
@@ -916,7 +919,25 @@ static int skl_probe(struct pci_dev *pci,
|
|
|
|
|
|
|
|
skl_nhlt_update_topology_bin(skl);
|
|
|
|
|
|
|
|
- pci_set_drvdata(skl->pci, bus);
|
|
|
|
+#else
|
|
|
|
+ if (request_firmware(&nhlt_fw, "intel/nhlt_blob.bin", bus->dev)) {
|
|
|
|
+ dev_err(bus->dev, "Request nhlt fw failed, continuing..\n");
|
|
|
|
+ goto nhlt_continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ skl->nhlt = devm_kzalloc(&pci->dev, nhlt_fw->size, GFP_KERNEL);
|
|
|
|
+ if (skl->nhlt == NULL)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+ memcpy(skl->nhlt, nhlt_fw->data, nhlt_fw->size);
|
|
|
|
+ release_firmware(nhlt_fw);
|
|
|
|
+
|
|
|
|
+nhlt_continue:
|
|
|
|
+#endif
|
|
|
|
+ pci_set_drvdata(skl->pci, ebus);
|
|
|
|
+
|
|
|
|
+#if !IS_ENABLED(CONFIG_SND_SOC_INTEL_CNL_FPGA)
|
|
|
|
+ skl_dmic_data.dmic_num = skl_get_dmic_geo(skl);
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/* check if dsp is there */
|
|
|
|
if (bus->ppcap) {
|
|
|
|
--
|
2019-04-08 18:08:36 +08:00
|
|
|
https://clearlinux.org
|
2018-10-16 02:05:43 +08:00
|
|
|
|