summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm_adsp.c
AgeCommit message (Collapse)Author
2013-04-12Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown
2013-04-12Merge remote-tracking branch 'asoc/topic/adsp' into asoc-nextMark Brown
2013-04-11ASoC: wm_adsp: Add support for firmware wide coefficient blocksMark Brown
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>
2013-03-29ASoC: wm_adsp: Split ADSP1 and ADSP2 firmware controlsMark Brown
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>
2013-03-29ASoC: wm_adsp: Provide defines for firmwaresMark Brown
For future work to have specific handling for some firmwares. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-21ASoC: arizona: Basic support for ISRC rate selectionMark Brown
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>
2013-03-13ASoC: wm_adsp: Handle old .bin filesMark Brown
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>
2013-03-12ASoC: wm_adsp: fix possible memory leak in wm_adsp_load_coeff()Wei Yongjun
'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>
2013-02-11ASoC: wm_adsp: round to 4-byte boundary for coeff file blocksChris Rattray
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04ASoC: wm_adsp: Use asynchronous I/O to write firmware and coefficientsMark Brown
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>
2013-01-30ASoC: wm_adsp: Fix support for firmware switching on DSP2 and higherMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-29Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adspMark Brown
Conflicts: sound/soc/codecs/wm_adsp.c
2013-01-29ASoC: wm_adsp: Ensure ADSP2 DMAs are quiesced when DSP is haltedMark Brown
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>
2013-01-26ASoC: wm_adsp: Accept 0 as a parameter block addressMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-26ASoC: wm_adsp: Add speaker Tx as a firmware optionMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-24ASoC: wm_adsp: Correct handling of some coefficeint blocksMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22ASoC: wm_adsp: Release firmware on errorCharles Keepax
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>
2013-01-21ASoC: wm_adsp: Provide explicit trace of coefficient writesMark Brown
Helpful for debugging. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-21Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adspMark Brown
2013-01-20ASoC: wm_adsp: Use GFP_DMA for algorithm readbackMark Brown
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>
2013-01-20ASoC: wm_adsp: Use GFP_DMA for things that may be DMAedMark Brown
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>
2013-01-20ASoC: wm_adsp: Make region identification errors more informativeMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-18ASoC: wm_adsp: Set ADSP1 clock rate to match sys clockChris Rattray
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>
2013-01-18ASoC: wm_adsp: Implement support for coefficeint file format 1Mark Brown
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>
2013-01-16ASoC: wm_adsp: Add initialisation function for ADSP1Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-12ASoC: wm_adsp: Add basic firmware selection supportMark Brown
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>
2013-01-08ASoC: wm_adsp: Implement support for algorithm-specific coefficient blocksMark Brown
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>
2013-01-08ASoC: wm_asdp: Validate sanity of algorithm countMark Brown
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>
2013-01-08ASoC: wm_adsp: Factor out calculation of memory base addressesMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-08ASoC: wm_adsp: Add support for parsing algorithmsMark Brown
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>
2013-01-07ASoC: wm_adsp: Ensure that block writes are from DMA aligned addressesMark Brown
Otherwise we won't run correctly on systems that require this for larger data transfers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown
2012-12-03ASoC: adsp: Set DSP clock rate to SYSCLK rateMark Brown
For simplicity always run the DSP at the SYSCLK rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03ASoC: adsp: Keep ADSP2 memory powered off when not in useMark Brown
Turn off the ADSP memory when we aren't using it, saving a small amount of power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-29ASoC: arizona: Add parenthesesMark Brown
Some compiler versions complain. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28ASoC: wm_adsp: Set the core enable as well as start bit for ADSP2Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-28ASoC: wm_adsp: Enable DVFS for ADSP2Mark Brown
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>
2012-10-28ASoC: adsp: Add ADSP base supportMark Brown
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>