Firmwares may provide some firmware wide configuration regions which can
be configured by the coefficient files using the firmware ID as the
algorithm ID, include these in the algorithm list.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Now that we have regular register mapped controls we should be splitting
the control sets for ADSP1 and ADSP2 as the register maps are not
identical. Do that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since ASoC does not yet really have the framework features needed to
support propagating sample rates through the device well yet implement
basic support for the ISRCs equivalent to that we currently have for the
ASRCs. The user can opt for 8kHz or 16kHz as the rate for the DSP blocks
in addition to the main audio rate, these being the primary use cases.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Older .bin files report the global coefficients as absolute address writes
to zero; maintain compatibility with them.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
'file' is malloced in wm_adsp_load_coeff() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Allow the regmap API to use asynchronous I/O where supported to minimise
the delay between transfers, reducing firmware download times.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Maximise robustness for the widest range of firmwares by ensuring the DSP
is in a consistent state when halted.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch correctly releases the firmware if the magic string in the
firmware header does not match.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Sets the ADSP1 clock rate to match the system clock
rate. To support this the codec driver provides
details of register containing the system clock
control bits.
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
WMDR coefficient files can specify coefficients in terms of algorithm
specific data regions. Record the start addresses of these regions while
parsing the algorithms and then use them to handle coefficients with
these formats.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we run into I/O problems the algorithm count may be crazy, validate it
before we proceed and dump the read data for diagnostic purposes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ADSP devices report information on the algorithms loaded on them. Parse
this data and use it to allow coefficients to be configured for specific
algorithms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Otherwise we won't run correctly on systems that require this for larger
data transfers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Some ADSP devices can make use of DVFS to optimise power consumption
depending on the operating frequency of the DSP core. Implement
support for this in the generic ADSP code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>