summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm0010.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'spi/topic/omap-100k', ↵Mark Brown2015-11-041-1/+0
|\ \ | | | | | | | | | 'spi/topic/omap-uwire', 'spi/topic/owner', 'spi/topic/pxa' and 'spi/topic/pxa2xx' into spi-next
| | * spi: Drop owner assignment from spi_driversAndrew F. Davis2015-10-281-1/+0
| |/ | | | | | | | | | | | | | | | | An spi_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/psc', ↵Mark Brown2015-09-231-14/+9
|\ \ | |/ |/| | | 'asoc/fix/pxa', 'asoc/fix/spear', 'asoc/fix/sti' and 'asoc/fix/wm0010' into asoc-linus
| * ASoC: wm0010: fix error pathSudip Mukherjee2015-09-191-12/+10
| | | | | | | | | | | | | | | | | | Fix the error path so that we can free the allocated memory on the error path instead of releasing them individually on each error. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: wm0010: fix memory leakSudip Mukherjee2015-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | We have requested for the firmware but we have missed releasing it both on success and on error path. While checking the code it turned out that the requested firmware is not even used. More over the same firmware is being loaded by wm0010_stage2_load(). Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * ASoC: wm0010: fix memory leakSudip Mukherjee2015-09-011-1/+7
| | | | | | | | | | | | | | | | | | | | We were aborting if the kzalloc of img_swap fails but without freeing the already allocated out. Similarly we were aborting if spi_sync fails without releasing out and img_swap. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm0010: Remove spurious missing IRQF_ONESHOTAxel Lin2015-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | This reverts 58d468328646 ("ASoC: wm0010: Add missing IRQF_ONESHOT"). The coccinelle warnings is false positive because the original code does set IRQF_ONESHOT by "trigger |= IRQF_ONESHOT;". Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: wm0010: Remove redundant spi driver bus initializationAntonio Borneo2015-07-061-1/+0
|/ | | | | | | | | | In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_register_driver(), so we can drop the manual assignment. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: wm0010: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-06-011-2/+2
| | | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-2/+0
| | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', ↵Mark Brown2014-08-041-1/+1
|\ \ | | | | | | | | | 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
| | * ASoC: wm0010.c: add static to local variableFabian Frederick2014-06-271-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Also add const to array text data bss dec hex filename 10946 2904 3528 17378 43e2 sound/soc/codecs/wm0010.o-before 10891 2840 3512 17243 435b sound/soc/codecs/wm0010.o-after Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm0010: Remove redundant OOM messageSachin Kamat2014-06-271-11/+1
|/ | | | | | | | Let memory subsystem handle the error logging. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* 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-101-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>
OpenPOWER on IntegriCloud