summaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
2010-10-15ASoC: ak4642: make sure name of register/valueKuninori Morimoto
This patch replace magic code with defined name, and remove unnecessary settings which set default value Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-15ASoC: Remove unused vol field from WM8994 access mask tableJoe Perches
Remove unused vol from struct access_mask Reduces object size ~3kb. $ size sound/soc/codecs/wm8994.o* text data bss dec hex filename 40727 4384 4480 49591 c1b7 sound/soc/codecs/wm8994.o.new 43879 4384 4480 52743 ce07 sound/soc/codecs/wm8994.o.old Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-13ASoC: Restore DAI ID specification for WM8994Mark Brown
WM8994 relies on the DAIs having IDs that match the AIF numbers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-13ASoC: Add WM8962 microphone bias controlMark Brown
We unconditionally require SYSCLK since while only microphone detection specifically requires SYSCLK any actual use case would enable it via some other means but microphone detection may have nothing active other than the bias itself. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-13ASoC: ac97: add MODULE_ALIAS for the platform driverMika Westerberg
So that modprobe can load the driver automatically when the platform device appears. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-13ASoC: ac97: don't call snd_soc_new_ac97_codec at probeMika Westerberg
It is not needed since snd_ac97_mixer() will create a new ac97 object for us. Removing the call also fixes a memory leak since codec->ac97 is set to NULL at the beginning of snd_ac97_mixer(). Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-12ASoC: ak4642: simultaneous playback/recorde supportKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-11ASoC: checking kzalloc() for IS_ERR() instead of NULLDan Carpenter
There is a typo here that got copy and pasted to several probe functions. kzalloc() returns NULL on allocation failures and not an ERR_PTR. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-11ASoC: Compress WM8962 register access mapMark Brown
Reduce the source code size still futher by only specifying non-zero rows in the WM8962 access map. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-11ASoC: Shrink code size for WM8962 register defaults tableMark Brown
Dramatically reduce the code size for the WM8962 register defaults table by switching to explicitly initialise only defined registers, relying on static defaulting to zero for the overwelming bulk of the register map. Similar treatement for the register access table will come later and will produce a similarly dramatic code size shrink. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-07ASoC: Staticise CS4270 DAIMark Brown
It's not needed with multi-component. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Acked-by: Timur Tabi <timur@freescale.com>
2010-10-07ASoC: Staticise AD1980 DAIMark Brown
It doesn't need to be exported with multi-component. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-05ASoC: WM8804: Retrieve the device revision and print itDimitris Papastamos
Be verbose and print out the device revision. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-04ASoC: WM8804: Power down the PLL correctlyDimitris Papastamos
The PLL is disabled when the corresponding bit is set not the other way around. This commit depends on my other commit with Subject "ASoC: WM8804: Refactor set_pll code to avoid GCC warnings". Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-04ASoC: WM8804: Refactor set_pll code to avoid GCC warningsDimitris Papastamos
Ensure that no uninitialised variable warnings are generated by GCC. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-02ASoC: WM8804: Use a proper DAI nameDimitris Papastamos
Make sure the DAI name does not include a '/' since we might have per DAI debugfs or sysfs entries in the future. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-02ASoC: Put WM8962 GPIO2/3 into GPIO mode when configuring platform data tooMark Brown
GPIO2 and GPIO3 on the WM8962 are MFPs and need to be put into GPIO mode before the GPIO block can be used to control them. We're already doing this when used via gpiolib, factor out the code for use when setting static configurations via platform data as well. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-02ASoC: Implement interrupt based jack detectionMark Brown
Allow microphone detection on WM8962 to be performed using the interrupt signal, allowing the detection of both microphone presence and button presses with a signal singal from the CODEC to CPU. Currently a 250ms debounce time is applied to both short circuit and presence detection, this has not been optimised. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-02ASoC: Add support for WM8962 GPIO outputsMark Brown
The WM8962 features five GPIOs, add support for controlling their output state via gpiolib. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-30ASoC: Relax restrictions on WM8962 BCLK configurationMark Brown
The restrictions on configuring BCLK are overly cautious, other constraints in the system should ensure that reconfiguration is not possible when the device is sufficiently active to be unable to support reclocking. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-30ASoC: WM8804: Initial driverDimitris Papastamos
The WM8804 is a high performance consumer mode S/PDIF transceiver with support for 1 received channel and 1 transmitted channel. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-30ASoC: Remove unneeded use of spi_bus_typeDimitris Papastamos
No need to explicitly set the bus type, spi_register_driver does that for us. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-30ASoC: Provide microphone bias configuration for WM8962Mark Brown
Add the widget for MICBIAS power control and allow configuration of the microphone bias setup via the platform data for the WM8962. When microphone status signals are brought out to GPIO this should be sufficient to enable microphone detection. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-30ASoC: Mark WM8962 Additional Control 4 register as volatileMark Brown
There are some status bits for microphone detection in here. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-29ASoC: Initial WM8962 IRQ supportMark Brown
Provide an initial hookup for interrupts on the WM8962. Currently we simply report error status via log messages if an IRQ is provided for the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-29ASoC: Lowercase WM8962 CODEC nameMark Brown
For consistency. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-28ASoC: Fix masking of WM8962 FLL1 registerMark Brown
When configuring the FLL we preserve the FLL enable configuration in order to allow us to reenable the FLL after configuration but we do not clear the other bits in the register, causing old configuration to be preserved. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-28ASoC: WM8985: Use the correct macro for the kcontrol definedDimitris Papastamos
Since we are using custom get/put handlers use SOC_ENUM_SINGLE_EXT_DECL instead of the original SOC_ENUM_SINGLE_DECL macro. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-27ASoC: Fix a compile warning for printk formatTakashi Iwai
sound/soc/codecs/wm8985.c: In function 'wm8985_hw_params': sound/soc/codecs/wm8985.c:731:2: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' Actually the variable is fine as int. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-24ASoC: WM8985: Remove unneeded declaration.Dimitris Papastamos
We are not using the private data in this function, so get rid of it. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-24ASoC: Clean up AC'97 glue driverMark Brown
Remove version number and clean up some indentation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-22Merge branch 'for-2.6.37' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into for-2.6.37
2010-09-21ASoC: Fix merge issue with WM8962 control additionMark Brown
Let's not add the core controls twice. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20ASoC: Fix WM8978/migor driver name conflictMark Brown
Standardise on 'wm8978' as the name for the CODEC. Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20ASoC: tlv320aic3x: Let the codec hit SND_SOC_BIAS_OFF when idleJarkko Nikula
Now codec hits the SND_SOC_BIAS_OFF also when it is idle. This is also the default state after probing and codec is left unconfigured and unpowered by default. Initialization will happen when the bias state changes and aic3x_set_power does power-up and cache sync. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20ASoC: tlv320aic3x: Use regulator notifiers for optimizing the cache syncJarkko Nikula
There is no need to reset the codec and perform cache sync if none of the supply regulators were not disabled. Patch registers a notifier callback for each supply and callback then sets a flag to indicate when cache sync is required. HW writes are also needless when codec bias is off so cache_only flag is set independently of actual supply regulators state. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20ASoC: tlv320aic3x: Add runtime regulator control to aic3x_set_bias_levelJarkko Nikula
Now all the regulators are disabled when entering into SND_SOC_BIAS_OFF and enabled when coming back to SND_SOC_BIAS_STANDBY state. Currently this runtime control happens only with suspend/resume as this patch does not change the default idle behavior. This patch manages all the regulators and reset since it seems that register sync is needed even if only analog supplies AVDD and DRVDD are disabled. This was noted when the system was running with idle behavior changed and IOVDD and DVDD were on. It is not known are all the registers needed to sync or only some subset of them. Therefore patch plays safe and does always full shutdown/power-up. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20ASoC: tlv320aic3x: Move regulator management from i2c to soc domainJarkko Nikula
It will be easier to keep regulator enable/disable calls in sync when dynamic regulator management is added if regulator management is moved from aic3x_i2c_probe/_remove to aic3x_probe/_remove. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20Merge remote branch 'asoc/for-2.6.37' into for-2.6.37Liam Girdwood
2010-09-20ASoC: tlv320aic3x: Add virtual output pin DetectionJarkko Nikula
Purpose of this virtual Detection pin is to keep codec bias on whenever the GPIO or jack detection features are needed. Jack detection needs a mic bias so machine drivers can construct a following route for instance for keeping the path and codec bias on: "Input Jack" -> "Mic Bias xV" -> "Detection" -> detection block inside codec. For the GPIO the machine driver can force the pin on with snd_soc_dapm_force_enable_pin. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-20Merge remote branch 'broonie-asoc/for-2.6.37' into for-2.6.37Liam Girdwood
2010-09-16ASoC: da7210: code clean upKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-16ASoC: ak4642: code clean upKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-15ASoC: WM8985: Initial driverDimitris Papastamos
The WM8985 is a low power, high quality, feature-rich stereo CODEC designed for portable multimedia applications that require low power consumption and high quality audio. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-15ASoC: tlv320aic3x: Complete the soc-cache conversionJarkko Nikula
Complete the phasing out of aic3x_read_reg_cache, aic3x_write_reg_cache, aic3x_read and aic3x_write calls. This patch uses in aic3x_read the codec->hw_read that points to a function implemented by soc-cache. Only use for aic3x_read is if wanting to read volatile bits from those registers that has both read-only and read/write bits. All other cases should use snd_soc_read. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-15ASoC: tlv320aic3x: Switch to soc-cache helpersJarkko Nikula
Continue phasing out aic3x_read_reg_cache, aic3x_write_reg_cache, aic3x_read and aic3x_write calls. This patch takes the soc-cache in use and removes aic3x_read_reg_cache and aic3x_write. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-15ASoC: tlv320aic3x: Use snd_soc_read and snd_soc_writeJarkko Nikula
Start phasing out aic3x_read_reg_cache, aic3x_write_reg_cache, aic3x_read and aic3x_write calls in order to switch to soc-cache helpers. This patch replaces aic3x_read_reg_cache and aic3x_write with snd_soc_read and snd_soc_write. This is basically null-op since .read and .write in soc_codec_dev_aic3x points to aic3x_read_reg_cache and aic3x_write. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-15ASoC: Change my mail addressArnaud Patard (Rtp)
Like other coworkers, I'm about leave Mandriva/Edge-It so I'm changing my mail address to use my personal one. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Arnaud Patard <apatard@mandriva.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-15ASoC: Remove needless codec->bias_level assignment to SND_SOC_BIAS_OFFJarkko Nikula
This assignment is done by the snd_soc_register_codec so there is no need to redo it in probe function of a codec driver. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-11ASoC: Fix off-by-one bug in WM8962 register cache size configurationDimitris Papastamos
This is a simple off-by-one bug, the size of the register cache is incorrectly set to the maximum register index. Fix it by adding one. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>