aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-sst.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-08-15ASoC: Intel: Skylake: Print constant literals from format specifierAndy Shevchenko1-2/+1
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>
2019-07-24ASoC: Intel: Skylake: Merge skl_sst and skl into skl_dev structCezary Rojewski1-25/+26
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>
2019-06-26Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown1-9/+1
Linux 5.2-rc6
2019-06-20ASoC: Intel: Skylake: Switch to modern UUID APIAndy Shevchenko1-3/+1
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>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 490Thomas Gleixner1-9/+1
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>
2018-04-17ASoC: Intel: Skylake: Unify the fw ops for SKL and KBLPradeep Tewani1-32/+2
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>
2017-12-20ASoC: Intel: Skylake: Request IRQ late only after all context are initializedSubhransu S. Prusty1-1/+1
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-08-23ASoC: Intel: Skylake: Fix to free dsp resource on ipc_init failureSubhransu S. Prusty1-1/+3
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-16ASoC: Intel: Skylake: make skl_dsp_fw_ops constBhumika Goyal1-2/+2
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-03ASoC: Intel: Skylake: Move platform specific init to platform dsp_init()Guneshwor Singh1-0/+4
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-03ASoC: Intel: Skylake: Add num of cores in dsp opsDharageswari R1-2/+0
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-06-30ASoC: Intel: Skylake: Add sram address to sst_addr structureGuneshwor Singh1-0/+5
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-04-26ASoC: Intel: Skylake: Add loadable module support on KBL platformSodhi, VunnyX1-6/+58
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>
2017-04-26ASoC: Intel: Skylake: Register dsp_fw_ops for kabylakeSubhransu S. Prusty1-0/+30
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>
2017-04-26ASoC: Intel: Skylake: Modify arguments to reuse module transfer functionG Kranthi1-6/+9
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>
2017-04-26ASoC: Intel: Skylake: Move sst common initialization to a helper functionG Kranthi1-26/+6
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-03-29ASoC: Intel: Skylake: Don't unload module when in useVinod Koul1-0/+5
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>
2017-03-15ASoC: Intel: Skylake: Fix module load when module size > DMA buffer sizeJeeja KP1-12/+41
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>
2017-01-06ASoC: Intel: Skylake: Release FW ctx in cleanupJeeja KP1-0/+3
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>
2016-09-24ASoC: Intel: Skylake: add missing \n to end of dev_* messagesColin Ian King1-3/+3
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-08-08ASoC: Intel: Skylake: Parse UUIDs onceVinod Koul1-7/+9
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>
2016-08-08ASoC: Intel: Skylake: add additional args to module parsingSenthilnathan Veppur1-1/+1
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-08ASoC: Intel: Skylake: split fw and dsp initializationVinod Koul1-10/+17
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-06-22ASoC: Intel: Skylake: Support multi-core in SkylakeJayachandran B1-29/+48
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>
2016-06-22ASoC: Intel: Skylake: Add DSP muti-core infrastructureJayachandran B1-7/+9
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-14ASoC: Intel: Skylake: Check for module list being NULLVinod Koul1-0/+3
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>
2016-06-14ASoC: Intel: Skylake: Enable firmware reload in suspendJayachandran B1-0/+1
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-07ASoC: Intel: Skylake: Clean up of driver resources in suspendDharageswari R1-0/+10
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>
2016-05-30ASoC: Intel: Skylake: Find uuids for SkylakeVinod Koul1-0/+14
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>
2016-05-30ASoC: Intel: Skylake: Strip manifest for Skylake platformVinod Koul1-1/+8
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>
2016-05-02ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean upDharageswari.R1-0/+4
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>
2016-04-21ASoC: Intel: Skylake: Use UUID in binary formatShreyas NC1-3/+6
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>
2016-03-12ASoC: Intel: Skylake: Move module id definesVinod Koul1-3/+0
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>
2015-12-16ASoC: Intel: Skylake: Fix a couple signedness bugsDan Carpenter1-3/+3
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>
2015-12-08ASoC: Intel: Skylake: Add support for Loadable modulesDharageswari R1-0/+175
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>
2015-11-18ASoC: Intel: Skylake: Reset the DSP when set D3 failsJeeja KP1-10/+10
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>
2015-11-18ASoC: Intel: Skylake: Fix cleanup of dma bufferJeeja KP1-5/+5
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>
2015-11-16ASoC: Intel: Skylake: Use the fw name from ACPI mach tableVinod Koul1-2/+3
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>
2015-11-16ASoC: Intel: Skylake: Fix to cleanup if skl_sst_dsp_init failsSubhransu S. Prusty1-3/+4
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>
2015-10-09ASoC: Intel: Skylake: Correct the runtime handler behaviourJeeja KP1-26/+30
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>
2015-07-16ASoC: Intel: Skylake: Add SKL DSP initializationSubhransu S. Prusty1-0/+280
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>