summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Enable ASoC register map dump for some regmap CODECsMark Brown2011-12-301-0/+8
| | | | | | | 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>
* ASoC: Remove unused label from wm8994 probe()Mark Brown2011-12-291-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove WM8994 register cacheMark Brown2011-12-131-87/+0
| | | | | | | | | Now that the mfd is using the register map cache there's no need for the CODEC driver to do any register cache management or any funny dances to interact with the other drivers using the device so just remove the cache initialisation and volatility information. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove ASoC-specific WM8994 I/O codeMark Brown2011-12-131-51/+12
| | | | | | | Just go directly to the regmap API, saving code and making integration that bit more direct. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Rely on core enabling the wm8994 with runtime PMMark Brown2011-12-081-6/+1
| | | | | | No need to do this in the driver now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.2' into for-3.3Mark Brown2011-12-021-6/+6
|\
| * ASoC: Mark WM8994 ADC muxes as virtualMark Brown2011-12-021-6/+6
| | | | | | | | | | | | | | | | Since they don't actually have power bits but do have events associated with them it's important that we bootstrap their state properly which making them virtual does. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add missing err labelMark Brown2011-12-021-0/+1
| | | | | | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen2011-12-021-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>
* | ASoC: Convert WM8994 to devm_kzalloc()Mark Brown2011-12-011-7/+4
| | | | | | | | | | | | | | 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>
* | ASoC: Add platform data for WM8958/WM1811 microphone detection ratesMark Brown2011-12-011-8/+4
| | | | | | | | | | | | | | | | 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>
* | ASoC: Ensure we reconfigure WM8958 microphone detection on rate changesMark Brown2011-12-011-4/+2
| | | | | | | | | | | | | | | | 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>
* | ASoC: Implement support for WM1811A jack detectionMark Brown2011-12-011-19/+245
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Rename WM8994 detecting flag to mic_detectingMark Brown2011-12-011-6/+6
| | | | | | | | | | | | More specific and avoids confusion with a following change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Allow more WM8958/WM1811 button levels with default handlerMark Brown2011-12-011-8/+34
| | | | | | | | | | | | | | | | 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>
* | ASoC: Tune down active mode detection rate for WM8958 mic detectionMark Brown2011-12-011-2/+2
| | | | | | | | | | | | Saves a little power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Don't use control_data to get struct wm8994Mark Brown2011-12-011-34/+38
| | | | | | | | | | | | | | 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>
* | ASoC: Provide debug log of accessory status on WM8958Mark Brown2011-11-301-0/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Enhance default WM8958 microphone detectionMark Brown2011-11-291-11/+109
| | | | | | | | | | | | | | | | 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>
* | ASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audioMark Brown2011-11-291-1/+39
| | | | | | | | | | | | | | 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>
* | ASoC: Ensure SYSCLK is enabled for WM8958 accessory detectionMark Brown2011-11-291-0/+3
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-281-0/+2
|\|
| * ASoC: Supply dcs_codes for newer WM1811 revisionsMark Brown2011-11-281-0/+2
| | | | | | | | | | | | Based on initial data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-11-281-0/+5
|\|
| * ASoC: Error out if we can't generate a LRCLK at all for WM8994Mark Brown2011-11-281-0/+5
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Convert CODEC drivers to module_platform_driverMark Brown2011-11-281-12/+1
| | | | | | | | | | | | Factors out a bit of boilerplate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-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>
* ASoC: Ensure we get an impedence reported for WM8958 jack detectMark Brown2011-11-041-11/+26
| | | | | | | | | Occasionally we may see an accessory reported before we have a stable impedance for the accessory. If this happens then reread the status in order to ensure that the handler can take the appropriate action for the status change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Don't use wm8994->control_data when requesting IRQsMark Brown2011-11-041-2/+2
| | | | | | | | The field is no longer initialised so this will crash if running on wm8958. Reported-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Don't use wm8994->control_data in wm8994_readable_register()Mark Brown2011-11-041-1/+1
| | | | | | | | | The field is no longer initialised so this will crash if running on wm8958. Reported-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 CaptureAxel Lin2011-10-201-1/+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> Cc: stable@kernel.org
* ASoC: Update WM1811 DCS codes for latest evaluation resultsMark Brown2011-10-181-2/+2
| | | | | | | | Evaluation of larger quantities of material has provided new DCS codes values to be applied for WM1811. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: Remove impossible case from wm8994_hw_paramsAxel Lin2011-10-121-10/+0
| | | | | | | | We set hw_params callback for wm8994_aif3_dai_ops to wm8994_aif3_hw_params. Thus no need to check wm8994-aif3 in wm8994_hw_params. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-3.1' into for-3.2Mark Brown2011-10-041-1/+1
|\
| * ASoC: wm8994: Fix setting rate_reg for wm8994-aif2Axel Lin2011-10-041-1/+1
| | | | | | | | | | | | | | | | For wm8994-aif2, the rate_reg should be WM8994_AIF2_RATE. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: wm8994: Slightly optimize configure_clockAxel Lin2011-10-041-7/+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 WM8994_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>
* | ASoC: Add WM1811 supportMark Brown2011-10-041-5/+78
| | | | | | | | | | | | | | | | The WM1811 is mostly register compatible with the WM8994 and WM8958, providing a high performance audio hub CODEC in a small form factor suitable for ultra compact system designs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix backport of WM8994 thermal warningMark Brown2011-08-171-2/+2
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
* | ASoC: Implement WM8994 thermal warning and shutdown interrupt supportMark Brown2011-08-171-0/+26
| | | | | | | | | | | | | | ALSA doesn't really have good mechanisms for dealing with these so we just log them - the hardware already has automatic shutdown support. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add WM8958 noise gate supportMark Brown2011-08-171-0/+38
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Disable pulls on WM8994 AIF2 when starting itMark Brown2011-08-151-0/+16
| | | | | | | | | | | | | | | | | | | | Pull control is availalbe for WM8994 AIF2, generally disabled as part of the GPIO configuration in order to save power after system startup. As on newer devices in the series there is no GPIO functionality on these pins this will happen less naturally so have the driver disable the pulls as the AIF is probed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Disable WM8994 VMID for digital only pathsMark Brown2011-08-141-56/+127
| | | | | | | | | | | | | | | | | | | | | | On WM8994 class devices only the analogue portions of the CODEC require VMID so when running digital only paths we can leave VMID disabled. On some earlier devices the FLL uses VMID so we don't use DAPM reference counting alone, we maintain an internal reference count which is also enabled and disabled by the FLL startup. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Add VMID widget for wm_hubs devicesMark Brown2011-08-141-0/+3
| | | | | | | | | | | | | | | | | | Currently this does not actually do anything, it is being introduced in order to facilitate additional power optimisations for current generation devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | Merge branch 'for-3.1' into for-3.2Mark Brown2011-08-111-0/+1
|\|
| * ASoC: Add missing break in WM8994 probeMark Brown2011-08-111-0/+1
| | | | | | | | | | | | | | | | This error would have no effect on current silicon revisions, the fall through case has the same behaviour. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Support separate left and right channel dcs_codes valuesMark Brown2011-08-011-1/+2
| | | | | | | | | | | | | | | | Some devices can have performance optimized by setting different offsets for left and right channels. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* | ASoC: Implement new DC servo readback mode for late WM8994 revisionsMark Brown2011-08-011-1/+2
|/ | | | | | | | | Later WM8994 devices implement a new DC servo readback mode with the register used to access the offset moved to register 0x59. Implement support for this and enable it on the appropriate devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* Merge branch 'for-3.0' into for-3.1Mark Brown2011-07-171-3/+4
|\
| * ASoC: Correct WM8994 MICBIAS supply widget hookupMark Brown2011-07-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | The WM8994 and WM8958 series of devices have two MICBIAS supplies rather than one, the current widget actually manages the microphone detection control register bit (which is managed separately by the relevant API). Fix this, hooking the relevant supplies up to the MICBIAS1 and MICBIAS2 widgets. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Reduce power consumption for idle DAIs in WM8994Mark Brown2011-07-171-0/+29
| | | | | | | | | | | | | | | | If DAIs are idle but their clocks are in use for some reason (eg, as SYSCLK or for accessory detect) then set the clock dividers to the maximum to reduce slightly the power consumption of the unclocked circuits. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>