1
0
Fork 0
Commit Graph

38 Commits (8e8e69d67e5fad1a1edf97acebd649a6c8f1febd)

Author SHA1 Message Date
Thomas Gleixner 8e8e69d67e treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 100 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.918357685@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Subhransu S. Prusty 8e9d8e19b3
ASoC: Intel: Skylake: Request IRQ late only after all context are initialized
Sometimes during boot, panic is observed at sst_dsp_shim_read_unlocked().
This happens when interrupt occurs before the context is initialized. So
move the irq initialization only after the context is initialized
completely.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Pawse, GuruprasadX <guruprasadx.pawse@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-20 10:48:06 +00:00
Subhransu S. Prusty 3b3011adad ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failure
For some dsp init error path, irq and few more resources are not freed.
This results in oops. So, fix it by freeing up the resources on ipc_init
failure.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-23 11:55:07 +01:00
Bhumika Goyal 2788808a1b ASoC: Intel: Skylake: make skl_dsp_fw_ops const
Make these const as they are only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-16 12:01:15 +01:00
Guneshwor Singh 2eed1b024a ASoC: Intel: Skylake: Move platform specific init to platform dsp_init()
Move ipc_init() from helper function to respective platform's dsp_init()
as ipc_init() per platform can be different.

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:26 +01:00
Dharageswari R 363d45385f ASoC: Intel: Skylake: Add num of cores in dsp ops
Number of dsp cores may differ for different platforms hence
adding it in dsp ops.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-03 11:07:12 +01:00
Dronamraju Santosh P K 3fbbcf4dad ASoC: Intel: bxtn: Remove code loader reference in cleanup
Since Broxton does not use code loader DMA, remove code loader cleanup
in its dsp cleanup routine. Remove the iounmap too as it is done in
skl_free_dsp().

Signed-off-by: Dronamraju Santosh P K <santosh.pavan.kumarx.dronamraju@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-01 13:34:01 +01:00
Guneshwor Singh 09e914d6b6 ASoC: Intel: Skylake: Add sram address to sst_addr structure
SRAM address and memory window size differ for different platforms.
So add members to sst_addr structure and initialize them in the
respective dsp_init().

Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-30 13:28:03 +01:00
Arnd Bergmann 351d74e4d7 ASoC: Intel: Skylake: fix uninitialized pointer use
The error handling in bxt_sst_dsp_init() got changed in a way that
it now derefences an uninitialized pointer when printing a warning
about the device not being found:

sound/soc/intel/skylake/bxt-sst.c: In function 'bxt_sst_dsp_init':
sound/soc/intel/skylake/bxt-sst.c:567:14: error: 'skl' may be used uninitialized in this function [-Werror=maybe-uninitialized]

As we do have a valid device pointer available at the call site,
let's use that instead.

Fixes: 9fe9c71192 ("ASoC: Intel: Skylake: Move sst common initialization to a helper function")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30 21:46:49 +09:00
Subhransu S. Prusty 100e7f396d ASoC: Intel: Skylake: Modify load_lib_ipc arguments for a nowait version
Kabylake uses code loader dma and wait on notification instead of ipc
reply for load library ipc status. So modify the argument of
skl_sst_ipc_load_library to check on flag to wait for ipc reply.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:49 +01:00
Subhransu S. Prusty ebe8907687 ASoC: Intel: Skylake: Commonize library load
request firmware, strip extended manifest and release library changes
are common to kabylake and APL.

So move these common code to utils to be reused in later patches for
kabylake library load.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:37 +01:00
G Kranthi 9fe9c71192 ASoC: Intel: Skylake: Move sst common initialization to a helper function
Some skl sst context are not dependent of platform and initializing them
independently for each platform can lead to errors. So optimize by
moving them to a helper function and platform specific init code can
call this.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-26 15:47:28 +01:00
Colin Ian King 5f75b19ef9 ASoC: Intel: bxtn: fix spelling mistake: "Timout" -> "Timeout"
trivial fix to spelling mistake in dev_err error message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-30 11:15:30 +01:00
Jeeja KP 03de8c2ef8 ASoC: Intel: bxtn: Reload the firmware in case of D3 failure
If D3 IPC fails or times out, firmware needs to be reloaded as driver
continues the reset.
So set the fw_load flag to false to reload the firmware in D0.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:04 +00:00
Jeeja KP 1fb344a33a ASoC: Intel: bxtn: Update DSP core state in D0
In system suspend, firmware needs to be re-downloaded as IMR is cleared.
When firmware is downloaded in D0, core state is not set to running
state causing instability with subsequent D0-D3 cycles.

So set the core state correctly during D0 and check the DSP core state
if not in reset to set the DSP to D3.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:28:01 +00:00
Jeeja KP 5518af9f97 ASoC: Intel: bxtn: Disable interrupt when DSP is in D3
When DSP is in D3, no interrupts are expected, so disable
interrupt while entering D3.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-15 17:27:58 +00:00
Jeeja KP 7d3f91dc1e ASoC: Intel: bxtn: optimize ROM init retries
During S3->S0 transition, sometime ROM init fails because of
authentication engine loads later than the OS. In this case driver
waits for a longer period and then retries the FW download causing
huge delay in resume time of audio device.

To avoid this, ROM INIT wait time is set to a optimal value and
increased the retries for firmware download.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:48:01 +01:00
Jeeja KP 31d648f051 ASoC: Intel: bxtn: Store the FW/Library context at boot
Store the DSP firmware/library at boot, so that for S3 to S0 transition
use the stored ctx for downloading the firmware to DSP memory.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07 13:47:34 +01:00
Jeeja KP 1448099dd3 ASoC: Intel: bxtn: Use DSP poll API to poll FW status
Use the optimized dsp_register_poll API to poll the DSP firmware
status register rather than open coding it.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-06 18:14:48 +00:00
Jeeja KP eee0e16f8c ASoC: Intel: Skylake: Clean up manifest info
Instead of passing the topology manifest info directly to IPC library,
define the manifest info in topology and use this in IPC Library.
This will remove the dependency on topology interface definition with
IPC library.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-06 18:14:31 +00:00
Vinod Koul a83e3b4c44 ASoC: Intel: Skylake: Add D0i3 mode ref counting
For device opened/closed, we check the D0i3 capability for the device
and invoke skl_tplg_d0i3_get/put, which counts the use case based on the
mode supported.

These counters are then used to decide if the device can enter D0i3 mode
of streaming or non-streaming or no D0i3.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:42 -06:00
Jayachandran B 5bb4cd46ac ASoC: Intel: Skylake: Add D0iX callbacks
The driver needs two DSP callback, one to set D0i0 (active) and D0i3
(low-power) states.

Add these callbacks in dsp ops and implement them for broxton platforms.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:22 -06:00
Colin Ian King ecd286a9d8 ASoC: Intel: Skylake: add missing \n to end of dev_* messages
Trival fix, some dev_* messages are missing a \n, so add it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24 19:42:42 +01:00
Ramesh Babu 1ef015e611 ASoC: Intel: Skylake: Add library loading support
The library load is added as one of the ops in skl_dsp_fw_ops().

The manifest load gives the files to be loaded which are loaded during
the fw_init()

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 0bdd6d8bed ASoC: Intel: Bxt: Parse UUIDs once
The firmware manifest contains UUIDs which needs to be passed only once.

So use the newly introduced is_first_boot flag to distinguish and parse
these only once on bxt platform as well.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Senthilnathan Veppur a8e2c19efd ASoC: Intel: Skylake: add additional args to module parsing
For additional library parsing, we need to pass firmware to be
loaded and not use the pointer in context. Also, Library module
IDs are combination of library index and module ID in manifest.

So add the additional arguments of firmware and library offset to
snd_skl_parse_uuids().

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Vinod Koul 78cdbbdac0 ASoC: Intel: Skylake: split fw and dsp initialization
The DSP instance creation also loads the firmware on DSPs. For library load
the firmware names come from topology so can't be loaded at object creation.

So split the firmware load and object creation. FW load is now called after
topology init in platform probe.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08 11:54:59 +01:00
Mark Brown 44d624622e Merge remote-tracking branch 'asoc/topic/intel' into asoc-next 2016-07-24 22:07:22 +01:00
Senthilnathan Veppur c78722676e ASoC: Intel: Skylake: Fix fw reload failure
FW reload had two issues:
 - We need to disable the core 0 on when fw fails
 - Before loading firmware mark boot flag as false

This patch fixes these two

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-14 16:32:51 +01:00
Jayachandran B e68aca08d7 ASoC: Intel: Skylake: Support multi-core in Broxton
Add multicore DSP support in Broxton DSP operations.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:13:12 +01:00
Jayachandran B 052f103c89 ASoC: Intel: Skylake: Add DSP muti-core infrastructure
The DSP can have more than one cores. In that case the secondary
core has to be managed by the driver. This patch adds the changes
to driver infrastructure to support multiple core.

A new object skl_dsp_cores is introduced to support multiple
core. Helpers skl_dsp_get_core() skl_dsp_put_core() help to
managed the cores.

Many of the power_up/down and DSP APIs take additional argument
of core_id. The primary core, 0 is always powered up first and
then on demand second core.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-22 16:13:12 +01:00
Vinod Koul b914bb55f2 ASoC: Intel: Skylake: Initialize module list for Broxton
The module list was not initialized for Broxton DSP code, so
initialize it.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 18:00:34 +01:00
Senthilnathan Veppur 2023576dd7 ASoC: Intel: Skylake: Update FW purge for Broxton
Broxton needs to send Purge firmware IPC to DSP before downloading the
firmware. The DMA id needs to be updated for that.

While at it also update Broxton boot sequence to send purge request after
power up and before yanking off reset.

Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00
Jayachandran B 1665c177ab ASoC: Intel: Skylake: Enable firmware reload in suspend
Broxton DSP needs retains code loaded during runtime_pm cycles.
But it looses that on suspend cycle, so on resume we need to
download the firmware again.

This is done by adding a new flag and based on flag status, we
download the firmware.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-14 14:59:33 +01:00
Vinod Koul 3467a64dde ASoC: Intel: Skylake: Find uuids for Broxton
Broxton uses different offset in manifest for parsing module
table. So invoke common parsing utility from broxton using
broxton offset.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30 18:24:41 +01:00
Vinod Koul bf242d19d5 ASoC: Intel: Skylake: Strip manifest for Broxton platform
Broxton firmrware comes with extended manifest so invoke
skl_dsp_strip_extended_manifest() to check and strip

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30 18:24:41 +01:00
Vinod Koul fdfa82ee14 ASoC: Intel: Skylake: Don't use local pointer for firmware
We have firmware pointer is driver context, so use that instead
of local pointer.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30 18:24:41 +01:00
Jeeja KP 92eb4f62cb ASoC: Intel: Bxtn: Add Broxton DSP support
Broxton DSP is mostly similar to Skylake one but with subtle
differences like no Code Load DMA and uses HDA DMA for code
loading, DSP D0 and D3 sequences are different.

These changes are comprehended by adding different DSP power up
and down handlers, and new loader ops and also adding prepare and
trigger which HDA DSP DMA requires

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com>
Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-30 15:30:04 -07:00