History log of /linux-master/sound/soc/intel/skylake/skl-sst-ipc.h
Revision Date Author Comments
# 8f0ccd59 13-Aug-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: Intel: Skylake: (cosmetic) align function parameters

Fix cppcheck warnings and align headers with code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200813200147.61990-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 36004c42 08-Aug-2019 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: Intel: Skylake: large_config_get overhaul

LARGE_CONFIG_GET is mainly used to retrieve requested module parameters
but it may also carry TX payload with them. Update its implementation to
account for both TX and RX data.
First reply.header carries total payload size within data_off_sizefield.
Make use of reply.header to realloc returned buffer with correct size.

Failure of IPC request is permissive - error-payload may be returned, an
informative data why GET for given param failed - and thus function
should not collapse before entire processing is finished. Caller is
responsible for checking returned payload and bytes parameters.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190808181549.12521-3-cezary.rojewski@intel.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# bcc2a2dc 23-Jul-2019 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: Intel: Skylake: Merge skl_sst and skl into skl_dev struct

Skylake driver is divided into two modules:
- snd_soc_skl
- snd_soc_skl_ipc

and nothing would be wrong if not for the fact that both cannot exist
without one another. IPC module is not some kind of extension, as it is
the case for snd_hda_ext_core which is separated from snd_hda_core -
legacy hda interface. It's as much core Skylake module as snd_soc_skl
is.

Statement backed up by existence of circular dependency between this
two. To eliminate said problem, struct skl_sst has been created. From
that very momment, Skylake has been plagued by header errors (incomplete
structs, unknown references etc.) whenever something new is to be added
or code is cleaned up.

As this design is being corrected, struct skl_sst is no longer needed,
so combine it with struct skl. To avoid ambiguity when searching for skl
stuff (struct skl *skl) it has also been renamed to skl_dev.

No functional changes.

Signed-off-by: Piotr Maziarz <piotrx.maziarz@intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190723145854.8527-2-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 47d7195d 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 490

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 version 2 as
published by the free software foundation 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 13 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Enrico Weigelt <info@metux.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081205.608593891@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fc9fdd61 12-Mar-2018 Sanyog Kale <sanyog.r.kale@intel.com>

ASoC: Intel: Skylake: Disable clock and power gating during FW/LIB download

In order to achieve better DMA performance and reduce download time for
firmware and library, it is recommended to disable dynamic clock and
power gating. In some scenarios, DMA may wait to accumulate more data and
last chunk of data never gets completed if dynamic clock and power
gating is kept enabled.

This patch adds support to disable/enable dynamic clock and power gating
and use it during firmware and library download.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 4bdb04f0 02-Aug-2017 Guneshwor Singh <guneshwor.o.singh@intel.com>

ASoC: Intel: cnl: Unstatify common ipc functions

Common ipc functions can be reused for cnl, so make them non-static.

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>


# f0a550a8 02-Aug-2017 Guneshwor Singh <guneshwor.o.singh@intel.com>

ASoC: Intel: Skylake: Use num_core to allocate instead of macro

For different platforms, number of dsp cores can vary. So instead of
creating array of size SKL_DSP_CORES_MAX, use num_core in dsp_ops() of
the respective platform to allocate core usage counts and states.

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>


# 100e7f39 24-Apr-2017 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

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>


# b26199ea 24-Mar-2017 Jeeja KP <jeeja.kp@intel.com>

ASoC: Intel: Skylake: Rearrangement of code to cleanup SKL SST library

Skylake driver topology header/driver structure is referenced and used
in SST library which creates circular dependency. Hence the
rearrangement.

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>


# b7d0254c5 13-Mar-2017 Jeeja KP <jeeja.kp@intel.com>

ASoC: Intel: Skylake: Fix module load when module size > DMA buffer size

When module size > DMA buffer size, driver copies first chunk and waits
for the BDL complete interrupt. BDL complete interrupt never occurs and
wait time expires as module load IPC is not send to start the DMA from
DSP.

To fix the above issue need to follow the below steps:
1. After copying the first chunk, send the module load IPC to start the
DMA.
2. Wait for the BDL interrupt. Once interrupt is received, copy the
next chunk.
3. Continue step 2 till all bytes are copied.
4. When all the bytes are copied (bytes_left = 0), wait for module load
IPC response
5. Handled module load IPC response messages, check the load module IPC
response and wake up the thread to complete module load.

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>


# 7bd86a30 13-Mar-2017 G Kranthi <gudishax.kranthikumar@intel.com>

ASoC: Intel: Skylake: Remove get dsp_ops in cleanup routine

dsp ops is already set in init, so use this in cleanup routine
instead of again retrieving it. Also constify struct skl_dsp_ops.

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
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>


# eee0e16f 01-Jan-2017 Jeeja KP <jeeja.kp@intel.com>

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>


# 786e1c37 28-Nov-2016 Takashi Iwai <tiwai@suse.de>

ASoC: intel: Replace kthread with work

The usage pattern of kthread worker in Intel SST drivers can be
replaced gracefully with the normal workqueue, which is more light-
weight and easier to manage in general. Let's do it.

While in the replacement, move the schedule_work() call inside the
spinlock for excluding the race, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# a83e3b4c 03-Nov-2016 Vinod Koul <vkoul@kernel.org>

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>


# 8a0cb236 03-Nov-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Add support for LPMode

For D0i3, we need to tell DSP to run the pipelines in LP mode. This
information is kept in topology and passed to driver as an attribute
for pipe.

So add a new tuple for lpmode and program the pipe based on value set.

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>


# 5bb4cd46 03-Nov-2016 Jayachandran B <jayachandran.b@intel.com>

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>


# a26a3f53 03-Nov-2016 Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>

ASoC: Intel: Skylake: Add support for programming D0i3C

To set the controller in D0i3 mode, the driver needs to set D0i3C
register after DSP is quiesced. Since the D0iX entry/exit is done by IPC,
add this as callback so that it can be invoked from IPC module.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
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>


# 41b7523f 03-Nov-2016 Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>

ASoC: Intel: Skylake: Add D0iX IPCs

The audio DSP supports intermediate power states between D0 and D3
states. These states are D0i0 and D0i3 states.

Collectively we refer these two states as D0iX states.

To set or wake up from these states, driver also needs to send an IPC "Set D0iX
IPC" before doing anything else.

Add support for this new IPC messages.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
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>


# 3d4006cd 26-Jul-2016 Senthilnathan Veppur <senthilnathanx.veppur@intel.com>

ASoC: Intel: Skylake: Add module processing domain support

A module can be scheduled in deferent processing domains in DSP. Topology
specifies the module domain.

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>


# 8d983be8 26-Jul-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Fix a comment style

While changing code notice bad comment style, so fix it up.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 20fb2fbd 26-Jul-2016 Ramesh Babu <ramesh.babu@intel.com>

ASoC: Intel: Skylake: Add library loading IPCs

DSP fw can have additional firmwares as libs. These libs can be
loaded using message IPC_GLB_LOAD_LIBRARY.

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>


# 15ecaba9 26-Jul-2016 Kranthi G <gudishax.kranthikumar@intel.com>

ASoC: Intel: Skylake: add support for tplg manifest load

Topology manifest gives information about the libraries to be
loaded. Implement the topology manifest load callback to get
this.

Signed-off-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@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>


# 78cdbbda 26-Jul-2016 Vinod Koul <vkoul@kernel.org>

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>


# 052f103c 20-Jun-2016 Jayachandran B <jayachandran.b@intel.com>

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>


# 1665c177 13-Jun-2016 Jayachandran B <jayachandran.b@intel.com>

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>


# fe3f4442 03-Jun-2016 Dharageswari R <dharageswari.r@intel.com>

ASoC: Intel: Skylake: Clean up of driver resources in suspend

On suspend firmware is re-initialized so resources are reset inside
firmware. Driver should also clear the firmware counters at this time.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# ea6b3e94 30-May-2016 Shreyas NC <shreyas.nc@intel.com>

ASoC: Intel: Skylake: Add DSP firmware manifest parsing

Module params like module_id and loadable flag can be changed
in the DSP Firmware. These are kept in the firmware manifest
and driver should read these values from this manifest.

So, add support to parse the DSP firmware manifest and
read these module params.

Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0c8ba9d2 18-Dec-2015 Jayachandran B <jayachandran.b@intel.com>

ASoC: Intel: Skylake: fix reset controller sequencing

MISCBDCGE is a new register for Misc Backbone clock gate control
which is useful to control while resetting the link and ensuring
controller is in required state so add API to control it

HW recommends that we reset with CGCTL.MISCBDCGE disabled, so add
that while doing init chip and reset sequence.

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>


# cce1c7f3 03-Dec-2015 Mousami Jana <mousami.janax@intel.com>

ASoC: Intel: Skylake: add LARGE_CONFIG_GET IPC support

For messages which have larger payload than mailbox data, we need
to split the payload using set of messages containing mailbox
size as payload.

For sending such payload we already support LARGE_CONFIG_SET
IPCs and now to query such payload add LARGE_CONFIG_GET IPC

Signed-off-by: Mousami Jana <mousami.janax@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 6c5768b3 03-Dec-2015 Dharageswari R <dharageswari.r@intel.com>

ASoC: Intel: Skylake: Add support for Loadable modules

A module is loaded when the path consisting the module is opened.
The module binary(ies) is loaded from file system and cached in
kernel memory for future use. This is downloaded to DSP using DMA
and invoking Load module IPCs

This patch adds support for load/unload module IPCs, DMAing
modules and manging the modules

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 84c9e283 09-Oct-2015 Jeeja KP <jeeja.kp@intel.com>

ASoC: Intel: Skylake: Correct the runtime handler behaviour

On runtime pm resume, we need to download the firmware, also on
suspend we need to ensure all the interrupts from controller and
DSP are disabled.

Also since we download the firmware on resume, we don't need to do
so on init, so remove that bit

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b81fd263 09-Jul-2015 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ASoC: Intel: Add Skylake IPC library

This adds base SKL IPC library which uses common SST IPC lib.
Here we add definition for IPC types, sending and receiving IPC messages
from aDSP, handling interrupt, sending different types of messages etc

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>