summaryrefslogtreecommitdiff
path: root/sound/soc/intel/skylake/skl-sst.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-05 12:13:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-05 12:13:14 -0700
commit5691f0e9a3e7855832d5fd094801bf600347c2d0 (patch)
tree4cd4538de2bde556be944e984a3882a64b25dfcb /sound/soc/intel/skylake/skl-sst.c
parent878fb5dc96b9dfae1de45be1b85aba40aca3356e (diff)
parenteeea8b40cd2866ca24f25e5ef09225edb076ae45 (diff)
Merge tag 'sound-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "Again the diffstat shows a widely distributed pattern at this cycle, as there've been many code cleanups and refactoring allover the places. Other than that, the development was relatively calm, and no big surprise shouldn't be expected. Here are some highlights: Core: - Sequencer code refactoring / documentation updates - TLV code moved to uapi, following some relevant cleanups USB-Audio: - Lots of LINE6 driver fixes / updates - DragonFly and TEAC device quirk updates HD-audio: - Usual fixupes for Dell, Lenovo and HP machines - Link-audio time reporting capability ASoC: - Large refactoring of simple-card code to be shared with rcar driver - Removal of some duplicated ops over lots of CODEC drivers - Again quite a few Intel SKL driver updates - New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663" * tag 'sound-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (465 commits) ASoC: fsl: Fix lockups with recent cache changes ASoC: Intel: Skylake: fix memory leak of module on error exit path ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUME ASoC: wm8960: remove usage of obsoleted TLV-related macro ASoC: rt5616: remove usage of obsoleted TLV-related macro ASoC: max9867: remove usage of obsoleted TLV-related macro ASoC: trivial: system spelling fix ASoC: da7219: fix inappropriate condition statement ASoC: tlv320aic31xx: do not declare support for mono DAI ASoC: stac9766: fix wrong usage of DECLARE_TLV_DB_LINEAR() ASoC: wm8991: remove unused variable ASoC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR() ASOC: tpa6130a2: add static qualifier for file local symbols ASoC: sst-bxt-rt298: fix obsoleted initializers for array ASoC: sst-bxt-da7219_max98357a: fix obsoleted initializers for array ASoC: rt5616: add static qualifier for file local symbols ASoC: arizona: Add output power up/down delays for speaker path ASoC: arizona: Add debug prints for output power up/down times ALSA: hda - Add the top speaker pin config for HP Spectre x360 ASoC: Intel: Add DMIC channel constraint for bxt machine ...
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst.c')
-rw-r--r--sound/soc/intel/skylake/skl-sst.c49
1 files changed, 29 insertions, 20 deletions
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index 588f899ceb65..8fc3178bc79c 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -88,13 +88,15 @@ static int skl_load_base_firmware(struct sst_dsp *ctx)
}
}
- ret = snd_skl_parse_uuids(ctx, SKL_ADSP_FW_BIN_HDR_OFFSET);
- if (ret < 0) {
- dev_err(ctx->dev,
- "UUID parsing err: %d\n", ret);
- release_firmware(ctx->fw);
- skl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
- return ret;
+ /* prase uuids on first boot */
+ if (skl->is_first_boot) {
+ ret = snd_skl_parse_uuids(ctx, ctx->fw, SKL_ADSP_FW_BIN_HDR_OFFSET, 0);
+ if (ret < 0) {
+ dev_err(ctx->dev, "UUID parsing err: %d\n", ret);
+ release_firmware(ctx->fw);
+ skl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
+ return ret;
+ }
}
/* check for extended manifest */
@@ -105,13 +107,13 @@ static int skl_load_base_firmware(struct sst_dsp *ctx)
ret = skl_dsp_boot(ctx);
if (ret < 0) {
- dev_err(ctx->dev, "Boot dsp core failed ret: %d", ret);
+ dev_err(ctx->dev, "Boot dsp core failed ret: %d\n", ret);
goto skl_load_base_firmware_failed;
}
ret = skl_cldma_prepare(ctx);
if (ret < 0) {
- dev_err(ctx->dev, "CL dma prepare failed : %d", ret);
+ dev_err(ctx->dev, "CL dma prepare failed : %d\n", ret);
goto skl_load_base_firmware_failed;
}
@@ -484,25 +486,32 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
return ret;
skl->cores.count = 2;
+ skl->is_first_boot = true;
+
+ if (dsp)
+ *dsp = skl;
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(skl_sst_dsp_init);
+
+int skl_sst_init_fw(struct device *dev, struct skl_sst *ctx)
+{
+ int ret;
+ struct sst_dsp *sst = ctx->dsp;
ret = sst->fw_ops.load_fw(sst);
if (ret < 0) {
- dev_err(dev, "Load base fw failed : %d", ret);
- goto cleanup;
+ dev_err(dev, "Load base fw failed : %d\n", ret);
+ return ret;
}
skl_dsp_init_core_state(sst);
+ ctx->is_first_boot = false;
- if (dsp)
- *dsp = skl;
-
- return ret;
-
-cleanup:
- skl_sst_dsp_cleanup(dev, skl);
- return ret;
+ return 0;
}
-EXPORT_SYMBOL_GPL(skl_sst_dsp_init);
+EXPORT_SYMBOL_GPL(skl_sst_init_fw);
void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
{