aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_hubs.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-28ASoC: wm_hubs: Ensure volume updates are handled during class W startupMark Brown1-0/+5
In some circumstances we may need to flush volume updates to the device after switching to class W mode. Do this unconditionally to ensure that these situations are handled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-08-22ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdataMark Brown1-4/+31
Sometimes the analogue circuitry connected to the microphone needs some time to settle after power up. Allow systems to configure this delay in the platform data, the driver will then insert the required delay during power up of paths that involve the microphone. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22ASoC: wm_hubs: Add trace showing semantics of the DCS updateMark Brown1-0/+4
Aids diagnostics. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22ASoC: wm_hubs: Use explicit casts for converting to signedMark Brown1-2/+2
Should be no behaviour change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm_hubs: Rename calibrate_dc_servo()Mark Brown1-2/+2
Really we're enabling it here and the name will become very confusing shortly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm_hubs: Factor out DC servo readback codeMark Brown1-22/+43
It's currently only used in one place but another user will be added shortly and there's an argument it's clearer anyway. Also add support for readback in mode 1, though it's not currently used. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm_hubs: Move CODEC stored in private data into wm_hubsMark Brown1-0/+2
Further wm_hubs code will use this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown1-1/+1
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-13Merge tag 'v3.4-rc7' into for-3.5Mark Brown1-6/+9
Linux 3.4-rc7 Conflicts): drivers/base/regmap/regmap.c (overlap with bug fixes) sound/soc/blackfin/bf5xx-ssm2602.c (overlap with bug fixes)
2012-05-01ASoC: wm_hubs: Cache multiple DCS offsetsMark Brown1-9/+65
Rather than invalidating the cached DCS value every time the headphone gain changes store multiple values, indexed by gain. This allows the optimisation we get from the cache to take effect more often. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-27ASoC: wm_hubs: Enable class W for output mixer pathsMark Brown1-21/+40
Class W can be used for any path where only data from the DAC is routed to the headphones. Currently we only enable it when the direct DAC to headphone path is used but it can also be enabled for paths that go via the output mixer providing the DAC is the only input to the output mixer. Implement support for this, including updates to the class W status when the output mixer configuration is changed. This also allows us to enable the DC servo optimisations for DAC to headphone paths where the output mixer is used. In general the direct DAC path is still preferred as this will offer better performance on most wm_hubs devices but these additional paths can simplify use case management. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-27ASoC: wm_hubs: Factor out class W managementMark Brown1-0/+59
Since the analogue portions of the checks for class W are the same over all the devices factor out these checks into wm_hubs and while we're at it also use wm_hubs_dac_hp_direct() to enable class W optimisations on more paths. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-27ASoC: wm_hubs: Special case headphones for digital paths in more use casesMark Brown1-6/+42
The optimisations which we can do with caching the headphone DCS result in wm_hubs have only been enabled in cases where class W is enabled. However, there are more use cases which can benefit from the cache, especially with WM8994 series devices with their more advanced digital routing. Rather than keying off the class W information from the CODECs have a check in wm_hubs for a suitable path and use that to determine if we can deploy our headphone optimisations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-23ASoC: wm_hubs: Make sure we don't disable differential line outputsMark Brown1-6/+9
While we need to clean up unused single ended line outputs we don't want to do this if the outputs are in differential mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-19ASoC: wm_hubs: Don't actively manage LINEOUT_VMID_BUFMark Brown1-11/+5
It can just be enabled all the time with no impact. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04ASoC: wm_hubs: Disable cache of the DC servo calibration for WM1811Mark Brown1-1/+1
The WM1811 DC servo is able to run much faster than previous devices so the benefit of skipping calibration is not useful. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29ASoC: wm_hubs: Bomb out if we can't read back the DC servo resultMark Brown1-1/+1
Should have no practical impact but it's safer than trying to soldier on. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21ASoC: wm_hubs: Convert headphone driver to output driver widgetMark Brown1-3/+2
Mostly for neatness, though it may help with sequencing in some situations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11ASoC: wm_hubs: Clamp inputs to VMID while we rampMark Brown1-0/+10
Reduces the amount of time taken to stabilise them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11ASoC: wm_hubs: Improve single ended line output enable performanceMark Brown1-8/+105
The enable of the single ended line outputs on wm_hubs devices performs better if the output is enabled prior to starting VMID. Since inactive outputs are held at VMID anyway there is little cost to doing this for unused outputs. Add callbacks into wm_hubs and keep track of which outputs are really active so we can disable them once we're active. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09Merge tag 'v3.3-rc3' as we've got several bugfixes in there which areMark Brown1-6/+12
colliding annoyingly with development. Linux 3.3-rc3 .. the number of the half-beast? Conflicts: sound/soc/codecs/wm5100.c sound/soc/codecs/wm8994.c
2012-02-07ASoC: wm_hubs: Convert most output drivers to OUT_DRV widgetsMark Brown1-12/+12
No practical impact but now we have the control type we may as well use it for the slightly nicer sequencing. 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-02-01ASoC: wm_hubs: Correct line input to line output 2 pathsMark Brown1-2/+2
The second line output mixer has the controls for the line input bypasses in the opposite order. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-01-31ASoC: wm_hubs: Push check for idle_bias_off out into driversMark Brown1-6/+0
For later wm_hubs devices we have much less need to keep the biases up even when using single ended line outputs so flag idle_bias_off for everything except the WM8993 and WM8994. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31ASoC: wm_hubs: Fix routing of input PGAs to line output mixerMark Brown1-4/+4
IN1L/R is routed to both line output mixers, we don't route IN1 to LINEOUT1 and IN2 to LINEOUT2. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-01-27ASoC: wm_hubs: fix wrong bits for LINEOUT2 N/P mixerUK KIM1-2/+2
Signed-off-by: UK KIM <w0806.kim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-01-26ASoC: wm_hubs: Enable line out VMID buffer for single ended line outputsMark Brown1-0/+6
For optimal performance the single ended line outputs require that the line output VMID buffer be enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2011-12-02ASoC: Convert WM8994 MICBIASes to supply widgetsMark Brown1-2/+2
There are some in tree systems using the driver but none use the MICBIAS widgets. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-27ASoC: Remove unneeded platform_device.h inclusions from CODECsMark Brown1-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>
2011-11-21Merge branch 'for-3.2' into for-3.3Mark Brown1-1/+1
2011-11-20ASoC: wm_hubs: fix DB_RANGE sizeClemens Ladisch1-1/+1
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent reading more data than actually is in the array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-11-04ASoC: Disable thermal shutdown when not using speakers in wm_hubsMark Brown1-0/+3
The thermal shutdown support in wm_hubs devices is tied to the speaker drivers (which are the only high power subsystems within the device). Ensure minimal current usage when the thermal shutdown support is not required by disabling the circuit when the speaker drivers are powered down. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-06ASoC: Replace remaining use of *_volsw_2r with *_volswPeter Ujfalusi1-2/+2
The snd_soc_*_volsw_2r functionality has been merged to *volsw callbacks. Few places still used the get, or put variant of volsw_2r, replace those with the corresponding *_volsw. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-05ASoC: Consolidate use of controls with custom get/put functionPeter Ujfalusi1-13/+5
Use the macros for controls require custom get/put function. This is to make sure that the soc_mixer_control is used consistently among the drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Arun KS <arunks@mistralsolutions.com> Cc: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-14ASoC: Add VMID widget for wm_hubs devicesMark Brown1-0/+16
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>
2011-08-08Merge branch 'for-3.1' into for-3.2Mark Brown1-2/+1
Conflict due to the fix for the register map failure - taken the for-3.1 version. Conflicts: sound/soc/codecs/sgtl5000.c
2011-08-01ASoC: Support separate left and right channel dcs_codes valuesMark Brown1-6/+7
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>
2011-08-01ASoC: Implement new DC servo readback mode for late WM8994 revisionsMark Brown1-4/+15
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>
2011-07-29ASoC: Disable wm_hubs periodic DC servo updateMark Brown1-2/+1
This does not function correctly in all circumstances so disable the periodic updates unconditionally for stable; a future patch will reenable where appropriate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-07-15ASoC: Handle spurious wm_hubs DC servo done interruptsMark Brown1-14/+16
Don't assume the first fire indicates that we're done. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Implement DC servo completion IRQ handling for wm_hubs devicesMark Brown1-5/+29
The individual devices should set the flag dcs_done_irq in the hubs shared data structure to indicate that they will flag the interrupt by calling wm_hubs_dcs_done(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: Use late enable handling for direct voice, speaker and headphoneMark Brown1-3/+0
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-06-29ASoC: Correct left/right swap in wm_hubs DC offset correctionMark Brown1-8/+8
It was consistently wrong for everything except WM8993 so should be no functional change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.comm>
2011-06-23ASoC: Allow suppression of series updates on wm_hubs devicesMark Brown1-1/+1
Some devices do not support manual updates of the DC servo. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-23ASoC: Trigger wm_hubs series update startup off a separate flagMark Brown1-2/+1
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-27ASoC: Fix wm_hubs input PGA ZC bitsMark Brown1-4/+4
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-05-16ASoC: Add some missing volume update bit sets for wm_hubs devicesMark Brown1-2/+6
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-05-16ASoC: Ensure output PGA is enabled for line outputs in wm_hubsMark Brown1-8/+8
Also fix a left/right typo while we're at it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com. Cc: stable@kernel.org
2011-04-11ASoC: Fix output PGA enabling in wm_hubs CODECsMark Brown1-4/+4
The output PGA was not being powered up in headphone and speaker paths, removing the ability to offer volume control and mute with the output PGA. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org