aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l52.c
AgeCommit message (Collapse)Author
2014-10-06Merge remote-tracking branches 'asoc/topic/suspend', 'asoc/topic/tas2552', ↵Mark Brown
'asoc/topic/tegra', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic3x' into asoc-next
2014-09-09ASoC: cs42l52: Cleanup manual bias level transitionsLars-Peter Clausen
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28ASoC: cs42l52: use true/false returns for bool functionsBrian Austin
Return true or false instead of 1 and 0 Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17ASoC: Fix SOC_DOUBLE_R_SX_TLV volume mixer argumentsBrian Austin
Remove unnecessary bit shifts. Correct min value to match datasheet. Num steps = number of steps between min and max. Reported-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' ↵Mark Brown
and 'asoc/topic/davinci' into asoc-next
2014-05-02ASoC: Remove IS_ENABLED for INPUT in CS42L52 and WM8962Brian Austin
Now that INPUT is required for the CS42L52 and WM8962 we can remove the IS_ENABLED(INPUT) check in the drivers. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18ASoC: cs42l52: Convert to use devm_gpio_request_oneAxel Lin
Current code missed a gpio_free() call in cs42l52_i2c_remove(). Convert to use devm_gpio_request_one() to fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-07ASoC: cs42l52: Fix mask for REVIDAxel Lin
BIT[0:2] of register 01h is REVID, so the mask for REVID should be 0x7. Also updates the code to use CS42L52_CHIP_REV_MASK. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-25Merge tag 'asoc-v3.15-2' into asoc-nextMark Brown
ASoC: Updates for v3.15 This is mostly a few additional fixes from Lars-Peter, a new driver and cleaning up a git failure with merging the Intel branch (combined with an xargs failure to pay attention to error codes). The history lists a bunch of additional commits for the branch but the content of those commits is actually present already but not recorded in history due to git failing. Unfortunately xargs is used in the merge script and it doesn't do a good job of noticing errors from the commands it invokes. # gpg: Signature made Thu 13 Mar 2014 14:25:44 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2014-03-25Merge tag 'asoc-v3.15' into asoc-nextMark Brown
ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC. # gpg: Signature made Wed 12 Mar 2014 23:05:45 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
2014-03-18ASoC: cs42l52: Fix mask bits for SOC_VALUE_ENUM_SINGLEBrian Austin
The mask bits values were wrong for the SOC_VALUE_ENUM_SINGLE for the PCM/ADC Swap controls Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-13Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown
2014-03-11ASoC: codec: Simplify ASoC probe code.Xiubo Li
For some CODEC drivers like who act as the MFDs children are ignored by this patch. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20ASoC: cs42l52: Use SOC_ENUM_SINGLE_DECL()Takashi Iwai
Just replace with the helper macro. No functional change at all. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-29ASoC: cs42l52: Fix buildMark Brown
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28ASoC: cs42l52: Add devicetree support for CS42L52Brian Austin
This patch adds device tree support for the CS42L52 Codec Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28ASoC: cs42l52: Make MICA/B mixer dependent on mic configBrian Austin
MICA/B Single-Ended input selection depends on mica/b config so lets make the mixer controls for them only show for selected mic's Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28ASoC: cs42l52: Reorganize MICA/B Config and SelectBrian Austin
This patch reworks the MICA an MICB config for single-ended or differential and the selection of which MIC for the single config Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-27ASoC: cs42l52: Use IS_ENABLED() macroFabio Estevam
Using the IS_ENABLED() macro can make the code shorter and simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25ASoC: cs42l52: Add chip rev id messageBrian Austin
This patch adds a print message at bootup for the CODEC Rev ID Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25ASoC: cs42l52: convert pdata config to regmap_update_bitsBrian Austin
Moving platform data to bus probe and convert to regmap_update_bits. This will work nicer when converted to device tree instead of having it split into multiple probes Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25ASoC: cs42l52: Add platform data for reset gpioBrian Austin
This patch adds platform data support for a reset GPIO. Also uses reset_gpio to toggle reset of the CODEC Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06ASoC: cs42l52: Add new TLV for Beep VolumeBrian Austin
CS42L52 Beep control uses 2dB scale from -56dB Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep VolumeBrian Austin
Beep Volume Min/Max was backwards. Change to SOC_SONGLE_SX_TLV for correct volume representation Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@kernel.org
2013-05-29ASoC: cs42l52: fix hp_gain_enum shift value.Nicolas Schichan
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.Nicolas Schichan
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28ASoC: cs42l52: fix default value for MASTERA_VOL.Nicolas Schichan
The default register value for MASTERA_VOL is 0x00, the same as MASTERB_VOL. Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2013-05-22ASoC: cs42l52: fix bogus shifts in "Speaker Volume" and "PCM Mixer Volume" ↵Nicolas Schichan
controls. Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22ASoC: cs42l52: microphone bias is controlled by IFACE_CTL2 register.Nicolas Schichan
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-11Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-nextMark Brown
2012-12-27ASoC: cs42l52: Convert to devm_input_allocate_device()Axel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24ASoC: cs42l52: Catch no-match case in cs42l52_get_clkAxel Lin
In the case of no-match, return -EINVAL instead of 0. Since we assign i to ret in the for loop, ret always less than ARRAY_SIZE(clk_map_table). Thus remove the boundary checking for ret. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton
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-13Merge branches 'fix/arizona', 'fix/core', 'fix/cs42l52', 'fix/mxs', ↵Mark Brown
'fix/samsung' and 'fix/wm8978' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into tmp
2012-11-07ASoC: cs42l52: fix the return value of cs42l52_set_fmt()Wei Yongjun
Fix the return value of cs42l52_set_fmt() when clock inversion is not allowed and also remove the useless variable ret. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) [We had been assigning to ret but then ignoring the value we assgined -- broonie] Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-11-04ALSA: Fix typo in drivers soundMasanari Iida
Correct spelling typo in debug messages within drivers/sound Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-07ASoC: cs42l52: Remove duplicate inclusion of slab.h header fileSachin Kamat
slab.h header file was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-05ASoC: cs42l52: Convert to devm_regmap_init_i2c()Brian Austin
Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-04ASoC: cs42l52: Remove version.h header file inclusionSachin Kamat
version.h header file is no longer needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-09ASoC: cs42l52: Staticise non-exported symbolsMark Brown
Makes sparse happy and avoids polluting the global namespace. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com>
2012-04-30ASoC: cs42l52: Remove duplicate module exit codeMark Brown
In the conversion to module_init_i2c() the original open coded module exit function was left. Remove it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-30ASoC: Add support for CS42L52 CodecBrian Austin
This patch adds support for Cirrus Logic CS42L52 Low Power Stereo Codec Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Georgi Vlaev <joe@nucleusys.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>