summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
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-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-15Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-15ASoC: 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-15ASoC: 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-15ASoC: 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-15ASoC: 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-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-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-06ASoC: 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-06ASoC: 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-06Merge branch 'for-3.1' into for-3.2Mark Brown
2011-09-06ASoC: 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-06ASoC: 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-06ASoC: 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>
2011-08-31ASoC: Remove unused mutex from WM9090 driverMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: imx: Fix build warning of unused 'card' variableFabio Estevam
Fixes the following warning: CC sound/soc/imx/imx-pcm-fiq.o sound/soc/imx/imx-pcm-fiq.c: In function 'imx_pcm_fiq_new': sound/soc/imx/imx-pcm-fiq.c:243: warning: unused variable 'card' CC sound/soc/imx/imx-pcm-dma-mx2.o Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: soc_codec_reg_show use snd_soc_codec_readable_registerLars-Peter Clausen
Use snd_soc_codec_readable_register instead of open-coding it. 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-08-31Merge branch 'for-3.1' into for-3.2Mark Brown
2011-08-31ASoC: Fix register cache sync register_writable WARN_ONsLars-Peter Clausen
Currently the condition for these WARN_ONs is reversed and they are placed before the actual check whether we are going to write to that register. So if the codec implements the register_writable callback we'll get a warning for each writable register when syncing the register cache. While we are at it change the check to use snd_soc_codec_writable_register instead of open-coding it. 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-08-31ASoC: snd_soc_codec_{readable,writable}_register change default to trueLars-Peter Clausen
Change the default return value of snd_soc_codec_{readable,writable}_register to true when no codec specific callback for this function is given. Otherwise all registers of that codec will neither be readable nor writable, which is most certainly not what we want. 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-08-31ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_freePeter Ujfalusi
We have dapm_context instead of codec parameter. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: imx: use more robust checking of available streamsWolfram Sang
Replace the channels_min check with a check for the relevant substream being present. Suggested here [1] when mxs implemented the audio-support. [1] http://www.spinics.net/lists/arm-kernel/msg133010.html Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31ASoC: imx-ssi: use dma_writecombine consistentlyWolfram Sang
If the channel is allocated as writecombine, then mmaping it should also use writecombine. Also, add a proper device for the call. Ported from a similar fix for mach-mxs. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29ASoC: Add 3D stereo support for wm8996susan gao
My first patch to ASoC ever! If I did something wrong, blame Ian. Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29ASoC: davinci-mcasp: add support for unsigned PCM formatsBen Gardiner
Although the McASP supports sign-extending samples in RX or TX [1]; the davinci-mcasp driver does not touch the {R,X}PBIT or {R,X}PAD field of the {R,X}FMT registers meaning that the McASP will serialize the bytes it is given regardless of their signedness. So supporting unsigned formats is as simple as adding them to the metadata of the davinci-mcasp driver. Update the FMTBITs reported in the snd_soc_dai_driver and also update the case statements in davinci-mcasp's hw_params() function so that the McASP can be connected to CODECs that use unsigned values. [1] http://www.ti.com/lit/ug/sprufm1/sprufm1.pdf 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-08-24Merge branch 'for-3.1' into for-3.2Mark Brown
2011-08-24ASoC: MPC5200: replace of_device with platform_deviceTimur Tabi
'struct of_device' no longer exists, and its functionality has been merged into platform_device. Update the MPC5200 audio DMA driver (mpc5200_dma) accordingly. This fixes a build break. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-24ASoC: Correct element count for WM8996 sidetone HPFMark Brown
I can count. Honest. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
2011-08-24ASoC: SAMSUNG: Add Kconfig to support SMDK4212Sangbeom Kim
This patch adds Kconfig to support SMDK4212. SMDK4212 is based on samsung exynos4212 SoC. And WM8994 is used for audio codec. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-24Merge branch 'for-3.1' into for-3.2Mark Brown