summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2011-09-16ARM: ep93xx: simone: 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-16ASoC: snappercl15: 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: support sample sizes properly in the WM8776 codec driverTimur Tabi
Use snd_pcm_format_width() to determine the sample size, instead of checking specify sample formats and assuming that those are the only valid format. This change adds support for big-endian architectures (which use the _BE formats) and the packed 24-bit format (SNDRV_PCM_FORMAT_S24_3xE). [Fixed single letter variable name legibility problem -- broonie] 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-16Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-16ASoC: Fix WM8996 DC servo operation without IRQMark Brown
We need to count the timeout down. Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-16ASoC: bf5xx-ad73311: Fix prototype for bf5xx_probeAxel Lin
Fix below build warning: sound/soc/blackfin/bf5xx-ad73311.c: warning: initialization from incompatible pointer type 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: samsung: Fix checking return value of clk_getAxel Lin
clk_get() returns a pointer to the struct clk or an ERR_PTR(). This patch also use PTR_ERR() for return value. 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: improve asynchronous mode support in the fsl_ssi driverTimur Tabi
The Freescale SSI audio controller supports "synchronous" and "asynchronous" modes. In synchronous mode, playback and capture use the same input clock, so sample rates must be the same during simultaneous playback and capture. Unfortunately, the code which supports asynchronous mode is just broken in various ways. In particular, it was constraining sample sizes as well as the sample rate. The fix also allows us to simplify the code by eliminating the 'asynchronous', 'playback', and 'capture' variables that were used to keep track of playback and capture streams. Unfortunately, it turns out that simulataneous playback and record does not actually work on the only platform that supports asynchronous mode: the Freescale P1022DS reference board. If a second stream is started, the SSI grinds to halt for both streams. This is true even if the P1022 is configured for synchronous mode, so it's likely a hardware problem that needs to be worked around. 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-14ASoC: Correct channel numbers for WM8996 AIF2Mark Brown
The AIF1 channels are numbered from zero than one; do the same thing for AIF2 too. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14ASoC: Disable WM8996 CPVDD supply when not in useMark Brown
The WM8996 only requires CPVDD when the charge pump is active so control it separately to the other supplies, only enabling it when the charge pump is active. This will result in a small power saving on systems which are able to provide independent software control of the supply. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14regulator: Implement deferred disable supportMark Brown
It is a reasonably common pattern for hardware to require some delay after being quiesced before the disable has finalised, especially in mixed signal devices. For example, an active discharge may be required to ensure that the circuit starts up again in a known state. Avoid having to implement such delays in the regulator API by providing regulator_deferred_disable() which will do a regulator_disable() a specified number of milliseconds after it is called. Due to the reference counting done on regulators a deferred disable can be cancelled by doing another regulator_enable(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-12ASoC: Fix trivial build regression in Kirkwood I2SArnd Bergmann
A fix merged in 3.1-rc2 introduced a small regression, this should get it to build again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09ASoC: ad193x: Setup regmap read and write flag masks for SPILars-Peter Clausen
Currently register read-back for the ad193x is broken, because it expects bit 0 of the upper byte to be set to indicate a read operation, while the regmap default for SPI is to use bit 7. This patch also addresses another oddity of the device. There are SPI and I2C versions of this codec. In both cases the registers are 8-bit wide and numbered from 0x0 to 0x10, but in the SPI case there is also a so called 'global address' which is prefixed in-front of the register address. The global address mimics I2C behaviour and includes a static device address the and the read/write flag. This basically extends the register address to an 16-bit value numbered from 0x800 to 0x810. These are the register numbers which are currently used by the driver. This works, because I2C will ignore the upper 8 bits of the register, but it is still a bit confusing, as there are no such register numbers in the I2C case. The approach taken by this patch is to number the registers from 0x00 to 0x10 and encode the global address for SPI mode into the read and write flag masks. 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-09Merge branch 'topic/interface' of git://opensource.wolfsonmicro.com/regmap ↵Mark Brown
into for-3.2
2011-09-09regmap: Provide device read and write map interface for mergingMark Brown
Add the externally visible interface introduced by Lars-Peter's commit 6f3064 (regmap: Add support for device specific write and read flag masks) separately in order to allow merge into other subsystems for integration with drivers. Drivers relying on this feature will not be functional until they are merged with the implementation. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09ASoC: playpaq_wm8510: Return proper error if clk_get failsAxel Lin
Return proper error instead of 0 if clk_get fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08ASoC: sst_platform: fix memory leakLu Guanqun
snd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is not opened successfully. However the corresponding close callback isn't able to be called later on to release these two allocated memories, thus resulting in memory leak. This patch moves the check for hardware contraints earlier, thus resolving this issue. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08ASoC: sst_platform: using builtin functionLu Guanqun
Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by myself. Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08ASoC: sst_platform: trivial coding style fixLu Guanqun
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08ASoC: ad1980: Return proper error if vendor id mismatchAxel Lin
Return -ENODEV instead of 0 if vendor id mismatch. 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-08ASoC: Remove unused step size from debugfs CODEC write functionMark Brown
We don't use the step size so there's no need to work it out. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-05ASoC: alc5623: Remove unused mutexAxel 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-05ASoC: Check that WM8996 FLL started even if we don't have the IRQMark Brown
We can directly read the FLL lock status on WM8996 so even if we don't have an interrupt wired up we can still verify that the FLL started successfully. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-05Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-05ASoC: Add missing platform_device_put in raumfeld_audio_init error pathAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Daniel Mack <zonque@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-05ASoC: Blackfin: bf5xx-ad193x: Fix codec device nameLars-Peter Clausen
Fix the codec_name field of the dai_link to match the actual device name of the codec. Otherwise the card won't be instantiated. 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> Cc: stable@kernel.org
2011-09-05ASoC: Fix reporting of partial jack updatesMark Brown
We need to report the entire jack state to the core jack code, not just the bits that were being updated by the caller, otherwise the status reported by other detection methods will be omitted from the state seen by userspace. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org
2011-09-04ASoC: sn95031: Fix the logic to find free channelAxel Lin
In the case of no free channel available, current implementation returns 0 instead of negative errno. This patch fixes the logic to return -EINVAL if no free channel available. 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-08-31Merge branch 'for-3.1' into for-3.2Mark Brown
2011-08-31ASoC: Allow source specification for CODEC level sysclkMark Brown
Similarly to PLLs/FLLs some modern CODECs provide selectable system clock sources. When the clock is the clock for a DAI we do not usually need to identify which clock is being configured so can use clk_id for the source clock but with CODEC wide system clocks we will need to specify both the clock being configured and the source. Add a source argument to the CODEC driver set_sysclk() operation to reflect this. As this operation is not as widely used as the DAI set_sysclk() operation the change is not very invasive. We probably ought to go and make the same alternation for DAIs at some point. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: Add device tree binding for WM8804Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: Add device tree binding for WM8776Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: Add device tree binding for WM8770Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: Remove redundant -codec from WM8776 driver nameMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Timur Tabi <timur@freescale.com>