History log of /linux-master/sound/soc/intel/skylake/skl-sst.c
Revision Date Author Comments
# a4bebce2 06-Oct-2020 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: Intel: Skylake: Unassign ram_read and read_write ops

Skylake driver makes no use of ram_read or ram_write operation so remove
the assignments. This prepares sound/soc/common/sst-dsp* for following
removal of unused DSP operations.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://lore.kernel.org/r/20201006064907.16277-8-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0d8aa2cc 07-Aug-2020 Randy Dunlap <rdunlap@infradead.org>

ASoC: various vendors: delete repeated words in comments

Drop the repeated words {related, we, is, the} in comments.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20200808012209.10880-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# ff30779b 21-Jun-2019 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

ASoC: Intel: Skylake: Print constant literals from format specifier

Instead of using two additional "%s" specifiers, put the constant string
literals directly to the format specifier.

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190621113116.47525-1-andriy.shevchenko@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>


# 9e0784d0 19-Jun-2019 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

ASoC: Intel: Skylake: Switch to modern UUID API

Switch the driver to use modern UUID API, i.e. guid_t type and
accompanying functions, such as guid_equal().

Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.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>


# 651e4890 01-Apr-2018 Pradeep Tewani <pradeep.d.tewani@intel.com>

ASoC: Intel: Skylake: Unify the fw ops for SKL and KBL

SKL and KBL driver used separate set of fw ops for library loading.
However, with the unification of fw binary, use the common set of fw
ops for both

Signed-off-by: Pradeep Tewani <pradeep.d.tewani@intel.com>
Signed-off-by: Sriram Periyasamy <sriramx.periyasamy@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8e9d8e19 17-Dec-2017 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

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>


# 3b3011ad 22-Aug-2017 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

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>


# 2788808a 11-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

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>


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

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>


# 363d4538 02-Aug-2017 Dharageswari R <dharageswari.r@intel.com>

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>


# 09e914d6 29-Jun-2017 Guneshwor Singh <guneshwor.o.singh@intel.com>

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>


# b6726009 24-Apr-2017 Sodhi, VunnyX <vunnyx.sodhi@intel.com>

ASoC: Intel: Skylake: Add loadable module support on KBL platform

Kabylake platform expects modules in a library manifest. After loading
base firmware library manifest is loaded using load library IPC. This is
followed by module load using load multiple modules IPC.

Signed-off-by: Sodhi, VunnyX <vunnyx.sodhi@intel.com>
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>


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

ASoC: Intel: Skylake: Register dsp_fw_ops for kabylake

For audio kabylake is same as skylake except the module load approach.
This patch registers different dsp_fw_ops for kabylake and next patch
adds the module load support for kabylake.

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>


# 4e0277d2 24-Apr-2017 G Kranthi <gudishax.kranthikumar@intel.com>

ASoC: Intel: Skylake: Modify arguments to reuse module transfer function

Kabylake also uses code loader dma for module load and library load.
skl_transfer_module can be reused. Modify the arguments to include
library index to be passed to lib load ipc and module/lib check to use
correct ipc for lib/module load.

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>


# 9fe9c711 24-Apr-2017 G Kranthi <gudishax.kranthikumar@intel.com>

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>


# f7ea7777 24-Mar-2017 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Don't unload module when in use

A module may have multiple instances in DSP, so unload only when usage
count is zero.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@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>


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

ASoC: Intel: Skylake: Release FW ctx in cleanup

Saved firmware ctx was not never released, so release Firmware
ctx in cleanup routine.

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>


# ecd286a9 16-Sep-2016 Colin Ian King <colin.king@canonical.com>

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>


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

ASoC: Intel: Skylake: 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.

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


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

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>


# 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>


# 40a16603 20-Jun-2016 Jayachandran B <jayachandran.b@intel.com>

ASoC: Intel: Skylake: Support multi-core in Skylake

Add multicore DSP support in Skylake 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>


# 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>


# a35aeaee 14-Jun-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Check for module list being NULL

While clearing loaded module count, we should check first to see
if module list is NULL or not. Some distributions can ship with
no modules and thus list can be empty.

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>


# 06711051 30-May-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Find uuids for Skylake

SKylake uses different offset in manifest for parsing module
table. So invoke common parsing utility from skylake using
skylake offset.

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


# cd63655e 30-May-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Strip manifest for Skylake platform

Future firmware updates may comes with extended manifest so invoke
skl_dsp_strip_extended_manifest() to check and strip

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>


# 95536d8c 28-Apr-2016 Dharageswari.R <dharageswari.r@intel.com>

ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up

If request firmware fails at init, the code loader DMA allocation
can be NULL, so check for boot complete before freeing up these
resources

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>


# 09305da9 21-Apr-2016 Shreyas NC <shreyas.nc@intel.com>

ASoC: Intel: Skylake: Use UUID in binary format

To avoid complex string manipulations with UUID in canonical
form, use UUID in binary format.

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>


# 39fa37d5 10-Mar-2016 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Move module id defines

The module ID defines are common to other platforms so can be
reused if moved to a common driver header so move it

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>


# db4e5613 14-Dec-2015 Dan Carpenter <dan.carpenter@oracle.com>

ASoC: Intel: Skylake: Fix a couple signedness bugs

These need to be signed because they hold negative error codes.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-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>


# 53afce2c 13-Nov-2015 Jeeja KP <jeeja.kp@intel.com>

ASoC: Intel: Skylake: Reset the DSP when set D3 fails

Sometimes firmware D3 IPC fails causing firmware to be in invalid
state. To recover we need to reset the DSP and then shut it down,
so don't return on error and continue resetting to recover.

On D0, firmware will be redownloaded and DSP will be back in
clean state

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>


# ae395937 13-Nov-2015 Jeeja KP <jeeja.kp@intel.com>

ASoC: Intel: Skylake: Fix cleanup of dma buffer

During firmware download, dma buffers are allocated in prepare
and never freed on clean up. This patch frees the allocated dma
buffer in cldma controller clean up.

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>


# aecf6fd8 05-Nov-2015 Vinod Koul <vkoul@kernel.org>

ASoC: Intel: Skylake: Use the fw name from ACPI mach table

The firmware name is hard coded which doesnt allow to load
different platforms for various platforms so get this name from
available machine table and pass it to dsp context for loading

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


# b4fe965f 30-Oct-2015 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init fails

This patch fixes the below warning reported by Dan by invoking
skl_sst_dsp_cleanup() in cleanup path on error and not bailing out

sound/soc/intel/skylake/skl-sst.c:270 skl_sst_dsp_init()
info: ignoring unreachable code.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@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>


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

ASoC: Intel: Skylake: Add SKL DSP initialization

This adds the dsp and ipc initialization for the Skylake platform.
It also requests firmware and uses code loader dma to load it.

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>