summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2011-09-22ASoC: omap-mcpdm: Replace legacy driverMisael Lopez Cruz
Reasons for the replacement: The current driver for McPDM was developed to support the legacy mode only. In preparation for the ABE support the current driver stack need the be replaced. The new driver is much simpler, easier to extend, and it also fixes some of the issues with the old stack. Main changes: - single file for omap-mcpdm (mcpdm.c/h removed) - Define names for registers, bits cleaned up, prefixed - Full-duplex audio operation (arecord | aplay) has been fixed - Less code McPDM need to be turned off after all streams has been stopped. This might cause pop noise on the output, if the codec's DAC is still powered at this time. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-22ASoC: OMAP4: McPDM: Convert to hwmod/omap_devicePeter Ujfalusi
In order to probe, and operate correctly, the OMAP McPDM driver needs to be converted to use hwmod. The device name has been changed to probe the driver. Replace the clk_* with pm_runtime_* calls to manage the clocks correctly. Missing request_mem_region/release_mem_region added. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-22ASoC: omap-mcpdm: Fix threshold and dma configurationPeter Ujfalusi
DMA packet_size must be configured based on the McPDM FIFO threshold value, number of channels. Due to the FIFO operation the DMA muse be configured differently for playback, and capture. At the same time fix the McPDM threshold values used for playback, and capture to avoid broken code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-22OMAP4: hwmod: enable mcpdm hwmod device.Peter Ujfalusi
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jorge Eduardo Candelaria Signed-off-by: Margarita Olaya Cabrera Signed-off-by: Liam Girdwood <lrg@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Benoit Cousson <b-cousson@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
2011-09-22OMAP: McPDM: Convert McPDM device to omap_devicePeter Ujfalusi
McPDM device is converted to omap device. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Jorge Eduardo Candelaria Signed-off-by: Margarita Olaya Cabrera Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
2011-09-21ASoC: tpa6130a2: Remove model_id from platform dataPeter Ujfalusi
The model_id is no longer needed within the platform_data for the TPA driver since the model of TPA specified with the device name (tpa6130a2/tpa6140a2). Also update rx51 (the only affected user) to use the device name rather than platform data. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: tpa6130a2: Model support cleanupPeter Ujfalusi
Use the device name and driver_data to identify the TPA model supported by the driver. Board files should use either "tpa6130a2" or "tpa6140a2" as device name to specify the model in used on the specific board. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: soc-core: symmetry checking for each DAIs separatelyDong Aisheng
The orginal code does not cover the case that one DAI such as codec may be shared between other two DAIs(CPU). When do symmetry checking, altough the codec DAI requires symmetry, the two CPU DAIs may still be configured to run on different rates. We change to check each DAI's state separately instead of only checking the dai link to prevent this issue. Signed-off-by: Dong Aisheng <b29396@freescale.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: 88pm860x-codec - reset the codec correctlyBas Vermeulen
Reset the codec according to the Audio power-up delay errata for the 88PM8607. Signed-off-by: Bas Vermeulen <bas.vermeulen@novero.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: 88pm860x-codec - Allow independent use of both I2S playback and captureBas Vermeulen
Introduce a I2S CLK supply so playback and capture can operate independently. Signed-off-by: Bas Vermeulen <bas.vermeulen@novero.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Add driver for rt5631johnnyhsu@realtek.com
Signed-off-by: Johnny Hsu <johnnyhsu@realtek.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Staticise nuc900_dma_getposition()Axel Lin
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Staticise jz4740_pcm_new()Axel Lin
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Staticise bf5xx_pcm_i2s_new()Axel Lin
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Staticise bf5xx_pcm_ac97_new()Axel Lin
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-21ASoC: Ensure we generate a driver nameMark Brown
Commit 873bd4c (ASoC: Don't set invalid name string to snd_card->driver field) broke generation of a driver name for all ASoC cards relying on the automatic generation of one. Fix this by using the old default with spaces replaced by underscores. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Takashi Iwai <tiwai@suse.de>
2011-09-21ASoC: Factor out per-widget DAPM power checksMark Brown
The indentation is getting a little deep. Should be straight code motion, no functional changes. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Trace and collect statistics for DAPM graph walkingMark Brown
One of the longest standing areas for improvement in ASoC has been the DAPM algorithm - it repeats the same checks many times whenever it is run and makes no effort to limit the areas of the graph it checks meaning we do an awful lot of walks over the full graph. This has never mattered too much as the size of the graph has generally been small in relation to the size of the devices supported and the speed of CPUs but it is annoying. In preparation for work on improving this insert a trace point after the graph walk has been done. This gives us specific timing information for the walk, and in order to give quantifiable (non-benchmark) numbers also count every time we check a link or check the power for a widget and report those numbers. Substantial changes in the algorithm may require tweaks to the stats but they should be useful for simpler things. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20ASoC: Add WM5100 driverMark Brown
The WM5100 is a highly integrated low power audio subsystem with advanced digital signal processing capabilities including effects, speech clarity enhancement and active noise cancellation. This initial driver provides support for basic audio paths, further patches will provide more complete functionality. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-20ASoC: ssm2602: Do not dereference codec->control_dataLars-Peter Clausen
The driver assumes that control_data points to the drivers i2c_client struct, but this is no longer the case since the ASoC core has switched to regmap. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20ASoC: fsl: Fix error handling if platform_device_add failsAxel Lin
Call platform_device_put() instead of platform_device_unregister() if platform_device_add() fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20ASoC: Remove bitrotted wm8962_resume()Mark Brown
This functionality is now subsumed within the bias management, using the standard cache management functionality, without assuming the cache type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20ASoC: Refcount WM8996 bandgap from FLL tooMark Brown
For digital only paths we need to make sure the bandgap is enabled prior to starting the FLL which isn't tied into DAPM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-20ASoC: Fix unused variable warning in WM8996Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19ASoC: twl6040: Correct supported number of playback channelsPeter Ujfalusi
twl6040 supports 5 playback, and 2 capture channels Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: twl6040: Fix the number of channels for vibraPeter Ujfalusi
Only mono audio can be used for vibra (DL4 channel). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: twl6040: Use chip defaults in the initial reg_cachePeter Ujfalusi
Reset the twl6040_reg array to hold the chip default values. The only changed values were for the microphone input selection. Select no input for the microphones in the twl6040_init_chip function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: twl6040: Chip initialization cleanupPeter Ujfalusi
There is no need to write to the vio registers at probe time, since most them either read only, or shared with MFD or not used. On the other hand it is a good idea to updated the ASICREV register in the cache at this time. After power up we need to restore some registers. Clean up the list to contain only the registers we are going to restore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Fix power on GPIO handlingPeter Ujfalusi
Avoid requesting the audpwron gpio in case of ES1.0 revision. In the past we requested the gpio, but we did not free it up, since we made the check for the revision later. This results later checks for gpio validity to fail, leaving the gpio reserved (even after the driver has been removed). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19Input: twl6040-vibra: Use accessor to get revision informationPeter Ujfalusi
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Add accessor for revision IDPeter Ujfalusi
For client driver to use, if they need chip resvision information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19MFD: twl6040: Remove global pointer for platform_devicePeter Ujfalusi
There is no need to keep global pointer for the platform device, since it is only used for dev_* prints, and the device pointer available within the twl6040 structure. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: mxs-saif: add record functionDong Aisheng
1. add different clkmux mode handling SAIF can use two instances to implement full duplex (playback & recording) and record saif may work on EXTMASTER mode which is using other saif's BITCLK&LRCLK. The clkmux mode could be set in pdata->init() in mach-specific code. For generic saif driver, it only needs to know who is his master and the master id is also provided in mach-specific code. 2. support playback and capture simutaneously however the sample rates can not be different due to hw limitation. Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: sn95031: Staticize sn95031_pcm_hw_paramsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-19ASoC: Add line loads to the list of supported detections for SpeysideMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19ASoC: Initial WM8996 headphone impedance measurement supportMark Brown
The WM8996 can measure the impedance of accessories connected to the headphone output. Implement initial support for this, measuring the left channel impedance when an accessory is detected and using this to distinguish between a line load and a headphone load. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19ASoC: WM8996 only needs bandgap for analogue functionalityMark Brown
Rather than managing the bandgap in the bias level control use a supply widget as we only actually need to enable it for analogue paths, not fully digital ones. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-19ASoC: Display the error code when we fail to add a DAPM controlMark Brown
Useful for diagnostics. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-16ASoC: support all possible sample rates in the WM8776 driverTimur Tabi
The WM8776 supports a continuous range of sample rates rather than discrete values and supports a wider range of sample rates on the playback path than is currently supported. Update the constraints on the DAIs to reflect this. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: wm8995: Remove unused i2c variable in wm8995_remove()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: wm8995: Return -EINVAL if device ID mismatchAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: tpa6130a2: Remove obsolete cleanup for clientdataAxel Lin
The i2c core will clear the clientdata pointer automatically, we don't have to set the `data' field to NULL in remove() or if probe() failed anymore. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: davinci-pcm: trivial: replace link with actual chan/linkBen Gardiner
The ambiguously named variable 'link' is used as a temporary throughout davinci-pcm -- its presence makes grepping (and groking) the code difficult. Replace link with the value of link in almost all sites. The exception is a couple places where the last-assigned link/chan needs to be returned by a function -- in these cases, rename to last_link. Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: edb93xx: convert to use snd_soc_register_card()Mika Westerberg
Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: simone: convert to use snd_soc_register_card()Mika Westerberg
Current method for machine driver to register with the ASoC core is to use snd_soc_register_card() instead of creating a "soc-audio" platform device. In addition we use platform_device_register_simple() to create a platform device for the codec. This function will handle putting and deleting the device automatically which simplifies the error handling in the machine driver. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ASoC: ep93xx-pcm: add MODULE_ALIASMika Westerberg
To get the PCM module loaded automatically by udev et al. we need to add a proper MODULE_ALIAS. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ARM: ep93xx: snappercl15: register audio platform deviceMika Westerberg
Since the ASoC machine driver is now a platform driver we need to register a matching platform device. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16ARM: ep93xx: edb93xx: register audio platform deviceMika Westerberg
Since the ASoC machine driver is now a platform driver we need to register a matching platform device. Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>