summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', ↵Mark Brown2014-08-041-10/+10
|\ \ | | | | | | | | | 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
| | * ASoC: wm8994: Convert to params_width()Mark Brown2014-07-311-10/+10
| |/ | | | | | | | | | | | | The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and ↵Mark Brown2014-08-041-5/+1
|\ \ \ | | |/ | |/| | | | 'asoc/topic/pxa' into asoc-next
| | * ASoC: wm8994: Remove redundant OOM messageSachin Kamat2014-06-271-5/+1
| |/ | | | | | | | | | | | | | | Let memory subsystem handle the error logging. Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm8994: Prevent double lock of accdet_lock mutex on wm1811Charles Keepax2014-06-171-6/+3
|/ | | | | | | | | | | | | wm1811_micd_stop takes the accdet_lock mutex, and is called from two places, one of which is already holding the accdet_lock. This obviously causes a lock up. This patch fixes this issue by removing the lock from wm1811_micd_stop and ensuring that it is always locked externally. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
* Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown2014-05-221-6/+6
|\
| * ASoC: wm8994: Replace usage deprecated MUX/ENUM macrosLars-Peter Clausen2014-04-141-6/+6
| | | | | | | | | | | | | | | | | | | | SND_SOC_DAPM_VIRT_MUX, SND_SOC_DAPM_VIRT_MUX_E and SOC_DAPM_ENUM_VIRT are deprecated and merely an alias for SND_SOC_DAPM_MUX, SND_SOC_DAPM_MUX_E and SOC_DAPM_ENUM. Replace the deprecated macros so we can eventually remove their definition. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge branches 'topic/sta350', 'topic/core', 'topic/dapm' and 'topic/cache' ↵Mark Brown2014-04-221-2/+8
|\ \ \ | | |/ | |/| | | | of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-component
| | * ASoC: codec: fix the sparse check warnings.Xiubo Li2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some thing Likes: reproduce: make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> sound/soc/codecs/wm8997.c:1084:15: sparse: symbol \ 'wm8997_get_regmap' was not declared. Should it be static? Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: wm8994: Remove the set_cache_io() entirely from ASoC probe.Xiubo Li2014-04-141-2/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | As we can set the CODEC I/O while snd_soc_register_codec(), so the calling of set_cache_io() from CODEC ASoC probe could be removed entirely. And then we can set the CODEC I/O in the device probe instead of CODEC ASoC probe as earily as possible. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: Add snd_soc_kcontrol_codec() helper functionLars-Peter Clausen2014-04-141-5/+5
|/ | | | | | | | | | | | | | | For CODEC controls snd_kcontrol_chip() currently returns a pointer to the CODEC that registered the control. With the upcoming consolidation of platform and CODEC controls this will change. Prepare for this by introducing the snd_soc_kcontrol_codec() helper function that will hide the implementation details of how the CODEC for a control can be obtained. This will allow us to change this easily in the future. The patch also updates all CODEC drivers to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-2/+1
|\
| * ASoC: io: New signature for snd_soc_codec_set_cache_io()Xiubo Li2014-03-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Now that all users have been converted to regmap and the config.reg_bits and config.val_bits can be setted by each user through regmap core API. So these two params are redundant here. Since the only control type that left is SND_SOC_REGMAP, so remove it. Drop the control params and add struct regmap *regmap to simplify the code. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: wm8994: Use SOC_ENUM_SINGLE_VIRT_DECL()Lars-Peter Clausen2014-03-011-2/+1
| | | | | | | | | | | | | | | | | | For the upcoming consolidation for MUXs and virtual MUXs we need to mark virtual enums as such. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
| \
| \
*---. \ Merge branches 'topic/dapm', 'topic/sign', 'topic/adau1373', ↵Mark Brown2014-03-011-83/+97
|\ \ \ \ | | | |/ | | |/| | | | | 'topic/max98090', 'topic/mc13783', 'fix/wm8994' and 'topic/wm8995' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum
| | | * ASoC: wm8994: Fix the wrong number of enum itemsTakashi Iwai2014-02-201-65/+70
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wm8994 codec driver has a few places wrongly defining the number of enum items. Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | ASoC: wm8994: Update locking around use of DAPM pin APICharles Keepax2014-02-201-18/+27
| |/ | | | | | | | | | | | | | | The pin updates in this driver look like they are intended to be done atomically, update to do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: Rename soc_enum.max field with itemsTakashi Iwai2014-02-201-2/+2
|/ | | | | | | | | | | | | | | | | | The name "max" in struct soc_enum is rather confusing since it actually takes the number of items. With "max", one might try to assign (nitems - 1) value. Rename the field to a more appropriate one, "items", which is also used in struct snd_ctl_elem_info, too. This patch also rewrites some code like "if (x > e->nitems - 1)" with "if (x >= e->nitems)". Not only the latter improves the readability, it also fixes a potential bug when e->items is zero. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: wm8994: Move DCS done IRQ request laterwangbiao2013-11-271-6/+5
| | | | | | | | | | | | | | once code return from request_threaded_irq, irq was setup enabled by default, but completion var dcs_done not got initialized yet, if then a dcs done irq was raised, system will got hung as the sync mechanism is invalid now. so this patch move dcs done irq request to the end of initialization of completion. Signed-off-by: wang, biao <biao.wang@intel.com> Signed-off-by: Zhang, Di <di.zhang@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/topic/wm8994' into asoc-nextMark Brown2013-08-221-15/+20
|\
| * ASoC: wm8994: Fix class W controlsMark Brown2013-08-061-1/+1
| | | | | | | | | | | | | | | | Commit 6e0650 (ASoC: wm8994: Use SOC_SINGLE_EXT() instead of open-coding it) went too far and converted a DAPM control to use SOC_SINGLE_EXT() which crashes. Revert that portion of the patch. Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: wm8994: Use power efficient workqueueMark Brown2013-07-191-9/+14
| | | | | | | | | | | | | | | | | | The accessory detect debounce work is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
| * ASoC: wm8994: Move runtime PM init to platform device initMark Brown2013-07-151-5/+5
| | | | | | | | | | | | | | As well as being better style this allows the device to idle when there is no audio card instantaited which is probably what we want. Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: dapm: Add a helper to get the CODEC for DAPM kcontrolLars-Peter Clausen2013-07-291-3/+1
| | | | | | | | | | | | | | | | | | | | We use the same 3 lines to get the CODEC for a kcontrol in a quite a few places. This patch puts them into a common helper function. Having this encapsulated in a helper function will also make it more easier to eventually change the data layout of the kcontrol's private data. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | 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>
OpenPOWER on IntegriCloud