summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: twl6040 - Add method to query optimum PDM_DL1 gainLiam Girdwood2012-01-112-0/+24
| | | | | | | The DL1 PDM interface adds a little gain depending on the output device. Add a method to retrieve the gain value for machine driver usage. Signed-off-by: Liam Girdwood <lrg@ti.com>
* ASoC: cx20442: add bias control over a platform provided regulatorJanusz Krzysztofik2012-01-091-2/+46
| | | | | | | | | | | | | | | | | | | | | | | Now that a regulator device for controlling the codec chip reset state over a platform agnostic regulator API is available on the only board using this driver so far, extend the driver with a bias control function which will request virtual power to the codec chip from that virtual regulator, and will supersede the present implementation existing at the sound card level. Thanks to the regulator sharing mechanism, both the old (the sound card) and the new (the codec) implementations should coexist smoothly until the sound card file is updated. For this to work as expected, update the sound card .set_bias_level callback to not touch codec->dapm.bias_level. While extending the cx20442 structure, drop unused control_type member. Created against linxu-3.2-rc6, tested on top of patch 1/4 "ARM: OMAP1: ams-delta: set up a regulator over the modem reset GPIO pin". Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
* ASoC: Convert cs42l51 to table based DAPM and control initAxel Lin2011-12-201-9/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert 88pm860x-codec to table based DAPM and control initAxel Lin2011-12-201-7/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4671 to devm_kzalloc()Axel Lin2011-12-201-4/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4642 to devm_kzalloc()Axel Lin2011-12-201-4/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4641 to devm_kzalloc()Axel Lin2011-12-201-5/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4535 to devm_kzalloc()Axel Lin2011-12-201-4/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert ak4104 to devm_kzalloc()Axel Lin2011-12-201-4/+2
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Rename rt562[1|2]_vol_snd_controls to alc562[1|2]_vol_snd_controlsAxel Lin2011-12-201-6/+6
| | | | | | | | The module desciption says this is ASoC alc5621/2/3 driver. Make the naming consistent with the reset of the code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert uda1380 to table based DAPM and control initAxel Lin2011-12-201-16/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert max9850 to table based DAPM and control initAxel Lin2011-12-201-9/+8
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use standard cache sync code in wm8961Mark Brown2011-12-171-12/+1
| | | | | | | We write the reset register with the default value so it should not be mistakenly written. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert wm8961 to devm_kzalloc()Mark Brown2011-12-171-4/+4
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove I2C ifdefs from wm8961 driverMark Brown2011-12-171-6/+0
| | | | | | The driver only supports I2C so no need to conditionalise its use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert WM8960 to devm_kzalloc()Mark Brown2011-12-171-4/+3
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix partial cherry pick in wm8993Mark Brown2011-12-151-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Tune the accessory detection rates for WM8996Mark Brown2011-12-141-6/+12
| | | | | | | Use longer intervals when the microphone is not inserted to increase robustness against leisurely insertion. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use standard register cache sync in wm8993Mark Brown2011-12-141-23/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert wm8993 to devm_kzalloc()Mark Brown2011-12-141-3/+2
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Use standard snd_soc_cache_sync() for WM9090Mark Brown2011-12-141-12/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove cache default for volatile wm9081 reset registerMark Brown2011-12-141-1/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix wm8995 regmap usageMark Brown2011-12-141-0/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Rename ALC5632 MICBIAS to common name convention.Leon Romanovsky2011-12-131-2/+2
| | | | | Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove WM8994 register cacheMark Brown2011-12-124-3245/+1
| | | | | | | | | Now that the mfd is using the register map cache there's no need for the CODEC driver to do any register cache management or any funny dances to interact with the other drivers using the device so just remove the cache initialisation and volatility information. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove ASoC-specific WM8994 I/O codeMark Brown2011-12-121-51/+12
| | | | | | | Just go directly to the regmap API, saving code and making integration that bit more direct. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'mfd/wm8994' of ↵Mark Brown2011-12-121-6/+6
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into for-3.3
| * mfd: Define some additional wm8994 registersMark Brown2011-12-121-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>
* | Merge branch 'for-3.2' into for-3.3Mark Brown2011-12-121-0/+2
|\ \
| * | ASoC: WM8958: correctly show firmware magic on mismatchJonathan Neuschäfer2011-12-121-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | Merge branch 'for-3.2' into for-3.3Mark Brown2011-12-101-0/+1
|\| |
| * | ASoC: Fix WM8996 24.576MHz clock operationMark Brown2011-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Record the clock after the divider as that is what all SYSCLK users see. Without this the other clock configuration in the device comes out at half rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | | ASoC: Convert wm8770 to devm_kzalloc()Mark Brown2011-12-091-4/+3
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Fix comments for disabling amplifier and PGAAxel Lin2011-12-091-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Convert WM8900 to table based DAPM and control initMark Brown2011-12-091-16/+8
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Convert WM8804 to table based control initMark Brown2011-12-091-3/+4
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Make WM8770 SPI usage unconditionalMark Brown2011-12-091-6/+0
| | | | | | | | | | | | | | | | | | The device only supports SPI. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Convert WM8776 to devm_kzalloc()Mark Brown2011-12-091-8/+6
| | | | | | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: wm8960: Use snd_soc_update_bits for read-modify-writeAxel Lin2011-12-081-46/+21
| | | | | | | | | | | | | | | | | | | | | | | | Use snd_soc_update_bits for read-modify-write register access instead of open-coding it using snd_soc_read and snd_soc_write Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Rely on core enabling the wm8994 with runtime PMMark Brown2011-12-081-6/+1
| | | | | | | | | | | | | | | | | | No need to do this in the driver now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: WM8903: Add of_match_tableStephen Warren2011-12-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the device to be matched against the device tree using the compatible flag directly, as is standard, rather than falling back to matching .id_table against the non-vendor portion of the first compatible property value. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | Merge branch 'for-3.2' into for-3.3Mark Brown2011-12-062-1/+2
|\| |
| * | ASoC: Fix build dependency for SND_SOC_JZ4740_CODECAxel Lin2011-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently SND_SOC_JZ4740_CODEC depends on SOC_JZ4740 but SOC_JZ4740 is not defined in any Kconfig. Thus the codec driver will not be built when select "Build all ASoC CODEC drivers". (Unless it is selected by SND_JZ4740_SOC_QI_LB60). Remove the dependency with SOC_JZ4740, then this code driver can be built when select "Build all ASoC CODEC drivers". Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: Include linux/io.h for jz4740 codecAxel Lin2011-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include linux/io.h to fix below build errors: CC sound/soc/codecs/jz4740.o sound/soc/codecs/jz4740.c: In function 'jz4740_codec_read': sound/soc/codecs/jz4740.c:82: error: implicit declaration of function 'readl' sound/soc/codecs/jz4740.c: In function 'jz4740_codec_write': sound/soc/codecs/jz4740.c:92: error: implicit declaration of function 'writel' sound/soc/codecs/jz4740.c: In function 'jz4740_codec_probe': sound/soc/codecs/jz4740.c:373: error: implicit declaration of function 'ioremap' sound/soc/codecs/jz4740.c:373: warning: assignment makes pointer from integer without a cast sound/soc/codecs/jz4740.c:393: error: implicit declaration of function 'iounmap' make[3]: *** [sound/soc/codecs/jz4740.o] Error 1 make[2]: *** [sound/soc/codecs] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Don't fail if we can't read the IRQ type in WM8903Mark Brown2011-12-061-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | If we fail to read the IRQ type from the interrupt controller don't fail, just assume a value and solider on - we may fail later when we try to request the IRQ but it's possible we'll succeed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: WM8903: Add device tree bindingStephen Warren2011-12-061-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document the device tree binding for the WM8903 codec, and modify the driver to extract platform data from the device tree, if present. Based on work by John Bonesio, but significantly reworked since then. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: WM8903: Get default irq_active_low from IRQ controllerStephen Warren2011-12-061-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the WM8903 is hooked up to an interrupt, set the irq_active_low flag in the default platform data based on the IRQ's IRQ_TYPE. Map IRQ_TYPE_NONE (a lack of explicit configuration/restriction) to irq_active_low = false; the previous default. This code is mainly added to support device tree interrupt bindings, although will work perfectly well in a non device tree system too. Any interrupt controller that supports only a single IRQ_TYPE could set each IRQ's type based on that restriction. This applies equally with and without device tree. To cater for interrupt controllers that don't do this, for which irqd_get_trigger_type() will return IRQ_TYPE_NONE, the platform data irq_active_low field may be used in systems that don't use device tree. With device tree, every IRQ must have some IRQ_TYPE set. Controllers that support DT and multiple IRQ_TYPEs must define the interrupts property (as used in interrupt source nodes) such that it defines the IRQ_TYPE to use. When the core DT setup code initializes wm8903->irq, the interrupts property will be parsed, and as a side- effect, set the IRQ's IRQ_TYPE for the WM8903 probe() function to read. Controllers that support DT and a single IRQ_TYPE could arrange to set the IRQ_TYPE somehow during their initialization, or hard-code it during the processing of the child interrupts property. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: WM8903: Remove conditionals checking pdata != NULLStephen Warren2011-12-061-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pdata pointer is now always valid. Remove any conditions that check its validity. This patch is mostly just removing an indentation level. One variable had to be moved due to the removal of a scope, and one comment was split into two. Viewing the patch with git show/diff -b will show that it's actually very small. Note that WM8903_MIC_BIAS_CONTROL_0 is now written unconditionally, whereas it used to be written only if pdata was supplied. Since defpdata.micdet_cfg = 0, this unconditional write simply echos the HW defaults in the case where pdata is not supplied. Based on work by John Bonesio, but significantly reworked since then. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: WM8903: Fix platform data gpio_cfg confusionStephen Warren2011-12-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wm8903_platform_data.gpio_cfg[] was intended to be interpreted as follows: 0: Don't touch this GPIO's configuration register 1..7fff: Write that value to the GPIO's configuration register 8000: Write zero to the GPIO's configuration register other: Undefined (invalid) The rationale is that platform data is usually global data, and a value of zero means that the field wasn't explicitly set to anything (e.g. because the field was new to the pdata type, and existing users weren't update to initialize it) and hence the value zero should be ignored. 0x8000 is an explicit way to get 0 in the register. The code worked this way until commit 7cfe561 "ASoC: wm8903: Expose GPIOs through gpiolib", where the behaviour was changed due to my lack of awareness of the above rationale. This patch reverts to the intended behaviour, and updates all in-tree users to use the correct scheme. This also makes WM8903 consistent with other devices that use a similar scheme. WM8903_GPIO_NO_CONFIG is also renamed to WM8903_GPIO_CONFIG_ZERO so that its name accurately reflects its purpose. Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: Olof Johansson <olof@lixom.net> Cc: Colin Cross <ccross@android.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: Fix reg_cache_size for stac9766Axel Lin2011-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | reg_cache_size is supposed to be the number of elements in the register cache, not the size in bytes. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>