summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
2011-12-02ASoC: WM8903: Disallow all invalid gpio_cfg pdata valuesStephen Warren
The GPIO registers are 15 bits wide. Hence values, higher than 0x7fff are not legal GPIO register values. Modify the pdata.gpio_cfg handling code to reject all illegal values, not just WM8903_GPIO_NO_CONFIG (0x8000). This will allow the later use of 0xffffffff as an invalid value in future device tree bindings, meaning "don't touch this GPIO's configuration". Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen
The existence of this parameter is purely historical. None of the CODEC drivers uses it and we always pass in the same value anyway, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> 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-12-02ASoC: Make WM5100 tone generator widgets signal generatorsMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-12-01ASoC: Convert WM8994 to devm_kzalloc()Mark Brown
Still have a manual free in there for some realloc()ed memory as there's no devm version of that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Add platform data for WM8958/WM1811 microphone detection ratesMark Brown
Allow systems to override the default microphone detection rates using platform data in case the settings are not suitable (eg, due to an unusually noisy jack). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Ensure we reconfigure WM8958 microphone detection on rate changesMark Brown
We don't need to rerun DAPM if the clock source is the same but we do need to adjust the microphone detection rate in case we are moving from an audio to a non-audio rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Implement support for WM1811A jack detectionMark Brown
The WM1811A features an advanced low power accessory detection subsystem which allows the device to be maintained in a very low power state while the system is idle without sacrificing any accessory detection features. Implement software support for this, automatically managing the power configuration of the device depending on the detected accessory. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Rename WM8994 detecting flag to mic_detectingMark Brown
More specific and avoids confusion with a following change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Allow more WM8958/WM1811 button levels with default handlerMark Brown
The WM8958 and WM1811 support detecting a range of buttons. Allow the user to provide platform data enabling more of these levels without having to write a custom detection handler. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Tune down active mode detection rate for WM8958 mic detectionMark Brown
Saves a little power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-01ASoC: Don't use control_data to get struct wm8994Mark Brown
This will support refactoring to make use of the regmap API more directly in the core. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-30ASoC: Provide debug log of accessory status on WM8958Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: Enhance default WM8958 microphone detectionMark Brown
Actively manage the detection rate for microphones with WM8958, providing improved power consumption and maximising the benefit from the hardware debounce. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audioMark Brown
When we don't have any active audio we can put the microphone biases into bypass mode to save power at the expense of performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: Ensure SYSCLK is enabled for WM8958 accessory detectionMark Brown
Ensure SYSCLK is enabled while running accessory detection on WM8958. It is always required so there is no sense in requiring machine drivers to individually do this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: SigmaDSP: Add regmap supportLars-Peter Clausen
Add support for loading the SigmaDSP firmware using regmap. This allows us to transparently use SPI or I2C as the transport protocol on devices which support them. For now we keep the old I2C support since we have one user of this which is not straight forward to convert to regmap, due to variable length registers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: SigmaDSP: Move private structs and functions to C fileLars-Peter Clausen
Move the structs and functions only used by SigmaDSP firmware loader itself from the header to the C file. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: SigmaDSP: Provide diagnostic error messagesLars-Peter Clausen
Provide some error messages when loading the firmware fails, so it is possible to diagnose the reason for the failure. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: Move SigmaDSP firmware loader to ASoCLars-Peter Clausen
It has been pointed out previously, that the firmware subsystem is not the right place for the SigmaDSP firmware loader. Furthermore the SigmaDSP is currently only used in audio products and we are aiming for better integration into the ASoC framework in the future, with support for ALSA controls for firmware parameters and support dynamic power management as well. So the natural choice for the SigmaDSP firmware loader is the ASoC subsystem. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-29ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmtAxel Lin
What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits, but current code clears BIT[2:0]. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28Merge branch 'for-3.2' into for-3.3Mark Brown
2011-11-28ASoC: Supply dcs_codes for newer WM1811 revisionsMark Brown
Based on initial data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28Merge branch 'for-3.2' into for-3.3Mark Brown
2011-11-28ASoC: Convert CS42L73 to devm_kzalloc()Brian Austin
Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: Error out if we can't generate a LRCLK at all for WM8994Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Convert to direct regmap API usageLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Use snd_soc_update_bits where appropriateLars-Peter Clausen
We can reduce the code size here a bit by using snd_soc_update_bits instead of open-coding the read-modify-write cycle. The conversion done in this patch is not completely straightforward and some minor code restructuring has been incorporated to further reduce the code size. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Add sysclk DAPM supplyLars-Peter Clausen
Add a DAPM supply widget for the internal sysclk, so it can be disabled automatically when not needed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Remove non-functional DAPM route controlsLars-Peter Clausen
DAPM route controls only take effect on paths where the sink is a mixer or a mux, furthermore the control must be a control assigned to the mixer or mux. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Make enum items const char * constLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Provide dB ranges for the volume controlsLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: ad193x: Use table based DAPM and controls setupLars-Peter Clausen
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28ASoC: Convert WM8903 MICBIAS to a supply widgetMark Brown
Also rename it to MICBIAS to reflect the pin name and help any out of tree users notice the change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@nvidia.com>
2011-11-28ASoC: Convert CODEC drivers to module_platform_driverMark Brown
Factors out a bit of boilerplate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Convert WM8962 to devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Convert wm8996 to use devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Convert wm9081 driver to use devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Convert wm1250-ev1 driver to use 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-27ASoC: Remove driver versioning from ak4642Mark Brown
It's never been updated so it can't be that useful and it makes the driver needlessly chatty. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25ASoC: Use devm_kzalloc() in wm5100Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-25ASoC: Staticise non-exported symbols in sta32xMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Johannes Stezenbach <js@sig21.net>
2011-11-23ASoC: Remove unused variable in wm8776 driverMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23Merge branch 'for-3.2' into for-3.3Mark Brown
2011-11-23ASoC: Cleanup duplicated constLars-Peter Clausen
Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally introduced a few duplicated consts. This patch cleans it up. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: cs42l51: Fix off-by-one for reg_cache_sizeAxel Lin
Just checking the code in cs42l51_fill_cache(): The cache pointer points to codec->reg_cache + 1. I think it is because CS42L51_FIRSTREG is 0x01, so codec->reg_cache[0] is not used here. Then we read CS42L51_NUMREGS bytes to cache. So we need reg_cache_size to be CS42L51_NUMREGS + 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> 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-23ASoC: Convert wm8776 to table based control and DAPM initMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Staticise and constify cs42l73_reg_defaultsMark Brown
It's not exported and doesn't need to change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>