summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown2014-08-041-2/+2
|\
| * ASoC: Move card field form platform/codec to componentLars-Peter Clausen2014-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the parent card and both handle this pointer in mostly the same way. This patch moves the card field to the component level which will allow further code consolidation between platforms and CODECS. Since there are only a handful of users of the snd_soc_codec struct's card field (and none of the snd_soc_platform's) these are update in this patch as well, which allows it to be removed from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm_adsp: Add missing MODULE_LICENSEPraveen Diwakar2014-07-041-0/+2
|/ | | | | | | | | | | Since MODULE_LICENSE is missing the module load fails, so add this for module. Signed-off-by: Praveen Diwakar <praveen.diwakar@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
*-. Merge remote-tracking branches 'asoc/topic/adau' and 'asoc/topic/adsp' into ↵Mark Brown2014-06-031-20/+17
|\ \ | | | | | | | | | asoc-next
| | * ASoC: wm_adsp: Use adsp_err/warn instead of dev_err/warnCharles Keepax2014-05-271-20/+17
| | | | | | | | | | | | | | | | | | | | | We have defines for adsp messages best to consistently use them. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'asoc/topic/ad1980', 'asoc/topic/adsp', ↵Mark Brown2014-05-221-1/+1
|\ \ \ \ | | |/ / | |/| / | | |/ 'asoc/topic/ak4104', 'asoc/topic/ak4642', 'asoc/topic/alc5623', 'asoc/topic/arizona', 'asoc/topic/atmel' and 'asoc/topic/cache' into asoc-next
| | * ASoC: wm_adsp: Remove uneeded semicolonCharles Keepax2014-04-181-1/+1
| |/ | | | | | | | | | | Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen2014-04-141-2/+2
|/ | | | | | | | | | | | | | | For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm_adsp: Correct type specifier in printfCharles Keepax2014-03-071-1/+1
| | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm_adsp: Split firmware load into smaller chunksCharles Keepax2014-03-061-17/+31
| | | | | | | | | | The firmware files can be quite large and allocating the whole firmware a single DMA safe buffer can be problematic if the system is under a high memory load. Ease the requirements slightly by writing the firmware out in page sized chunks. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm_adsp: Add debug print to note that the DSP has shutdownCharles Keepax2014-02-031-0/+2
| | | | | | | | It can be useful for debugging purposes to see at what point the DSP has powered down, so add a message to inform us of this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', ↵Mark Brown2014-01-161-78/+121
|\ \ | | | | | | | | | 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai
| * | ASoC: wm_adsp: Mark wm_adsp2_boot_work as staticCharles Keepax2014-01-091-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Start DSP booting earlier in the DAPM processCharles Keepax2014-01-081-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the start of booting the DSP to earlier in the DAPM process, and move the final starting of the DSP to later in the DAPM process. This allows us to overlap some of the processing with other components of the system being brought up. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Factor out ADSP2 boot proceedureCharles Keepax2014-01-081-78/+103
| | | | | | | | | | | | | | | | | | | | | | | | Move the ADSP2 boot proceedure into a work structure in preparation for running it asynchronously with the reset of the audio path bring up. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
*-----. \ \ Merge remote-tracking branches 'asoc/topic/ad1836', 'asoc/topic/ad193x', ↵Mark Brown2014-01-021-10/+10
|\ \ \ \ \ \ | | | |_|/ / | | |/| | / | | |_|_|/ | |/| | | 'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4641', 'asoc/topic/ak4642', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x', 'asoc/topic/axi', 'asoc/topic/bcm2835', 'asoc/topic/blackfin', 'asoc/topic/cs4271', 'asoc/topic/cs42l52', 'asoc/topic/da7210', 'asoc/topic/davinci', 'asoc/topic/ep93xx', 'asoc/topic/fsl', 'asoc/topic/fsl-mxs', 'asoc/topic/generic', 'asoc/topic/hdmi', 'asoc/topic/jack', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/mxs', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/s6000', 'asoc/topic/sai', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/spear', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/uda1380', 'asoc/topic/width', 'asoc/topic/wm8510', 'asoc/topic/wm8523', 'asoc/topic/wm8580', 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8741', 'asoc/topic/wm8750', 'asoc/topic/wm8753', 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8901', 'asoc/topic/wm8940', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8985', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm9081' and 'asoc/topic/x86' into asoc-next
| | | * | ASoC: wm_adsp: Stop region iteration when the desired region is foundCharles Keepax2013-11-281-0/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When locating the memory region relating to a coefficient block written through a bin file we keep processing the list of regions even after we have found the region we require. This patch adds a break, so we don't process redundant list items. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | ASoC: wm_adsp: Remove duplicate info message for DSP RAM readyCharles Keepax2013-12-181-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | ASoC: adsp: Use async writes where possibleMark Brown2013-12-041-9/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | This will allow a marginal speed improvement when used with a bus that supports async I/O by reducing the amount of context thrashing between writes, allowing the bus to be more fully utilised. Signed-off-by: Mark Brown <broonie@linaro.org>
* | | ASoC: wm_adsp: Add small delay while polling DSP RAM startCharles Keepax2013-12-181-3/+7
|/ / | | | | | | | | | | | | | | | | | | Some devices are getting very close to the limit whilst polling the RAM start, this patch adds a small delay to this loop to give a longer startup timeout. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* | Merge remote-tracking branch 'asoc/topic/warn' into asoc-nextMark Brown2013-11-081-11/+6
|\ \
| * | ASoC: wm_adsp: Fix BUG_ON() and WARN_ON() usagesTakashi Iwai2013-11-071-11/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch does: - Move the sanity check with WARN_ON() in wm_adsp_region_to_reg() and remove the checks in the callers, - Fix wrong WARN_ON() usages, replaced with WARN(), - Fix unreachable or wrong BUG_ON() usages and replace with WARN_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'asoc/topic/adsp' into asoc-nextMark Brown2013-11-081-7/+20
|\ \
| * | ASoC: wm_adsp: Print out the firmware versionDimitris Papastamos2013-11-011-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Remove and free algorithm regions for ADSP1Dimitris Papastamos2013-11-011-0/+9
| | | | | | | | | | | | | | | | | | | | | Do it in a similar fashion as we do for ADSP2. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Add debug info on get()/put() transfersDimitris Papastamos2013-11-011-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Release firmware on memory allocation failureDimitris Papastamos2013-11-011-1/+2
| | | | | | | | | | | | | | | Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm_adsp: Print error when regmap reads/writes failDimitris Papastamos2013-11-011-6/+6
| |/ | | | | | | | | Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm_adsp: Interpret ADSP memory region lengths as 32 bit wordsNariman Poushin2013-11-041-0/+5
|/ | | | | | | | | | Pad the ADSP word (3 bytes) to 4 bytes in the kernel and calculate lengths based on padded ADSP words instead of treating them as bytes Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* ASoC: wm_adsp: Sanitize parameter passingDimitris Papastamos2013-08-011-15/+16
| | | | | | | | | No need to hold on to the `codec' pointer. We can use the `dsp' pointer and grab all the information we need from there. This makes the parameters for the functions a bit more sane and idiomatic. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm_adsp: Simplify kcontrol handlingDimitris Papastamos2013-07-291-72/+31
| | | | | | | | | | Get rid off the wm_coeff struct and the wm_coeff_add_kcontrol() function. We are now using the snd_soc_card_kcontrol() function to get the kcontrol pointers. No need to call into ALSA code to register the kcontrols. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/adsp' into asoc-nextMark Brown2013-06-171-7/+452
|\
| * ASoC: wm_adsp: Ensure set controls are synced on each bootDimitris Papastamos2013-05-281-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Rename `dirty' to `set' as it is a bit more descriptive. A set control is any control that has been set by the user. We need to ensure that everytime we boot the DSP we sync out any controls that were set. We could at some point start keeping track of the default values of the controls to suppress some of the device I/O. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm_adsp: memory leak in wm_adsp_create_control()Dan Carpenter2013-05-141-2/+4
| | | | | | | | | | | | | | There are two return paths which don't kfree(name). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm_adsp: Expose coefficient blocks as ALSA binary controlsDimitris Papastamos2013-05-121-7/+451
| | | | | | | | | | | | | | | | | | | | Add initial support for runtime tuning for the ADSP cores. This is achieved by exposing the coefficient configuration blocks as ALSA binary controls. The current code assumes that no controls on the DSP are volatile. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm5110: Correct rate control for DSP4Charles Keepax2013-06-141-1/+1
|/ | | | | | Reported-by: Dennis May <dennis.may@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* 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-291-4/+12
|\ | | | | | | | | Conflicts: sound/soc/codecs/wm_adsp.c
| * ASoC: wm_adsp: Ensure ADSP2 DMAs are quiesced when DSP is haltedMark Brown2013-01-291-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>
OpenPOWER on IntegriCloud