summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm0010.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-nextMark Brown2013-11-081-4/+4
|\
| * ASoC: wm0010: Fix possible out-of-bounds array readTakashi Iwai2013-10-301-4/+4
| | | | | | | | | | | | | | Spotted by coverity CID 744701. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm0010: Use WARN_ON() instead of BUG_ON()Takashi Iwai2013-11-061-1/+2
|/ | | | | | | Use WARN_ON() and handle the error cases accordingly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm0010: Use DMA-safe memory for SPI transfersDimitris Papastamos2013-08-011-6/+6
| | | | | | | | We should be allocating our buffers for the SPI transfers from the DMA zone. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm0010: Fix resource leakDimitris Papastamos2013-07-311-12/+12
| | | | | | | | | If kzalloc() fails for `img' then we are going to leak the memory for `out'. We are freeing the memory of all the tx/rx transfers but the tx/rx buf pointers will be NULL if we drop out earlier. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm0010: Clear IRQ as wake source and include missing headerCharles Keepax2013-06-031-0/+3
| | | | | | | | Both clear the IRQ as being a wake source when we are finished with it and include a missing header file that is required. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm0010: Set IRQ as a wake sourceCharles Keepax2013-05-301-0/+7
| | | | | | | | | The DSPs IRQ should be a wake source as several of the possible algorithms may run whilst the AP is asleepi and require to wake the AP to push or pull more data, such as compressed playback. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linusMark Brown2013-05-141-0/+1
|\
| * ASoC: wm0010: fix error return code in wm0010_boot()Wei Yongjun2013-05-071-0/+1
| | | | | | | | | | | | | | | | Fix to return -ENOMEM in the memory malloc of 'out' and 'img_swap' error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm0010: Report filename when we fail to load firmwareCharles Keepax2013-03-291-2/+2
| | | | | | | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm0010: Constify usage of firmware filenamesCharles Keepax2013-03-291-1/+1
|/ | | | | Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-091-3/+3
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Ignore interrupts in power down modeMark Brown2012-11-271-1/+0
| | | | | | | The device should not be generating interrupts when it does not have power so ignore incoming interrupts. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Add checking for .dfw info record version.Scott Ling2012-11-231-1/+24
| | | | | | | | | | | The info record at the start of the dsp firmware file has been expanded to incorporate additional version information. We need to check the version to make sure we understand the layout of the information in the record. The srec2image tool is currently used to create this record during creation of the .dfw file. Signed-off-by: Scott Ling <sl@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Up the completion timeout to 20ms instead of 10msDimitris Papastamos2012-11-211-2/+2
| | | | | | | | Increase timeout to be more reliable and avoid the chance of missing interrupts during boot. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Split out the stage2 load from the boot functionScott Ling2012-11-091-50/+79
| | | | | Signed-off-by: Scott Ling <sl@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Split out the firmware file parsing from the bootScott Ling2012-11-091-117/+146
| | | | | | | | Move the firmware load and record parsing functionality out into a separate function from the boot function. Signed-off-by: Scott Ling <sl@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Remove boot_done variable as no longer required.Scott Ling2012-11-061-4/+1
| | | | | | | | Remove the boot_done counter variable and check the wm0010 state variable instead. Signed-off-by: Scott Ling <scott.ling@wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Initialise chip state before we register the interruptMark Brown2012-09-261-5/+2
| | | | | | The interrupt handler uses the chip state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Don't check if reset GPIO is defined when removingMark Brown2012-09-261-5/+2
| | | | | | We will fail to probe without one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Allow slow GPIO for resetMark Brown2012-09-261-3/+5
| | | | | | | We never set the GPIO from atomic context so there's no reason why we can't support a GPIO that needs to sleep when configuring. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Fix warning, use format %zu for type size_tEmil Goode2012-09-061-1/+1
| | | | | | | | | | | | Fix warning by using format specifier %zu for type size_t Sparse warning: sound/soc/codecs/wm0010.c:411:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat] Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: unlock on error pathDan Carpenter2012-09-061-0/+2
| | | | | | | We're holding the wm0010->lock mutex when we goto err_core. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Add missing IRQF_ONESHOTFengguang Wu2012-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | FYI, there are new coccinelle warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7 head: e3523e01869da20fdd12ffd19ae1df7bf492650e commit: e3523e01869da20fdd12ffd19ae1df7bf492650e [95/95] ASoC: wm0010: Add initial wm0010 DSP driver All coccinelle warnings: + sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT -- + sound/soc/codecs/wm0010.c:660:1-7: preceding lock on line 359 vim +850 sound/soc/codecs/wm0010.c 847 trigger = IRQF_TRIGGER_FALLING; 848 trigger |= IRQF_ONESHOT; 849 > 850 ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger, 851 "wm0010", wm0010); 852 if (ret) 853 dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n", Please consider folding the attached diff :-) Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Move resource acquisition to device probeMark Brown2012-08-251-27/+27
| | | | | | | This is more idimatic for modern drivers. Also fix a couple of return codes while we're at it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Tweak diagnostic outputMark Brown2012-08-251-1/+1
| | | | | | Make it scan better by writing ROM with capitals. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Don't double free reset GPIOMark Brown2012-08-251-1/+0
| | | | | | We are using devm_ to allocate the GPIO so it will be freed automatically. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Set idle_bias_offMark Brown2012-08-251-0/+1
| | | | | | | Doesn't make any practical difference given that _SUSPEND and _OFF are equivalent for the driver but it's what we're really doing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Add dummy widget for CLKINMark Brown2012-08-251-0/+11
| | | | | | | | Make it easier to integrate the management of the clock supplying the WM0010 with DAPM by providing a dummy supply widget which supplies the interface widgets, this can be connected to clock outputs by the machines. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Enable 44.1kHz supportMark Brown2012-08-251-1/+1
| | | | | | | With appropriate clocking configuration the WM0010 driver supports 44.1kHz audio; enable that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Fix passthrough routingMark Brown2012-08-251-1/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm0010: Add initial wm0010 DSP driverDimitris Papastamos2012-08-231-0/+930
The WM0010 is a compact digital signal processor that has been highly optimised for low-power audio applications. Extensive memory resources and core optimisation allow the device to manage all audio processing algorithms efficiently and autonomously, while the host processor sleeps or performs other tasks. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>