summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Decouple DAPM from CODECsLiam Girdwood2010-11-0659-312/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decoupling Dynamic Audio Power Management (DAPM) from codec devices is required when developing ASoC further. Such as for other ASoC components to have DAPM widgets or when extending DAPM to handle cross-device paths. This patch decouples DAPM related variables from struct snd_soc_codec and moves them to new struct snd_soc_dapm_context that is used to encapsulate DAPM context of a device. ASoC core and API of DAPM functions are modified to use DAPM context instead of codec. This patch does not change current functionality and a large part of changes come because of structure and internal API changes. Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some minor core changes, codecs and machine driver conversions from Jarkko Nikula <jhnikula@gmail.com>. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Manuel Lauss <manuel.lauss@googlemail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Cliff Cai <cliff.cai@analog.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Ryan Mallon <ryan@bluewatersys.com> Cc: Timur Tabi <timur@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Jassi Brar <jassi.brar@samsung.com> Cc: Daniel Gloeckner <dg@emlix.com> Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-2.6.37' into HEADMark Brown2010-11-053-14/+33
|\
| * ASoC: Check return value of strict_strtoul() in WM8962Mark Brown2010-11-031-1/+4
| | | | | | | | | | | | | | strict_strtoul() has been made __must_check so do so. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
| * ASoC: tpa6130a2: Get rid of compile warning from tpa6130a2_powerJarkko Nikula2010-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | Patch "ASoC: tpa6130a2: Fix unbalanced regulator disables" introduced a compiler warning "‘ret’ may be used uninitialized in this function". Initialize ret to zero to get rid of it and making sure that the function does not return any random error code when the code is falling through. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Merge branch 'for-2.6.37' of ↵Takashi Iwai2010-11-032-12/+28
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc
| | * ASoC: tpa6130a2: Fix unbalanced regulator disablesJarkko Nikula2010-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver has unbalanced regulator_disable when doing module loading and unloading. This is because tpa6130a2_probe followed by tpa6130a2_remove calls twice tpa6130a2_power(0). Fix this by implementing a state checking in tpa6130a2_power. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| | * ASoC: tlv320dac33: Mode1 FIFO auto configuration fixPeter Ujfalusi2010-10-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Do not allow invalid (too big) nSample value, when FIFO Mode1 and automatic fifo configuration has been selected. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| | * ASoC: tlv320dac33: Limit the US_TO_SAMPLES macroPeter Ujfalusi2010-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Limit the time window to maximum 1s in the macro. The driver deals with much shorter times (<200ms). This will fix a rare division by zero bug in Mode1. This could happen, when the work is not executed in time (within mode1_latency) after the interrupt. In this case the DAC33 will not receive the needed nSample command in time, and enters to an unknown state, and won't recover. In such event the time window will increase, and eventually going to be bigger than 1s, resulting devision by zero. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| | * ASoC: tlv320dac33: Error handling for broken chipPeter Ujfalusi2010-10-301-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct/Implement handling of broken chip. Fail the soc_prope if the communication with the chip fails (can not read chip ID). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | | ASoC: Use pm_wakeup_event() in WM8962 jack detectionMark Brown2010-11-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that the system does not suspend while we process a WM8962 jack event by using pm_wakeup_event() to block the suspend while we're waiting for the jack to settle. Use a slightly longer timeout than the jack waits to allow for other stuff to take over and delays in scheduling. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | | ASoC: Remove register write trace from WM8994Mark Brown2010-11-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | We now have trace in the ASoC core so we don't need to our own trace in the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | | Merge branch 'for-2.6.37' into HEADMark Brown2010-11-021-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | WARN() fix from Joe moved. Conflicts: sound/soc/codecs/wm_hubs.c
| * | ASoC: Update WARN uses in wm_hubsJoe Perches2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add missing newlines. 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>
* | | ASoC: Fix SND_SOC_ALL_CODECS typo for alc5623Jarkko Nikula2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Include alc5623.c in SND_SOC_ALL_CODECS when dependencies are met. 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>
* | | Merge branch 'for-2.6.37' into for-2.6.38Mark Brown2010-11-017-20/+51
|\ \ \ | |/ /
| * | ASoC: Include cx20442 to SND_SOC_ALL_CODECSJarkko Nikula2010-11-011-0/+1
| | | | | | | | | | | | | | | | | | 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>
| * | ASoC: Fix SND_SOC_ALL_CODECS typo for jz4740Jarkko Nikula2010-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Include jz4740.c to SND_SOC_ALL_CODECS when the dependencies are met. 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>
| * | ASoC: Remove volatility from WM8900 POWER1 registerMark Brown2010-11-011-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all bits can be read back from POWER1 so avoid corruption when using a read/modify/write cycle by marking it non-volatile - the only thing we read back from it is the chip revision which has diagnostic value only. We can re-add later but that's a more invasive change than is suitable for a bugfix. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
| * | ASoC: sound/wm9090: add missing __devexit markerArnaud Lacombe2010-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: sound/soc/codecs/wm9090.c:668:12: warning: 'wm9090_i2c_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ASoC: sound/max98088: add missing __devexit markerArnaud Lacombe2010-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: sound/soc/codecs/max98088.c:2054:12: warning: 'max98088_i2c_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ASoC: sound/ad73311: add missing __devexit markerArnaud Lacombe2010-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: sound/soc/codecs/ad73311.c:50:12: warning: 'ad73311_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | Merge branch 'for-2.6.37' of ↵Takashi Iwai2010-10-232-10/+46
| |\ \ | | |/ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc
| | * ASoC: tlv320dac33: Use usleep_range for delaysPeter Ujfalusi2010-10-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to use the more precise usleep_range instead of msleep(). Replace the udelay with usleep_range to remove the busy loop waiting. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Borwn <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| | * ASoC: tpa6130a2: Error handling for broken chipPeter Ujfalusi2010-10-211-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct/Implement handling of broken chip. Fail the i2c_prope if the communication with the chip fails. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
| | * ASoC: tlv320dac33: Control for line output gainPeter Ujfalusi2010-10-131-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New control to select the line output gain. This gain control affects the linein-to-lineout and dac-to-loneout gain differently. Use enum type to select the desired gain combination. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | | ASoC: Store DC offset correction for wm_hubs devices in class W modeMark Brown2010-10-284-23/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Providing the analogue configuration of the output path remains the same the DC offset corrected by the DC servo will remain identical so we can skip the callibration, reducing the startup time for the headphone output. Implement this for the wm_hubs devices as has been done for several other CODECs. Don't do this if we have any analogue paths enabled since offsets may be being introduced by the analogue paths which could vary outside the control of the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
* | | ASoC: add support for alc562[123] codecsArnaud Patard (Rtp)2010-10-214-0/+1286
|/ / | | | | | | | | | | | | | | | | This patch is adding support for alc562[123] codecs. It's based on the source code available in HP source code and other places. Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: max98088: Staticise m98088_eq_bandDimitris Papastamos2010-10-211-1/+1
| | | | | | | | | | | | | | | | | | This function is not exported and it does not seem to be called from anywhere else therefore it should be static. 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>
* | ASoC: WM8580: Remove useless assignmentJassi Brar2010-10-191-4/+0
| | | | | | | | | | | | | | | | The variable is not used anyway. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Restore MAX98088 CODEC driverMark Brown2010-10-184-0/+2296
| | | | | | | | | | | | | | | | This reverts commit f6765502f8daae3d237a394889276c8987f3e299 and adds the missing include file. Signed-off-by: Peter Hsiang <Peter.Hsiang@maxim-ic.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Revert "ASoC: Add max98088 CODEC driver"Mark Brown2010-10-184-2296/+0
| | | | | | | | | | This reverts commit e65d255a5a610ce9e185e0df855250706aca7c21 since it does not build.
* | ASoC: Add max98088 CODEC driverPeter Hsiang2010-10-154-0/+2296
| | | | | | | | | | | | | | | | This patch adds the MAX98088 CODEC driver. Signed-off-by: Peter Hsiang <peter.hsiang@maxim-ic.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: ak4642: make sure name of register/valueKuninori Morimoto2010-10-151-18/+46
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: Remove unused vol field from WM8994 access mask tableJoe Perches2010-10-151-1574/+1573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Restore DAI ID specification for WM8994Mark Brown2010-10-131-0/+3
| | | | | | | | | | | | | | 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>
* | ASoC: Add WM8962 microphone bias controlMark Brown2010-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: ac97: add MODULE_ALIAS for the platform driverMika Westerberg2010-10-131-0/+1
| | | | | | | | | | | | | | | | | | 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>
* | ASoC: ac97: don't call snd_soc_new_ac97_codec at probeMika Westerberg2010-10-131-6/+0
| | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: ak4642: simultaneous playback/recorde supportKuninori Morimoto2010-10-121-4/+4
| | | | | | | | | | | | 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>
* | ASoC: checking kzalloc() for IS_ERR() instead of NULLDan Carpenter2010-10-112-8/+8
| | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Compress WM8962 register access mapMark Brown2010-10-114-21166/+1148
| | | | | | | | | | | | | | | | 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>
* | ASoC: Shrink code size for WM8962 register defaults tableMark Brown2010-10-113-21145/+687
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ASoC: Staticise CS4270 DAIMark Brown2010-10-071-1/+1
| | | | | | | | | | | | | | | | 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>
* | ASoC: Staticise AD1980 DAIMark Brown2010-10-071-1/+1
|/ | | | | | | 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>
* ASoC: WM8804: Retrieve the device revision and print itDimitris Papastamos2010-10-051-0/+8
| | | | | | | | 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>
* ASoC: WM8804: Power down the PLL correctlyDimitris Papastamos2010-10-041-3/+3
| | | | | | | | | | 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>
* ASoC: WM8804: Refactor set_pll code to avoid GCC warningsDimitris Papastamos2010-10-041-21/+26
| | | | | | | | | 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>
* ASoC: WM8804: Use a proper DAI nameDimitris Papastamos2010-10-021-1/+1
| | | | | | | | | 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>
* ASoC: Put WM8962 GPIO2/3 into GPIO mode when configuring platform data tooMark Brown2010-10-021-13/+29
| | | | | | | | | | 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>
* ASoC: Implement interrupt based jack detectionMark Brown2010-10-022-0/+88
| | | | | | | | | | | 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>
OpenPOWER on IntegriCloud