summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown2013-04-121-2/+38
|\
| * ASoC: wm_adsp: Split ADSP1 and ADSP2 firmware controlsMark Brown2013-03-291-7/+19
| | | | | | | | | | | | | | | | 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>
| * ASoC: arizona: Basic support for ISRC rate selectionMark Brown2013-03-211-0/+24
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'asoc/topic/adsp' into asoc-nextMark Brown2013-04-121-9/+75
|\ \
| * | ASoC: wm_adsp: Add support for firmware wide coefficient blocksMark Brown2013-04-111-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ASoC: wm_adsp: Provide defines for firmwaresMark Brown2013-03-291-5/+13
| | | | | | | | | | | | | | | | | | For future work to have specific handling for some firmwares. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: wm_adsp: Handle old .bin filesMark Brown2013-03-131-4/+22
| |/ | | | | | | | | | | | | 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>
* / ASoC: wm_adsp: fix possible memory leak in wm_adsp_load_coeff()Wei Yongjun2013-03-121-2/+3
|/ | | | | | | | | '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>
* ASoC: wm_adsp: round to 4-byte boundary for coeff file blocksChris Rattray2013-02-111-1/+7
| | | | | Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_adsp: Use asynchronous I/O to write firmware and coefficientsMark Brown2013-02-041-16/+66
| | | | | | | 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>
* ASoC: wm_adsp: Fix support for firmware switching on DSP2 and higherMark Brown2013-01-301-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adspMark Brown2013-01-281-4/+12
|\ | | | | | | | | Conflicts: sound/soc/codecs/wm_adsp.c
| * ASoC: wm_adsp: Ensure ADSP2 DMAs are quiesced when DSP is haltedMark Brown2013-01-281-3/+11
| | | | | | | | | | | | | | 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>
| * ASoC: wm_adsp: Release firmware on errorCharles Keepax2013-01-221-1/+1
| | | | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Accept 0 as a parameter block addressMark Brown2013-01-261-50/+35Star
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Add speaker Tx as a firmware optionMark Brown2013-01-261-2/+3
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Correct handling of some coefficeint blocksMark Brown2013-01-231-1/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Provide explicit trace of coefficient writesMark Brown2013-01-211-0/+3
| | | | | | | | | | | | Helpful for debugging. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge remote-tracking branch 'asoc/fix/adsp' into asoc-adspMark Brown2013-01-211-1/+22
|\|
| * ASoC: wm_adsp: Use GFP_DMA for things that may be DMAedMark Brown2013-01-201-2/+2
| | | | | | | | | | | | | | 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>
| * ASoC: wm_adsp: Ensure that block writes are from DMA aligned addressesMark Brown2013-01-071-1/+22
| | | | | | | | | | | | | | Otherwise we won't run correctly on systems that require this for larger data transfers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Use GFP_DMA for algorithm readbackMark Brown2013-01-201-1/+1
| | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Make region identification errors more informativeMark Brown2013-01-201-1/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Set ADSP1 clock rate to match sys clockChris Rattray2013-01-181-0/+33
| | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Implement support for coefficeint file format 1Mark Brown2013-01-181-5/+15
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Add initialisation function for ADSP1Mark Brown2013-01-161-0/+8
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Add basic firmware selection supportMark Brown2013-01-121-2/+73
| | | | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Implement support for algorithm-specific coefficient blocksMark Brown2013-01-081-4/+110
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: wm_asdp: Validate sanity of algorithm countMark Brown2013-01-081-2/+15
| | | | | | | | | | | | | | 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>
* | ASoC: wm_adsp: Factor out calculation of memory base addressesMark Brown2013-01-081-5/+25
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Add support for parsing algorithmsMark Brown2013-01-081-0/+143
|/ | | | | | | | 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>
* Merge remote-tracking branch 'asoc/topic/arizona' into asoc-nextMark Brown2012-12-091-0/+33
|\
| * ASoC: adsp: Set DSP clock rate to SYSCLK rateMark Brown2012-12-021-0/+22
| | | | | | | | | | | | For simplicity always run the DSP at the SYSCLK rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: adsp: Keep ADSP2 memory powered off when not in useMark Brown2012-12-021-0/+11
| | | | | | | | | | | | | | 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>
* | ASoC: arizona: Add parenthesesMark Brown2012-11-291-1/+1
| | | | | | | | | | | | | | Some compiler versions complain. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_adsp: Set the core enable as well as start bit for ADSP2Mark Brown2012-11-281-3/+5
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_adsp: Enable DVFS for ADSP2Mark Brown2012-11-281-2/+95
| | | | | | | | 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>
* ASoC: adsp: Add ADSP base supportMark Brown2012-10-281-0/+571
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>