summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4642.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: ak4642: Enable cache usage to fix crashes on resumeMark Brown2016-05-181-0/+3
| | | | | | | | | | | | | | The ak4642 driver is using a regmap cache sync to restore the configuration of the chip on resume but (as Peter observed) does not actually define a register cache which means that the resume is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: ak4642: Remove CLK_IS_ROOTStephen Boyd2016-04-201-3/+1
| | | | | | | | | This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ak4642: exchange macro name to avoid redefinitionKuninori Morimoto2015-09-161-3/+4
| | | | | | | | | | | 71a0138ab("ASoC: ak4642: enable to use MCKO as fixed rate output pin on DT") added new FS() macro, but x86 already has it in arch/x86/include/uapi/asm/ptrace-abi.h This patch exchange FS() to FSs() to avoid redefinition warning Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ak4642: enable to use MCKO as fixed rate output pin on DTKuninori Morimoto2015-09-141-48/+93
| | | | | | | | ak4642 chip can output clock via MCKO pin as audio reference clock. This patch supports it on DT Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ak4642: use *dev on ak4642_i2c_probe()Kuninori Morimoto2015-09-141-5/+6
| | | | | | | Let's replace &i2c->dev to dev Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ac97', ↵Mark Brown2015-08-301-7/+26
|\ \ | | | | | | | | | 'asoc/topic/ak4542', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next
| | * ASoC: ak4642: Fix up max_register settingAxel Lin2015-07-071-7/+26
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max_register setting for ak4642, ak4643 and ak4648 are wrong, fix it. According to the datasheet: the maximum valid register for ak4642 is 0x1f the maximum valid register for ak4643 is 0x24 the maximum valid register for ak4648 is 0x27 The default settings for ak4642 and ak4643 are the same for 0x0 ~ 0x1f registers, so it's fine to use the same reg_default table with differnt num_reg_defaults setting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
|/ | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/4554', 'asoc/topic/ab8500', ↵Mark Brown2015-04-121-3/+34
|\ \ | | | | | | | | | 'asoc/topic/ak4642', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next
| | * ASoC: ak4642: enable stereo line output power-save modeTakeshi Kihara2015-03-241-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | ak4642 has power-save mode for stereo line to reduce pop noise. This patch enables it. Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * ASoC: ak4642: tidyup DAPM route for playbackKuninori Morimoto2015-03-171-1/+3
| |/ | | | | | | | | | | | | | | | | It needs DAC -> Playback route instead of direct settings via SND_SOC_DAPM_DAC. otherwise, it can't find correct path if sound card used prefix name Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: ak4642: fixup channels_minKuninori Morimoto2015-04-101-2/+2
|/ | | | | | | | ak4642 doesn't have Mono record, ak4643 have it, but not supported. This patch fixes channel mismatch Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ak4642: Cleanup manual bias level transitionsLars-Peter Clausen2014-10-221-16/+0
| | | | | | | | | | | | | 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> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: ak4642: Make of_device_id array constKiran Padwal2014-07-281-2/+2
| | | | | | | Make of_device_id array const, because all OF functions handle it as const Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Add support for extended sysclk frequencies of the ak4648Sascha Hauer2014-05-141-0/+20
| | | | | | | | Additionally to the ak4642 pll frequencies the ak4648 also supports 13MHz, 19.2MHz and 26MHz. This adds support for these frequencies. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Add driver data and driver private structSascha Hauer2014-05-141-11/+40
| | | | | | | | Currently unused, this is done to let the driver distinguish between the different supported codec types in later patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Add ALC controlsSascha Hauer2014-05-141-0/+2
| | | | | | | | ALC and ALC Zero crossing detection has been enabled unconditionally. Add controls for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Fix typo zoro -> zeroSascha Hauer2014-05-141-1/+1
| | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: codec: Simplify ASoC probe code.Xiubo Li2014-03-111-8/+0
| | | | | | | | 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>
* ASoC: ak4642: Convert to module_i2c_driver()Mark Brown2013-12-021-21/+1
| | | | | | | The device does not support anything other than I2C (at least with the current driver) so save code. Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Convert to direct regmap API usageMark Brown2013-12-021-54/+59
| | | | | | | | | This moves us towards being able to remove the ASoC level I/O code which duplicates regmap functionality. Currently the only difference between the supported devices in the driver is the regmap so we can replace the CODEC driver selections with regmap selection instead. Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Convert to table based control initMark Brown2013-12-021-3/+4
| | | | | | Improves error handling and saves code. Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: Use IS_ENABLED() macroFabio Estevam2013-11-241-3/+3
| | | | | | | 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>
* Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linusMark Brown2013-11-031-1/+1
|\
| * ASoC: ak4642: prevent un-necessary changes to SG_SL1Phil Edworthy2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If you record the sound during playback, the playback sound becomes silent. Modify so that the codec driver does not clear SG_SL1::DACL bit which is controlled under widget Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* | ASoC: ak4642: Remove redundant breakSachin Kamat2013-09-171-2/+0
|/ | | | | | | 'break' after return statement is redundant. Remove it. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: ak4642: remove __devinitconst annotationStephen Rothwell2013-01-141-1/+1
| | | | | | | CONFIG_HOTPLUG is always true now and the __dev* macros have been removed. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: add Device Tree supportKuninori Morimoto2013-01-101-2/+31
| | | | | | | Support for loading the ak4642 codec module via devicetree. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-4/+4
| | | | | | | | | | | 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>
* ASoC: ak4642: cleanup struct ak4642_privKuninori Morimoto2012-11-211-21/+2
| | | | | | | | | This patch removed struct ak4642_priv which had meaningless variable. It is no longer needed Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: fixup: mute needs +1 stepKuninori Morimoto2012-04-051-1/+1
| | | | | | | | | | ak4642 out_tlv is +12.0dB to -115.0 dB, and it supports mute. But current settings didn't care +1 step for mute. This patch adds it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* Merge branch 'topic/asoc' into for-linusTakashi Iwai2012-03-181-1/+1
|\
| * ASoC: core: Add support for DAI and machine kcontrols.Liam Girdwood2012-02-041-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>
* | ASoC: ak4642: fixup HeadPhone L/R dapm settingsKuninori Morimoto2012-02-211-15/+16
|/ | | | | | | | | | | | Current ak4642 driver had wrong dapm settings for headphone L/R. If you select headphone L, and select R after that, headphone L setting was removed by R settings. This patch fixes it up. It provides just "Headphone Enable" to user side Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4642 to devm_kzalloc()Axel Lin2011-12-201-4/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown2011-11-271-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>
* ASoC: Remove driver versioning from ak4642Mark Brown2011-11-271-4/+0
| | | | | | | 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>
* ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-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>
* ASoC: ak4642: add ak4648 supportKuninori Morimoto2011-11-111-8/+36
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: add Line out supportKuninori Morimoto2011-11-111-0/+11
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: add headphone mute switch controlKuninori Morimoto2011-11-111-3/+2
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: add DAPM support for HeadPhone OutputKuninori Morimoto2011-11-111-9/+35
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: add ak4642_set_bias_level()Kuninori Morimoto2011-11-111-4/+29
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: ak4642 was testedKuninori Morimoto2011-11-081-1/+1
| | | | | | | ak4642 was tested by ms7724se board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-10-311-0/+1
| | | | | | | | Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ASoC: ak4642: fixup cache register tableKuninori Morimoto2011-10-131-11/+11
| | | | | | | | | ak4642 register was 8bit, but cache table was defined as 16bit. ak4642 doesn't work correctry without this patch. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: ak4642: convert to soc-cacheAxel Lin2011-10-121-70/+12
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2Kuninori Morimoto2011-07-071-1/+1
| | | | | | | | | mask didn't cover update-data Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: ak4642: add SND_SOC_DAIFMT_FORMAT supportKuninori Morimoto2011-01-211-0/+24
| | | | | | | | This patch support LEFT_J / I2S only for now Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud