aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: change set_tdm_slot api to allow slot_width override.Daniel Ribeiro2009-08-061-2/+3
| | | | | | | | | | | | | | | | Extend set_tdm_slot to allow the user to arbitrarily set the frame width and active TX/RX slots. Updates magician.c and wm9081.c for the new set_tdm_slot(). wm9081.c still doesn't handle the slot_width override. While being there, correct an incorrect use of SlotsPerFrm(7) use in bitmask on pxa-ssp.c (SSCR0_SlotsPerFrm(x) is (((x) - 1) << 24)) ). (this series is meant for Mark's for-2.6.32 branch) Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: CX20442: simplify codec controller usageJanusz Krzysztofik2009-08-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | This patch is a workaround for the problem of several subsequent control statements not being applied correctly to the codec controller (modem). In order to follow the hook switch state change from handset to handsfree while in full duplex mode, two consecutive +VLS control commands were sent to the modem. The first one was M1 (microphone only), the seconds one was M1S1 (both microphone and speaker). As there was no real modem handshaking procedure implemented, neither in the codec nor in the machine driver part of the line discipline, the modem was having the second command missed. Since a possibility to switch to microphone only mode (and speaker only mode as well) seams of no value, I have modified the code to issue single M1S1 command only for any of those cases. Tested on my Amstrad Delta. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: CX20442: add some debuggingJanusz Krzysztofik2009-08-061-0/+1
| | | | | | | | This patch adds debugging statement that can help in tracing how the driver is trying to control the codec device. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add WM8776 CODEC driverMark Brown2009-08-064-0/+838
| | | | | | | | | | | The WM8776 is a high performance, stereo audio CODEC with five channel input selector. The WM8776 is ideal for surround sound processing applications for home hi-fi, DVD-RW and other audio visual equipment. This driver implements support for most WM8776 features - currently the ADC automatic level control/limiter functionality is omitted. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_deviceDaniel Mack2009-08-051-4/+23
| | | | | | | | | | | | | | | | | | | | Power management for the cs4270 codec is currently implemented as part of the i2c_driver struct. The disadvantage of doing it this way is that the callbacks registered in the snd_soc_card struct are called _before_ the codec's callbacks. That doesn't work, because the snd_soc_card callbacks will most likely switch down the codec's power domains or pull the reset GPIOs, and hence make the i2c communication bail out. Fix this by binding the suspend and resume code to the snd_soc_codec_device driver model and let the I2C functions only call the SoC core function for resume and suspend, which do nothing currently but will do later. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: CX20442: push down machine independent line discipline bitsJanusz Krzysztofik2009-07-312-6/+111
| | | | | | | | | | | | | | | | | This corrected patch adds machine independent line discipline code, prevoiusly exsiting inside my Amstrad Delta ASoC machine dirver, to the Conexant CX20442 codec driver. The code can be used as a standalone line discipline, or as a set of codec specific functions called from machine's line discipline callbacks. Anyway, the line discipline itself must be registered by a machine driver. Applies on top of the followup to my initial driver version: http://mailman.alsa-project.org/pipermail/alsa-devel/2009-July/019757.html Suggested by ASoC manintainer Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix checkpatch issues and typos of ad1938 codec and bf5xx-tdm daiBarry Song2009-07-291-17/+33
| | | | | | | | | 1. fix "line over 80 characters" checkpatch warnings 2. ‘DMA_nnBIT_MASK’ is deprecated, use DMA_BIT_MASK instead 3. fix typos Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: CX20442: fix issues pointed out by subsystem maintainerJanusz Krzysztofik2009-07-281-7/+10
| | | | | | | | | | The patch fixes some checkpatch identified issues and adds a comment about line discipline interaction to my driver code, as requested by Mark on my inital submission (thank you Mark for applying my imperfect patch anyway). It also fixes MODULE_ALIAS mismatch as used in my machine driver. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: MAX9877: fix write operation for registerJoonyoung Shim2009-07-231-3/+11
| | | | | | | | | | | | | | | The MAX9877 needs an address of start register when we write values to registers through i2c_master_send(), but the code for this was missed in max9877_write_regs(). If the value of control is 0 in the max9877_set_out_mode(), the value is not increased to 1, but actually the value to write to the register should be 1. And the register bits for out_mode and osc_mode should be cleared before writing. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add support for Conexant CX20442-11 voice modem codecJanusz Krzysztofik2009-07-234-0/+419
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Conexant CX20442-11 voice modem codec, suitable for use by the ASoC board driver for Amstrad E3 (Delta) videophone. Related sound card driver will follow. This codec is an optional part of the Conexant SmartV three chip modem design. As such, documentation for its proprietary digital audio interface is not available. However, on Amstrad Delta board, thanks to Mark Underwood who created an initial, omap-alsa based sound driver a few years ago[1], the codec has been discovered to be accessible not only from the modem side, but also over the OMAP McBSP based CPU DAI. Thus, the driver can be used by any sound card that can access the codec DAI directly. The DAI configuration parameters (sample rate and format, number of channels) has been selected out empirically for best user experience. The codec analogue interface consists of two pairs of analogue I/O pins: speakerphone interface or telephone handset/headset interface. Furthermore, it seams to provide two operation modes for speakerphone I/O: standard and advanced, with automatic gain control and echo cancelation. Even if the codec control interface is unknown and not available, all those interfaces and modes can be selected over the modem chip using V.253 commands. The driver is able to issue necessary commands over a suitable hw_write function if provided by a sound card driver. Otherwise, the codec can be controlled over the modem from userspace while inactive. Even if nothig is known about the codec internal power management capabilities, DAPM widgets has been used to model the codec audio map. Automatically performed powering up/down of those virtual widgets results in corresponding V.253 commands being issued. Some driver features/oddities may be board specific, but I have no way to verify that with any board other than Amstrad Delta. [1] http://www.earth.li/pipermail/e3-hacking/2006-April/000481.html Created and tested against linux-2.6.31-rc3. Applies and works with linux-omap-2.6 commit 7c5cb7862d32cb344be7831d466535d5255e35ac as well. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-2.6.31' into for-2.6.32Mark Brown2009-07-231-1/+10
|\
| * ASoC: tlv320aic3x: Enable PLL when not bypassedChaithrika U S2009-07-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PLL was not being enabled when it was not bypassed. This patch enables the PLL when it is used. Additionally, it disables the PLL when it is bypassed. Without this patch, the audio on TI DM646x EVM and DM355 EVM does not work properly. The bit clocks and the frame sync signals from the codec are not correct and hence the playback/record are faster than usual for most sample rates. The reason for this was that the PLL was not enabled when it was not bypassed. Tested on DM6467 EVM, playback tested on DM355 EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: MAX9877: separate callback functionsJoonyoung Shim2009-07-221-33/+63
| | | | | | | | | | | | | | | | | | | | | | The callback function to control register was used by whole controls in MAX9877 driver, but this causes using many if statement for double register control or invert. So, the callback function for double register control is separate differently, and the code for invert is added in the callback function. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix checkpatch issues in AD1938Mark Brown2009-07-181-78/+78
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix FLL reference clock division setup in WM8993Mark Brown2009-07-171-0/+2
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Bodge around GCC 4.4.0 flow analysis bug in GCC 4.4.0Mark Brown2009-07-171-2/+7
| | | | | | | | | | | | | | GCC 4.4.0 doesn't appear to be able to spot that we don't apply any FLL configuration if the output frequency is zero. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Kill direct accesses to driver_dataTakashi Iwai2009-07-171-2/+2
| | | | | | | | | | | | Replaced with dev_{get|set}_drvdata(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ASoC: new ad1938 codec driver based on asocBarry Song2009-07-164-0/+758
| | | | | | | | | | Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: MAX9877: add MAX9877 amp driverJoonyoung Shim2009-07-154-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAX9877 combines a high-efficiency Class D audio power amplifier with a stereo Class AB capacitor-less DirectDrive headphone amplifier. The max9877_add_controls() is called to register the MAX9877 specific controls on machine specific init() of the machine driver. The datasheet for the MAX9877 can find at the following url: http://datasheets.maxim-ic.com/en/ds/MAX9877.pdf [Slight edit to sort the ALL_CODECS entries -- broonie.] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Error out if we can't determine a suitable WM9081 sysclkMark Brown2009-07-151-0/+8
| | | | | | | | | | | | | | | | Due to the flexibility of the WM9081 FLL this should never happen in a real system. Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix sample rate lookup in WM8993Mark Brown2009-07-151-1/+2
| | | | | | | | | | | | | | | | We need to use the best value we picked, not the last value we looked at. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: spdif: set module licence to GPLKevin Hilman2009-07-131-0/+2
| | | | | | | | | | | | | | | | Without MODULE_LICENCE("GPL"), when built as a module it will fail to load because it uses other GPL symbols from kernel. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: spdif codec: enable use by modulesKevin Hilman2009-07-131-0/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Keep index within stac9766_reg[]Roel Kluin2009-07-131-2/+2
| | | | | | | | | | | | | | Keep index within stac9766_reg[] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: WM8510 has a single frame clock so needs symmetric ratesMark Brown2009-07-091-0/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Limit WM8731 to symmetric ratesMark Brown2009-07-081-0/+1
| | | | | | | | | | | | | | | | While the hardware is capable of some limited asynmmetric modes the driver does not currently support those modes so tell applications that only symmetric rates are available. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add WM8993 CODEC driverMark Brown2009-07-084-0/+4341
| | | | | | | | | | | | | | The WM8993 is a highly integrated ultra-low power hi-fi CODEC designed for portable devices such as multimedia phones. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Correct WM8731 Mic Capture Switch control nameMark Brown2009-07-081-1/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add TLV information for WM8731Mark Brown2009-07-081-4/+11
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-2.6.31' into for-2.6.32Mark Brown2009-07-061-3/+3
|\ \ | |/
| * ASoC: Fix wm8753 register cache size and initializationLars-Peter Clausen2009-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Register cache space was not being allocated for the final register, causing bugs when it was used. Allocate space for it. Also ensure that the final register is displayed in sysfs. [Commit message rewritten to document actual issue. -- broonie] Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: Fix register cache initialisation for WM8753Mark Brown2009-07-031-1/+1
| | | | | | | | | | | | | | | | | | The wrong register cache variable was being used to provide the size for the memcpy(), resulting in a copy of only a void * of data. Reported-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Remove unused AK4535 hardware read functionalityMark Brown2009-07-051-16/+0
| | | | | | | | | | | | | | | | Nothing uses it and the existing hw_read operation needs to be refectored so it's easier to remove it rather than work with it. Support can be re-added if the code requires volatile registers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix leaks in WM8988 registration error handlingMark Brown2009-07-051-3/+5
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix WM8960 leaks on probe failureMark Brown2009-07-051-5/+11
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix leaks in WM8731 probe error handlingMark Brown2009-07-051-5/+12
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Add tristate callbacks for HiFi and VoiceLopez Cruz, Misael2009-07-031-0/+28
| | | | | | | | | | | | | | | | | | | | Add "set_tristate" callbacks for HiFi and Voice DAIs. Machine drivers can enable and disable tristate for each DAI with "snd_soc_dai_set_tristate" function. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Add EXTMUTE to reduce pop-noise effectCandelaria Villareal, Jorge2009-07-022-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to TRM, an external FET controlled by a 1.8V output signal can be used to reduce the pop-noise heard when the audio amplifier is switched on. It is suggested that GPIO6 of TWL4030 be used, but any other gpio can be used instead. This is indicated in machine driver with the following twl4030_setup_data members: -hs_extmute. Set to 1 if board has support for EXTMUTE. -set_hs_extmute. Set to a callback funcion to control an external gpio line. Set to NULL if MUTE[GPIO6] pin is used. Codec driver takes care of enabling and disabling this output during the headset pop attenuation sequence. Also add a delay to let VMID settle in ramp up sequence. Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Add WM8523 CODEC driverMark Brown2009-07-014-0/+921
| | | | | | | | | | | | | | | | The WM8523 is a high performance stereo DAC with integral charge pump providing 2Vrms line driver outputs using a single 3.3V power supply rail. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Fix WM8961 suspend function typeMark Brown2009-06-291-1/+1
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: Remove word "Switch" from Handsfree switch nameLopez Cruz, Misael2009-06-261-6/+6
| | | | | | | | | | | | | | | | | | | | SoC dapm adds the suffix "Switch" to SND_SOC_DAPM_SWITCH controls, removing word "Switch" from HandsfreeL/HandsfreeR widget name for avoiding to duplicate it. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-2.6.31' into for-2.6.32Mark Brown2009-06-252-8/+0
|\ \ | |/
| * ASoC: Revert duplicated code in SSM2602 driverMark Brown2009-06-131-4/+0
| | | | | | | | | | | | | | | | | | The Blackfin submission was done as a patch against a different tree and contained a duplicate hunk which will cause us to loose track of the substream pointers when shutting down. Remove one of the duplicated hunks. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: Remove odd bit clock ratios for WM8903Mark Brown2009-06-121-4/+0
| | | | | | | | | | | | | | | | These are not supported since performance can not be guaranteed when they are in use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* | ASoC: Add core suspend and resume callbacks to WM8961Mark Brown2009-06-251-0/+17
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Correct bypass event for voice sidetoneLopez Cruz, Misael2009-06-231-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | Event for voice sidetone was being interpreted as an analog HiFi bypass event because VSTPGA register offset is less than ARXR2_APGA_CTL offset. Reordering the register checks allows to handle voice digital bypass event properly. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Add AVADC Clock PriorityLopez Cruz, Misael2009-06-231-0/+12
| | | | | | | | | | | | | | | | | | | | AVDAC clk priority allows to determine the path ADC must be connected when the codec is in option2 and both HiFi and Voice paths are enabled. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Fix voice interface clock mastersLopez Cruz, Misael2009-06-221-1/+1
| | | | | | | | | | | | | | | | | | Voice interface of twl4030 codec supports: CBM_CFM and CBS_CFS. It doesn't support CBS_CFM. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-By: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'wm8961' into for-2.6.32Mark Brown2009-06-224-0/+2181
|\ \
| * | ASoC: Add WM8961 driverMark Brown2009-06-124-0/+2181
| |/ | | | | | | | | | | | | | | The WM8961 is a low power, high quality stereo CODEC designed for portable digital applications with headphone and stereo class D speaker drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>