aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-debug.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Intel: Remove skylake driverCezary Rojewski2024-08-191-248/+0
| | | | | | | | | | | | | | | | | | | | | | | The avs-driver found in sound/soc/intel/avs is a direct replacement to the existing skylake-driver. It covers all features supported by it and more and aligns with the recommended flows and requirements based on Windows driver equivalent. For the official kernel tree the deprecation begun with v6.0. Most skylake-drivers users moved to avs- or SOF-driver when AudioDSP capabilities are available on the platform or to snd-hda-intel (sound/pci/hda) when such capabilities are not. For the supported trees the deprecation begun with v5.4 with v5.15 being the first where the skylake-driver is disabled entirely. All machine board drivers that consume the DSP driver have their replacements present within sound/soc/intel/avs/boards/ directory. Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
* ASoC: intel: skl: Fix possible buffer overflow in debug outputsTakashi Iwai2020-02-191-14/+14
| | | | | | | | | | | | | | | The debugfs output of intel skl driver writes strings with multiple snprintf() calls with the fixed size. This was supposed to avoid the buffer overflow but actually it still would, because snprintf() returns the expected size to be output, not the actual output size. Fix it by replacing snprintf() calls with scnprintf(). Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai <[email protected]> Acked-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
* ASoC: intel: skl: Fix pin debug printsTakashi Iwai2020-02-191-1/+3
| | | | | | | | | | | | skl_print_pins() loops over all given pins but it overwrites the text at the very same position while increasing the returned length. Fix this to show the all pin contents properly. Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai <[email protected]> Acked-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
* Merge branch 'asoc-5.4' into asoc-nextMark Brown2019-09-091-29/+13
|\
| * ASoC: Intel: SoC: skylake: no need to check return value of debugfs_create ↵Greg Kroah-Hartman2019-08-011-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Also, if a debugfs call fails, userspace is notified with an error in the log, so no need to log the error again. Cc: Pierre-Louis Bossart <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Jie Yang <[email protected]> Cc: Mark Brown <[email protected]> Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
| * ASoC: Intel: Skylake: Make MCPS and CPS params obsoleteCezary Rojewski2019-07-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per FW Interface Modules Configuration, init instance IPC request requires base initial module configuration. This configuration structure is made of: - cpc (chunks per cycle) - ibs (input buffer size) - obs (output buffer size) - is_pages (memory pages required) - audio_fmt (self explanatory) Skylake topology accepts following tokens: MCPS, CPS and CPC. All of these are directly connected. Moreover, assigning one of these allows to calculate the remaining two. In simplest scenario and assuming 1ms scheduling, following is true: CPS = CPC times 1000 MCPS = CPS times 1000 000 Note: these calculations vary depending on scenario and scheduling requirements. Given the current implementation, userspace is allowed to provide different values for all three causing informational chaos. On top of that, struct skl_base_cfg which represents base module configuration, incorrectly takes CPS param instead of CPC. This ambiguity may lead to user unintentionally providing improper values to DSP firmware and thus impacting module scheduling in unexpected fashion. Fix by making MCPS and CPS topology params obsolete and relying solely on CPC value. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
| * ASoC: Intel: Skylake: Merge skl_sst and skl into skl_dev structCezary Rojewski2019-07-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
* | ASoC: Intel: Skylake: Use correct function to access iomem spaceAmadeusz Sławiński2019-08-271-1/+1
|/ | | | | | | | | | | | | | | | | | For copying from __iomem, we should use __ioread32_copy. reported by sparse: sound/soc/intel/skylake/skl-debug.c:437:34: warning: incorrect type in argument 1 (different address spaces) sound/soc/intel/skylake/skl-debug.c:437:34: expected void [noderef] <asn:2> *to sound/soc/intel/skylake/skl-debug.c:437:34: got unsigned char * sound/soc/intel/skylake/skl-debug.c:437:51: warning: incorrect type in argument 2 (different address spaces) sound/soc/intel/skylake/skl-debug.c:437:51: expected void const *from sound/soc/intel/skylake/skl-debug.c:437:51: got void [noderef] <asn:2> *[assigned] fw_reg_addr Signed-off-by: Amadeusz Sławiński <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
* Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown2019-06-261-9/+1
|\ | | | | | | Linux 5.2-rc6
| * treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285Thomas Gleixner2019-06-051-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 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 <[email protected]> Reviewed-by: Alexios Zavras <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
* | ASoC: Intel: Skylake: Add function to cleanup debugfs interfaceAmadeusz Sławiński2019-06-251-0/+9
|/ | | | | | | | | Currently debugfs has no cleanup function. Add skl_debufs_exit function so we can clean after ourselves properly. Signed-off-by: Amadeusz Sławiński <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: topology: Move skl-tplg-interface.h to uapiGuenter Roeck2018-06-011-1/+1
| | | | | | | | | | | | | | skl-tplg-interface.h describes firmware format details for Skylake topology files. It is part of the ABI and should reside in the uapi directory. While moving the file, also replace the license boilerplate with the SPDX License Identifier. No functional change. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: intel: skylake: fix spelling mistake: "Homogenous" -> "Homogeneous"Colin Ian King2018-05-211-2/+2
| | | | | | | Trivial fix to spelling mistake in snprintf literal string Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: intel: skylake: replace platform to componentKuninori Morimoto2018-02-121-1/+1
| | | | | | | | Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: "Kp, Jeeja" <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: Intel: Skylake: Remove driver debugfs exitVinod Koul2017-07-031-8/+0
| | | | | | | | | | | | | | For driver debugfs, debugfs_remove_recursive() is called which is not needed as it is already done in ASoC core debugfs. And a device managed memory need not be freed explicitly as device core frees it up. So remove unnecessary skl_debugfs_exit(). Fixes: 5cdf6c09ca9d ASoC: ("Intel: Skylake: Add debugfs support") Reported-by: Julia Lawall <[email protected]> Reported-by: kbuild test robot <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: Intel: Skylake: explicitly add the headers sst-dsp.hVinod Koul2017-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit bdd0384a5ada ("ASoC: Intel: Skylake: Add support to read firmware registers") introduced firmware register read so added sst-dsp-priv.h but missed adding sst-dsp.h as that leads to below compiler warning: In file included from sound/soc/intel/skylake/skl-debug.c:23:0: >> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: 'struct sst_pdata' declared inside parameter list [enabled by default] int (*init)(struct sst_dsp *sst, struct sst_pdata *pdata); ^ >> sound/soc/intel/skylake/../common/sst-dsp-priv.h:63:42: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] So add the missing header. Fixes: bdd0384a5ada ("ASoC: Intel: Skylake: Add support to read firmware registers") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: Intel: Skylake: Add support to read firmware registersVunny Sodhi2017-06-301-0/+57
| | | | | | | | | | | | | | This patch adds debugfs support to read fw registers, mailbox offsets and sram address. Signed-off-by: Mousumi Jana <[email protected]> Signed-off-by: Ramesh Babu <[email protected]> Signed-off-by: Jayachandran B <[email protected]> Signed-off-by: Pardha Saradhi K <[email protected]> Signed-off-by: Vunny Sodhi <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Acked-By: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: Intel: Skylake: Debugfs facility to dump module configVinod Koul2017-06-301-0/+156
| | | | | | | | | | | Driver modules have lot of information represented in struct skl_module_cfg. Knowing this is useful for debug, so enable debugfs for this structure. Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Vunny Sodhi <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Signed-off-by: Mark Brown <[email protected]>
* ASoC: Intel: Skylake: Add debugfs supportVinod Koul2017-06-301-0/+55
For debug, the kernel debugfs mechanism is available. We can add various debug options for driver like module configuration read, firmware register read etc. This patch adds debugfs as a child to asoc plaform component and caller is added for skylake driver to do init and cleanup of debugfs. Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Vunny Sodhi <[email protected]> Signed-off-by: Guneshwor Singh <[email protected]> Signed-off-by: Mark Brown <[email protected]>