summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm0010.c
AgeCommit message (Collapse)Author
2013-11-08Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-nextMark Brown
2013-11-06ASoC: wm0010: Use WARN_ON() instead of BUG_ON()Takashi Iwai
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>
2013-10-30ASoC: wm0010: Fix possible out-of-bounds array readTakashi Iwai
Spotted by coverity CID 744701. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01ASoC: wm0010: Use DMA-safe memory for SPI transfersDimitris Papastamos
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>
2013-07-31ASoC: wm0010: Fix resource leakDimitris Papastamos
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>
2013-06-03ASoC: wm0010: Clear IRQ as wake source and include missing headerCharles Keepax
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>
2013-05-30ASoC: wm0010: Set IRQ as a wake sourceCharles Keepax
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>
2013-05-14Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linusMark Brown
2013-05-07ASoC: wm0010: fix error return code in wm0010_boot()Wei Yongjun
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>
2013-03-29ASoC: wm0010: Report filename when we fail to load firmwareCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-29ASoC: wm0010: Constify usage of firmware filenamesCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton
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>
2012-11-27ASoC: wm0010: Ignore interrupts in power down modeMark Brown
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>
2012-11-23ASoC: wm0010: Add checking for .dfw info record version.Scott Ling
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>
2012-11-21ASoC: wm0010: Up the completion timeout to 20ms instead of 10msDimitris Papastamos
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>
2012-11-09ASoC: wm0010: Split out the stage2 load from the boot functionScott Ling
Signed-off-by: Scott Ling <sl@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-09ASoC: wm0010: Split out the firmware file parsing from the bootScott Ling
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>
2012-11-06ASoC: wm0010: Remove boot_done variable as no longer required.Scott Ling
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>
2012-09-26ASoC: wm0010: Initialise chip state before we register the interruptMark Brown
The interrupt handler uses the chip state. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-26ASoC: wm0010: Don't check if reset GPIO is defined when removingMark Brown
We will fail to probe without one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-26ASoC: wm0010: Allow slow GPIO for resetMark Brown
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>
2012-09-06ASoC: wm0010: Fix warning, use format %zu for type size_tEmil Goode
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>
2012-09-06ASoC: wm0010: unlock on error pathDan Carpenter
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>
2012-09-06ASoC: wm0010: Add missing IRQF_ONESHOTFengguang Wu
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>
2012-08-25ASoC: wm0010: Move resource acquisition to device probeMark Brown
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>
2012-08-25ASoC: wm0010: Tweak diagnostic outputMark Brown
Make it scan better by writing ROM with capitals. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: wm0010: Don't double free reset GPIOMark Brown
We are using devm_ to allocate the GPIO so it will be freed automatically. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: wm0010: Set idle_bias_offMark Brown
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>
2012-08-25ASoC: wm0010: Add dummy widget for CLKINMark Brown
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>
2012-08-25ASoC: wm0010: Enable 44.1kHz supportMark Brown
With appropriate clocking configuration the WM0010 driver supports 44.1kHz audio; enable that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: wm0010: Fix passthrough routingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-23ASoC: wm0010: Add initial wm0010 DSP driverDimitris Papastamos
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>