summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wmfw.h
AgeCommit message (Collapse)AuthorFilesLines
2021-09-27firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPsSimon Trimmer1-202/+0
wm_adsp originally provided firmware loading on some audio DSP and was implemented as an ASoC codec driver. However, the firmware loading now covers a wider range of DSP cores and peripherals containing them, beyond just audio. So it needs to be available to non-audio drivers. All the core firmware loading support has been moved into a new driver cs_dsp, leaving only the ASoC-specific parts in wm_adsp. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-17-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-09-27ASoC: wm_adsp: Remove use of snd_ctl_elem_type_tSimon Trimmer1-3/+5
In preparation for moving the generic DSP support out of ASoC, remove the use of the ALSA specific types for the control type. The use of an ALSA type was unnecessary, the simplified code is easier to read and avoids Sparse warnings. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210913160057.103842-2-simont@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-31ASoC: wm_adsp: Use snd_ctl_elem_type_t for control typesRichard Fitzgerald1-3/+3
Sparse will complain about trying to convert between values declared as snd_ctl_elem_type_t and other types. This patch converts to consistently use snd_ctl_elem_type_t for control type values. A __force cast is needed in a couple of cases where the control type value is parsed out of a DSP data block. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20201230172427.13865-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: wm_adsp: Support new metadata block ID'sJames Schulman1-0/+1
Coefficient files now support additional metadata blocks, these contain machine parsable text strings describing the parameters contained in the coefficient file. Signed-off-by: James Schulman <james.schulman@cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200723110321.16382-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
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: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19ASoC: wm_adsp: Add support for new Halo core DSPsWen Shi1-0/+30
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: Wen Shi <wenshi@opensource.cirrus.com> Signed-off-by: Piotr Stankiewicz <piotrs@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-19ASoC: wm_adsp: Parse HOST_BUFFER controlsRichard Fitzgerald1-0/+1
Currently the compressed streams in DSP firmwares are identified essentially by looking at a fixed location inside the firmware. This is fragile and also limits things to a single compressed stream. Here a new form of firmware parameter is added, the HOST_BUFFER which identifies a compressed stream from meta-data in the firmware file. This is more robust and allows for the possiblity of using multiple streams per core in the future. Currently the implementation is still limited to a single stream and will use the first HOST_BUFFER parameter encountered. If there aren't any HOST_BUFFER parameters it will fall back to the legacy way of finding the host buffer. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11ASoC: wm_adsp: Support acknowledged controlsRichard Fitzgerald1-0/+1
This patch handles publishing acknowledged controls through ALSA. These controls allow user-side to send events to the firmware and wait for the firmware to acknowledge it. Note that although acked controls only operate in the direction host->firmware, and therefore they are write-only as seen from user- side code, we have to make them readable to account for all the code out there that assumes that ALSA controls are always readable (amixer for example.) Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11ASoC: wm_adsp: Signal firmware shutdown through event controlRichard Fitzgerald1-0/+3
If the firmware has any system event signalling controls, signal them during DSP PRE_PMD to tell the firmware it is about to be stopped. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: wm_adsp: Add support for DSP control flagsCharles Keepax1-0/+5
The DSP control information contains various hints about the usage of the control use these when handling the control. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: wm_adsp: Add basic support for rev 1 firmware file formatCharles Keepax1-3/+32
Revision one of the file format includes new algorithm and coefficient blocks which provide additional information about the controls exported by the firmware. This patch updates the processing to handle this version of the file format. Note that whilst this version of the format adds support for specifying a name for the control through the firmware file this has not been used and to keep compatibility with existing deployments no changes to the firmware control naming are made by this patch. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-27ASoC: wm_adsp: Improve variable namingCharles Keepax1-2/+2
We have wm_adsp_region, wm_adsp_alg_region, and wmfw_region, the variables for which are all frequently called region, this can get quite confusing when reviewing the code especially given some functions are quite long. Consistently use mem for wm_adsp_regions, alg_region for wm_adsp_alg_region and region for wmfw_region. Additionally, we use a mix of adsp and dsp for pointers to the wm_adsp structure standardise this on dsp. Finally, we use algs to refer to the number of algorithms quite frequently, change this to the more descriptive n_algs. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2013-01-18ASoC: wm_adsp: Implement support for coefficeint file format 1Mark Brown1-5/+10
Implement support for a new revision of the coefficeint file format for ADSP cores. Since coefficient file format 0 has not been widely deployed and is very unlikely to ever be used with this driver code support for it has been removed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-28ASoC: adsp: Add ADSP base supportMark Brown1-0/+29
Many current Wolfson devices feature DSPs based around an architecture known as ADSP. Since there is a lot of commonality in the system integration of these devices a common library will be used to provide support for them. This version provides equivalent support for ADSP1 to that currently included in the WM2200 driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Provide initial coefficient loadingMark Brown1-0/+43
Allow a coefficient set provided using the Wolfson callibration tools to be provided along with the firmware files. Currently only coefficient files which configure absolute register addresses are supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-05ASoC: wm2200: Initial DSP supportMark Brown1-0/+56
Support download and execution of firmwares to the DSPs on the WM2200. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>