aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
Commit message (Collapse)AuthorAge
* ASoC: wm8994: Ensure microphone detection state is reset on removalMark Brown2013-05-30
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Avoid leaking pm_runtime reference on removed jack raceMark Brown2013-05-30
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: check for array index returnedVinod Koul2013-05-28
| | | | | | | | 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-28
| | | | | | | | 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-28
| | | | | 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-03
|\ | | | | | | | | | | | | | | | | | | 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-30
| | | | | | | | | | | | | | | | | | 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-09
| | | | | | | | | | | | | | 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-21
| | | | | | | | | | | | 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-21
|/ | | | | | | | | | | | 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-12
|\
| * ASoC: wm8994: Fix variable double useMark Brown2012-12-07
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-09
| | | | | | | | | | | | | | | | | | | | | | 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-09
|\|
| * ASoC: wm8994: Allow microphone identification callback to be overriddenMark Brown2012-12-03
| | | | | | | | | | | | | | 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-03
| | | | | | | | | | | | | | | | | | 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-03
| | | | | | | | | | | | | | 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-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-03
| | | | | | | | | | | | | | | | | | 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-28
| | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
| * ASoC: wm8994: Use pdata cached in MFD driverMark Brown2012-11-23
| | | | | | | | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | 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-24
| | | | | | | | | | | | | | | | | | 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-14
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Tune VMID power up sequenceMark Brown2012-10-14
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: wm8994: Allow a delay between jack insertion and microphone detectMark Brown2012-10-14
| | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | 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-24
|/ | | | | | | | | 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-05
|\
| * ASoC: wm8994: Add missing dapm routes for WM8958 rev AChris Rattray2012-08-09
| | | | | | | | | | 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-23
| | | | | | | | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | 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-03
| | | | | | | | | | 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-03
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Ensure we get a notification on startup for jackdetMark Brown2012-08-03
| | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: wm_hubs: Move CODEC stored in private data into wm_hubsMark Brown2012-08-03
| | | | | | | | | | | | Further wm_hubs code will use this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Implement support for self-oscillation mode in the FLLMark Brown2012-08-03
|/ | | | | | | | The FLLs in the WM8994 series devices can be started without any reference being supplied, mainly for use in analogue bypass cases. Implement support for this mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Hold runtime PM reference while handling mic and jack IRQsMark Brown2012-07-24
| | | | | | | | Ensures that we don't interact badly with the power management framework, especially in the cases where we're doing deferred work or we're using a direct GPIO for these signals. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8994: Ensure there are enough BCLKs for four channelsMark Brown2012-07-23
| | | | | | | | Otherwise if someone tries to use all four channels on AIF1 with the device in master mode we won't be able to clock out all the data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* Merge branch 'for-3.5' into for-3.6Mark Brown2012-07-23
|\
| * ASoC: wm8994: remove duplicate codeJaroslav Kysela2012-06-25
| | | | | | | | | | | | | | It seems that the code duplication was added at a merge operation. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: wm8994: Update micdet for irqdomain conversionMark Brown2012-07-18
| | | | | | | | | | | | | | | | The conversion of the core driver to irqdomains means that we don't need and irq_base to have working interrupts so use wm8994_request_irq() to deal with looking up the interrupt number for the micdet IRQ. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: wm8994: Don't suspend accessory detectionMark Brown2012-07-03
| | | | | | | | | | | | | | | | Leave it up to the machine driver to disable accessory detection if desired, the common pattern is to have accessory detection be a wake source. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge tag 'v3.5-rc4' into for-3.6Mark Brown2012-06-25
|\| | | | | | | Linux 3.5-rc4 contains some bug fixes which overlap with new features.
| * ASoC: wm8994: Apply volume updates with clocks enabledMark Brown2012-06-05
| | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org
| * ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variantsMark Brown2012-06-05
| | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org
* | ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown2012-06-03
|/ | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'topic/asoc' into for-linusTakashi Iwai2012-05-21
|\
| * Merge tag 'v3.4-rc7' into for-3.5Mark Brown2012-05-13
| |\ | | | | | | | | | | | | | | | | | | | | | Linux 3.4-rc7 Conflicts): drivers/base/regmap/regmap.c (overlap with bug fixes) sound/soc/blackfin/bf5xx-ssm2602.c (overlap with bug fixes)