summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8996.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton1-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>
2012-09-08ASoC: dapm: Add flags to regulator suppliesMark Brown1-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>
2012-06-25ASoC: wm8996: Move register default configuration to I2C probeMark Brown1-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>
2012-06-25ASoC: wm8996: Inline wm8996_reset() and optimise cache-only usageMark Brown1-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>
2012-06-25ASoC: wm8996: Move regulator notifier callbacks into I2C levelMark Brown1-21/+20
Now that we're using regmap the cache is available here. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-25Merge tag 'v3.5-rc4' into for-3.6Mark Brown1-5/+3
Linux 3.5-rc4 contains some bug fixes which overlap with new features.
2012-06-11ASoC: wm8996: Convert to devm_regmap_init_i2c()Mark Brown1-3/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-11ASoC: wm8996: Remove write sequencer registers from the defaults tableMark Brown1-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>
2012-06-11ASoC: wm8996: Mark the CODEC as cache only when powering off on bootMark Brown1-2/+1
Otherwise we might try to write to a powered off device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-11ASoC: wm8996: Move reset before the initial regulator disableMark Brown1-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>
2012-06-11ASoC: wm8996: Remove spurious regulator_bulk_free()Mark Brown1-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>
2012-06-03ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-26ASoC: wm8996: Put the microphone biases into bypass mode when idleMark Brown1-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>
2012-03-14ASoC: wm8996: Add 44.1kHz supportMark Brown1-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>
2012-03-08ASoC: wm8996: Remove separate output stage enable stepMark Brown1-20/+12
Marginally improve performance during startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-08ASoC: wm8996: Remove some volatile regisers from the defaults tableMark Brown1-2/+0
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29ASoC: wm8996: Remove stub register cacheMark Brown1-8/+0
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29ASoC: wm8996: Fix /RESET bounce orderingMark Brown1-1/+1
We want to leave the device out of rather than in reset. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21ASoC: wm8996: Convert to use DAPM routes for stream connectionsMark Brown1-35/+39
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21ASoC: wm8996: Implement DRC coefficient configurationMark Brown1-0/+6
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17ASoC: wm8996: Make sure we bounce /RESET to resetMark Brown1-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>
2012-02-17ASoC: wm8996: Convert to module_i2c_driver()Mark Brown1-19/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15ASoC: Show device id in the debug messageAxel Lin1-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>
2012-02-09Merge tag 'v3.3-rc3' as we've got several bugfixes in there which areMark Brown1-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
2012-02-04ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood1-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>
2012-02-01ASoC: wm8996: Use devm_regulator_bulk_get()Mark Brown1-6/+3
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01ASoC: wm8996: Switch to using common code for managing CPVDD supplyMark Brown1-27/+5
Nice code saving. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01Merge tag 'v3.3-rc2' into for-3.4Mark Brown1-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.
2012-01-27ASoC: Set idle_bias_off flag in snd_soc_codec_driverAxel Lin1-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>
2012-01-26ASoC: wm8996: Handle failures to determine accessory polarityMark Brown1-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>
2012-01-25ASoC: wm8996: Mark register cache as dirty when regulators are disabledMark Brown1-1/+1
Otherwise we won't resync later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-22ASoC: wm8996: Call _POST_PMU callback for CPVDDMark Brown1-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
2012-01-20ASoC: 24 bits are significant on the WM8996 audio interfacesMark Brown1-0/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Disable register synchronisation for low frequency WM8996 SYSCLKMark Brown1-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
2011-12-30ASoC: Enable ASoC register map dump for some regmap CODECsMark Brown1-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>
2011-12-14ASoC: Tune the accessory detection rates for WM8996Mark Brown1-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>
2011-12-11Merge branch 'for-3.2' into for-3.3Mark Brown1-0/+1
2011-12-11ASoC: Fix WM8996 24.576MHz clock operationMark Brown1-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
2011-11-27ASoC: Convert wm8996 to use devm_kzalloc()Mark Brown1-3/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen1-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>
2011-11-08ASoC: Convert WM8996 gpiolib to regmapMark Brown1-29/+27
Actually pretty straightforward. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08ASoC: Move most WM8996 resource acquisition to I2C probeMark Brown1-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>
2011-11-08ASoC: Convert WM8996 to direct regmap API usageMark Brown1-308/+391
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-24ASoC: wm8996: Avoid a redundant i2c_get_clientdata call in wm8996_i2c_removeAxel Lin1-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>
2011-10-22ASoC: wm8996: Fix wrong mask for setting WM8996_AIF_CLOCKING_2Axel Lin1-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
2011-10-20ASoC: wm8996: Use SND_SOC_DAPM_AIF_OUT for AIF2 CaptureAxel Lin1-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
2011-10-03ASoC: Remove needless codec->dapm.bias_level assignment to SND_SOC_BIAS_OFFAxel Lin1-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>
2011-09-27ASoC: Add DRC control for WM8996Karl Tsou1-0/+8
Signed-off-by: Karl Tsou <karl@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20ASoC: Refcount WM8996 bandgap from FLL tooMark Brown1-6/+39
For digital only paths we need to make sure the bandgap is enabled prior to starting the FLL which isn't tied into DAPM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20ASoC: Fix unused variable warning in WM8996Mark Brown1-2/+0
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>