summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8994.c
AgeCommit message (Collapse)Author
2011-11-21ASoC: Don't use wm8994->control_data in wm8994_readable_register()Mark Brown
commit 8eeea521d9d0fa6afd62df8c6e6566ee946117fa upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ASoC: wm8994: Use SND_SOC_DAPM_AIF_OUT for AIF3 CaptureAxel Lin
commit 35024f4922f7b271e7529673413889aa3d51c5fc upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11ASoC: wm8994: Fix setting rate_reg for wm8994-aif2Axel Lin
commit c527e6aadc8f142ad388b6aa59a1ce6a4bfb1966 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-11ASoC: Add missing break in WM8994 probeMark Brown
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>
2011-07-17Merge branch 'for-3.0' into for-3.1Mark Brown
2011-07-17ASoC: Correct WM8994 MICBIAS supply widget hookupMark Brown
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
2011-07-17ASoC: Reduce power consumption for idle DAIs in WM8994Mark Brown
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>
2011-07-17ASoC: Handle failed WM8994 FLL lock waitsMark Brown
Try the completion before we start the FLL so that if an interrupt was delayed long enough for us to miss it we don't wait for the completion it signalled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-15Merge branch 'for-3.0' into for-3.1Mark Brown
2011-07-15ASoC: Fix shift in WM8958 accessory detection default implementationMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-07-14ASoC: Log WM8994 FIFO errors from the interruptMark Brown
We should spot them anyway on state changes but logging them gives us better time information about when the misconfiguration happened. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Don't warn on low WM8994/58 AIFnCLKsMark Brown
We can have valid but very low clocks in accessory detection modes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Use WM8994 FLL lock interruptMark Brown
If we have interrupts then wait for the FLL lock interrupt rather than using dead reckoning when waiting for the FLL to start. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Hook up DC servo completion IRQ for WM8994 and WM8958Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Use late enable handling for direct voice, speaker and headphoneMark Brown
This ensures appropriate clocking for bypass paths to speaker and headphone and direct voice paths on affected revisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-09ASoC: Conditionalize the enable of WM8994 ADC TDM modeMark Brown
Future devices will not benefit from this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-04Merge branch 'for-3.0' into for-3.1Mark Brown
2011-07-04ASoC: Ensure we delay long enough for WM8994 FLL to lock when startingMark Brown
This delay is very conservative. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-06-23ASoC: Trigger wm_hubs series update startup off a separate flagMark Brown
Allowing the two to be used independently. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-16ASoC: Fix wrong data type access in a few codec driversJarkko Nikula
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-05-11ASoC: Disable WM8994/58 microphone detection over suspendMark Brown
It will be non-functional with the basises and clocks off anyway, if the system needs microphone detection enabled over suspend then it should be causing the CODEC to ignore suspend using the APIs for that to prevent the biases being disabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-04-07Merge branch 'for-2.6.39' into for-2.6.40Mark Brown
2011-04-07ASoC: Set left channel volume update bits for WM8994Mark Brown
Ensures that we apply volume updates that don't affect the right channel. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-03-22ASoC: Add WM8958 enhanced EQ supportMark Brown
DSP2 in the WM8958 can be used to support an upgraded EQ for use in demanding applications. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-22ASoC: Add WM8958 VSS supportMark Brown
With appropriate firmware the WM8958 can support Virtual Surround Sound or VSS, widening the stereo audio image for improved user experience. Enable support for this mode of operation when the appropriate firmware can be loaded at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-22ASoC: Support download of WM8958 MBC firmwareMark Brown
Allow userspace to supply an update to the ROM firmware. The firmware request is non-blocking so userspace can load the firmware at its leisure without delaying startup, the driver will begin using the firmware the next time MBC is started after it has been supplied. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-03-18ASoC: Mark WM8958 DSP2 registers readableMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-18ASoC: Handle startup sequencing of WM8958 DSP2 with deferred clockingMark Brown
The DSP2 startup requires that the clock be enable so if we've deferred clock startup we need to defer DSP2 startup Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-18ASoC: Factor WM8958 DSP2 handling into separate fileMark Brown
DSP2 on the WM8958 has a default ROM which provides a multi-band compressor for enhanced performance on mobile devices but can also support runtime download of alternative firmware. In preparation for more exploiting this functionality refactor the code to split the handling of DSP2 into a separate file. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-18ASoC: Treat WM8958 revision A as WM8994 revision DMark Brown
The first WM8958 revision requires similar treatment. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-10Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-03-09ASoC: Ensure WM8958 gets all WM8994 late revision widgetsMark Brown
Without this fix the driver won't instantiate properly on relevant devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-03-09ASoC: Fix typo in late revision WM8994 DAC2R nameMark Brown
Without this fix the driver won't instantiate properly on relevant devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-03-01ASoC: WM8994: Ensure MICBIAS is provided with a clockDimitris Papastamos
The patch 'ASoC: WM8994: Improve Playback Robustness' did not handle this case properly. 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-03-01Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-03-01ASoC: WM8994: Ensure late enable events are processed for the ADCsDimitris Papastamos
Ensure that the ADCs are provided with a clock as the previous patch "ASoC: WM8994: Improve playback robustness" did not handle this case properly. 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-03-01ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionalyDimitris Papastamos
Since we began using the late clock disable functionality, ensure that we don't disable the clock if any of the ADC or DAC paths are still enabled. This happens when we have simultaneous playback and recording. 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-02-22ASoC: Simplify default WM8958 jack detection codeMark Brown
The default WM8958 jack detection handler implements a full set of buttons and also support for video detection. Support for multi-button jacks is fairly system specific and will usually require some tuning for headsets so simplify the implementation to only report a simple short to ground button, leaving multi-button headsets to be handled by system specific code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22ASoC: Support configuration of WM8958 microphone bias analogue parametersMark Brown
The WM8958 has a different microphone bias architecture to WM8994 so needs different configuration to WM8994. Support this in platform data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22ASoC: Support WM8958 direct microphone detection IRQMark Brown
Allow direct routing of the WM8958 microphone detection signal to a GPIO to be used, saving the need to demux the interrupt. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-02-22ASoC: Fix WM8958 default microphone detection argument orderingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18ASoC: Fix missing space in WM8994Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-13Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-02-13ASoC: WM8994: Improve playback robustnessDimitris Papastamos
On WM8994 revision D and earlier ensure proper playback robustness as some rare use cases can trigger issues. 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-02-13ASoC: WM8994: Improve robustness in some use casesDimitris Papastamos
Ensure that on disabling certain registers such as AIF1DAC1L, AIF1DAC1R etc. the AIF1CLK and AIF2CLK remain enabled. Similarly when enabling those registers, AIF1CLK and AIF2CLK will remain disabled. 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-02-03Merge branch 'for-2.6.38' into for-2.6.39Mark Brown
2011-02-03ASoC: Improve WM8994 digital power sequencingMark Brown
On WM8994 revision D and earlier ensure optimal sequencing with simultaneous usage of AIF1 and AIF2 by tying the signals together so if paths through both are connected the streams are started simultaneously. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
2011-02-03ASoC: Create an AIF1ADCDAT signal widget to match AIF2Mark Brown
Due to the different routing for AIF1 and AIF2 we weren't using a single widget to represent the ADCDAT signal. For consistency add one. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
2011-01-19Merge branch 'for-2.6.38' into for-2.6.39Mark Brown