summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8962.c
AgeCommit message (Collapse)Author
2012-08-09ASoC: wm8962: Don't duplicate bias level management in resumeMark Brown
The core will bring the bias level up for us since we use idle_bias_off, duplicating this may be harmful. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-31ASoC: wm8962: Allow VMID time to fully rampMark Brown
Required for reliable power up from cold. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-07-12ASoC: wm8962: Redo early init of the part on resumeMark Brown
Ensure robust startup of the part by going through the reset procedure prior to resyncing the full register cache, avoiding potential intermittent faults in some designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-07-03ASoC: wm8962: Log AIF configuration requested by hw_params()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown
In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Add HPF coefficient configuration supportMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Add HD Bass and VSS coefficient configurationMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Add Dynamic Range Control supportMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Add Direct-Form 1 filter supportMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Add 3D enhancement supportMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01ASoC: wm8962: Implement DSP2 configuration initialisationMark Brown
We can simply use the register cache code to synchronise the current configuration down to the device when bringing up the DSP. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-18Merge branch 'topic/asoc' into for-linusTakashi Iwai
2012-03-06ASoC: wm8962: Remove defaults for volatile registersMark Brown
Save a little RAM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-06ASoC: wm8962: Remove unneeded pm_runtime_set_active()Mark Brown
The default pm_runtime status is enabled which is what we want. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02ASoC: wm8962: Run the headphone in class G mode when sidetone is enabledMark Brown
Class W mode with sidetone is not fully supported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-01ASoC: wm8962: Remove register default for PLL2Mark Brown
The initial value can be changed depending on system configuration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23ASoC: wm8962: Convert interrupt handler to direct regmap usageMark Brown
Avoids potential locking issues with anything that needs the CODEC lock. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23ASoC: wm8962: Remove mistakenly committed debug loggingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17ASoC: wm8962: Convert to module_i2c_driver()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Convert to runtime PM for bias off managementMark Brown
This allows userspace control of final power off, allowing policy decisions for register configuration retention. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Don't automatically enable and disable FLLMark Brown
Only enable and disable the FLL when explicitly told to, supporting some additional use cases and making the driver behaviour more standard. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Clean up register dump cruftMark Brown
No longer needed with regmap. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Add new SYSCLK ratios for new device revisionsMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Log the selected SYSCLK ratioMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Only configure BCLK in hw_params when audio is activeMark Brown
Otherwise we might not have a sensible clocking setup ready. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16ASoC: wm8962: Update the clocking when setting system clockMark Brown
Make sure we update for any changes in cases where we reconfigure while live (eg, for analogue bypass). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15ASoC: Show device id in the debug messageAxel Lin
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-14ASoC: wm8962: Fix sidetone enumeration textsMark Brown
The sidetone enumeration texts have left and right swapped. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-02-09Merge tag 'v3.3-rc3' as we've got several bugfixes in there which areMark Brown
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-08ASoC: wm8962: Support mono playback and recordMark Brown
Make sure we generate enough BCLKs for I2S style modes by always having a minimum of two channels worth of clocks for the BCLK. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood
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: wm8962: Fix word length configurationSusan Gao
Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-01-27ASoC: wm8962: Enable idle_bias_offMark Brown
The WM8962 has ground referenced and class D outputs so can happily go down to BIAS_OFF without a large startup time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25ASoC: wm8962: Mark register cache as dirty when regulators are disabledMark Brown
Otherwise we won't resync later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24ASoC: wm8962: Optimise power consumption for IN4 DC measurement usageMark Brown
When the hardware is configured with one or both of the IN4 inputs used for DC measurement (with no DC blocking capacitor connected) then we can improve power consumption slightly in idle modes by applying a register write sequence. Provide platform data to enable this, implemented using a regmap patch. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Add WM8962 DAC and ADC L/R swap supportMark Brown
Simple switches since there's no per-channel control. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Convert WM8962 register access map to modern styleMark Brown
Much more compact, both in terms of source and especially in terms of RAM used at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: Make WM8962 I2C usage unconditionalMark Brown
We only support I2C so no need to ifdef. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02ASoC: Fix return value of wm8962_gpio_direction_out()Axel Lin
We can't just pass back the return value of snd_soc_update_bits() as it will be 1 if a bit changed rather than zero. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30ASoC: Enable ASoC register map dump for some regmap CODECsMark Brown
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-02ASoC: Make WM8962 beep a signal generatorMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-11-27ASoC: Convert WM8962 to devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown
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 Clausen
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 Brown
2011-11-20ASoC: wm8962: fix DB_RANGE sizeClemens Ladisch
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 Brown
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 Brown
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 Brown
Conflicts: sound/soc/codecs/wm8940.c