summaryrefslogtreecommitdiffstats
path: root/sound/soc
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: dmaengine-pcm: Add support for querying stream position from DMA driverLars-Peter Clausen2012-06-201-1/+28
| | | | | | | | | | | | | | | | | | | Currently the sound dmaengine pcm helper functions implement the pcm_pointer callback by trying to count the number of elapsed periods. This is done by advancing the stream position in the dmaengine callback by one period. Unfortunately there is no guarantee that the callback will be called for each elapsed period. It may be possible that under high system load it is only called once for multiple elapsed periods. This patch addresses the issue by implementing support for querying the current stream position directly from the dmaengine driver. Since not all dmaengine drivers support reporting the stream position yet the old period counting implementation is kept for now. Furthermore the new mechanism allows to report the stream position with a sub-period granularity, given that the dmaengine driver supports this. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointerLars-Peter Clausen2012-06-205-9/+9
| | | | | | | | | | | | | | | | | | | Currently the sound dmaengine pcm helper functions implement the pcm_pointer callback by trying to count the number of elapsed periods. This is done by advancing the stream position in the dmaengine callback by one period. Unfortunately there is no guarantee that the callback will be called for each elapsed period. It may be possible that under high system load it is only called once for multiple elapsed periods. This patch renames the current implementation and documents its shortcomings and that it should not be used anymore in new drivers. The next patch will introduce a new snd_dmaengine_pcm_pointer which will be implemented based on querying the current stream position from the dma device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by Vinod Koul <vinod.koul@linux.intel.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: add i2s dai driver for bf6xx socScott Jiang2012-06-203-3/+244
| | | | | | | | | This driver enables i2s mode support on blackfin bf6xx platform. We reuse bf5xx-i2s-pcm.c as its i2s pcm driver because it's the same for both bf5xx and bf6xx soc. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: add sport driver for bf6xx socScott Jiang2012-06-204-3/+513
| | | | | | | | | | The SPORT(Serial Port) module on bf6xx soc has a totally different ip comparing to bf5xx soc. An individual SPORT module consists of two independently configurable SPORT halves with identical functionality. Each SPORT half can be configured for either transmitter or receiver. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm5100: Remove stubs of ASoC-level register map codeMark Brown2012-06-191-9/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ux500: unlock on an error pathDan Carpenter2012-06-171-1/+2
| | | | | | | | There is a missing mutex_unlock() here. The cleanup path also has more debug output. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ux500: Add machine-driverOla Lilja2012-06-175-0/+580
| | | | | | | | | Add machine-driver for ST-Ericsson U8500 platform, including support for the AB8500-codec. Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: probe CODECs and platforms before DAIs and linksStephen Warren2012-06-131-34/+95
| | | | | | | | | | | | | | | | | | soc_probe_dai_link() currently inter-mixes the probing of CODECs, platforms, and DAIs. This can lead to problems such as a CODEC's DAI being probed before the CODEC, if that DAI is used as the CPU-side of a DAI link without any other of the CODEC's DAIs having been used as the CODEC-side of any DAI link that was probed earlier. To solve this, split soc_probe_dai_link() into soc_probe_link_components() and soc_probe_link_dais(). The former is used to probe all CODECs and platforms used by a card first, and then the latter is used to probe all the DAIs and links later. A similar change is made to soc_remove_dai_links(). Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: factor out soc_remove_platform()Stephen Warren2012-06-131-16/+24
| | | | | | | | | This change simply factors out part of soc_remove_dai_link() into a standalone function. This makes platform and CODEC removal much more similar at the call-sites. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: when removing a CPU DAI, clean up its DAPM contextStephen Warren2012-06-131-1/+4
| | | | | | | | | | | | | When a standalone CPU DAI (one not part of a CODEC) is probed, widgets are created for it. Add a call to snd_soc_dapm_free() in order to clean these up when the CPU DAI is removed. In order for snd_soc_dapm_free() to work, the CPU DAI's DAPM context's list member must be initialized, since snd_soc_dapm_free() removes that from the list it's part of. Add it to the card's list of DAPM contexts. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: when initializing CPU DAI, don't duplicate any CODEC initStephen Warren2012-06-131-5/+9
| | | | | | | | | | | | | | | | | | If the CPU-side of a DAI link is a CODEC rather than a standalone DAI, the codec initialization will call try_module_get() and create the DAI widgets. Ensure that this isn't duplicated when the CPU DAI itself is probed, if the CPU DAI is part of a CODEC. Note that this is not a complete fix on its own, since there's no guarantee that the CODEC itself will be initialized - currently that only happens if the CODEC is also used as the CODEC-side of a DAI link, and that initialization may happen before or after the DAIs within the CODEC are initialized. However, such a scenario doesn't necessarily currently work, and I don't think this change alone makes it any worse. This is fixed in a couple patches time. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: add ttc-dkb machine supportQiao Zhou2012-06-133-0/+195
| | | | | | | | add ttc-dkb machine support for pxa910. It uses 88pm8607 as codec dai, mmp-pcm as platform and pxa-ssp as cpu dai. Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: add mmp brownstone supportZhangfei Gao2012-06-133-0/+186
| | | | | | | | Adds Alsa audio platform driver for mmp brownstone machine Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Leo Yan <leoy@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: mmp: add sspa supportZhangfei Gao2012-06-134-0/+577
| | | | | | | | | | | The SSPA is a configurable multi-channel audio serial (TDM) interface. It's configurable at runtime to support up to 128 channels and the number of bits per sample: 8, 12, 16, 20, 24 and 32 bits. It also support stereo format: I2S, left-justified or right-justified. Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Leo Yan <leoy@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: mmp: add audio dma supportZhangfei Gao2012-06-133-0/+308
| | | | | | | | | | mmp-pcm handle audio dma based on soc-dmaengine Support mmp and pxa910 Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com> Signed-off-by: Leo Yan <leoy@marvell.com> Signed-off-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: ml26124: Convert to devm_regmap_init_i2cAxel Lin2012-06-131-4/+1
| | | | | | | This fixes a leak if snd_soc_register_codec fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Ux500: Correct license stringsOla Lilja2012-06-134-4/+4
| | | | | | | | | GPLv2 -> GPL v2 Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8903: Move register default changes to I2C probeMark Brown2012-06-121-32/+31
| | | | | | | | Also convert to use update_bits() while we're at it. No great need to do this, it's just a bit neater to do as much as possible in the I2C probe. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* ASoC: wm8903: Move interrupt request to I2C probeMark Brown2012-06-121-34/+31
| | | | | | | | | | There's no reason to defer requesting of the interrupt until the CODEC probe and doing so results in more work if we hit an error as we'll have registered the CODEC with the core. It's neater to acquire as many of the resources we'll need as we can in the bus probe function. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* ASoC: wm8903: Make interrupt handler use regmap directlyMark Brown2012-06-121-16/+32
| | | | | | | | | There's no urgent need for the interrupt handler to use the ASoC I/O functions and it'll support a further move in where we request the interrupt so call the regmap APIs directly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* ASoC: wm8903: Move pin configuration into I2C probe() functionMark Brown2012-06-121-45/+47
| | | | | | | | | | Ensure that the device pins are configured as soon as possible by moving the pin configration (including MICBIAS) into the I2C probe() function. This had been done in the CODEC probe() function when we were relying on the ASoC register I/O code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
* ASoC: codecs: Add DA732x codec driverAdam Thomson2012-06-115-0/+2420
| | | | | | | | This patch adds support for Dialog DA732x audio codecs. Signed-off-by: Michal Hajduk <Michal.Hajduk@diasemi.com> Signed-off-by: Adam Thomson <Adam.Thomson@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Convert to devm_regmap_init_i2c()Mark Brown2012-06-111-3/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8996: Remove write sequencer registers from the defaults tableMark Brown2012-06-111-178/+0
| | | | | | | They aren't marked as readable and the feature is never used so they'll never get referenced. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: codecs: Add AB8500 codec-driverOla Lilja2012-06-114-0/+3117
| | | | | | | Add codec-driver for ST-Ericsson AB8500 mixed-signal ASIC. Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8904: Convert to devm_regmap_init_i2c()Mark Brown2012-06-091-4/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8904: Convert to module_i2c_driver()Mark Brown2012-06-091-17/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: wm8903: Convert to devm_regmap_init_i2c()Mark Brown2012-06-091-3/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: use regmap more directlyStephen Warren2012-06-086-112/+95
| | | | | | | | | | | | | Stop open-coding the caching of the ctrl registers; instead, use regmap_update_bits() to update parts of the register from different places. The removal of the open-coded cache will allow controls to be created which touch registers, which will be necessary if any of these modules are converted to CODECs. Get rid of tegra*_read/write; just call regmap_read/write directly. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: use DAI's not card's dev for dev_errStephen Warren2012-06-083-3/+3
| | | | | | | | | | This is the actual device of the I2S or SPDIF controller reporting the problem. If a future change converts these controllers to be CODECs, then there may be no pcm associated with the substream, so this change avoids a crash. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: remove usage of rtd->codecStephen Warren2012-06-084-6/+8
| | | | | | | | | | rtd->codec_dai->codec can be used instead. This is a slight step along the way to not needing the rtd->codec field any more. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: statically define DAI link formatStephen Warren2012-06-082-38/+6
| | | | | | | | Define the DAI format statically in the dai_link, rather than executing code to set it each time the hw params are set. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: add .stream_name to CPU DAIsStephen Warren2012-06-083-0/+5
| | | | | | | | This is certainly required if the I2S and SPDIF controllers are converted to be CODECs, and is probably good practice irrespective. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: isabelle: using an uninitialized variableDan Carpenter2012-06-081-2/+1
| | | | | | | We should set "isabelle_regmap" before using it. GCC complains. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: max98095: Staticise non-exported functions and export jack detectMark Brown2012-06-081-2/+3
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: lm59453: Unconstify dai_driverMark Brown2012-06-051-1/+1
| | | | | | | The core fills in some blanks which makes it annoying to do the right thing and constify the calls in the core. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Revert "ASoC: fsl_ssi: convert to use devm_clk_get"Mark Brown2012-06-051-2/+5
| | | | | | | This reverts commit 014e5b56702575c5cd8ffc4b1a7924cfdfe0f1ea since PowerPC doesn't use clkdev and hasn't implemented devm_clk_get() itself. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l52: Convert to devm_regmap_init_i2c()Brian Austin2012-06-051-14/+4
| | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Convert to devm_regmap_init_i2c()Brian Austin2012-06-051-15/+5
| | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: The clock API is even less consistent than thoughtMark Brown2012-06-051-1/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: isabelle: Remove regmap_exit()MR Swami Reddy2012-06-051-2/+0
| | | | | | | | With devm_ APIs regmap_exit() not needed, so remove regmap_exit(). Signed-off-by: Vishwas A Deshpande <vishwas.a.deshpande@ti.com> Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Support TI Isabelle Audio driverM R Swami Reddy2012-06-054-0/+1328
| | | | | | | | | | | | | | | | | | ASoC: Support TI Isabelle Audio driver The Isabelle Audio IC is a complete low power high fidelity CODEC with integrated ADCs, DACs, decimation and interpolation filters, PLL, and power providers. This device supports 2 analog and 2 digital microphone channels, a mono earpiece driver, stereo class G headphone drivers with ultra low power and best SNR in the industry, stereo Class D speaker drivers, and 2 high performance Line drivers. The below patch is a basic driver code for TI Isabelle audio codec. The functionalities like headset detection, etc., will be included incrementally in the up-coming patches. Signed-off-by: Vishwas A Deshpande <vishwas.a.deshpande@ti.com> Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: lm49453: Remove version.h header file inclusionSachin Kamat2012-06-041-1/+0
| | | | | | | version.h header file is no longer required. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l52: Remove version.h header file inclusionSachin Kamat2012-06-041-1/+0
| | | | | | | version.h header file is no longer needed. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: fsl_ssi: convert to use devm_clk_getRichard Zhao2012-06-041-5/+2
| | | | | | Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: dapm: Bodge for lack of a widely available clk APIMark Brown2012-06-041-0/+6
| | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: dapm: Use devm_clk_get()Mark Brown2012-06-041-1/+1
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
* ASoC: wm8350: Convert to direct regmap API usageMark Brown2012-06-031-17/+3
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: core: Add single controls with specified range of valuesAdam Thomson2012-06-031-0/+98
| | | | | | | | | | | | | | | | | | | | Control type added for cases where a specific range of values within a register are required for control. Added convenience macros: SOC_SINGLE_RANGE SOC_SINGLE_RANGE_TLV Added accessor implementations: snd_soc_info_volsw_range snd_soc_put_volsw_range snd_soc_get_volsw_range Signed-off-by: Michal Hajduk <Michal.Hajduk@diasemi.com> Signed-off-by: Adam Thomson <Adam.Thomson@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: make snd_soc_dai_link more symmetricalStephen Warren2012-06-036-24/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch, the CPU side of a DAI link was specified using a single name. Often, this was the result of calling dev_name() on the device providing the DAI, but in the case of a CPU DAI driver that provided multiple DAIs, it needed to mix together both the device name and some device-relative name, in order to form a single globally unique name. However, the CODEC side of the DAI link was specified using separate fields for device (name or OF node) and device-relative DAI name. This patch allows the CPU side of a DAI link to be specified in the same way as the CODEC side, separating concepts of device and device-relative DAI name. I believe this will be important in multi-codec and/or dynamic PCM scenarios, where a single CPU driver provides multiple DAIs, while also booting using device tree, with accompanying desire not to hard-code the CPU side device's name into the original .cpu_dai_name field. Ideally, both the CPU DAI and CODEC DAI loops in soc_bind_dai_link() would now be identical. However, two things prevent that at present: 1) The need to save rtd->codec for the CODEC side, which means we have to search for the CODEC explicitly, and not just the CODEC side DAI. 2) Since we know the CODEC side DAI is part of a codec, and not just a standalone DAI, it's slightly more efficient to convert .codec_name/ .codec_of_node into a codec first, and then compare each DAI's .codec field, since this avoids strcmp() on each DAI's CODEC's name within the loop. However, the two loops are essentially semantically equivalent. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud