aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8994.c
AgeCommit message (Collapse)Author
2013-05-30ASoC: wm8994: Ensure microphone detection state is reset on removalMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: wm8994: Avoid leaking pm_runtime reference on removed jack raceMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28ASoC: wm8994: check for array index returnedVinod Koul
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>
2013-05-28ASoC: wm8994: Fix reporting of accessory removal on WM8958Mark Brown
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>
2013-05-28ASoC: wm8994: use the correct pointer to get the control valueVinod Koul
Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-03Merge tag 'asoc-v3.10-4' of ↵Takashi Iwai
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.
2013-04-30ASoC: wm8994: missing break in wm8994_aif3_hw_params()Dan Carpenter
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
2013-04-09ASoC: wm8994: Remove duplicate revision cacheMark Brown
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>
2013-03-21ASoC: wm8994: Restore AIFnCLK after reducing it for low clock ratesMark Brown
This helps to ensure a smooth startup when we restore. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-21ASoC: wm8994: Support constraining the maximum number of channels clockedMark Brown
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>
2013-02-12Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown
2012-12-10ASoC: codecs: remove __dev* attributesBill Pemberton
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>
2012-12-10Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown
2012-12-07ASoC: wm8994: Fix variable double useMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03ASoC: wm8994: Allow microphone identification callback to be overriddenMark Brown
Allow custom accessory identification mechanisms to make use of the MICDET support in the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-03ASoC: wm8994: Check jack is inserted when handling mic IRQMark Brown
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>
2012-12-03ASoC: wm8994: Support custom accessory identification for WM1811AMark Brown
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>
2012-12-03ASoC: wm8994: Simplify button detection codeMark Brown
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>
2012-12-03ASoC: wm8994: Stop mic detection whenever we detect an open circuitMark Brown
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>
2012-11-28ASoC: wm8994: Use the same DCS codes for all WM1811 variantsMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-11-24ASoC: wm8994: Use pdata cached in MFD driverMark Brown
This is better style and facilitates implementation of device tree support for the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-22ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHzMark Brown
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>
2012-11-04ALSA: Fix typo in drivers soundMasanari Iida
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>
2012-10-24ASoC: wm8994: Only enable extra BCLK cycles when requiredMark Brown
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>
2012-10-24ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHzMark Brown
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>
2012-10-15ASoC: wm8994: Tune VMID power down sequenceMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15ASoC: wm8994: Tune VMID power up sequenceMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-15ASoC: wm8994: Allow a delay between jack insertion and microphone detectMark Brown
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>
2012-09-05Merge branch 'asoc-omap' into for-3.7Mark Brown
2012-08-23ASoC: wm8994: Update for new WM1811 variantsMark Brown
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>
2012-08-22ASoC: wm_hubs: Allow configuration of MICBIAS power up delay via pdataMark Brown
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-17ASoC: wm8994: Add bytes controls for DRCMark Brown
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>
2012-08-09ASoC: wm8994: Add missing dapm routes for WM8958 rev AChris Rattray
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm8994: enable mic and short detect debounce.Chris Rattray
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm8994: Fix some indentation issuesMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm8994: Ensure we get a notification on startup for jackdetMark Brown
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>
2012-08-03ASoC: wm_hubs: Move CODEC stored in private data into wm_hubsMark Brown
Further wm_hubs code will use this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-03ASoC: wm8994: Implement support for self-oscillation mode in the FLLMark Brown
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>
2012-07-24ASoC: wm8994: Hold runtime PM reference while handling mic and jack IRQsMark Brown
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>
2012-07-23ASoC: wm8994: Ensure there are enough BCLKs for four channelsMark Brown
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
2012-07-23Merge branch 'for-3.5' into for-3.6Mark Brown
2012-07-18ASoC: wm8994: Update micdet for irqdomain conversionMark Brown
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>
2012-07-03ASoC: wm8994: Don't suspend accessory detectionMark Brown
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>
2012-06-25ASoC: wm8994: remove duplicate codeJaroslav Kysela
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>
2012-06-25Merge tag 'v3.5-rc4' into for-3.6Mark Brown
Linux 3.5-rc4 contains some bug fixes which overlap with new features.
2012-06-05ASoC: wm8994: Apply volume updates with clocks enabledMark Brown
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
2012-06-05ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variantsMark Brown
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
2012-06-03ASoC: codecs: Refresh copyrights for Wolfson driversMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-21Merge branch 'topic/asoc' into for-linusTakashi Iwai
2012-05-15ASoC: wm8994: Fix AIF2ADC power downMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org