summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8996.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-nextMark Brown2013-11-081-0/+2
|\
| * ASoC: wm8996: Fix negative array index readTakashi Iwai2013-10-301-0/+2
| | | | | | | | | | | | | | Spotted by coverity CID 146355. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm8996: Replace BUG() with WARN()Takashi Iwai2013-11-071-6/+6
|/ | | | | | | | | | | BUG() used in the driver is just to spit the stack trace on buggy points, not really needed to stop the whole operation. For that purpose, it'd be more convenient to use WARN() instead with more error information. Cc: patches@opensource.wolfsonmicro.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-4/+4
| | | | | | | | | | | 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: dapm: Add flags to regulator suppliesMark Brown2012-09-081-1/+1
| | | | | | | This will be used to enable additional control of the regulators. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: wm8996: Move register default configuration to I2C probeMark Brown2012-06-251-151/+180
| | | | | | | This gets the registers set up as early as possible, mainly useful for the GPIOs to ensure that they're in the correct mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Inline wm8996_reset() and optimise cache-only usageMark Brown2012-06-251-18/+13
| | | | | | | | | | There is only one caller and this allows us to cleanly leave the CODEC with the internal LDO powered down which is the default state we're looking for and means that we can robustly disable the register cache only when we either disable the LDO or power down the external regulators. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Move regulator notifier callbacks into I2C levelMark Brown2012-06-251-21/+20
| | | | | | Now that we're using regmap the cache is available here. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'v3.5-rc4' into for-3.6Mark Brown2012-06-251-5/+3
|\ | | | | | | Linux 3.5-rc4 contains some bug fixes which overlap with new features.
| * ASoC: wm8996: Mark the CODEC as cache only when powering off on bootMark Brown2012-06-111-2/+1
| | | | | | | | | | | | Otherwise we might try to write to a powered off device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8996: Move reset before the initial regulator disableMark Brown2012-06-111-2/+2
| | | | | | | | | | | | | | If we don't have control over the LDO but do have control over the other regulators then we may end up trying to write to a powered off device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8996: Remove spurious regulator_bulk_free()Mark Brown2012-06-111-1/+0
| | | | | | | | | | | | | | We're using demv_regulator_bulk_get() so don't need to manually free and this is in the CODEC driver not the I2C driver anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Convert to devm_regmap_init_i2c()Mark Brown2012-06-111-3/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Remove write sequencer registers from the defaults tableMark Brown2012-06-111-178/+0
| | | | | | | | | | | | | | They aren't marked as readable and the feature is never used so they'll never get referenced. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown2012-06-031-1/+1
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Put the microphone biases into bypass mode when idleMark Brown2012-04-261-0/+12
| | | | | | | | | When we're not actively doing audio we don't need the microphone biases to be regulated, noise is not important when we are not looking at the audio signal. Save some power by putting the MICBIAS regulators into bypass mode when not doing audio. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Add 44.1kHz supportMark Brown2012-03-141-9/+10
| | | | | | | The WM8996 specification has been updated to specify 44.1kHz as a supported sample rate. Update the driver to accept this configuration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Remove separate output stage enable stepMark Brown2012-03-081-20/+12
| | | | | | Marginally improve performance during startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Remove some volatile regisers from the defaults tableMark Brown2012-03-081-2/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Remove stub register cacheMark Brown2012-02-291-8/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Fix /RESET bounce orderingMark Brown2012-02-291-1/+1
| | | | | | We want to leave the device out of rather than in reset. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Convert to use DAPM routes for stream connectionsMark Brown2012-02-211-35/+39
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Implement DRC coefficient configurationMark Brown2012-02-211-0/+6
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Make sure we bounce /RESET to resetMark Brown2012-02-171-0/+1
| | | | | | | | While it matches the current code only bringing the device out of reset isn't actually doing what the function says so make sure we set the GPIO high before we pull it low. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Convert to module_i2c_driver()Mark Brown2012-02-171-19/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Show device id in the debug messageAxel Lin2012-02-151-1/+1
| | | | | | | | Show the id we read when the id mismatch is detected. This is useful for debugging. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'v3.3-rc3' as we've got several bugfixes in there which areMark Brown2012-02-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | colliding annoyingly with development. Linux 3.3-rc3 .. the number of the half-beast? Conflicts: sound/soc/codecs/wm5100.c sound/soc/codecs/wm8994.c
| * ASoC: wm8996: Mark register cache as dirty when regulators are disabledMark Brown2012-01-251-1/+1
| | | | | | | | | | | | Otherwise we won't resync later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood2012-02-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently ASoC can only add kcontrols using codec and platform component device handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for SoC card machine drivers too. This allows the kcontrol to have a direct handle to the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily get it's private data. This change makes snd_soc_add_controls() static and wraps it in the folowing calls (card and dai are new) :- snd_soc_add_card_controls() snd_soc_add_codec_controls() snd_soc_add_dai_controls() snd_soc_add_platform_controls() This patch also does a lot of small mechanical changes in individual codec drivers to replace snd_soc_add_controls() with snd_soc_add_codec_controls(). It also updates the McBSP DAI driver to use snd_soc_add_dai_controls(). Finally, it updates the existing machine drivers that register controls to either :- 1) Use snd_soc_add_card_controls() where no direct codec control is required. 2) Use snd_soc_add_codec_controls() where there is direct codec control. In the case of 1) above we also update the machine drivers to get the correct component data pointers from the kcontrol (rather than getting the machine pointer via the codec pointer). Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Use devm_regulator_bulk_get()Mark Brown2012-02-011-6/+3
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Switch to using common code for managing CPVDD supplyMark Brown2012-02-011-27/+5
| | | | | | | | | | | | Nice code saving. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge tag 'v3.3-rc2' into for-3.4Mark Brown2012-02-011-1/+2
|\| | | | | | | | | | | | | | | | | | | | | A reasonable amount of new development is causing fiddly merge conflicts between different resource management changes (mostly fixing bugs in resource management due to noticing things while doing enhancements in the same area). Linux 3.3-rc2 .. several days delayed. No reason, I just didn't think of it.
| * ASoC: wm8996: Call _POST_PMU callback for CPVDDMark Brown2012-01-221-1/+2
| | | | | | | | | | | | | | | | We should be allowing a 5ms delay after the charge pump is started in order to ensure it has finished ramping. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Set idle_bias_off flag in snd_soc_codec_driverAxel Lin2012-01-271-3/+1
| | | | | | | | | | | | | | | | | | Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver for devices can unconditionally support idle_bias_off. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Handle failures to determine accessory polarityMark Brown2012-01-261-12/+26
| | | | | | | | | | | | | | | | If we get an indeterminate impedance with both headset polarities then give up and report the accessory as a headphone rather than continually retrying. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: 24 bits are significant on the WM8996 audio interfacesMark Brown2012-01-201-0/+4
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Disable register synchronisation for low frequency WM8996 SYSCLKMark Brown2012-01-201-0/+4
| | | | | | | | | With a low frequency SYSCLK and a fast I2C clock register synchronisation may occasionally take too long to take effect, causing I/O issues. Disable synchronisation in order to avoid any issues. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: Enable ASoC register map dump for some regmap CODECsMark Brown2011-12-301-0/+8
| | | | | | | It's still useful to be able to poke around in the register map at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Tune the accessory detection rates for WM8996Mark Brown2011-12-141-6/+12
| | | | | | | Use longer intervals when the microphone is not inserted to increase robustness against leisurely insertion. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.2' into for-3.3Mark Brown2011-12-111-0/+1
|\
| * ASoC: Fix WM8996 24.576MHz clock operationMark Brown2011-12-111-0/+1
| | | | | | | | | | | | | | | | | | Record the clock after the divider as that is what all SYSCLK users see. Without this the other clock configuration in the device comes out at half rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Convert wm8996 to use devm_kzalloc()Mark Brown2011-11-271-3/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Convert WM8996 gpiolib to regmapMark Brown2011-11-081-29/+27
| | | | | | | | | | | | Actually pretty straightforward. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Move most WM8996 resource acquisition to I2C probeMark Brown2011-11-081-87/+96
| | | | | | | | | | | | | | | | | | | | | | | | Now that the WM8996 driver is using the regmap API for register I/O we no longer need the ASoC card to be active in order to interact with the chip. In order to be more idiomatic for Linux move most of the existing probe() function out into the I2C probe() function prior to registration with ASoC. The IRQ and GPIO init will be moved separately as these are slightly more involved. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Convert WM8996 to direct regmap API usageMark Brown2011-11-081-308/+391
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_removeAxel Lin2011-10-241-1/+1
|/ | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2Axel Lin2011-10-221-1/+1
| | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 CaptureAxel Lin2011-10-201-2/+2
| | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: Remove needless codec->dapm.bias_level assignment to SND_SOC_BIAS_OFFAxel Lin2011-10-031-1/+0
| | | | | | | | This assignment is done by the snd_soc_register_codec so there is no need to redo it in probe function of a codec driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>