summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linusMark Brown2013-07-151-4/+0
|\
| * ASoC: wm8994: Remove overly noisy debug loggingMark Brown2013-07-051-4/+0
| | | | | | | | | | | | This was committed in error. Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge tag 'asoc-v3.11-2' of ↵Takashi Iwai2013-06-281-8/+4
|\ \ | |/ |/| | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: More updates for v3.11 Some more fixes and enhancements, and also a bunch of refectoring for AC'97 support which enables more than one AC'97 controller driver to be built in.
| * ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding itLars-Peter Clausen2013-06-191-8/+4
| | | | | | | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown2013-06-171-43/+145
|\ \ | |/ |/|
| * ASoC: wm8994: Allow debounce before MICDET identificationMark Brown2013-06-011-2/+33
| | | | | | | | | | | | | | | | For systems which do not have a jack detection feature allow some debounce to be specified before we perform accessory identification, improving robustness without impacting button detection responsiveness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Remove unused variableMark Brown2013-06-011-1/+0
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Add digital loopback pathsMark Brown2013-05-301-2/+29
| | | | | | | | | | | | | | | | There is loopback control within the audio interfaces, provide control of this as there are some obscure scenarios where this could be used in production. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Defer declaration of open circuit microphonesMark Brown2013-05-291-9/+31
| | | | | | | | | | | | | | Provide a bit of debounce to handle pathological cases with slow input better by allowing the microphone detection to run for a bit longer. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Ensure lambda is zeroed for WM8994Mark Brown2013-05-281-0/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Remove restore of DAC enable stateMark Brown2013-05-281-16/+0
| | | | | | | | | | | | It's not been needed since the regmap conversion. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Handle LRCLK inversion for WM8958 and WM1811AMark Brown2013-05-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | On WM8958 and WM1811A separate control of the LRCLK inversion bit is available for the DAC and ADC LRCLKs which for compatibility reasons is done in a new register bit. Since writes to each scheme have no effect on parts using the other just always write to both for simplicity. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Samreen Nilofer <samreen.nilofer@intel.com>
| * ASoC: wm8994: missing break in wm8994_get_fll_config()Dan Carpenter2013-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | Smatch complains that: sound/soc/codecs/wm8994.c:2087 wm8994_get_fll_config() warn: missing break? reassigning 'fll->k' Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Support EFS mode for FLLMark Brown2013-05-131-13/+36
| | | | | | | | | | | | | | | | Later WM8994 devices support an enhanced accuracy FLL divisor mode called EFS which allows more precise selection of fractional source to output ratios. Support this on relevant devices. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Ensure microphone detection state is reset on removalMark Brown2013-05-301-0/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Avoid leaking pm_runtime reference on removed jack raceMark Brown2013-05-301-1/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: check for array index returnedVinod Koul2013-05-281-0/+5
| | | | | | | | | | | | | | | | The array 'drc_cfg' of size 3 may use index value -22 (EINVAL) The array 'retune_mobile_cfg' of size 3 may use index value -22 (EINVAL) Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Fix reporting of accessory removal on WM8958Mark Brown2013-05-281-0/+5
| | | | | | | | | | | | | | | | During recent refactoring the code to report removal when MICDET reports an absent microphone was removed, causing problems for systems which rely solely on the MICDET for this functionality. Restore it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: use the correct pointer to get the control valueVinod Koul2013-05-281-1/+1
|/ | | | | Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge tag 'asoc-v3.10-4' of ↵Takashi Iwai2013-05-031-0/+1
|\ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.10 A few more bug fixes, the DAPM clock fix is actually a driver specific one since currently there's only one user of the clock support due to the problems relying on the clock API.
| * ASoC: wm8994: missing break in wm8994_aif3_hw_params()Dan Carpenter2013-04-301-0/+1
| | | | | | | | | | | | | | | | | | The missing break here means that we always return early and the function is a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | ASoC: wm8994: Remove duplicate revision cacheMark Brown2013-04-091-12/+11
| | | | | | | | | | | | | | There's already a device revision stored in the core data structure, don't duplicate it in the CODEC driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Restore AIFnCLK after reducing it for low clock ratesMark Brown2013-03-211-0/+32
| | | | | | | | | | | | This helps to ensure a smooth startup when we restore. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Support constraining the maximum number of channels clockedMark Brown2013-03-211-2/+11
|/ | | | | | | | | | | | Some systems use the audio CODEC to clock a DAI with multiple data lines in parallel, meaning that bit clocks are only required for a smaller number of channels than data is sent for. In some cases providing the extra bit clocks can take the other devices on the audio bus out of spec. Support such systems by allowing a maximum number of channels to be specified. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown2013-02-121-5/+5
|\
| * ASoC: wm8994: Fix variable double useMark Brown2012-12-071-5/+5
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown2012-12-101-141/+202
|\ \ | |/
| * ASoC: wm8994: Allow microphone identification callback to be overriddenMark Brown2012-12-031-6/+16
| | | | | | | | | | | | | | Allow custom accessory identification mechanisms to make use of the MICDET support in the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Check jack is inserted when handling mic IRQMark Brown2012-12-031-0/+12
| | | | | | | | | | | | | | | | | | If we've got jack detection support then check that the jack is still inserted when handling a mic IRQ in order to avoid transient reports caused by shorts during the removal process as the two interrupts race with each other. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Support custom accessory identification for WM1811AMark Brown2012-12-031-15/+21
| | | | | | | | | | | | | | Allow the user to override the accessory identification code with their own implementation if the system provides an alternative method. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Simplify button detection codeMark Brown2012-12-031-50/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the WM8994 driver allows the WM8958 microphone detection code to be replaced in its entirety, providing a default implementation. This doesn't actually reflect the needs of users well. They generally wish to replace only the accessory identification parts of the algorithm (eg, using an external GPIO to provide the equivalent of the JACKDET support in the WM1811A). In preparation for supporting these users better refactor the existing code so that we have separate identification and button detection callbacks, selecting between them rather than using the mic_detecting flag in the existing callback. This also simplifies the code by introducing a more explicit state machine for the detecting and button states. In anticipation of future refactoring the callback is left in the signature for wm8958_mic_detect(), it will be removed at a later stage. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Stop mic detection whenever we detect an open circuitMark Brown2012-12-031-25/+31
| | | | | | | | | | | | | | | | | | Jack detection will not do anything to help us detect a microphone when there is a fault in the cable and the debounce we have is enough to avoid getting an intermediate result so halt microphone detection when we detect that one is not present. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Use the same DCS codes for all WM1811 variantsMark Brown2012-11-281-14/+2
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
| * ASoC: wm8994: Use pdata cached in MFD driverMark Brown2012-11-241-22/+28
| | | | | | | | | | | | | | This is better style and facilitates implementation of device tree support for the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHzMark Brown2012-11-221-0/+12
| | | | | | | | | | | | | | | | | | When lowering SYSCLK to 50kHz for accessory detection also lower the AIFnCLK divisor to normalise the clocking configuration within the device. This will not disrupt audio as we cannot support active audio with such a low SYSCLK. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHzMark Brown2012-10-241-0/+12
| | | | | | | | | | | | | | | | | | When lowering SYSCLK to 50kHz for accessory detection also lower the AIFnCLK divisor to normalise the clocking configuration within the device. This will not disrupt audio as we cannot support active audio with such a low SYSCLK. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Tune VMID power down sequenceMark Brown2012-10-151-18/+4
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Tune VMID power up sequenceMark Brown2012-10-151-2/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Allow a delay between jack insertion and microphone detectMark Brown2012-10-151-19/+55
| | | | | | | | | | | | | | | | This can be used to provide some additional settling time to ensure that we don't start microphone detection while the microphone pin is connected to one of the headphone pins. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ALSA: Fix typo in drivers soundMasanari Iida2012-11-041-1/+1
| | | | | | | | | | | | | | Correct spelling typo in debug messages within drivers/sound Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: wm8994: Only enable extra BCLK cycles when requiredMark Brown2012-10-241-1/+17
|/ | | | | | | | | Rather than always assuming the maximum possible BCLK rate will be required generate BCLKs for stereo if either one or two channels is enabled. In order to support this we also need to ensure that only the relevant channels are enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'asoc-omap' into for-3.7Mark Brown2012-09-051-0/+2
|\
| * ASoC: wm8994: Add missing dapm routes for WM8958 rev AChris Rattray2012-08-091-0/+2
| | | | | | | | | | Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Update for new WM1811 variantsMark Brown2012-08-231-4/+7
| | | | | | | | | | | | | | There are some new WM1811 variants distinguished by both revision and cust_id which need slightly different handling. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdataMark Brown2012-08-221-0/+2
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: wm8994: Add bytes controls for DRCMark Brown2012-08-171-4/+21
| | | | | | | | | | | | | | | | | | | | If DRC coefficients are not configured via platform data then add bytes controls for them instead so they can be configured by applications. This is the normal means of controlling things like this for newer systems, we maintain compatibility with platform data to avoid disruption to existing systems. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: enable mic and short detect debounce.Chris Rattray2012-08-031-0/+6
| | | | | | | | | | Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Fix some indentation issuesMark Brown2012-08-031-2/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Ensure we get a notification on startup for jackdetMark Brown2012-08-031-1/+36
| | | | | | | | | | | | | | | | | | | | | | Since jackdet only reports deltas it won't generate an interrupt on startup when a jack is not present. This doesn't make a difference to userspace but does mean we don't generate a notification via the internal notifier chains. Fix that by scheduling a work to poll the chip after the clock is enabled. Use an extremely large timeout since there's no urgency and we don't want to report a false negative. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud