- 18 1月, 2021 1 次提交
-
-
由 James Schulman 提交于
When switching between firmware types, the wrong control can be selected when requesting control in kernel API. Use the currently selected DSP firwmare type to select the proper mixer control. Signed-off-by: NJames Schulman <james.schulman@cirrus.com> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210115201105.14075-1-james.schulman@cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 11 12月, 2020 1 次提交
-
-
由 Dan Carpenter 提交于
The error handling frees "ctl" but it's still on the "dsp->ctl_list" list so that could result in a use after free. Remove it from the list before returning. Fixes: 2323736d ("ASoC: wm_adsp: Add basic support for rev 1 firmware file format") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/X9B0keV/02wrx9Xs@mwandaSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 25 11月, 2020 1 次提交
-
-
由 Luo Meng 提交于
Fix to return a negative error code from the error handling case instead of 0 in function wm_adsp_load(), as done elsewhere in this function. Fixes: 170b1e12 ("ASoC: wm_adsp: Add support for new Halo core DSPs") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NLuo Meng <luomeng12@huawei.com> Acked-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201123133839.4073787-1-luomeng12@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 10月, 2020 1 次提交
-
-
由 Adam Brickman 提交于
A call to wm_adsp_write_ctl() could cause a kernel crash if it does not retrieve a valid kcontrol from snd_soc_card_get_kcontrol(). This can happen due to a missing control name prefix. Then, snd_ctl_notify() crashes when it tries to use the id field. Modified wm_adsp_write_ctl() to incorporate the name_prefix (if applicable) such that it is able to retrieve a valid id field from the kcontrol once the platform has booted. Fixes: eb65ccdb ("ASoC: wm_adsp: Expose mixer control API") Signed-off-by: NAdam Brickman <Adam.Brickman@cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201001152425.8590-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 8月, 2020 1 次提交
-
-
由 Charles Keepax 提交于
It seems the datasheet has never used the word slave for this error status bit and has always used the term address error. So update the driver to match the datasheets and also in the process align a bit better with avoiding the use of such words where possible. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200818160126.4852-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 24 7月, 2020 1 次提交
-
-
由 James Schulman 提交于
Coefficient files now support additional metadata blocks, these contain machine parsable text strings describing the parameters contained in the coefficient file. Signed-off-by: NJames Schulman <james.schulman@cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200723110321.16382-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 22 6月, 2020 1 次提交
-
-
由 Vlad Karpovich 提交于
Exposed additional mixer controls to select calibration or diagnostic firmware. 'Calibration' --> chip-dsp<id>-spk-cali.wmfw (.bin) 'Diagnostic' --> chip-dsp<id>-spk-diag.wmfw (.bin) Signed-off-by: NVlad Karpovich <Vlad.Karpovich@cirrus.com> Signed-off-by: NDavid Rhodes <david.rhodes@cirrus.com> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200619212651.2739-1-david.rhodes@cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 22 4月, 2020 1 次提交
-
-
由 Kuninori Morimoto 提交于
We can use snd_compress_ops. Let's switch to use it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/87tv1evdlu.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 27 3月, 2020 1 次提交
-
-
由 Kuninori Morimoto 提交于
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87wo7bhci3.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 13 3月, 2020 1 次提交
-
-
由 Takashi Iwai 提交于
snprintf() is a hard-to-use function, it's especially difficult to use it for concatenating substrings in a buffer with a limited size. Since snprintf() returns the would-be-output size, not the actual size, the subsequent use of snprintf() may point to the incorrect position. Use scnprintf() instead for fixing such potential errors. Signed-off-by: NTakashi Iwai <tiwai@suse.de> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200313130334.9028-1-tiwai@suse.deSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 17 1月, 2020 1 次提交
-
-
由 Charles Keepax 提交于
The recently added API that exposes firmware mixer controls to the kernel is missing cache handling and all writes bypass the cache, this obviously causes the cache to get out of sync with the hardware. Factor out the cache handling into two new helper functions and call those from both the normal ALSA control handlers and the new kernel API. Fixes: eb65ccdb ("ASoC: wm_adsp: Expose mixer control API") Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200114161841.451-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 11月, 2019 1 次提交
-
-
由 Li Xu 提交于
Expose mixer control API for reading and writing controls from the kernel. This API can be used by ALSA kernel drivers with ADSP support to read and write firmware-defined memory regions. Signed-off-by: NLi Xu <li.xu@cirrus.com> Signed-off-by: NDavid Rhodes <david.rhodes@cirrus.com> Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/1573847653-17094-2-git-send-email-david.rhodes@cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 10月, 2019 2 次提交
-
-
由 Stuart Henderson 提交于
User space always expects to be able to read ALSA controls, so ensure no kcontrols are generated without an appropriate READ flag. In the case of a read of such a control zeros will be returned. Signed-off-by: NStuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20191002084240.21589-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Li Xu 提交于
Fix potential NULL pointer dereference for alg_region in wm_adsp_buffer_parse_legacy. In practice this can never happen as loading the firmware should have failed at the wm_adsp2_setup_algs stage, however probably better for the code to be robust against future changes and this is more helpful for static analysis. Signed-off-by: NLi Xu <li.xu@cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20191001130911.19238-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 26 7月, 2019 1 次提交
-
-
由 Charles Keepax 提交于
There is no need for end drivers to add helper functions to allow the bus error handler to be called, simply update the prototype so it can be called directly. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20190725163931.24964-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 6月, 2019 1 次提交
-
-
由 Thomas Gleixner 提交于
Based on 2 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 version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NEnrico Weigelt <info@metux.net> Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org> Reviewed-by: NAllison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 6月, 2019 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
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. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 02 5月, 2019 2 次提交
-
-
由 Charles Keepax 提交于
Due to a typo the wrong base is being supplied for the primary algorithm on Halo firmwares, which will cause the controls to not function. Fixes: 170b1e12 ("ASoC: wm_adsp: Add support for new Halo core DSPs") Reported-by: NStuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Whilst this isn't strictly necessary as the code is already DSP specific better to use the pointers to avoid potential issues in the future if one core ends up having multiple methods of stopping the watchdog. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 4月, 2019 1 次提交
-
-
由 Charles Keepax 提交于
It is unsafe to call snd_compr_stop_error from outside of the compressed ops. Firstly the compressed device lock needs to be held and secondly it queues error work to issue a trigger stop which should not happen after the stream has been freed. To avoid these issues use the same trick used for the IRQ handling, simply send a snd_compr_fragment_elapsed to cause user-space to wake on the poll, then report the error when user-space issues the pointer request after it wakes. Fixes: a2bcbc1b ("ASoC: wm_adsp: Shutdown any compressed streams on DSP watchdog timeout") Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@kernel.org
-
- 03 4月, 2019 3 次提交
-
-
由 Charles Keepax 提交于
Tidy up some instances of dereferencing to obtain things that are already stored in local variables. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
wm_adsp_compr_detach is NULL aware so there is no need to check for NULL before calling it, remove the redundant check. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Trigger stop can be called in situations where trigger start failed and as such it can't be assumed the buffer is already attached to the compressed stream or a NULL pointer may be dereferenced. Fixes: 639e5eb3 ("ASoC: wm_adsp: Correct handling of compressed streams that restart") Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 4月, 2019 1 次提交
-
-
由 Charles Keepax 提交于
Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 3月, 2019 1 次提交
-
-
由 Charles Keepax 提交于
The wm_adsp_ops structures should be static and correct two printf specifiers. Fixes: 170b1e12 ("ASoC: wm_adsp: Add support for new Halo core DSPs") Fixes: 4e08d50d ("ASoC: wm_adsp: Factor out DSP specific operations") Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 19 3月, 2019 12 次提交
-
-
由 Stuart Henderson 提交于
Signed-off-by: NStuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Richard Fitzgerald 提交于
A Halo Core DSP has a memory protection unit that can trap and signal memory access faults. This patch adds a function that dumps the fault information. The interrupt reaches the host via the parent codec interrupt controller so this fault function is exported to be called by the codec driver. Signed-off-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Wen Shi 提交于
The Halo core is a new generation of audio DSP architecture from Cirrus Logic. A new iteration of the WMFW file format (v3) is also added, for this new architecture. Currently this format is not supported on the old ADSP2 architecture however support may be added for it in the future. Signed-off-by: NWen Shi <wenshi@opensource.cirrus.com> Signed-off-by: NPiotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
In preparation for the addition of more types of DSP core refactor the handling of DSP specific operations such as starting the memory or enabling the core into a set of callbacks. This should make it easier to add new core types and allow for more code reuse between them. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
There is no need to duplicate this code for both ADSP1 and 2 as the handling is exactly the same. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
In preparation for further additions refactor the reading of the firmware status. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Richard Fitzgerald 提交于
The original wm_adsp2_early_event took an additional frequency argument for clocking control so could not be used directly as a DAPM callback. But this setup could equally be done by the codec driver function wrapping wm_adsp2_early event. In preparation for adding support for new core types wm_adsp2_set_dspclk has been exported, and the freq argument removed so that it can be used directly as a DAPM callback. Signed-off-by: NRichard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
This function is not presently called from outside the adsp code and nor should it be, as such stop exporting it. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
If a watchdog timeout is received from the DSP it is safe to assume the DSP is not functioning anymore and as such any active compressed streams should be put into an error state. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Best to lock across handling the bus error to ensure the DSP doesn't change power state as we are reading the status registers. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
During recent logging improvements it seems two error messages lost their updates during patch application/rebasing. Add these back in. Fixes: 0d3fba3e ("ASoC: wm_adsp: Improve logging messages") Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Previously support was added to allow streams to be stopped and started again without the DSP being power cycled and this was done by clearing the buffer state in trigger start. Another supported use-case is using the DSP for a trigger event then opening the compressed stream later to receive the audio, unfortunately clearing the buffer state in trigger start destroys the data received from such a trigger. Correct this issue by moving the call to wm_adsp_buffer_clear to be in trigger stop instead. Fixes: 61fc060c ("ASoC: wm_adsp: Support streams which can start/stop with DSP active") Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 22 2月, 2019 3 次提交
-
-
由 Charles Keepax 提交于
As the compressed stream implementation has acquired support for multiple DAI links and compressed streams it has become harder to interpret messages in the kernel log. Add additional macros to include the compressed DAI name in the log messages, allowing different streams to be easily disambiguated. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Stuart Henderson 提交于
Currently, only a single compressed stream is supported per firmware. Add support for multiple compressed streams on a single firmware, this allows additional features like completely independent trigger words or separate debug capture streams to be implemented. Signed-off-by: NStuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
Make the code slightly clearer and prepare things for the addition of multiple compressed streams on a single DSP core. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-