summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8962.c
AgeCommit message (Collapse)AuthorFilesLines
2011-12-02ASoC: Make WM8962 beep a signal generatorMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-11-28ASoC: Convert WM8962 to devm_kzalloc()Mark Brown1-5/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown1-1/+0
They've not been needed for a long time if they were ever required. 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-21Merge branch 'for-3.2' into for-3.3Mark Brown1-2/+2
2011-11-20ASoC: wm8962: fix DB_RANGE sizeClemens Ladisch1-2/+2
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the arrays. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-08ASoC: Disable debounce on some WM8962 interruptsMark Brown1-0/+6
Allow them to work when the device is unclocked. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08ASoC: Convert WM8962 to direct regmap usageMark Brown1-791/+802
This initial conversion just moves the register init, regulator acquisition and device verification out to the I2C probe(). Movement of other parts of the driver like the GPIO and beep generation code will follow. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-08Merge branch 'for-3.2' into for-3.3Mark Brown1-10/+20
Conflicts: sound/soc/codecs/wm8940.c
2011-11-05ASoC: Manage thermal shutdown for WM8962Mark Brown1-0/+8
Disable the thermal shutdown circuits for headphone and speaker when the relevant outputs are not enabled in order to save current in idle modes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01ASoC: Disable MICBIAS and SYSCLK when stopping WM8962 accessory detectionMark Brown1-0/+3
They aren't needed any more. If machines need them for other purposes then further changes will be required. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01ASoC: WM8962 accessory detection requires MICBIASMark Brown1-1/+3
Force MICBIAS on as well as SYSCLK as the WM8962 accessory detection can't function without both. No point in making machine drivers manually enable it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01ASoC: Enable SYSCLK last when enabling WM8962 mic detectionMark Brown1-0/+3
Ensure everything is set up before we start detecting. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01ASoC: Start WM8962 FLL if SYSCLK is enabledMark Brown1-0/+4
Since we have code to automatically manage the start and stop of the FLL based on the SYSCLK widget if SYSCLK is already enabled and the FLL is configured then we need to start it up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-01ASoC: Ensure we always delay for WM8962 FLL when starting from SYSCLKMark Brown1-9/+8
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-11-01ASoC: Ensure the WM8962 oscillator and PLLs start up disabledMark Brown1-0/+5
Since there is no current software control for these they would otherwise be left enabled, consuming power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-11-01ASoC: Ensure WM8962 PLL registers are resetMark Brown1-1/+7
The WM8962 has a separate software reset for the PLL registers. Ensure that these are reset also on startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-10-04ASoC: Remove direct register cache accesses from WM8962 driverMark Brown1-10/+11
Also fix return values for speaker switch updates. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-09-29ASoC: Fix a bug in WM8962 DSP_A and DSP_B settingsSusan Gao1-2/+2
Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmico.com> Cc: stable@kernel.org
2011-09-23ASoC: Convert WM8962 MICBIAS to a supply widgetMark Brown1-1/+1
A supply widget is generally clearer than a MICBIAS widget and a mic bias is just a type of supply so use a supply widget for the MICBIAS. This also avoids confusion with the routing when connected to multiple inputs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23ASoC: Rename WM8962 DMIC widget to DMIC_ENAMark Brown1-4/+4
Matches the register name and avoids confusion with board widgets. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20Merge branch 'for-3.1' into for-3.2Mark Brown1-26/+0
2011-09-20ASoC: Remove bitrotted wm8962_resume()Mark Brown1-26/+0
This functionality is now subsumed within the bias management, using the standard cache management functionality, without assuming the cache type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22Merge branch 'for-3.1' into for-3.2Mark Brown1-0/+4
2011-08-22ASoC: Provide more detail on WM8962 thermal shutdown statusMark Brown1-2/+15
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Clear any outstanding WM8962 FLL lock completions before waitingMark Brown1-0/+4
Ensure that we don't spuriously trigger early. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Report IRQ_NONE when we don't see an interrupt from WM8962Mark Brown1-0/+3
This should never happen with level triggered IRQs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Initial WM8962 DSP2 supportMark Brown1-1/+156
The WM8962 features a DSP providing a number of signal processing features including HD Bass and Virtual Surround Sound (VSS). Enable initial support for this, allowing users to enable and disable the algorithms using the default coefficient sets. Further patches will add support for runtime configuration of the DSP coefficients. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-22ASoC: Add basic WM8962 capture low/high pass filter controlMark Brown1-0/+10
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-14ASoC: Move WM8962 CLKREG_OVD earlierMark Brown1-4/+4
When the clocking registers are not overriden some of the registers are not writable. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-07-20ASoC: Acknowledge WM8962 interrupts before acting on themMark Brown1-3/+3
This closes the small race between a status being read in response to an interrupt and clearing the interrupt, meaning that if the status changes between those periods we might not get a reassertion of the interrupt. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08Merge branch 'for-3.0' into for-3.1Mark Brown1-2/+2
2011-06-08ASoC: Defer all WM8962 clocking configuration until power upMark Brown1-27/+33
Don't require an audio rate SYSCLK in hw_params() in order to better support microphone detection use cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-08ASoC: Implement base 5 band EQ control for WM8962Mark Brown1-0/+16
ReTune Mobile modes are not currently supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08ASoC: Report errors when we have a WM8962 IRQ and don't get FLL lockMark Brown1-5/+32
We really should be getting the interrupt - if we don't get one it's very likely that the configuration is incorrect and audio will fail. Also increase the timeout substantially in this case for safety. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08ASoC: Factor out I2C usage in WM8962 driverMark Brown1-9/+10
The chip can actually support SPI so we shouldn't assume we've got an I2C device even though that's the most common configuration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-08ASoC: Fix WM8962 headphone volume update for use of advanced cachesMark Brown1-2/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-04-28ASoC: Implement WM8962 ADC high pass filter configurationMark Brown1-0/+10
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26ASoC: Don't warn if the WM8962 SYSCLK FLL setting doesn't match realityMark Brown1-1/+0
When bringing up audio low power modes boards may configure SYSCLK before they actually start the FLL as we do much of the clocking setup prior to the power up sequence. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26ASoC: Implement WM8962 DMIC supportMark Brown1-0/+31
DMIC support is automatically disabled when none of the GPIOs are set up to bring out the DMICCLK and DMICDAT pins at startup. Note that there's no support for controlling DMIC routing except the power control so the board DAPM configuration will need to manage DMIC enable and disable if analogue mics (eg, a headset) also exist. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26ASoC: Move WM8962 FLL configuration to CODECMark Brown1-3/+2
There's only one DAI anyway. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-26ASoC: Support FLL lock interrupt on WM8962Mark Brown1-1/+15
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-01-31ASoC: Accept any logical value for WM8962 GPIO set()Mark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-17ASoC: Avoid direct register cache access when setting defaultsMark Brown1-10/+20
Directly accessing the register cache means that we can't use anything except a flat register cache so use snd_soc_update_bits(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-13ASoC: Update users of readable_register()/volatile_register()Dimitris Papastamos1-2/+2
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-29Merge branch 'for-2.6.37' into for-2.6.38Mark Brown1-25/+20
2010-12-29ASoC: codecs: wm8962: Fix register cache incoherencyLars-Peter Clausen1-25/+20
The multi-component patch(commit f0fba2ad1) moved the allocation of the register cache from the driver to the ASoC core. Most drivers where adjusted to this, but the wm8962 driver still uses its own register cache for its private functions, while functions from the ASoC core use the generic cache. Thus we end up with two from each other incoherent caches, which can lead to undefined behaviour. This patch fixes the issue by changing the wm8962 driver to use the generic register cache in its private functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org (for 2.6.37 only)
2010-12-28ASoC: One more x86 typo fixMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-27ASoC: Fix typo in x86 workaroundMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>