aboutsummaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: add espresso machine driverZiyan2016-04-303-0/+779
|
* sound: soc: sync wm8994 with GT-P3110_JB_OpensourceZiyan2016-04-302-22/+55
|
* [espresso] Revert "ASoC: wm8994: Ensure there are enough BCLKs for four ↵Andreas Blaesius2016-04-301-0/+4
| | | | | | channels" for espresso This reverts commit 3b6ae1807d29f8cacd63fddf513110f9308b4c8e.
* ASoC: wm8994: Tune debounce rates for jack detect modeMark Brown2016-04-301-2/+4
|
* mfd: Define some additional wm8994 registersMark Brown2016-04-301-6/+6
| | | | | | | | Add a bunch of definitions for wm8994 registers that are not currently used by software. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
* ASoC: wm8994: Keep AIF3 tristated when not in useMark Brown2016-04-301-5/+4
| | | | | | | | Since AIF3 shares clock signals with other audio interfaces in order to ensure it doesn't drive undesirable clocks we need to tristate it. Rather than forcing the machine driver to do so have the driver do this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Don't allow reconfiguration of FLL when it provides SYSCLKMark Brown2016-04-301-18/+17
| | | | | | | | | | | | Rather than trying to work around machine drivers which try to reprogram the FLL while it is providing SYSCLK just return an error if they try. This will avoid audio glitches during FLL reconfiguration, or at least move the introduction of the glitches to the machine driver. Since disabling the source for an active SYSCLK is not supported in the first place systems shouldn't be doing this in the first place. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Cache multiple DCS offsetsMark Brown2016-04-302-10/+67
| | | | | | | | 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>
* ASoC: wm_hubs: Enable class W for output mixer pathsMark Brown2016-04-301-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>
* ASoC: wm_hubs: Factor out class W managementMark Brown2016-04-304-159/+82
| | | | | | | | | | | | | 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. Change-Id: If7ec8c909e6608fcc58563b6607efb77f6a6ab68 Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Conflicts: sound/soc/codecs/wm8993.c
* ASoC: wm_hubs: Special case headphones for digital paths in more use casesMark Brown2016-04-304-15/+46
| | | | | | | | | | | | | 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>
* ASoC: wm8994: Implement FLL bypass supportMark Brown2016-04-302-0/+20
| | | | | | | Later WM8994 class devices can bypass the FLL from BCLK. Do this automatically when the FLL input and output frequencies match up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Disable cache of the DC servo calibration for WM1811Mark Brown2016-04-303-1/+3
| | | | | | | 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>
* ASoC: wm_hubs: Don't actively manage LINEOUT_VMID_BUFMark Brown2016-04-301-11/+5
| | | | | | It can just be enabled all the time with no impact. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Apply volume updates with clocks enabledMark Brown2016-04-301-35/+58
| | | | | | | | | | | | | | commit bfd37bb5f681961e255fd2f346c20fdae2ef3f27 upstream. Volume updates may not be acted upon if there is no clock applied when the volume update is written. Ensure this doesn't happen by writing out registers with volume updates after we enable each of the clocks. There are more registers updated than before as previously we were relying on wm_hubs to set those for controls it manages. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variantsMark Brown2016-04-301-4/+8
| | | | | | | | | | commit c8fdc1b56611faa7b38eab6b99da5e20113661ff upstream. Ensure that all the actions get taken at appropriate times by calling the _PRE and _POST events for the aifNclk_ev functions explicitly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: wm8994: Fix AIF2ADC power downMark Brown2016-04-301-1/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: wm8994: Improve sequencing of AIF channel enablesMark Brown2016-04-301-54/+222
| | | | | | | | This ensures a clean startup of the channels, without this change some use cases could result in issues in a small proportion of cases. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: wm8994: Update WM8994 DCS calibrationMark Brown2016-04-301-1/+1
| | | | | | | Based on latest production information. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: wm8994: Provide VMID mode control and fix default sequenceMark Brown2016-04-302-39/+155
| | | | | | | | | | | | | | The optimal management of VMID depends on a number of factors which vary dynamically at runtime, for example the connection to a system docking station. In some circumstances it is desirable to keep VMID enabled all the time, in others it is desirable to aggressively power it up and down. Provide a callback allowing machine driver to configure either the normal power up/down mode (WM8994_VMID_MODE_NORMAL) or to maintain VMID even when idle (WM8994_VMID_MODE_FORCE). This callback, wm8994_vmid_mode(), should be called with the CODEC lock. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Add missing break in resumeMark Brown2016-04-301-0/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Prevent ABBA deadlock with CODEC and accdet mutexesMark Brown2016-04-301-35/+34
| | | | | | | | | | | | | Currently we can the accdet mutex from within DAPM when updating the device state which means we take accdet then the CODEC mutex but we also do the locking the other way around when responding to the jackdet IRQ. Move all the jackdet use of the CODEC mutex out of the accdet lock to avoid this. Since all the DAPM interactions depend only on a single threaded IRQ this is still serialised. The locking improvements in 3.5 allow a better solution there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Use audio mode for jack detection when system is activeMark Brown2016-04-302-29/+49
| | | | | | | When we are out of system sleep always use audio mode for jack detection in order to avoid potential performance issues handing off between modes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Factor out WM1811A detection mode settingMark Brown2016-04-301-20/+28
| | | | | | | Push everything through one function for active use cases, should be no practical effect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Don't bother updating the jackdet mode needlesslyMark Brown2016-04-301-0/+3
| | | | | | If we're not doing jackdet it's not needed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Disable JACKDET when disabling detectonMark Brown2016-04-301-0/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changesMark Brown2016-04-301-0/+2
| | | | | | | | Normally this will have no effect as we set detection up at system startup before DAPM syncs take effect, this will only be useful if the system enables and disables detection at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Suppress noop updates of FLL KMark Brown2016-04-301-1/+2
| | | | | | | Using snd_soc_write() means we always write to the register even if it already contains the newly calculated value. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Disable debounce of jack detection on inserted jackMark Brown2016-04-301-0/+8
| | | | | | | Don't debounce jack detection for inserted jacks, giving improved responsiveness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet modeMark Brown2016-04-301-12/+13
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Move wm_hubs callback before we start ramping VMIDMark Brown2016-04-301-2/+2
| | | | | | Allows the generic code to set up for that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Support external capacitors on MICBIAS2 with jack detectionMark Brown2016-04-301-0/+24
| | | | | | | | | | | When an external capacitor is connected to MICBIAS2 on devices with jack detection (which is not required but may be done in some systems) then the loading may mean that better performance is obtained when the microphone bias is enabled normally rather than using the low power mode. Provide platform data allowing systems to indicate if they require this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Actively discharge idle MICBIAS with jack detectMark Brown2016-04-301-0/+9
| | | | | | | This minimises the chance of any external capacitors that are fitted being discharged into headphones as they insert. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Enable headphone startup mode 1 for WM1811 and WM8958Mark Brown2016-04-301-0/+2
| | | | | | The latest recommendation for optimal performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Bomb out if we can't read back the DC servo resultMark Brown2016-04-301-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>
* ASoC: wm_hubs: Convert headphone driver to output driver widgetMark Brown2016-04-301-3/+2
| | | | | | | Mostly for neatness, though it may help with sequencing in some situations. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Clamp inputs to VMID while we rampMark Brown2016-04-302-0/+19
| | | | | | Reduces the amount of time taken to stabilise them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Actively discharge VMID when not in useMark Brown2016-04-301-0/+4
| | | | | | Ensure we're in a known state when we restart. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: VMID management improvementsMark Brown2016-04-301-1/+14
| | | | | | | | | Raise the ramp time to 50ms to cover corner cases, use the startup bias generator, explicitly reset the ramp circuit when complete and reorder things all of which should improve performance somewhat for systems that are sensitive to noise from VMID. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm_hubs: Improve single ended line output enable performanceMark Brown2016-04-304-8/+125
| | | | | | | | | | 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>
* ASoC: wm_hubs: Convert most output drivers to OUT_DRV widgetsMark Brown2016-04-301-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>
* ASoC: wm8994: Fix typo in VMID ramp settingMark Brown2016-04-301-1/+1
| | | | | | | The VMID ramp rate is supposed to be 0x3, not 11b. Fix that. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: wm_hubs: Push check for idle_bias_off out into driversMark Brown2016-04-303-6/+14
| | | | | | | | 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>
* ASoC: wm8994: Enabling VMID should take a runtime PM referenceMark Brown2016-04-301-0/+4
| | | | | | | | We can enable VMID independently of the bias in some use cases so we need to ensure that the core device is powered up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* ASoC: Mark WM8994 ADC muxes as virtualMark Brown2016-04-301-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 platform data for WM8958/WM1811 microphone detection ratesMark Brown2016-04-301-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 Brown2016-04-301-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 Brown2016-04-302-19/+249
| | | | | | | | | | | 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 Brown2016-04-302-7/+7
| | | | | | 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 Brown2016-04-302-8/+35
| | | | | | | | 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>