summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8995.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton1-7/+7
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-11-23ASoC: wm8995: Convert to use devm_regmap_init_{spi,i2c}()Tushar Behera1-23/+3
Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-23ASoC: wm8995: Convert to use devm_kzalloc()Tushar Behera1-10/+4
Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood1-1/+1
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-01-27ASoC: Set idle_bias_off flag in snd_soc_codec_driverAxel Lin1-1/+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>
2011-12-14ASoC: Fix wm8995 regmap usageMark Brown1-0/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen1-1/+1
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-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen1-3/+3
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-10ASoC: Convert WM8995 to direct regmap usageMark Brown1-109/+608
Large code size increase due to the addition of readability information and the reformatting of the defaults table. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31ASoC: Convert wm8995 MICBIASes to supply widgetsMark Brown1-2/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-04ASoC: wm8995: Slightly optimize configure_clockAxel Lin1-8/+4
snd_soc_update_bits() will only write new register value if the old value is different from the new value. In additional, snd_soc_update_bits() returns 0 for no change. No need to read WM8995_CLOCKING_1 register before calling snd_soc_update_bits(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-30ASoC: Add missed regulator_unregister_notifier and regulator_bulk_free in ↵Axel Lin1-0/+7
wm8995_remove Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: wm8995: Remove unused i2c variable in wm8995_remove()Axel Lin1-2/+0
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-09-16ASoC: wm8995: Return -EINVAL if device ID mismatchAxel Lin1-0/+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-05-16ASoC: Fix wrong data type access in a few codec driversJarkko Nikula1-2/+2
Commit fafd217 ("ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol") changed the control private data type that is passed to snd_soc_cnew when creating dapm mixer and mux controls. Commit did not update a few codec drivers that are using their own put callbacks and thus are accessing a wrong data type. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-19Merge branch 'for-2.6.38' into for-2.6.39Mark Brown1-1/+1
2011-01-19ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()Dimitris Papastamos1-1/+1
In the wm8995_set_tristate() function when updating the register bits use the value and not the register index as the value argument. 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> Cc: stable@kernel.org
2011-01-17ASoC: WM8995: Add regulator handling codeDimitris Papastamos1-5/+97
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>
2011-01-13ASoC: Update users of readable_register()/volatile_register()Dimitris Papastamos1-1/+1
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>
2011-01-13Merge branch 'for-2.6.38' into for-2.6.39Mark Brown1-1/+1
2011-01-11ASoC: Fix section mismatch in wm8995.cTakashi Iwai1-1/+1
__devinitconst can't be used for data referred in driver struct. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-11ASoC: WM8995: Remember to flush the cache on resumeDimitris Papastamos1-0/+1
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-22ASoC: Add initial WM8995 driverDimitris Papastamos1-0/+1818
The WM8995 is a digital audio hub CODEC designed for smartphones. The current driver supports most of the basic functionality of the WM8995. 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>