aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-07-24ASoC: Switch palm27x-asoc to jack detection apiMarek Vasut
This patch removes the old method of jack detection from palm27x-asoc driver and adds jack detection api. It also removes some other (now) useless stuff from the driver and corrects pin configuration for the codec. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-24ASoC: Jack handling enhancements as suggested by subsystem maintainerJanusz Krzysztofik
The patch adds a few small enhancements to the ASoC jack handling, as suggested by Mark in his comments to my Amstrad Delta driver, and a few fixes for related bugs found while learning Mark's code and testing results. Enhancements: 1. Update status of an ASoC jack while associating it with new gpios. 2. Really update DAPM pins while associating them with an ASoC jack. 3. Export ASoC jack gpios over gpiolib sysfs for diagnostic purposes. Fixes: 1. Apply mask on jack status report before using it, just for case. 2. While updating jack associated DAPM pins, use full resulting jack status, not the status report passed as an argument. Created and tested on linux-2.6.31-rc3 Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-23ALSA: Allow passing platform_data to devices attached to AC97 busMarek Vasut
This patch allows passing platform_data to devices attached to AC97 bus (like touchscreens, battery measurement chips ...). Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-23ASoC: MAX9877: fix write operation for registerJoonyoung Shim
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>
2009-07-23ASoC: Add support for Conexant CX20442-11 voice modem codecJanusz Krzysztofik
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>
2009-07-23Merge branch 'for-2.6.31' into for-2.6.32Mark Brown
2009-07-23ASoC: OMAP: Staticise pcm creation function of omap-pcmLopez Cruz, Misael
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-23ASoC: tlv320aic3x: Enable PLL when not bypassedChaithrika U S
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>
2009-07-22ASoC: MAX9877: separate callback functionsJoonyoung Shim
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>
2009-07-22ASoC: MPC5200: Increase the delay time between resetsJohn Bonesio
Reset was failing with the original udelay(50) between the code in psc_ac97_cold_reset() and the call to psc_ac97_warm_reset(). Through testing it was found that a delay of 1ms was necessary for the cold_reset code to consistently complete successfully. Signed-off-by: John Bonesio <bones@secretlab.ca> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-18ASoC: Fix checkpatch issues in AD1938Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-17ASoC: Fix FLL reference clock division setup in WM8993Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-17ASoC: Bodge around GCC 4.4.0 flow analysis bug in GCC 4.4.0Mark Brown
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>
2009-07-17ASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6Candelaria Villareal, Jorge
Board sdp3430 has hardware support for EXTMUTE using TWL4030 GPIO6 line, controlled by register INTBR_PMBR1. Machine driver takes care of enabling gpio line through i2c and codec driver manipulates the line during headset ramp up/down sequence. Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-17ASoC: Kill direct accesses to driver_dataTakashi Iwai
Replaced with dev_{get|set}_drvdata(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-16ASoC: new ad1938 codec driver based on asocBarry Song
Signed-off-by: Barry Song <21cnbao@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-16ASoC: davinci: don't use clock namesKevin Hilman
clock name strings are no longer passed on platform_data. Instead, we rely entirely on struct device and clkdev to find the right clock. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15ASoC: MAX9877: add MAX9877 amp driverJoonyoung Shim
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>
2009-07-15ASoC: add SOC_DOUBLE_R_EXT_TLV control typeJoonyoung Shim
This is a macro for double controls with special callback function and TLV. The SOC_DOUBLE_R_EXT_TLV needs two registers and one shift for double controls. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15ASoC: add SOC_DOUBLE_EXT_TLV control typeJoonyoung Shim
This is a macro for double controls with special callback function and TLV. The SOC_DOUBLE_EXT_TLV needs one register and two shifts for double controls. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15ASoC: Error out if we can't determine a suitable WM9081 sysclkMark Brown
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>
2009-07-15ASoC: Fix sample rate lookup in WM8993Mark Brown
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>
2009-07-14ASoC: Blackfin I2S: fix resume handlingCliff Cai
There is no need to manually start playback/capture ourselves as the PCM driver will handle things for us. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-14ASoC: Blackfin AC97: fix resume handlingCliff Cai
There is no need to manually start playback/capture ourselves as the PCM driver will handle things for us. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13Merge branch 'for-2.6.31' into for-2.6.32Mark Brown
2009-07-13ASoC: fixes multiple typos in comments, no functional changePeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13ASoC: spdif: set module licence to GPLKevin Hilman
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>
2009-07-13ASoC: spdif codec: enable use by modulesKevin Hilman
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13ASoC: fix checking for external widgets bugRongrong Cao
In SOC DAPM layer of SOUND subsystem, when add signal route (in the function snd_soc_dapm_add_route() ), the original code has wrong logic when dapm layer check each widget whether an external one. Signed-off-by: Rongrong Cao <rrcao@ambarella.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13ASoC: Keep index within stac9766_reg[]Roel Kluin
Keep index within stac9766_reg[] Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-09ASoC: WM8510 has a single frame clock so needs symmetric ratesMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-09ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_freeDaniel Mack
Check for rtd->params->drcmr != NULL before accessing it. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Add pop delay debug at end of DAPM sequencingMark Brown
Provide an interval after the end of DAPM sequencing so that we can distinguish between a pop in the final step of the sequence and a pop generated from some other source outside DAPM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Configure WM8731 SYSCLK at startup on AT91SAM9G20-EKMark Brown
The system clock is currently fixed by the driver and this avoids the need for us to handle errors with enabling and disabling MCLK (which was incorrect previously so this fixes bugs in error handling). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Disable microphone input for AT91SAM9G20-EK by defaultMark Brown
As shipped the board does not have inputs but it is relatively straightforward to modify the board to hook them up so support is provided in the driver. When these modifications have not been made enabling the microphone stage can cause problems. Add an ifdef to disable this by default. Don't put it into Kconfig since users will have to get their soldering irons out to change things. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Use CODEC as clock master on AT91SAM9G20-EKMark Brown
This simplifies the driver by removing the need to manually configure dividers within the CPU and improve audio performance by ensuring that the optimal phase relationships between the clocks in the system are maintained. Note that currently this means that for playback to work the Output Mixer HiFi switch must be enabled since otherwise CODEC will not generate the DAC clock. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Limit WM8731 to symmetric ratesMark Brown
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>
2009-07-08ASoC: Add WM8993 CODEC driverMark Brown
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>
2009-07-08ASoC: DaVinci I2S needs mach/asp.hMark Brown
Reported-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Correct WM8731 Mic Capture Switch control nameMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: Add TLV information for WM8731Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08ASoC: DaVinci: pcm, don't play 1st sound period twiceTroy Kisky
Update the dma link with correct data as soon as the master channel has copied it. Otherwise, the 1st period will play twice. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-07Merge branch 'davinci' into for-2.6.32Mark Brown
Conflicts: sound/soc/davinci/davinci-i2s.c
2009-07-06Merge branch 'for-2.6.31' into for-2.6.32Mark Brown
2009-07-05ASoC: Remove unused AK4535 hardware read functionalityMark Brown
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>
2009-07-05ASoC: Fix leaks in WM8988 registration error handlingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Fix WM8960 leaks on probe failureMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Fix leaks in WM8731 probe error handlingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Add CODEC volatile register operationMark Brown
Add a volatile_register() operation to the CODEC structure providing a standard operation to query if a register is volatile. This will be used to factor out the register cache I/O operations for the CODECs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: DaVinci: i2s, add davinci_i2s_prepare and shutdownTroy Kisky
If the codec is master then prepare should call mcbsp_start, not trigger. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>