Commit Graph

5163 Commits (b16ca626358cbf056b752eab63ba8f20087afeaf)

Author SHA1 Message Date
Mark Brown 6449c9f858 ASoC: wm8996: Remove stub register cache
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:21 +00:00
Mark Brown 1dd4c8e42a ASoC: wm8996: Fix /RESET bounce ordering
We want to leave the device out of rather than in reset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:17 +00:00
Mark Brown b9e67e5ef3 ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 10:28:59 +00:00
Shawn Guo 64902b29cb ASoC: Remove unnecessary -codec from cs4270 driver name
Similar to what commit 1e3ad57 (ASoC: Remove redundant -codec from
WM8776 driver name) does for wm8776 driver, this patch does the same
thing for cs4270 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:20 +00:00
Shawn Guo 7c59bc55e4 ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
Align mpc8610_hpcd with p1022_ds on getting codec node by just calling
of_parse_phandle.  The bonus point of doing that is we can save
exporting get_node_by_phandle_name() when we consolidate the common
bits between mpc8610_hpcd and p1022_ds into a module, which can be
shared by more machine drivers added later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:08 +00:00
Shawn Guo fb1a6453bc ASoC: fsl: correct get_dma_channel parameter name
The second parameter of function get_dma_channel is actually a property
name rather than a compatible string, so rename it for less confusing.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:04 +00:00
Mark Brown 2c823d14bf ASoC: wm8753: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 15:25:27 +00:00
Paul Gortmaker 07a38b1b4e ASoC: fix trivial build error in mpc5200_dma.c
Add the obvious header to fix this:

sound/soc/fsl/mpc5200_dma.c:301: error: implicit declaration of function 'DMA_BIT_MASK'
sound/soc/fsl/mpc5200_dma.c:301: error: initializer element is not constant

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 14:56:30 +00:00
Shawn Guo 1e1d7e593e ASoC: imx: let SND_MXC_SOC_FIQ select FIQ
CONFIG_FIQ is only needed when CONFIG_SND_MXC_SOC_FIQ is selected to
build imx-pcm-fiq.c, so let SND_MXC_SOC_FIQ select FIQ.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 14:36:10 +00:00
Viresh Kumar b1dd5897f5 ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops
SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it
again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the
second one overwrites the first one, this is not the correct way. Fix this by
expanding SET_SYSTEM_SLEEP_PM_OPS in our structure.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-24 14:46:26 +00:00
Mark Brown 0512615db6 ASoC: wm8962: Convert interrupt handler to direct regmap usage
Avoids potential locking issues with anything that needs the CODEC lock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23 22:06:58 +00:00
Javier Martin 5ed80a75b2 ASoC: i.MX SSI: Fix DSP_A format.
According to i.MX27 Reference Manual (p 1593) TXBIT0 bit selects
whether the most significant or the less significant part of the
data word written to the FIFO is transmitted.

As DSP_A is the same as DSP_B with a data offset of 1 bit, it
doesn't make any sense to remove TXBIT0 bit here.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-23 18:58:17 +00:00
Mark Brown d690516c6d ASoC: wm8962: Remove mistakenly committed debug logging
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23 15:46:25 +00:00
Mark Brown 2901d6ebe1 ASoC: ak4104: Convert to direct regmap API usage
Since the cache is currently open coded this is more of a win than for
most devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:14:18 +00:00
Mark Brown 34baf22020 ASoC: ak4104: Use snd_soc_write() rather than internal write function
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:14:14 +00:00
Mark Brown afad95f825 ASoC: ak4104: Use snd_soc_update_bits() for read/modify/write
Don't use the internal I/O functions directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:13:54 +00:00
Mark Brown 7679e42ec8 ASoC: dapm: Check for bias level when powering down
Recent enhancements in the bias management means that we might not be
in standby when the CODEC is idle and can have active widgets without
being in full power mode but the shutdown functionality assumes these
things. Add checks for the bias level at each stage so that we don't
do transitions other than the ON->PREPARE->STANDBY->OFF ones that the
drivers are expecting.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-02-23 15:13:02 +00:00
Mark Brown 462835e4a7 mfd/ASoC: Convert WM8994 driver to use regmap patches
Early revisions of several of the WM8994 variants have register updates
to improve performance. Move these over to using the regmap patch system
instead of open coding them in the audio driver. Since the regmap init
is done by the MFD the code is moved there.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2012-02-22 13:57:03 +00:00
Lars-Peter Clausen 95a771ca16 ASoC: mxs-pcm: Request DMA channel early
Request the DMA channel in the PCM open callback instead of the hwparams
callback, this allows us to let open fail if no dma channel is available. This
also fixes a bug where the channel will be requested multiple times if hwparams
is called multiple times.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Lars-Peter Clausen 4564d10f30 ASoC: imx-pcm: Request DMA channel early
Request the DMA channel in the pcm open callback. This allows us to let open
fail if there is no dma channel available.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Lars-Peter Clausen 91a38540f5 ASoC: imx-ssi: Set dma data early
Move the call to snd_soc_dai_set_dma_data from the hw_params callback to the
startup callback. This allows us to use the dma data in the pcm driver's open
callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Viresh Kumar 258aea76f5 dmaengine: Pass dma_slave_config .device_fc = NULL for all existing users
.device_fc is added in struct dma_slave_config recently. All user drivers, which
want DMA to be the flow controller must pass this field as false. As earlier
driver don't look to use this feature, mark it false for now.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-02-22 18:15:37 +05:30
Mark Brown f7085641ee ASoC: wm8994: Move wm_hubs callback before we start ramping VMID
Allows the generic code to set up for that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 23:10:41 +00:00
Mark Brown 1ec1cdfbb3 ASoC: wm8996: Convert to use DAPM routes for stream connections
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:37:46 +00:00
Mark Brown cdaaf301da ASoC: wm5100: Implement DRC coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:34:50 +00:00
Mark Brown 29e3cc1597 ASoC: wm8996: Implement DRC coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:34:49 +00:00
Mark Brown f831b055ec ASoC: core: Add support for masking out parts of coefficient blocks
Chip designers frequently include things like the enable and disable
controls for algorithms in the register blocks which also hold the
coefficients. Since it's desirable to split out the enable/disable
control from userspace the plain SND_SOC_BYTES() isn't optimal for
these devices.

Add a SND_SOC_BYTES_MASK() which allows a bitmask from the first word
of the block to be excluded from the control. This supports the needs
of devices I've looked at and lets us have a reasonably simple API.
Further controls can be added in future if that's needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:48 +00:00
Mark Brown 71d08516b8 ASoC: core: Add SND_SOC_BYTES control for coefficient blocks
Allow devices to export blocks of registers to the application layer,
intended for use for reading and writing coefficient data which can't
usefully be worked with by the kernel at runtime (for example, due to
requiring complex and expensive calculations or being the results of
callibration procedures). Currently drivers are using platform data to
provide configurations for coefficient blocks which isn't at all
convenient for runtime management or configuration development.

Currently only devices using regmap are supported, an error will be
generated for any attempt to work with a byte control on a non-regmap
device. There's no fundamental block to other devices so support could
be added if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:48 +00:00
Mark Brown 2b4bdee292 ASoC: io: Retrieve val_bytes from the regmap API
Allow us to build infrastructure which needs to know the size of a value
without requiring regmap based drivers to supply this information to both
ASoC and regmap by asking regmap for the value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:47 +00:00
Lars-Peter Clausen 8949490f70 ASoC: mxs-pcm: Remove unused fields from struct mxs_pcm_runtime_data
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Lars-Peter Clausen f691402457 ASoC: imx-pcm: Remove unused fields from imx_pcm_runtime_data struct
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Lars-Peter Clausen e54e2f81da ASoC: imx-pcm: Remove empty prepare callback
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Mark Brown 07fb9d9e93 ASoC: wm8994: Support external capacitors on MICBIAS2 with jack detection
When an external capacitor is connected to MICBIAS2 on devices with
jack detection (which is not required but may be done in some systems)
then the loading may mean that better performance is obtained when
the microphone bias is enabled normally rather than using the low power
mode. Provide platform data allowing systems to indicate if they require
this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 16:49:53 +00:00
Mark Brown 55a2778685 ASoC: wm8994: Actively discharge idle MICBIAS with jack detect
This minimises the chance of any external capacitors that are fitted
being discharged into headphones as they insert.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 16:49:49 +00:00
Mark Brown 29fdc3605c ASoC: wm8994: Enable headphone startup mode 1 for WM1811 and WM8958
The latest recommendation for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 10:57:47 +00:00
Kuninori Morimoto e555cf3631 ASoC: ak4642: fixup HeadPhone L/R dapm settings
Current ak4642 driver had wrong dapm settings for headphone L/R.
If you select headphone L, and select R after that,
headphone L setting was removed by R settings.

This patch fixes it up.
It provides just "Headphone Enable" to user side

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 10:00:24 +00:00
Peter Ujfalusi 3b8a079516 ASoC: twl4030: Debug code cleanup
Replace the printk(KERN_ERR* instances with dev_err in the driver.
While we are here clean up some of the debug messages as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:58:47 +00:00
Mark Brown 26422625d5 ASoC: wm_hubs: Convert headphone driver to output driver widget
Mostly for neatness, though it may help with sequencing in some
situations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:52:09 +00:00
Mark Brown fdd48f9d19 ASoC: wm8776: Add WM8775 device ID to the WM8776
The WM8775 is register compatible with the WM8776 so can be supported with
the same driver though it is an ADC only part. Add the device ID to the
WM8776 driver, further updates will be added in the future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:13:59 +00:00
Mark Brown 38d78bafb9 ASoC: ak4104: Convert to module_spi_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:01:01 +00:00
Mark Brown 65b30bee58 ASoC: ak4104: Remove uninformative print on probe()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:00:54 +00:00
Shawn Guo cbdfb661ff ASoC: imx/mxs: remove redundant SND_PCM selection
SND_PCM is already selected by SND_SOC, there is no need for
SND_IMX_SOC and SND_MXS_SOC to select it again.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 07:45:43 -08:00
Kuninori Morimoto 7da9ced606 ASoC: fsi: Add DMAEngine support
This patch supports DMAEngine to FSI driver.
It supports only Tx case at this point.
If platform/cpu doesn't support DMAEngine, FSI driver will
use PIO transfer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-19 18:36:16 -08:00
Mark Brown fa2c8f4017 Linux 3.3-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPQDoTAAoJEHm+PkMAQRiGMpYH/ibfyIFBrKMD1v/s9oNvp8rS
 c7J7E7mHZOylCHrpIS3lX3ZbOfOe33Ln0Z59f1/TcV4CMMz0NrKYcTC8erj/H/DA
 8DRYegiczWKqiXRgktwaZXkJcwXYdOOL1WQYxuzzbZcwRrNBY2QpH7Zu8Bj+TPAy
 d4fvJHWdlh4sbWVdQmLRbp04UB9J/Z5/uWmSNvVQjLLdRlD+mEBbt7JjiNY6sUVC
 2sJoAs9F3UlHu7VaN+JIhMOGZ3GqOpHGBxN/aWxJ/7GsXdXuAfCrxoPxaAe4xzOa
 HndN5ZDyg02Vy5uDeUzj+HJPW3M8L4Q0nwxAYb3ZnQ5tbpu1Q2cHfIBealomWCQ=
 =R91X
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
resolved below within the FSI driver and allow the application of the
dmaeengine conversion that depends on this resolution.

Linux 3.3-rc4

Conflicts:
	sound/soc/sh/fsi.c
2012-02-19 18:35:12 -08:00
Axel Lin a387419612 ASoC: Add __devinit annotation for pxa2xx_ac97_probe
This fixes below build warning:
WARNING: vmlinux.o(.text+0x1e632c): Section mismatch in reference from the function pxa2xx_ac97_probe() to the function .devinit.text:pxa2xx_ac97_hw_probe()
The function pxa2xx_ac97_probe() references
the function __devinit pxa2xx_ac97_hw_probe().
This is often because pxa2xx_ac97_probe lacks a __devinit
annotation or the annotation of pxa2xx_ac97_hw_probe is wrong.

Also rename pxa_ac97_dai to pxa_ac97_dai_driver to fix below build warning:

  LD      sound/soc/pxa/built-in.o
WARNING: sound/soc/pxa/built-in.o(.data+0x18c): Section mismatch in reference from the variable pxa_ac97_dai to the function .devinit.text:pxa2xx_ac97_probe()
The variable pxa_ac97_dai references
the function __devinit pxa2xx_ac97_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-19 18:13:02 -08:00
Fabio Estevam 0837fc6243 ASoC: soc-core: Show the returned values on error messages
Showing the returned values on error messages is useful information.

While at it, use pr_err/pr_warn whenever possible.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 13:51:01 -08:00
Mark Brown d5a7f23f9c ASoC: wm8996: Make sure we bounce /RESET to reset
While it matches the current code only bringing the device out of reset
isn't actually doing what the function says so make sure we set the GPIO
high before we pull it low.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 13:50:51 -08:00
Mark Brown 8005f394ab ASoC: wm8996: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:40 -08:00
Mark Brown 7813561a39 ASoC: wm8993: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:39 -08:00
Mark Brown 9d50a764b5 ASoC: wm8962: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:36 -08:00
Mark Brown 1a8b2d9d5b ASoC: dapm: Only mark pin widgets as dirty if we actually change state
Small optimisation for noop state updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:33 -08:00
Mark Brown 5567d8c621 ASoC: wm8994: Convert to use DAI widget routing rather than streams
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:28 -08:00
Mark Brown fe360685f9 ASoC: dapm: Convert stream events to use DAI widgets
This means we don't need to walk through every single widget in the system
for each stream event which is a bit less silly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:21 -08:00
Mark Brown 888df395eb ASoC: dapm: Implement and instantiate DAI widgets
In order to allow us to do smarter things with DAI links create DAPM
widgets which directly represent the DAIs in the DAPM graph. These are
automatically created from the DAIs as we probe the card with references
held in both directions between the widget and the DAI.

The widgets are not made available for direct instantiation by drivers,
they are created automatically from the DAIs.  Drivers should be updated
to create stream routes using DAPM maps rather than by annotating AIF
and DAC widgets with streams.

In order to ease transition to this model from existing drivers we
automatically create DAPM routes between the DAI widgets and the existing
stream widgets which are started and stopped by the DAI widgets, though
the old stream handling mechanism is still in place.  This also has the
nice effect of removing non-DAPM devices as any device with a DAI
acquires a widget automatically which will allow future simplifications
to the core DAPM logic.

The intention is that in future the AIF and DAI widgets will gain the
ability to interact such that we are able to manage activity on
individual channels independantly rather than powering up and down the
entire AIF as we do currently.

Currently we only generate these for CODECs, mostly as I have no systems
with non-CODEC DAPM to integrate with. It should be a simple matter of
programming to add the additional hookup for these.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:10 -08:00
Mark Brown 3056557f3b ASoC: dapm: Constify lots of names that are never modified
Neater and avoids warnings when used in other places where const strings
are desired.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:06 -08:00
Mark Brown 7bd3a6f34c ASoC: dapm: Supply the DAI and substream when calling stream events
In order to allow us to do something smarter than iterate through widgets
doing strcmp() to work out what to power up for stream events change the
interface used to generate them to be based on the combination of a DAI
and a stream direction rather than just a simple string identifying the
stream.

At some point we'll probably want a set of channels too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:01 -08:00
Mark Brown 5ba06fc969 ASoC: dapm: Refactor snd_soc_dapm_new_widget() to return the widget
Let the caller fiddle with the widget after we're done in order to
facilitate further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:09:56 -08:00
Mark Brown ce0e9f0ede ASoC: dapm: Unexport snd_soc_dapm_new_control()
Everything now uses snd_soc_dapm_new_controls() instead so we don't need
to make it part of the external API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:09:52 -08:00
Axel Lin 059ad76028 ASoC: Change spitz_ext_control to take dapm as argument.
This fixes below build warning:
  CC      sound/soc/pxa/spitz.o
sound/soc/pxa/spitz.c: In function 'spitz_startup':
sound/soc/pxa/spitz.c:116: warning: passing argument 1 of 'spitz_ext_control' from incompatible pointer type
sound/soc/pxa/spitz.c:47: note: expected 'struct snd_soc_card *' but argument is of type 'struct snd_soc_codec *'

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>
2012-02-17 08:09:33 -08:00
Mark Brown a1fa92130c ASoC: ak4535: Convert to direct regmap API usage
I suspect the timer register may also be volatile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown 7e11a53516 ASoC: ak4535: Remove bitrotted driver version
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown b08c576434 ASoC: ak4535: Make I2C usage unconditional
Convert to module_i2c_driver() too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown d69280be41 ASoC: ak4535: Remove -codec from driver name
Redundant, the device is only a CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown d23031a4d3 ASoC: wm8962: Convert to runtime PM for bias off management
This allows userspace control of final power off, allowing policy decisions
for register configuration retention.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:04 -08:00
Mark Brown a968d9db3b ASoC: wm8962: Don't automatically enable and disable FLL
Only enable and disable the FLL when explicitly told to, supporting some
additional use cases and making the driver behaviour more standard.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:03 -08:00
Mark Brown 5aa9b858ef ASoC: wm8962: Clean up register dump cruft
No longer needed with regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown 07fabd1bfb ASoC: wm8962: Add new SYSCLK ratios for new device revisions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown eeba1f8b6a ASoC: wm8962: Log the selected SYSCLK ratio
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:01 -08:00
Mark Brown 1993502d24 ASoC: wm8962: Only configure BCLK in hw_params when audio is active
Otherwise we might not have a sensible clocking setup ready.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:00 -08:00
Mark Brown 71de4d27c8 ASoC: wm8962: Update the clocking when setting system clock
Make sure we update for any changes in cases where we reconfigure while
live (eg, for analogue bypass).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:31:59 -08:00
Liam Girdwood 0e66821f63 ASoC: spitz: Fix kcontrols to use card instead of codec
Machine kcontrols now use card instead of codec for thier "chip".

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 08:24:40 -08:00
Axel Lin 905b41956c ASoC: Show device id in the debug message
Show the id we read when the id mismatch is detected.
This is useful for debugging.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 22:19:55 -08:00
Axel Lin 916be22c15 ASoC: Get correct revision id for wm2200
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 18:18:56 -08:00
Sebastien Guiriec 731f1ab290 ASoC: core: add platform DAPM debugfs support
Allow platform widgets to be visible in debugfs like codec widgets.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 08:05:18 -08:00
Mark Brown 48a8c3943d ASoC: dapm: Convert pin switches to use snd_soc_card
Since the addition of the non-CODEC control adds card controls like the
DAPM pin switch have been broken as they are expecting the private data
for the control to be the CODEC but it's now the card. Fix that for the
pin switches, an audit of other drivers is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-15 08:01:31 -08:00
Liam Girdwood 64e60f9f9e ASoC: core: Convert CODEC debugfs init to use dev_warn()
Update the codec debugfs initialisation to use dev_warn() instead of
printk(KERN_WARNING).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:59:04 -08:00
Liam Girdwood 8078d87f9d ASoC: dapm: Notify stream event to all card components.
Currently when DAPM widgets are power sequenced the stream_event()
completion callback is only called for the stream_event originator
DAPM context. Other components in the card may also be interested so
make sure they are also notified of any widget power events.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Liam Girdwood 6c120e19fa ASoC: dapm - Make DAPM reset code a separate function.
It's useful to export the DAPM reset as a static function for future use
by other DAPM functions. e.g. The dynamic PCM query widgets resets the DAPM
graph before working out active paths.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Mark Brown 65f01ef09e ASoC: wm8994: Use slow start for VMID
Improves performance on power up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:17 -08:00
Mark Brown da157875cd ASoC: wm9081: Use idle_bias_off
The main role of the WM9081 is as a class D speaker amplifier so there
is no concern about pops. There are also very few registers and a fast
power up time so we can happily mark the driver as idle_bias_off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:06 -08:00
Mark Brown 68fcde97e4 ASoC: wm9081: Move WM9081 IRQ platform data handling into I2C probe
Better style and better supports idle_bias_off which we're going to
implement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:05 -08:00
Mark Brown 31794bc37b ASoC: wm8962: Fix sidetone enumeration texts
The sidetone enumeration texts have left and right swapped.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-14 13:54:45 -08:00
Mark Brown 1f5cafb2c8 ASoC: wm8988: Remove unneded -codec from driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:22 -08:00
Mark Brown d2dc0a7782 ASoC: wm8988: Convert to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:21 -08:00
Mark Brown 2dbc34d827 ASoC: wm9081: Use module_i2c_driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:01 -08:00
Leon Romanovsky dd7d3a2417 ASoC: tegra+alc5632: Added digital microphone DAPM widget.
ALC5632 codec supports digital microphone. This patch adds DAPM widget.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:37:35 -08:00
Mark Brown e85b26ce3a ASoC: wm8994: Actively discharge VMID when not in use
Ensure we're in a known state when we restart.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:22 +00:00
Mark Brown cc6d5a8c2b ASoC: wm8994: VMID management improvements
Raise the ramp time to 50ms to cover corner cases, use the startup bias
generator, explicitly reset the ramp circuit when complete and reorder
things all of which should improve performance somewhat for systems that
are sensitive to noise from VMID.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:21 +00:00
Mark Brown d60d6c3b65 ASoC: wm_hubs: Clamp inputs to VMID while we ramp
Reduces the amount of time taken to stabilise them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:21 +00:00
Mark Brown 5f2f389040 ASoC: wm_hubs: Improve single ended line output enable performance
The enable of the single ended line outputs on wm_hubs devices performs
better if the output is enabled prior to starting VMID. Since inactive
outputs are held at VMID anyway there is little cost to doing this for
unused outputs. Add callbacks into wm_hubs and keep track of which outputs
are really active so we can disable them once we're active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:20 +00:00
Andrey Danin 0f613c21d6 ASoC: alc5632: Allow 8kHz stream support.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Paul Fertser 5148aed229 ASoC: alc5632: Fix Capture/Playback attributes for microphone inputs
According to the mixer path diagram input sources' attenuators logically
belong to the playback path and DMIC boost only affects capture.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Paul Fertser abb015be83 ASoC: alc5632: Fix Boost Volume TLVs used for the external microphones
This brings the TLVs in sync with the documentation and allows to properly
manipulate mic boost controls with alsamixer.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Marc Dietrich 2435d46fe6 ASoC: alc5632: Connect HP/HPL/HPR mix'es to HPOut Mix
This patch should fix output through speakers using HP mixer.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 9e75177901 ASoC: alc5632: Fix I2S digital interface power for recording
Fix I2S digital interface power for recording.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 5e4e94a958 ASoC: alc5632: Add DMIC switches and controls
Add DMIC switches and controls to ALC5632 codec.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 75b3566f79 ASoC: alc5632: Refactored DAPM routes to add voice support
Refactored DAPM routes to add voice support.

- Added undocumented register
- Used AIF in/out
- Added missed voice items and routes
- Added DMIC input
- Romoved unrelevant items

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 6002c22319 ASoC: alc5632: Remove unexisting route from Phone Mix to Mono Mix
There is no Phone Mix<->Mono Mix route in datasheet.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin a15a9af288 ASoC: alc5632: Rename capture switches to common scheme XXX2REC
Rename capture switches to common scheme XXX2REC.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 0a2c056e55 ASoC: alc5632: Add voice DAC playback switch
Add voice DAC playback switch.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 39be1aff50 ASoC: alc5632: Fixed voice DAC volume step.
Remove extra zero from volume step in DECLARE_TLV_DB_SCALE macro.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 7fb7528acb ASoC: alc5632: Coding style. Remove two extra empty lines.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:53 +00:00
Mark Brown b803422979 ASoC: wm8993: Add register default for INPUTS_CLAMP
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 20:51:53 +00:00
Julia Lawall 830eb8767d ASoC: mxs-saif: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 20:21:05 +00:00
Mark Brown e2da26778c ASoC: wm8993: Correct typos in regmap conversion
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 18:10:30 +00:00
Axel Lin 625136eb4a ASoC: Fix build error in sound/soc/omap/n810.c
Fix below build error which is introduced by
commit 022658 "ASoC: core: Add support for DAI and machine kcontrols".

  CC [M]  sound/soc/omap/n810.o
sound/soc/omap/n810.c: In function 'n810_set_input':
sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this function)
sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported only once
sound/soc/omap/n810.c:194: error: for each function it appears in.)
sound/soc/omap/n810.c:188: warning: unused variable 'card'
make[3]: *** [sound/soc/omap/n810.o] Error 1
make[2]: *** [sound/soc/omap] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 11:38:00 +00:00
Masanari Iida 1f5ff88327 ASoC: Fix typo in twl4030.c
Correct spelling "memroy" to "memory" in
sound/soc/codecs/twl4030.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 23:03:52 +00:00
Mark Brown a08a499aa3 Linux 3.3-rc3
.. the number of the half-beast?
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPMzv8AAoJEHm+PkMAQRiGgeYIAJxxGCxSMLRIiPaGRmQbWifs
 eE3z6AUWitGfYvhmYdWVz+C/aa4pPCVWr3bAFxUQhu+ESmiFIiqiefvlTRf5f84e
 pcoJFobkFfhtK4gLvUr75WxXDFq/1HhKqW1OLzIW4gQsnhMdjGJ3lLK6ZoRYH8h4
 cGoN3DRII9mVLFcB2sgbeRvbQBA/O4n0aOQ2ryZkCcPQQMIKhR/rUEEV2pe/ovHE
 rumQgI3PVey816P4e5YnOvrEAllFZlaZ/F0ClJgNdfeQCVTZx9KNRbiNxHi6fcC5
 6Zgg7e5EvQTAy7QqQZ0hmS4k4CFmnswX3Nm+ZabRNqBdLSjPEDD9hk1o1dodYCg=
 =BBLC
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc3' as we've got several bugfixes in there which are
colliding annoyingly with development.

Linux 3.3-rc3

.. the number of the half-beast?

Conflicts:
	sound/soc/codecs/wm5100.c
	sound/soc/codecs/wm8994.c
2012-02-09 12:00:22 +00:00
Kuninori Morimoto 1987877d86 ASoC: fsi: fixup fsi_pointer() calculation method
current fsi_pointer() calculation was not correct for FSI driver.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 10:50:53 +00:00
Mark Brown 17c0cee96f ASoC: wm2200: Ignore pmdown_time
The device is generally not succeptible to the issues that cause this to
be an issue.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 10:43:15 +00:00
Mark Brown a5d3a21a9a ASoC: twl6040: Move ignore_pmdown_time to driver struct
It's set unconditionally.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2012-02-09 10:43:10 +00:00
Mark Brown 5124e69e2b ASoC: core: Allow CODECs to set ignore_pmdown_time in the driver struct
This is usually not a use case dependant flag anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-09 10:42:56 +00:00
Mark Brown b5d1d036ea ASoC: pcm: If pmdown_time is zero then shut down DAPM immediately
Since we've already got logic to special case immediate teardown of the
stream we may as well use it if the pmdown_time has been set to zero by
the application layer instead of scheduling a work item with zero delay.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-09 10:42:55 +00:00
Mark Brown a7c4183be2 ASoC: wm8994: Disable line output discharge prior to ramping VMID
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-08 19:52:00 +00:00
Mark Brown f647e1526f ASoC: wm8994: Fix typo in VMID ramp setting
The VMID ramp rate is supposed to be 0x3, not 11b. Fix that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-08 19:51:53 +00:00
Mark Brown 4c6c0b5eee ASoC: wm8962: Support mono playback and record
Make sure we generate enough BCLKs for I2S style modes by always having
a minimum of two channels worth of clocks for the BCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-08 19:49:54 +00:00
Axel Lin 6d6761aa9b ASoC: Convert kirkwood-openrd to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:40:53 +00:00
Axel Lin 49915a54f0 ASoC: Convert kirkwood-t5325 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:40:52 +00:00
Mark Brown dc9c745437 ASoC: wm_hubs: Convert most output drivers to OUT_DRV widgets
No practical impact but now we have the control type we may as well use
it for the slightly nicer sequencing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:03:00 +00:00
Mark Brown 6035bbcfc0 ASoC: tlv320aic3x: Remove even more unused code
Now that we're not implementing GPIO or microphone detection support
there's no users for the read() function any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2012-02-07 11:17:58 +00:00
Mark Brown 87092e3ca4 ASoC: wm8994: Bring WM8994 accessory detection up to date
Make the mechanism used for WM8994 more like that for WM1811 and WM8958:
provide the logic to distinguish between headphone and headset and hard
code the reporting of sensible SND_JACK values. Should integration with
other detection mechanisms be required we can add appropriate callbacks
(though some integrations should be able to use the subsystem ones).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:19 +00:00
Mark Brown 27060b3c64 ASoC: wm8994: Unsuspend the device while reading GPIO statuses
Otherwise we might get an error if the GPIO is configured as an input
since that makes the register volatile and a suspended device can't be
read from.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:18 +00:00
Mark Brown 5fab517476 ASoC: wm8994: We don't need to runtime resume by default
This is the default state that the runtime PM infrastructure expects so
instead just kick the runtime PM core to suspend us if we're not doing
anything (as is default).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:01 +00:00
Liam Girdwood 14ac91126b ASoC: max9768: Fix build and use new add control API.
Fix build breakage by using the correct API call to add kcontrols.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:52:16 +00:00
Felipe Contreras 24cace30c5 ASoC: tlv320aic3x: remove unused code
Looks like nobody is or will be using this code.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:44:50 +00:00
Liam Girdwood 612a3fec21 ASoC: dapm: Clean up header information.
Fix some spelling mistakes in the header and remove the todo items. Most
todo items are now available as kcontrol options now anyway.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:36:15 +00:00
Liam Girdwood 40f02cd9f2 ASoC: dapm: Export mixer|mux_update_power() to public API.
Allow for the operation of custom mixer and mux DAPM widgets that can call
snd_soc_dapm_mixer_update_power() and snd_soc_dapm_mux_update_power() directly
after updating their status. This is useful with complex DAPM Mixer operations
where we need to do additional work in addition to setting a few mixer register
bits.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:17:01 +00:00
Mark Brown 839e5fadc6 ASoC: wm8994: Don't bring up to STANDBY by default
In cases where we should enter STANDBY DAPM will power us up, otherwise
there is no need to power up and we can remain in OFF.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 14:05:27 +00:00
Mark Brown 654a28c9dc ASoC: samsung: Enable accessory detect for WM8994 on Littlemill
The WM8994 has a different accessory detect architecture, call its setup
function too. We ignore the errors and the driver will check for chip type
so it's safe to call the setup functions for both architectures.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 14:04:51 +00:00
Mark Brown db966f8abb ASoC: wm8994: Enabling VMID should take a runtime PM reference
We can enable VMID independently of the bias in some use cases so we need
to ensure that the core device is powered up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-06 12:08:33 +00:00
Liam Girdwood 022658beab ASoC: core: Add support for DAI and machine kcontrols.
Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.

This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-

snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()

This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().

It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().

Finally, it updates the existing machine drivers that register controls to either :-

1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.

In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04 12:40:11 +00:00
Kuninori Morimoto 83344027ca ASoC: fsi: add .init/.quit handler support
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto fec691e73b ASoC: fsi: PortA/B information was controlled by sh_fsi_port_info
Current FSI got each PortA/B parameter by porta_flags/portb_flags from platform.
And .set_rate function was shared for PortA/B.
This structure was not readable and not flexible.
This patch adds sh_fsi_port_info, and its own settings was added on each platform.
it is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 97df81873e ASoC: fsi: fsi_stream_is_working() care substream->runtime
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 180346ede3 ASoC: fsi: add .start_stop handler to fsi_stream_handler
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 938e2a8da5 ASoC: fsi: don't use is_play as a parameter of fsi functions
is_play should be kept as local valuable.
it prepare cleanup for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 1b0ca1a0c0 ASoC: fsi: tidyup: fsi_pio_xxx() are gathered
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 5e97313ac4 ASoC: fsi: add fsi_stream_handler and PIO handler
This patch adds struct fsi_stream_handler and defined fsi_pio_push/pop_handler.
these are controled by fsi_steam_xxx() function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 7b1b3331e6 ASoC: fsi: use fsi_stream in fsi_get_current_fifo_samples() parameter
fsi_get_current_fifo_samples() uses fsi_stream instead of is_play.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto a449e46754 ASoC: fsi: re-define fsi_is_play() and fsi_stream_is_play()
This patch re-define fsi_is_play() and fsi_stream_is_play().
fsi_data_pop/push() function keeps direct value of "is_play" at this point,
but it will be removed soon.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 95b0cf0597 ASoC: fsi: modify fsi_pio_get_area() parameter and using position
This patch modify fsi_pio_get_area() parameter to use
struct fsi_stream, and used it on fsi_fifo_data_ctrl().
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 8c4152951c ASoC: fsi: rename fsi_stream_push/pop() to fsi_stream_init/quit()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 41bba15193 ASoC: fsi: remove unnecessary parameter from fsi_hw_shutdown()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto b49e802781 ASoC: fsi: tidyup: move fsi_fifo_init() onto fsi_hw_startup()
fsi_fifo_init() is called only from fsi_hw_startup()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto d78629e2a4 ASoC: fsi: rename fsi_dma_soft_xxx() to fsi_pio_xxx()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto 376cf38a90 ASoC: fsi: data push/pop calculation part was divided
Next transfer data size of "push" and "pop" had calculated on shared function.
But it was not readable code.
This patch divided it into for push, and for pop.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto 4e62d84d9d ASoC: fsi: tidyup: fsi_stream_xx() functions were gathered
This patch gathered fsi_stream_xxx() functions in order to make it readable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto c1e6f10ea9 ASoC: fsi: reduce runtime calculation by using pre-setting
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Leon Romanovsky 9f71770b88 ASoC: tegra: Remove unused DAPM route structure.
All DAPM routes are configured via device tree, and there is no need in
DAPM route structures in board file.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02 22:27:52 +00:00
Leon Romanovsky d559f1e5ad ASoC: Tegra+ALC5632: Enable headset autodetection on PAZ00 board.
This patch is adding device tree support of headset autodetection on PAZ00 board.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02 22:27:52 +00:00
Mark Brown 25bfe662e8 ASoC: pcm: Improve error logging
Use the standard logging macros and use dev_ variants where we can, also
reporting error codes whenever we report an error. These changes (the
error codes in particular) make it noticeably easier to figure out what
went wrong just from the basic dmesg output.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-02 14:14:17 +00:00
Mark Brown 43b6cec27e ASoC: wm_hubs: Correct line input to line output 2 paths
The second line output mixer has the controls for the line input bypasses
in the opposite order.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-01 23:55:56 +00:00
Axel Lin bc6c117ef0 ASoC: Convert afeb9260 to table based DAPM init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 21:52:54 +00:00
Axel Lin 5813db970d ASoC: Use dai_fmt in afeb9260 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 21:52:54 +00:00
Lars-Peter Clausen 980b0bc692 ASoC: blackfin: Use dai_fmt
Use the dai_link's dai_fmt attribute to setup the DAI format instead of doing
this manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 18:29:19 +00:00
Mark Brown 471280b715 ASoC: wm9712: Add TLV information for microphone input
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 12:54:12 +00:00
Mark Brown f3bafaa096 ASoC: wm9712: Remove driver specific version
I don't think it's been updated since the driver was merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 12:54:12 +00:00
Axel Lin 44bed4838d ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:42:24 +00:00
Mark Brown 2633f73647 ASoC: wm5100: Handle failures to determine accessory polarity
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:31:12 +00:00
Mark Brown 24e0c57b8e ASoC: wm8996: Use devm_regulator_bulk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:17:34 +00:00
Mark Brown 4a086e4cc4 ASoC: wm8996: Switch to using common code for managing CPVDD supply
Nice code saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:17:24 +00:00
Mark Brown 177f72fd10 Linux 3.3-rc2
.. several days delayed. No reason, I just didn't think of it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPKF4KAAoJEHm+PkMAQRiGw/YH+wXg2DpZUuHeBK52zMGlJBPc
 DzX11/Uan3Y07gM0JbDzuVxwjX4vdxR2bV6r1qsLP8JEUnE8jyFC32DBGi5WAht7
 F4KU/Uov2Ds5/wzvY4Iuo01C+JftQHXuy/Sbhck1d0LI0yjLejRaw+zuJv0x2/eS
 7YqV+KTGE1lDuJs/Gyq1Vqr1g9831AuS1tv/g3gaqBuN6TcPBFCocaVxzwrUc+y6
 94h26XbbOhQRIz38oqUkiqAGnvYS61ocyBcEiRHf0dXkNSDIINqlgukvd7YTXouA
 jj/w/DWpMRcQuYAgqkrurr9+yWC9hVQcsvvQ5sAQnIPcxoR868sg1pO8Oheq+1g=
 =kUzV
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc2' into for-3.4

A reasonable amount of new development is causing fiddly merge conflicts
between different resource management changes (mostly fixing bugs in
resource management due to noticing things while doing enhancements in
the same area).

Linux 3.3-rc2

.. several days delayed. No reason, I just didn't think of it.
2012-02-01 10:08:15 +00:00
Susan Gao 2b6712b195 ASoC: wm8962: Fix word length configuration
Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-01 10:07:20 +00:00
Leon Romanovsky b4dc0a75af ASoC: Tegra+ALC5632: Implement device tree support in board file
This patch implements device tree support for Tegra boards with ALC5632
codec.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 19:34:48 +00:00
Mark Brown f959dee9c7 ASoC: wm_hubs: Push check for idle_bias_off out into drivers
For later wm_hubs devices we have much less need to keep the biases up
even when using single ended line outputs so flag idle_bias_off for
everything except the WM8993 and WM8994.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 19:29:58 +00:00
Mark Brown 5aa44b132e ASoC: core: Support suspend to disk
Use the same pm_ops for all system suspend and resume paths. This isn't
ideal for suspend to disk with older CODECs as we'll suspend and then
resume the CODEC before powering off all of which takes a long time due
to VMID ramps but it's very simple to implement and for modern CODECs the
overhead should be minimal.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-31 19:29:37 +00:00
Mark Brown 125a25da57 ASoC: core: Better support for idle_bias_off suspend ignores
If an idle_bias_off device is in any state other than off then it is still
active for some reason (typically a low power function such as accessory
detection). This wasn't an issue when the feature was implemented as we
always went to _ON for any active function, subsequent power improvements
have changed things.

With the modern way of doing things we should overhaul the infrastructure
to allow devices to explicitly take references for these functions but
that's a much more invasive change and will require driver updates to
deploy, this will bring the framework into line with the existing driver
set before we do that work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-31 19:29:07 +00:00
Mark Brown 489773c223 ASoC: wm8993: Convert to use a regmap patch
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 15:25:12 +00:00
Mark Brown 67f97f5c3e ASoC: wm8994: Remove ASoC level register cache sync
Now we've switched over to regmap the ASoC level cache sync will be
ineffectual and potentially harmful as there is no longer an ASoC level
cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 15:24:58 +00:00
Mark Brown ee76744c51 ASoC: wm_hubs: Fix routing of input PGAs to line output mixer
IN1L/R is routed to both line output mixers, we don't route IN1 to LINEOUT1
and IN2 to LINEOUT2.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-31 11:56:39 +00:00
Mark Brown bc122e3446 ASoC: fsi: Remove unneeded empty runtime PM callbacks
The runtime PM core no longer requires any callbacks so don't provide
empty ones for it any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 11:16:12 +00:00
Mark Brown 69edea8a50 ASoC: max9768: Fix up review comments in max9768 driver
The Mute Switch should be called Playback Switch to match the volume
and the regmap core has been updated so we don't need to mark all the
registers as non-volatile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
2012-01-31 11:15:46 +00:00
Wolfram Sang 394d2bbae3 ASoC: max9768: add driver for max9768 amplifier
Add a driver supporting the volume control and the mute pin. Shdn pin
and DAPM are not taken care of yet.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-30 21:50:55 +00:00
Denis 'GNUtoo' Carikli 1ae5cbc52e ASoC: neo1973_wm8753: remove references to the neo1973-gta01 machine
The Openmoko GTA01 machine has been removed from the machine ID database,
  so we need to remove references to it as well.

Without that fix we have:
  sound/soc/samsung/neo1973_wm8753.c: In function ‘neo1973_wm8753_init’:
  sound/soc/samsung/neo1973_wm8753.c:325:2: error: implicit declaration of function ‘machine_is_neo1973_gta01’

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-30 13:22:13 +00:00
Sascha Hauer c0fa6c8af7 ASoC: i.MX: Add missing dma_async_issue_pending
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-01-30 14:34:11 +05:30
Mark Brown ffa8d9df55 ASoC: wm2200: Remove trailing whitespace
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-29 21:45:31 +00:00
UK KIM 114395c61a ASoC: wm_hubs: fix wrong bits for LINEOUT2 N/P mixer
Signed-off-by: UK KIM <w0806.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-27 20:25:47 +00:00
Mark Brown 2693efd660 ASoC: wm8962: Enable idle_bias_off
The WM8962 has ground referenced and class D outputs so can happily go
down to BIAS_OFF without a large startup time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-27 20:18:55 +00:00
Axel Lin eb3032f8b9 ASoC: Set idle_bias_off flag in snd_soc_codec_driver
Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-27 11:22:05 +00:00
Mark Brown 77231abe55 ASoC: wm_hubs: Enable line out VMID buffer for single ended line outputs
For optimal performance the single ended line outputs require that the
line output VMID buffer be enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-26 18:58:00 +00:00
Mark Brown 7c08b51f2f ASoC: wm8994: Report any low impedance accessory as a headphone
Report any accessory with a low impedance as a headphone, previously
anything other than a short or microphone would not be reported at all.
The most likely reason is a microphone with incorrect polarity.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:41:03 +00:00
Mark Brown d7b3557077 ASoC: wm8996: Handle failures to determine accessory polarity
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:40:55 +00:00
Mark Brown 62c1c40127 ASoC: wm5100: Use pm_runtime for powerdown managment
Using pm_runtime to decide if the device should go into full power down
has the dual advantage of allowing easier integration with non-DAPM
reasons to power on the device (like the FLL) and allowing userspace to
control the final power down which is useful for tuning retention of
DSP firmware.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:39:24 +00:00
Mark Brown 17e3e57b65 ASoC: wm5100: Convert to devm_regulator_bulk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:37:08 +00:00
Mark Brown afe62367e0 ASoC: dapm: Ignore isolated signal generators for power purposes
A signal generator has no power control itself and so shouldn't cause a
power up of the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:22:53 +00:00
Mark Brown fb644e9ce0 ASoC: dapm: Drop runtime PM references asynchronously
We don't really care if any action is taken immediately so let the PM
core defer things if it wants to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:22:45 +00:00
Mark Brown d5315a23cc ASoC: wm2200: Add WM2200 CODEC driver
The WM2200 is a low power mobile CODEC with enhanced Wolfson myZone
Ambient Noise Cancellation (ANC) intended for mobile telephony
applications.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:07:55 +00:00
Mark Brown 1cf733569e ASoC: wm5100: Move regulator supplies over to DAPM infrastructure
Saves a nice block of code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:07:55 +00:00
Mark Brown 62ea874abc ASoC: Provide REGULATOR_SUPPLY widget type
Modern devices allow systems to enable and disable individual supplies on
the device, allowing additional power saving by switching off regulators
which power portions of the device which are not currently in use. Add a
new SND_SOC_DAPM_REGULATOR_SUPPLY widget type factoring out the code for
managing such widgets from individual drivers.

The widget name will be used as the supply name when requesting the
regulator from the regulator API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-26 16:07:54 +00:00
Peter Ujfalusi 6b21ed8516 ASoC: Kconfig: OMAP4: Enable support for PandaBoards
Enable ASoC audio support for OMAP4 based machines with
twl6040 codec via the omap-abe-twl6040 machine driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:58 +02:00
Peter Ujfalusi 62ba98ce4a ASoC: omap-abe-twl6040: Use provided MCLK frequency from pdata
Avoid using hardwired configuration for MCLK frequency.
Different board design might use other MCLK frequency.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:53 +02:00
Peter Ujfalusi 4ca07cb0cf ASoC: omap-abe-twl6040: Configure card according to platform data
Disable the not connected pins on the board based on the
received platform data.
DO not register the jack function on boards, which does not have
means to detect it (jack is always connected).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:52 +02:00
Peter Ujfalusi 8d946dd7dc ASoC: omap-abe-twl6040: DAI link selection based on platform data
We can have machines without DMIC connected. In this case there is
no need to create amother (unusable) capture PCM on the card.
The existence of the DMIC connection can be checked via
pdata->has_dmic.
Select the correct dai_link structure for the card based on
pdata->has_dmic.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:49 +02:00
Peter Ujfalusi b320883910 ASoC: omap-abe-twl6040: Add complete DAPM routing
SDP4430 is a reference platform, and as such it has all possible
audio routing implemented.
Correct the DAPM routing to be complete.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:46 +02:00
Peter Ujfalusi 778cee7afd ASoC: twl6040: Convert MICBIAS to SUPPLY widget
In order to avoid breakage change the omap-abe-twl6040
machine driver's routing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:43 +02:00
Peter Ujfalusi d1be1d2fd1 ASoC: omap-abe-twl6040: Convert to platform deriver
Convert the OMAP4 ABE/TWL6040 machine driver to platform
driver.
For the card name use the string provided via platform data.
The card's name for OMAP4 SDP4430 has been changed:
SDP4430 -> OMAP4-SDP4430

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:13 +02:00
Peter Ujfalusi 13f81d6595 ASoC: omap-abe-twl6040: Correct internal prefix, Kconfig entry
Change the internal prefixes within the driver from sdp4430.
At he same time correct the Kconfig text as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:05 +02:00
Peter Ujfalusi e15422edd4 ASoC: OMAP4: Rename the sdp4430 machine driver
The same machine driver will support other boards
with similar audio configuration (OMAP4, ABE, twl6040).
Rename the driver to have more generic name.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:47 +02:00
Peter Ujfalusi 8747a6b7d5 ASoC: sdp4430: Correct author e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:44 +02:00
Mark Brown 5c1b136b7b ASoC: wm5100: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:18:05 +00:00
Mark Brown 5539a10288 ASoC: wm8962: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:17:29 +00:00
Mark Brown 1b76d2ee40 ASoC: wm8996: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:17:28 +00:00
Mark Brown a188fcba73 ASoC: wm5100: Fix microphone configuration
We need to write the configuration for each microphone to a different
register.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-25 18:20:21 +00:00
Mark Brown 9fb83526a8 ASoC: wm5100: Make sure we switch to button reporting mode
When we have identified an accessory make sure we've flagged that we've
done so in order to make sure we always report buttons and don't continue
to polarity flip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 15:35:40 +00:00
Peter Ujfalusi 88e339541d ASoC: soc-pcm: msbits constraint: Drop 8 and 16 bit sample sizes
As per discussion we can safely ignore the 8 and 16 bit sample
sizes when applying the msbits constraint.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 11:17:16 +00:00
Mark Brown 182c51ce79 ASoC: wm8962: Optimise power consumption for IN4 DC measurement usage
When the hardware is configured with one or both of the IN4 inputs used
for DC measurement (with no DC blocking capacitor connected) then we can
improve power consumption slightly in idle modes by applying a register
write sequence. Provide platform data to enable this, implemented using
a regmap patch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 21:19:45 +00:00
Mark Brown 5509f2f80c ASoC: wm5100: Fix warnings from recent patches
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 19:51:34 +00:00
Mark Brown 15b52f10ec ASoC: Convert the WM5100 revision A updates to a regmap patch
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 19:48:39 +00:00
Mark Brown e8770dd878 ASoC: wm5100: Fix mismerge of IRQ frees
We only want them at the device level, not at the CODEC level.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 12:11:20 +00:00
Mark Brown 05d448e2c9 ASoC: Convert WM8731 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 11:43:18 +00:00
Jesper Juhl c83f1d7e71 ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error
In wm2000_i2c_probe(), if we take the true branch in

"
  ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000,
                               NULL, 0);
  if (ret != 0)
          goto err_fw;
"

then we'll release_firmware(fw) at the 'err_fw' label. But we've already
done that just a few lines above. That's a use-after-free bug.

This patch restructures the code so that we always call
release_firmware(fw) before leaving the function, but only ever call
it once.
This means that we have to initialize 'fw' to NULL since some paths
may now end up calling it without having called request_firmware(),
but since request_firmware() deals gracefully with NULL pointers, we
are fine if we just NULL initialize it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 11:34:19 +00:00
Jesper Juhl 7edf1a4f27 ASoC: wm8958: Use correct format string in dev_err() call
To print a value of type size_t one should use %zd, not %d.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 21:10:22 +00:00
Axel Lin 5091f5b797 ASoC: Add __devinit/__devexit annotations at necessary places
Fix below build warning when CONFIG_HOTPLUG is not set.

  CC      sound/soc/codecs/alc5623.o
sound/soc/codecs/alc5623.c:1062: warning: ‘alc5623_i2c_remove’ defined but not used
  CC      sound/soc/codecs/alc5632.o
sound/soc/codecs/alc5632.c:1112: warning: ‘alc5632_i2c_remove’ defined but not used

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 10:21:16 +00:00
Mark Brown 5e0ac527fd ASoC: sgtl5000: It's sgtl5000 not sgtl500
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 10:16:31 +00:00
Fabio Estevam 8998963796 ASoC: sgtl5000: Convert to table based DAPM and control init
Convert to table based DAPM and control init.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-22 21:55:03 +00:00
Mark Brown a14304edcd ASoC: wm8996: Call _POST_PMU callback for CPVDD
We should be allowing a 5ms delay after the charge pump is started in
order to ensure it has finished ramping.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-22 16:14:06 +00:00
Mark Brown 82fa367057 ASoC: wm8988: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 23:28:22 +00:00
Mark Brown dd21353f35 ASoC: wm8988: Convert to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 23:28:22 +00:00
Mark Brown 411a3450c9 ASoC: wm8985: Convert to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:42 +00:00
Mark Brown 9f8cbae416 ASoC: wm8985 Don't directly reference the cache data structure
In preparation for conversion to regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:41 +00:00
Mark Brown 8b71d441f7 ASoC: wm8985: Use standard cache sync implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:41 +00:00
Mark Brown eb8f7693df ASoC: wm8985: Convert to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:40 +00:00
Mark Brown a1fea9404f ASoC: wm8985: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:40 +00:00
Javier Martin 78adaeb2ae ASoC: Add external amplifier controls for Visstrim_M10.
Visstrim_M10 has an external class D amplifier.
This patch provides support for controlling the 4
possible gain levels and per channel muting.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:39 +00:00
Mark Brown 3a4cbf8896 ASoC: Fix build of tlv320dac33
The problem was introduced due to the obscure formatting some of the
older drivers use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:38 +00:00
Mark Brown 8a713da8d1 ASoC: Use regmap update bits operation for drivers using regmap
If a driver is using regmap directly ensure that we're coherent with
non-ASoC register updates by using the regmap API directly to do our
read/modify/write cycles. This will bypass the ASoC cache but drivers
using regmap directly should not be using the ASoC cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:38 +00:00
Mark Brown 278047fd65 ASoC: Don't tell applications about msbits unless we're ignoring input
On the off chance that an application both pays attention and gets
confused.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:37 +00:00
Fabio Estevam 6b35f924b8 ASoC: mxs: Fix mxs-saif timeout
On a mx28evk board the following errors happens on mxs-sgtl5000 probe:

[    0.660000] saif0_clk_set_rate: divider writing timeout
[    0.670000] mxs-sgtl5000: probe of mxs-sgtl5000.0 failed with error -110
[    0.670000] ALSA device list:
[    0.680000]   No soundcards found.

This timeout happens because clk_set_rate will result in writing to the DIV bits
of register HW_CLKCTRL_SAIF0 with the saif clock gated (CLKGATE bit set to one).

MX28 Reference states the following about CLKGATE:

"The DIV field can change ONLY when this clock gate bit field is low."

So call clk_prepare_enable prior to clk_set_rate to fix this problem.

After this change the mxs-saif driver can be correctly probed and audio is functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 18:38:44 +00:00
Mark Brown 09452f23eb ASoC: Push WM5100 interrupt request into I2C probe
This is more what the device model wants us to do and will allow use by
non-audio functions before the audio part of the device has come up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Mark Brown 46c1a877c6 ASoC: Make WM5100 interrupt path use regmap directly
This will allow us to move the interrupt allocation out of the ASoC part
of the driver and simplifies the locking by removing any reliance in the
bulk of the interrupt path on the big CODEC lock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Mark Brown 218240e27f ASoC: Remove redundant set_bias_level() from WM5100 remove()
The framework should bring the device down before it calls the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Peter Ujfalusi b4badd4960 ASoC: omap-mcpdm: Set 24msbits constraint
McPDM internal FIFO is 24 bit wide. From the 32 bit sample
8 bit is discarded. Let application know about this
via msbits constraint.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 7df6f2551f ASoC: omap-dmic: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 8819f65cec ASoC: twl4030: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 8d725b2bcb ASoC: tlv320dac33: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Fabio Estevam f2c6e757f6 ASoC: sgtl5000: Print revision number in hex
Throughout the sgtl5000 driver source code and also in the sgtl5000 datasheet
the revision code is shown in hexadecimal.

Print it hex format, for consistency.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Mark Brown 0132615da5 ASoC: Say we can't read WM5100 ID register
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 2688738eba ASoC: When releasing WM5100 put /RESET into reset
Reset is active low, make sure we leave it asserted when release the
device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 99b0292d94 ASoC: 24 bits are significant on wm_hubs DAIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 85f883933c ASoC: Make WM8993 I2C usage unconditional
The WM8993 only supports I2C so don't ifdef the I2C support in the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 164548d3b3 ASoC: Implement basic WM8993 interrupt support
If an interrupt is supplied then use it for thermal warning and FLL lock
notifications. When using the interrupt raise the timeout for the FLL lock
substantially to reduce the chances of spurious warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown a4b5233792 ASoC: 24 bits are significant on the WM8996 audio interfaces
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 58ba9b2545 ASoC: Allow drivers to specify how many bits are significant on a DAI
Most devices accept data in formats that don't correspond directly to
their internal format. ALSA allows us to set a msbits constraint which
tells userspace about this in case it finds it useful (for example, in
order to avoid wasting effort dithering bits that will be ignored when
raising the sample size of data) so provide a mechanism for drivers to
specify the number of bits that are actually significant on a DAI and
add the appropriate constraints along with all the others.

This is done slightly awkwardly as the constraint is specified per sample
size - we loop over every possible sample size, including ones that the
device doesn't support and including ones that have fewer bits than are
actually used, but this is harmless as the upper layers do the right thing
in these cases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-20 13:58:29 +00:00
Mark Brown 5f52ee4875 ASoC: Add WM8962 DAC and ADC L/R swap support
Simple switches since there's no per-channel control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Dimitris Papastamos d19fd5db3e ASoC: wm8983: Remove useless snd_kcontrol
This must be a leftover from a previous driver.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Axel Lin b33005f3ef ASoC: jz4740: Convert qi_lb60 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Mark Brown cef6d1d450 ASoC: Convert WM8962 register access map to modern style
Much more compact, both in terms of source and especially in terms of
RAM used at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:28 +00:00
Javier Martin a6b44f1636 ASoC: Route Mic Bias in Visstrim_M10 board.
Visstrim_M10 board uses an external microphone
that can be enabled/disabled by the user

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:28 +00:00
Ryan Mallon 44fb864b8f ep93xx: Don't use system controller defines in audio drivers
Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Mark Brown 291d64be31 ASoC: Make WM8962 I2C usage unconditional
We only support I2C so no need to ifdef.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Manjunath Hadli 2e932f2940 ASoC: CQ93VC: remove machine specific header file inclusion from codec driver
remove unnecessary inclusion of machine specific header
file mach/dm365.h from cq93vc.c voice codec driver
which comes in the way of platform code consolidation.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Liam Girdwood 7aca69f9fe ASoC: utils - Add support for a dummy codec driver.
This is useful to create dummy codec devices where we need to have some
DAI links without a real Codec. e.g. could be used to represent dumb FM,
MODEM, etc

This is also used by dynamic PCM for DAI links that have no codec.

Signed-off-by: Liam Girdwood <lrg@ti.com>
[Fixed the indentation -- broonie]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Liam Girdwood 08656910bb ASoC: twl6040 - add method to query HS DC offset step size in mV
Provide a method for mach drivers to query the HS DC offset step size in mV.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Mark Brown 9b85fc9063 ASoC: Optimise performance of WM8904 ADC 128fs OSR mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Liam Girdwood 3b09bb820d ASoC: core - Improve card registration error messaging for large DAI links.
Print out the offending DAI link entry when a naming error occurs. Makes
thing easier to debug for machines with a large number of DAI links.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Joachim Eastwood 350e16d529 ASoC: replace 0xffffffff with DMA_BIT_MASK macro
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Joachim Eastwood 6296914cce ASoC: use proper defines for stream directions in pcm engines
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 3294c4c603 ASoC: Convert WM8955 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 95860fdf0f ASoC: Convert WM8955 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 9887cb9e65 ASoC: Use standard register cache sync for WM8955
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown ba5c88d02d ASoC: Convert WM8955 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 1e9c898df0 ASoC: Make I2C usage unconditional in WM8955
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 42dad0d84a ASoC: Convert WM8940 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown b5531205f5 ASoC: Make I2C usage unconditional in WM8940
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 84d0d83180 ASoC: Convert WM8904 to direct regmap API usage
The device has a very sparse register map so should benefit from using a
rbtree cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 274eb8f9d8 ASoC: Use standard cache sync for WM8904
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 93e26d4e44 ASoC: Convert wm8904 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown 429440c947 ASoC: Make WM8904 I2C usage unconditional
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown 891271c28f ASoC: Convert wm8804 to direct regmap API usage
The register map for this device is actually fairly sparse so the rbtree
should be beneficial.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown f649f1a8aa ASoC: Convert wm8804 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown e055cd67fd ASoC: Use standard cache sync for wm8804
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown c2562a8e3b ASoC: Remove wm8974 private data
It's only ever referenced when being allocated and freed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown a2bd691c64 ASoC: Convert wm8974 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 7a389651bd ASoC: Make wm8974 I2C usage unconditional
The driver only supports I2C at present.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 028b0a0a92 ASoC: Convert wm8971 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown c4850644ce ASoC: Convert wm8971 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 542cc361de ASoC: Make WM8971 I2C usage unconditional
The driver only supports I2C so no need to worry about SPI only systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown d3398ff059 ASoC: Convert WM8753 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown bfea3abb80 ASoC: Move WM8993 resource acquisition and device reset to bus probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown d0ad0af043 ASoC: Convert wm8993 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 391d9e4e5c ASoC: Move WM9090 device identification and reset to I2C probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown ec2c0fec11 ASoC: Convert WM9090 to use regmap directly
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 008f8d4f99 ASoC: Push wm8978 reset down into the I2C probe
Ensures that we get control of the CODEC earlier and don't try to probe
the card at all if register I/O isn't working.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ee60d0155d ASoC: Convert wm8978 to direct regmap API usage
Helps push the register cache code down out of ASoC and improves resume
times by using the more efficient regmap cache sync code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown f98692ea6d ASoC: Use standard cache sync for WM8978
Saves a bit of code and supports further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 623105dc97 ASoC: Convert wm8978 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 803b37885d ASoC: Convert wm8978 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ad6cdec507 ASoC: Remove unused control type from wm8978 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown 0d6df67583 ASoC: Make WM8978 I2C usage unconditional
The driver only supports I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown fed2200711 ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK
With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:34 +00:00
Mark Brown 495174a8ff ASoC: Don't go through cache when applying WM5100 rev A updates
These are all to either uncached registers or fixes to register defaults,
in the former case the cache won't do anything and in the latter case
we're fixing things so the cache sync will do the right thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Mark Brown e53e417331 ASoC: Mark WM5100 register map cache only when going into BIAS_OFF
Writing to the registers won't work if we do actually manage to hit a fully
powered off state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Wolfram Sang 0c93a167a6 ASoC: tlv320aic32x4: always enable analouge block
Register LDOCTLEN must always be initialized to clear the analog power
control bit, otherwise the analog block will stay deactivated.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Wolfram Sang 01b37e94c0 ASoC: tlv320aic32x4: always enable dividers
Dividers (such as MDAC) are always needed, independent of the codec
being I2S master or slave. Needed on a custom board where the codec has
to be slave.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Zeng Zhaoming bb362e2e4f ASoC: sgtl5000: Fix wrong register name in restore
Correct SGTL5000_CHIP_CLK_CTRL to SGTL5000_CHIP_REF_CTRL in
sgtl5000_restore_regs(), and add comment to explain the
restore order.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:32 +00:00
Tony Lindgren 967809bd7f Merge branch 'omap1-part2' into omap1
Conflicts:
	drivers/leds/leds-ams-delta.c
2012-01-20 05:31:52 -08:00
Linus Torvalds 9278e634b4 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: Wait for WM8993 FLL to stabilise
  ASoC: core - Free platform DAPM context at platform removal.
  ASoC: dapm - Fix check for codec context in dapm_power_widgets().
  ASoC: sgtl5000: update author email address
  ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
2012-01-18 12:53:36 -08:00
Linus Torvalds 57f2685c16 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
  ARM: mach-shmobile: specify CHCLR registers on SH7372
  dma: shdma: fix runtime PM: clear channel buffers on reset
  dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit
  dmaengine/ste_dma40: clear LNK on channel startup
  dmaengine: intel_mid_dma: remove legacy pm interface
  ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
  dmaengine: intel_mid_dma: error path fix
  dmaengine: intel_mid_dma: locking and freeing fixes
  mtd: gpmi-nand: move to dma_transfer_direction
  mtd: fix compile error for gpmi-nand
  mmc: mxs-mmc: fix the dma_transfer_direction migration
  dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
  dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels
  dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe
  dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
  dma: mxs-dma: fix a typo in comment
  DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
  video i.MX IPU: Fix display connections
  i.MX IPU DMA: Fix wrong burstsize settings
  dmaengine/ste_dma40: allow fixed physical channel
  ...

Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c}

The conflicts looked pretty trivial, but I'll ask people to verify them.
2012-01-17 18:40:24 -08:00
Mark Brown 986b2f2c21 ASoC: Wait for WM8993 FLL to stabilise
Ensure the FLL is locked before we return from set_fll().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-17 16:48:27 +00:00
Linus Torvalds 5b3fcfed35 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm
* 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm:
  ARM: sa11x0: assabet: fix build warning
  ARM: Add arm_memblock_steal() to allocate memory away from the kernel
  ARM: 7275/1: LPAE: Check the CPU support for the long descriptor format
  ARM: 7274/1: NUC900: Rename nuc900-audio platform device to nuc900-ac97
  ARM: 7272/1: S3C24XX: Fix build error for missing <mach/system-reset.h>
  ARM: 7271/1: Fix typo in conversion of ARCH_NR_GPIOS to Kconfig
2012-01-16 15:34:44 -08:00
Liam Girdwood 675c496ba4 ASoC: core - Free platform DAPM context at platform removal.
Fix platform removal by freeing the platform DAPM resources and remove
it from the DAPM list.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:49:09 +00:00
Liam Girdwood e7c80e2a8b ASoC: dapm - Fix check for codec context in dapm_power_widgets().
Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context
has no codec.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:49:09 +00:00
Zeng Zhaoming f7cb8a4be1 ASoC: sgtl5000: update author email address
Update MODULE_AUTHOR email address.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:06:06 +00:00
Linus Torvalds 4964e0664c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
  MIPS: Delete unused function add_temporary_entry.
  MIPS: Set default pci cache line size.
  MIPS: Flush huge TLB
  MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
  MIPS: Octeon: Add support for OCTEON II PCIe
  MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
  MIPS: Alchemy: Update cpu-feature-overrides
  MIPS: Alchemy: db1200: Improve PB1200 detection.
  MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
  MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
  MIPS: Alchemy: irq: register pm at irq init time
  MIPS: Alchemy: Touchscreen support on DB1100
  MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
  net/irda: convert au1k_ir to platform driver.
  MIPS: Alchemy: remove unused board headers
  MTD: nand: make au1550nd.c a platform_driver
  MIPS: Netlogic: Mark Netlogic chips as SMT capable
  MIPS: Netlogic: Add support for XLP 3XX cores
  MIPS: Netlogic: Merge some of XLR/XLP wakup code
  MIPS: Netlogic: Add default XLP config.
  ...

Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile
2012-01-14 13:05:21 -08:00
Russell King 4de3a8e101 Merge branch 'master' into fixes 2012-01-13 15:00:22 +00:00
Axel Lin e37051dc7f ARM: 7274/1: NUC900: Rename nuc900-audio platform device to nuc900-ac97
This change ensures the platform device name matches nuc900-ac97 platform
driver name.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan Zongshun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-01-13 08:56:40 +00:00
Javier Martin 220d9f2595 ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
"snd_imx_pcm_hw_params" callback can be called
several times by the user (i.e. OSS emulation)
leading to a DMA channel leak.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-12 12:04:40 -08:00
Linus Torvalds a429638cac Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits)
  ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
  ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
  ALSA: usb-audio: add Yamaha MOX6/MOX8 support
  ALSA: virtuoso: add S/PDIF input support for all Xonars
  ALSA: ice1724 - Support for ooAoo SQ210a
  ALSA: ice1724 - Allow card info based on model only
  ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations
  ALSA: hdspm - Provide unique driver id based on card serial
  ASoC: Dynamically allocate the rtd device for a non-empty release()
  ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
  ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs
  ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
  ALSA: hda - Use auto-parser for HP laptops with cx20459 codec
  ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info()
  ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref()
  ALSA: hda/cirrus - support for iMac12,2 model
  ASoC: cx20442: add bias control over a platform provided regulator
  ALSA: usb-audio - Avoid flood of frame-active debug messages
  ALSA: snd-usb-us122l: Delete calls to preempt_disable
  mfd: Put WM8994 into cache only mode when suspending
  ...

Fix up trivial conflicts in:
 - arch/arm/mach-s3c64xx/mach-crag6410.c:
	renamed speyside_wm8962 to tobermory, added littlemill right
	next to it
 - drivers/base/regmap/{regcache.c,regmap.c}:
	duplicate diff that had already come in with other changes in
	the regmap tree
2012-01-12 08:00:30 -08:00
Takashi Iwai 29abceb67f Merge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc 2012-01-12 09:48:20 +01:00
Takashi Iwai d6b2450797 Merge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc into topic/asoc 2012-01-11 15:30:53 +01:00
Liam Girdwood e48b46ba16 ASoC: twl6040 - Add method to query optimum PDM_DL1 gain
The DL1 PDM interface adds a little gain depending on the output device.
Add a method to retrieve the gain value for machine driver usage.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-01-11 12:43:24 +00:00
Mark Brown 36ae1a96c4 ASoC: Dynamically allocate the rtd device for a non-empty release()
The device model needs a release() function so it can free devices when
they become dereferenced.  Do that for rtds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-10 14:53:56 -08:00
Axel Lin e4e9e05409 ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC
commit 739be96 "ASoC: Fix build dependency for SND_ATMEL_SOC_SSC"
introduces below build warnings:

drivers/misc/Kconfig:212:error: recursive dependency detected!
drivers/misc/Kconfig:212:       symbol ATMEL_SSC is selected by SND_ATMEL_SOC_SSC
sound/soc/atmel/Kconfig:9:      symbol SND_ATMEL_SOC_SSC is selected by SND_AT91_SOC_SAM9G20_WM8731
sound/soc/atmel/Kconfig:18:     symbol SND_AT91_SOC_SAM9G20_WM8731 depends on ATMEL_SSC

SND_ATMEL_SOC_SSC needs ATMEL_SSC to pass compilation.
This patch remove the "select ATMEL_SSC" from SND_ATMEL_SOC_SSC to avoid above
warnings. And then ensures all the machine drivers that select SND_ATMEL_SOC_SSC
need to depend on ATMEL_SSC.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-10 14:52:20 -08:00
Linus Torvalds 269d430131 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (40 commits)
  regulator: set constraints.apply_uV to 0 in of_get_fixed_voltage_config
  regulator: max8925: fix enabled/disabled judgement mistake
  regulator: add regulator_bulk_force_disable function
  regulator: pass regulator_register of_node in fixed voltage driver
  regulator: add regulator_force_disable() definition for !CONFIG_REGULATOR
  regulator: Enable supply regulator if child rail is enabled.
  regulator: mc13892: Convert to devm_kzalloc()
  regulator: mc13783: Convert to devm_kzalloc()
  regulator: Fix checking return value of create_regulator
  regulator: Fix the error handling if create_regulator fails
  regulator: Export regulator_is_supported_voltage()
  regulator: mc13892: add device tree probe support
  regulator: mc13892: remove the unnecessary prefix from regulator name
  regulator: Convert wm831x regulator drivers to devm_kzalloc()
  regulator: da9052: Staticize non-exported symbols
  regulator: Replace kzalloc with devm_kzalloc and if-else with a switch-case for da9052-regulator
  regulator: Update da9052-regulator for DT changes
  regulator: DA9052/53 Regulator support
  regulator: pass device_node to of_get_regulator_init_data()
  regulator: If a single voltage is set with device tree then set apply_uV
  ...
2012-01-10 10:20:34 -08:00
Linus Torvalds 979ecef5b8 clock management changes for i.MX
Another simple series related to clock management, this time only for
 imx.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATwta7GCrR//JCVInAQJD6A//ZbZtOEctF1nfrpQ6LeoPdJFWUt/4d+GX
 JW2CksR94AB1BqTNV0N0a/pRUNTEo5bBVzeXJw8XnJSCNnIakJpFoeZBh93YTOsO
 ZfuxhYwkVrbCusELaltrSdj5lUW/KgE58vTpfCkkqGgyMQQTzH73zJyjNOYAaWAK
 FleQ5jCpxm3FqoA5jp9+7xcHwF+o2btKXzM4kyEO/cAaypEIOz83qAK16FKzIvuI
 ba9QgMXN5sAKwNMIkNYJruHknlshGT00NBlYJebT0MXbd7pyuN9VsIfMMEQ+VG8B
 3hvfVvHrVeHiWoqdF0r8uxr/SZJiCZlE5RhDK1pO1MXPsroaOEAMSAeA/Y2193HK
 Dkz37iBBUf5T4mA5GfKb7dH4maM79OQ+SEtcQySF18hT+qCHeJV3J8WC0c7C81Ej
 7RFBJjFfpwKwd/SXFKn/PYmlgJZ4aW1+FNyx5xnIjBNpnU8N9knw2h1qGVvcjp+V
 SRQ7zghQToDY425U0ziiFle3XsrC/a0QZrzbFo+rqgUXMZQ2Vq7CiZr/E8QNsbiE
 I0AVE6hlWEx3aXgDoHKb0K3kSthIT7QkmO2UjhJmplEIjgVZw+vfjmAM9O+AeWJC
 BYLzgl2CRAZekNBD77aUdB1VUVz2cUUQ2zgh0wH11k2ca2+h3Lyw4buzsV4u3nxj
 Fqinw2GEt2U=
 =czKE
 -----END PGP SIGNATURE-----

Merge tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

clock management changes for i.MX

Another simple series related to clock management, this time only for
imx.

* tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: mxs: select HAVE_CLK_PREPARE for clock
  clk: add config option HAVE_CLK_PREPARE into Kconfig
  ASoC: mxs-saif: convert to clk_prepare/clk_unprepare
  video: mxsfb: convert to clk_prepare/clk_unprepare
  serial: mxs-auart: convert to clk_prepare/clk_unprepare
  net: flexcan: convert to clk_prepare/clk_unprepare
  mtd: gpmi-lib: convert to clk_prepare/clk_unprepare
  mmc: mxs-mmc: convert to clk_prepare/clk_unprepare
  dma: mxs-dma: convert to clk_prepare/clk_unprepare
  net: fec: add clk_prepare/clk_unprepare
  ARM: mxs: convert platform code to clk_prepare/clk_unprepare
  clk: add helper functions clk_prepare_enable and clk_disable_unprepare

Fix up trivial conflicts in drivers/net/ethernet/freescale/fec.c due to
commit 0ebafefcaa ("net: fec: add clk_prepare/clk_unprepare") clashing
trivially with commit e163cc97f9 ("net/fec: fix the .remove code").
2012-01-09 14:44:15 -08:00
Linus Torvalds 2ac9d7aacc Driver specific changes
Again, a lot of platforms have changes in here: pxa, samsung, omap,
 at91, imx, ...
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATwtZUmCrR//JCVInAQL93hAAzBbSkswA4SD09UXHPSLGpbWd7JYuax9T
 sR17FvnQCV+0T8c7ORRbjoBrCrxKkxuPMkFrfIHuTaP+beYe13CwTf2mV+dtnuv2
 hSjSjdgCq+yv+CvRZhRnmHqmEePN1dvRoC9Q/EVPEibJNJ4BjrTALMfkXbsTz861
 BOmcD7VGi0YfPhwRQ3D00MjohCflRoV2EmceHCUvH4HLEgpWcWl16UZeuWGn6BiA
 GJK37O2ubKz0hkExAH6NHEaRxeFsapjh8kkR8/dOoNh/iIlmmR5SRPOxMPWFD0ui
 lUeSc6QjMipHCzkfE7jUx6MICDZfRx+WRWVTwa/OTLJjJtY+zcRnUvoLl84XJqgX
 EG5YhyL+Os4Z0ci92uSK3rwYQ2AJz/r4dS6VWnAVVJHSc8zHCuioJL4KcF81llcz
 1dshlHkB1H1EeVrf08OM/1xX0X7SNzVJlQ801OZj31DYYtMqvrev72vn+tvJh6kL
 o9gZsOSl3cIlFi8cAK0WmZmwGHw4wfUDZb1ojN6GDctdrp/Vmwe3exHleWvfSDtN
 QBw4WyHl46JGw4bFVQ4hRH3vJZNuiso+ZNZvG3qGaEMfpNY5aMTy7lrxI/GFbFkA
 tEnhkDgjutEZ/B6nEF1h8cCrcLND7u4n209kJh6UR1Qx3a6xD/M/ycE4tisNuPE3
 wSSYuM1ZGTU=
 =vPhu
 -----END PGP SIGNATURE-----

Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Driver specific changes

Again, a lot of platforms have changes in here: pxa, samsung, omap,
at91, imx, ...

* tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
  ARM: sa1100: clean up of the clock support
  ARM: pxa: add dummy clock for sa1100-rtc
  RTC: sa1100: support sa1100, pxa and mmp soc families
  RTC: sa1100: remove redundant code of setting alarm
  RTC: sa1100: Clean out ost register
  Input: zylonite-wm97xx - replace IRQ_GPIO() with gpio_to_irq()
  pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq()
  ARM: EXYNOS: Modified files for SPI consolidation work
  ARM: S5P64X0: Enable SDHCI support
  ARM: S5P64X0: Add lookup of sdhci-s3c clocks using generic names
  ARM: S5P64X0: Add HSMMC setup for host Controller
  ARM: EXYNOS: Add USB OHCI support to ORIGEN board
  USB: Add Samsung Exynos OHCI diver
  ARM: EXYNOS: Add USB OHCI support to SMDKV310 board
  ARM: EXYNOS: Add USB OHCI device
  net: macb: fix build break with !CONFIG_OF
  i2c: tegra: Support DVC controller in device tree
  i2c: tegra: Add __devinit/exit to probe/remove
  net/at91_ether: use gpio_is_valid for phy IRQ line
  ARM: at91/net: add macb ethernet controller in 9g45/9g20 DT
  ...
2012-01-09 14:39:22 -08:00
Linus Torvalds 5ede3ceb7b New feature development
This adds support for new features, and contains stuff from most
 platforms. A number of these patches could have fit into other
 branches, too, but were small enough not to cause too much
 confusion here.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIVAwUATwtYgGCrR//JCVInAQKzRRAAybELlfOIT1fyVlzkzIgw0/OKxS75Vqda
 v5mNYUfQ001WxGjwbFGgFphrQgyhulmLj6gN5l1rwaBjEZlwLe5uk3sReeqeDMLk
 bERLbpg22ymka4JVhvugq5qh9UP2ptlvZV/cAZC0u2JBq+CaarFIJsrzbOyXAngf
 4kUkaMhKi8DDZTqrwwACaLxR7qtf3ddiSxNLZ93X4fDh4a3qs/EJErVg/xCFlfM3
 YTzTjKuqLV2cGT34E9YTJieN9o94G+PiqvbDsP3kOwG2dSElpRWsZwX/0hDoyCxN
 cWbqPfrrdzt/kDcNnNd8MZ16AJlPc4ElVVEWPF71tKP3HfKqtZ0vMlpzsldioFz6
 8AKvaXJXRkRddY4KqNcXeEQHcDxO0uniG/3lhZY8NlzO/1PnPQ4hGl8fhw+e/2z0
 nAQFUsCVIXacsxamPk/fFBUhYzyK7JrnH4pB3b7SPcCj7X9MVyWK+pbT5LA+VGOL
 Ys8tv3NtTWEObyW1s3NT+BEy9FkkRu4EG3TxPwHUXk4BTwa6nDmJBPjk7Hv7q4cn
 T58lPet8Aylhht2aZx+0dxK3MHtMOmgsJ5jQF0OAi48Kmx8kXPZ1AeXObROncbZL
 aI7qfuGTzps7MlUBYlmrMdceTfYLeOqIEoVyFX8N4xLE33alk8DMKc37QoTJVuxQ
 KrY8sCVMkK0=
 =N2B4
 -----END PGP SIGNATURE-----

Merge tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

New feature development

This adds support for new features, and contains stuff from most
platforms. A number of these patches could have fit into other
branches, too, but were small enough not to cause too much
confusion here.

* tag 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  mfd/db8500-prcmu: remove support for early silicon revisions
  ARM: ux500: fix the smp_twd clock calculation
  ARM: ux500: remove support for early silicon revisions
  ARM: ux500: update register files
  ARM: ux500: register DB5500 PMU dynamically
  ARM: ux500: update ASIC detection for U5500
  ARM: ux500: support DB8520
  ARM: picoxcell: implement watchdog restart
  ARM: OMAP3+: hwmod data: Add the default clockactivity for I2C
  ARM: OMAP3: hwmod data: disable multiblock reads on MMC1/2 on OMAP34xx/35xx <= ES2.1
  ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP4
  ARM: OMAP: USB: EHCI and OHCI hwmod structures for OMAP3
  ARM: OMAP: hwmod data: Add support for AM35xx UART4/ttyO3
  ARM: Orion: Remove address map info from all platform data structures
  ARM: Orion: Get address map from plat-orion instead of via platform_data
  ARM: Orion: mbus_dram_info consolidation
  ARM: Orion: Consolidate the address map setup
  ARM: Kirkwood: Add configuration for MPP12 as GPIO
  ARM: Kirkwood: Recognize A1 revision of 6282 chip
  ARM: ux500: update the MOP500 GPIO assignments
  ...
2012-01-09 14:38:51 -08:00
Arnd Bergmann dcf7ec5ee6 Merge branch 'samsung/driver' into next/drivers
Conflicts:
	arch/arm/mach-mxs/include/mach/common.h

Pull in previous samsung conflict merges and do a trivial
merge of an mxs double-add conflict.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-01-09 16:16:29 +00:00
Janusz Krzysztofik f75a8ff67d ASoC: cx20442: add bias control over a platform provided regulator
Now that a regulator device for controlling the codec chip reset state
over a platform agnostic regulator API is available on the only board
using this driver so far, extend the driver with a bias control function
which will request virtual power to the codec chip from that virtual
regulator, and will supersede the present implementation existing at the
sound card level.

Thanks to the regulator sharing mechanism, both the old (the sound card)
and the new (the codec) implementations should coexist smoothly until
the sound card file is updated. For this to work as expected, update the
sound card .set_bias_level callback to not touch codec->dapm.bias_level.

While extending the cx20442 structure, drop unused control_type member.

Created against linxu-3.2-rc6, tested on top of patch 1/4 "ARM: OMAP1:
ams-delta: set up a regulator over the modem reset GPIO pin".

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-01-09 11:20:16 +00:00
Mark Brown b2ed1b0bc6 ASoC: Fix idma build after update for channel count check
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-08 23:04:28 -08:00
Joachim Eastwood 25e9e7565f ASoC: check for substream not channels_min in pcm engines
This is a follow up on 53dea36c70 which fixes the other affected
pcm engines.

Description from 53dea36c70c1857:
 Don't rely on the codec's channels_min information to decide wheter or
 not allocate a substream's DMA buffer. Rather check if the substream
 itself was allocated previously.

Without this patch I was seeing null-pointer dereferenc in atmel-pcm.

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-07 11:18:05 -08:00
Axel Lin 739be96ab8 ASoC: Fix build dependency for SND_ATMEL_SOC_SSC
Make SND_ATMEL_SOC_SSC select ATMEL_SSC to fix below build errors:

  LD      .tmp_vmlinux1
sound/built-in.o: In function `atmel_ssc_remove':
sound/soc/atmel/atmel_ssc_dai.c:713: undefined reference to `ssc_free'
sound/built-in.o: In function `atmel_ssc_probe':
sound/soc/atmel/atmel_ssc_dai.c:700: undefined reference to `ssc_request'
sound/built-in.o: In function `atmel_ssc_set_audio':
sound/soc/atmel/atmel_ssc_dai.c:845: undefined reference to `ssc_request'
sound/soc/atmel/atmel_ssc_dai.c:851: undefined reference to `ssc_free'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-05 23:00:12 -08:00
Axel Lin 7a748e4318 ASoC: sta32x: Optimize the array work to find rate_min and rate_max
For a given ir and fs, there is at most one possible match for the case
mclk_ratios[ir][j].ratio * fs == freq.
Thus we can break from the inner loop once a match is found.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-03 21:18:32 +00:00
Sangsu Park a500231da4 ASoC: soc-pcm: Allocate PCM operations dynamically to support multiple DAIs
The original code does not cover the case that two DAIs(CPU) have different
ASoC core PCM operations(like mmap, pointer...). Currently we have only one
global soc_pcm_ops for ASoC core PCM operation. When two DAIs have different
pointer functions, second DAI's pointer function is set for both first DAI
and second DAI in case of original code.

This patch uses runtime's pcm_ops instead of global pcm_ops for each DAIs. So
each DAIs can have different ASoC core PCM operations. This is needed to
support multiple DAIs.

Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-03 20:28:51 +00:00
Axel Lin 34be9244c7 ASoC: pxa: Convert corgi to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:40 +00:00
Axel Lin 748b217827 ASoC: Fix return value of wm8580_set_sysclk()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:40 +00:00
Axel Lin c49c7f0cf9 ASoC: Use dai_fmt in tavorevb3 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:39 +00:00
Axel Lin 385bd9379b ASoC: Fix return value of wm8903_gpio_direction_in() and wm8903_gpio_direction_out()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:39 +00:00
Axel Lin 3c3f51f6a3 ASoC: Convert z2 to table based DAPM init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:38 +00:00
Axel Lin 1a2dbcbe04 ASoC: Convert tavorevb3 to table based DAPM init
Also remove a unsued ret variable to silence the build warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:37 +00:00
Axel Lin 7c27426356 ASoC: Convert spitz to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:37 +00:00
Axel Lin 38b437be0b ASoC: Convert saarb to table based DAPM init
Also remove a unused ret variable to silence the build warning.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:36 +00:00
Axel Lin 36c1b40018 ASoC: Use dai_fmt in z2 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:36 +00:00
Axel Lin c0e942310a ASoC: Use dai_fmt in spitz machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:35 +00:00
Axel Lin 2ce7f207c3 ASoC: Use dai_fmt in saarb machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:35 +00:00
Axel Lin fe75fe0e04 ASoC: Fix return value of wm8962_gpio_direction_out()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:34 +00:00
Axel Lin 16aff769d7 ASoC: Fix return value of ak4641_pcm_set_dai_fmt()
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:33 +00:00
Julia Lawall 6065abf5ce ASoC: ac97c.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:28 +00:00
Julia Lawall be547dd172 ASoC: dbdma2.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:23 +00:00
Julia Lawall 46c3a02cc9 ASoC: dma.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:18 +00:00
Julia Lawall 6d8955262a ASoC: i2sc.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:13 +00:00
Julia Lawall 8d9626d728 ASoC: psc-ac97.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:07 +00:00
Julia Lawall aa4079c110 ASoC: psc-i2s.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:08:02 +00:00
Julia Lawall cd0ff7eff0 ASoC: davinci-i2s.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

In this case, the original code did not contain a call to iounmap, nor does
one appear anywhere else in the file.  I have assumed that it is safe to
use devm_ioremap for the allocation in any case.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:07:56 +00:00
Julia Lawall 96d31e2b12 ASoC: davinci-mcasp.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

In this case, the original code did not contain a call to iounmap, nor does
one appear anywhere else in the file.  I have assumed that it is safe to
use devm_ioremap for the allocation in any case.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:07:51 +00:00
Julia Lawall a3bb8f3f81 ASoC: davinci-vcif.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses devm_kzalloc, devm_request_mem_region and
devm_ioremap for data that is allocated in the probe function of a platform
device and is only freed in the remove function.

Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 13:07:46 +00:00
Axel Lin 6945e9f9df ASoC: Convert tpa6130a2 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin a54877d745 ASoC: Convert tlv320dac33 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin 7fd8a67446 ASoC: Convert cs4270 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin 360b70ca5e ASoC: Convert alc5623 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:13 +00:00
Axel Lin e2257db325 ASoC: Convert tlv320aic3x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin a8163023d2 ASoC: Convert tlv320aic26 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin 099830608a ASoC: Convert tlv320aic23 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin d999c021b6 ASoC: Convert sta32x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin 8eeffe9891 ASoC: Convert ssm2602 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin a92b0a0803 ASoC: Convert rt5631 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:12 +00:00
Axel Lin bf791bdb38 ASoC: Convert max9850 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin b1b548824b ASoC: Convert max98095 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin 49ba767324 ASoC: Convert max98088 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Axel Lin 021b918efb ASoC: Convert cs42l51 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:28:11 +00:00
Ashish Chavan 24b6f263d9 ASoC: da7210: Add support for line input and mic
DA7210 has three line inputs (AUX1 Left, AUX1 Right and AUX2) and
a stereo MIC. This patch adds gain controls for MIC, AUX1, AUX2 as
well as INPGA.

Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-02 12:27:29 +00:00
Linus Torvalds c7f46b7aa4 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: wm8776: add missing break in sample size switch
2011-12-31 11:55:06 -08:00
Axel Lin 32696af137 ASoC: Convert corgi to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 10:44:45 +00:00
Axel Lin 74f4dd56ff ASoC: Use dai_fmt in corgi machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 10:44:45 +00:00
Axel Lin 87063dfcea ASoC: Use dai_fmt in poodle machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 02:00:30 +00:00
Axel Lin fe366d0674 ASoC: Convert poodle to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 02:00:22 +00:00
Axel Lin 2445ecc3c0 ASoC: pxa: Convert poodle to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 02:00:06 +00:00
Mark Brown 1b39bf3468 ASoC: Enable ASoC register map dump for some regmap CODECs
It's still useful to be able to poke around in the register map at
runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-30 01:59:39 +00:00
Mark Brown a421a0e41c ASoC: Remove unused label from wm8994 probe()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-29 11:54:43 +00:00
Axel Lin 658ecf7784 ASoC: Convert tlv320aic32x4 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:41 +00:00
Axel Lin 558460c65a ASoC: Convert jz4740 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:41 +00:00
Axel Lin 38b81c1d25 ASoC: Convert adau1701 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 6e4f17cb2b ASoC: Convert ad1836 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 80c2f9da4e ASoC: Convert adau1373 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Axel Lin 30c88f2ca8 ASoC: Convert ad193x to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:22:40 +00:00
Lothar Waßmann a5b683489f ASoC: mxs: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:20:48 +00:00
Fabio Estevam 512fa7c40b ASoC: Convert sgtl5000 to use devm_kzalloc()
Convert sgtl5000 codec driver to use devm_kzalloc().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:20:20 +00:00
Fabio Estevam cf1ee98d80 ASoC: sgtl5000: Fix voltage units in dev_err message
vdda, vddio and vddd are voltages expressed in milivolts (mV), so use the
proper annotation.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 17:20:20 +00:00
Shawn Guo 67939b22da ASoC: mxs-saif: convert to clk_prepare/clk_unprepare
The patch converts mxs-saif driver to clk_prepare/clk_unprepare by
using helper functions clk_prepare_enable/clk_disable_unprepare.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Dong Aisheng <b29396@freescale.com>
Cc: Liam Girdwood <lrg@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-28 21:31:57 +08:00
Axel Lin 5f5de18a7f ASoC: Convert kirkwood-t5325 to table based DAPM init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 11:37:37 +00:00
Axel Lin 7e0d6ac0d8 ASoC: Use dai_fmt in kirkwood-t5325 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 11:37:37 +00:00
Axel Lin 077a2ba4c8 ASoC: Use dai_fmt in kirkwood-openrd machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 11:37:36 +00:00
Axel Lin d4d9820b4a ASoC: Fix build error in sound/soc/kirkwood/kirkwood-i2s.c
Since commit db33f4de "ARM: Orion: Remove address map info from all platform data structures",
the dram is removed from struct kirkwood_asoc_platform_data.

This patch fixes below build error:
  CC      sound/soc/kirkwood/kirkwood-i2s.o
sound/soc/kirkwood/kirkwood-i2s.c: In function 'kirkwood_i2s_dev_probe':
sound/soc/kirkwood/kirkwood-i2s.c:444: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram'
sound/soc/kirkwood/kirkwood-i2s.c:450: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram'
make[3]: *** [sound/soc/kirkwood/kirkwood-i2s.o] Error 1
make[2]: *** [sound/soc/kirkwood] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28 11:37:36 +00:00
Arnd Bergmann 4551ae0a24 Merge branch 'v3.2-rc6' into next/drivers 2011-12-27 23:41:33 +00:00
Arnd Bergmann 07b98403ee Merge branch 'omap/hwmod' into next/drivers
This is needed as a dependency for omap/ehci.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2011-12-27 22:05:06 +00:00
Axel Lin 6ab7e71a9c ASoC: Convert 88pm860x-codec to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin 6ce91ad4d8 ASoC: Convert uda1380 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin eb3bb97ce7 ASoC: Convert lm4857 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin 306bf6b19e ASoC: Convert da7210 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-27 12:58:02 +00:00
Axel Lin b425b88418 ASoC: omap: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-12-23 18:13:01 +00:00
Mark Brown 2c9d9b6fa7 Merge branch 'for-3.2' into for-3.3 2011-12-23 18:08:02 +00:00
Joachim Eastwood 990fc3d0b2 ASoC: wm8776: add missing break in sample size switch
Broken in commit d1dc698a54

Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 18:03:21 +00:00
Shawn Guo d6077c92b6 ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
The commit 49920bc (dmaengine: add new enum dma_transfer_direction)
changes the type of parameter 'direction' of device_prep_dma_cyclic
from dma_data_direction to dma_transfer_direction.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2011-12-23 22:05:22 +05:30
Mark Brown c5cf4dbc7f ASoC: Add trivial pm_runtime usage to Samsung DAI drivers
Currently this won't actually do anything but using this will help the
core SoC code track when the system is idle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 12:08:32 +00:00
Axel Lin 8270ba0c96 ASoC: mid-x86: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:32:09 +00:00
Axel Lin 9b344ce80f ASoC: kirkwood: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:32:09 +00:00
Axel Lin e181d14ac3 ASoC: txx9: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:32:08 +00:00
Axel Lin 4a7042e599 ASoC: sh: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:32:07 +00:00
Axel Lin 23bd1ce48f ASoC: s6000: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:32:00 +00:00
Axel Lin b5a67048d0 ASoC: nuc900: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:16:58 +00:00
Axel Lin 1d9d25b352 ASoC: jz4740: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:16:57 +00:00
Axel Lin 6aff8ccb0c ASoC: imx: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:16:43 +00:00
Axel Lin 662d4e5c24 ASoC: au1x: Add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23 11:16:29 +00:00
Axel Lin b16eaf9fd3 ASoC: tegra: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:35 +00:00
Axel Lin a76a702329 ASoC: ep93xx: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:35 +00:00
Axel Lin 36a16d1ae0 ASoC: davinci: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:34 +00:00
Axel Lin 30e4953011 ASoC: blackfin: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:34 +00:00
Axel Lin 338d68db77 ASoC: atmel: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:33 +00:00
Axel Lin 4c3c5df05e ASoC: fsl: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:32 +00:00
Mark Brown 354a21423d ASoC: Declare soc_new_pcm() properly
Ensure that everything is seeing the same declaration by moving it to
a header file rather than putting the declaration in soc-core.c

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-12-22 17:34:25 +00:00
Mark Brown 204e418bd2 Merge branch 'for-3.2' into for-3.3 2011-12-22 12:02:29 +00:00
Mark Brown da403f87a2 Revert "ASoC: mxs: correct 'direction' of device_prep_dma_cyclic"
This reverts commit dbec3b30a6 as it
should never have been applied to the ASoC tree at all, let alone 3.2.
2011-12-22 11:37:03 +00:00
Axel Lin 095d79dc49 ASoC: samsung: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 11:04:18 +00:00
Axel Lin 561c6a172f ASoC: pxa: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 11:04:18 +00:00
Stephen Warren 5a5049637c ASoC: Allow DAI links to be specified using device tree nodes
DAI link endpoints and platform (DMA) devices are currently specified
by name. When instantiating sound cards from device tree, it may be more
convenient to refer to these devices by phandle in the device tree, and
for code to describe DAI links using the "struct device_node *"
("of_node") those phandles map to.

This change adds new fields to snd_soc_dai_link which can "name" devices
using of_node, enhances soc_bind_dai_link() to allow binding based on
of_node, and enhances snd_soc_register_card() to ensure that illegal
combinations of name and of_node are not used.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 11:00:21 +00:00
Janusz Krzysztofik f7519d8c82 ARM: OMAP1: ams-delta: register latch dependent devices later
In preparation to converting Amstrad Delta on-board latches to
basic_mmio_gpio devices, registration of platform devices which depend
on latches and will require initialization of their GPIO pins first,
should be moved out of .machine_init down to late_initcall level, as the
gpio-generic driver is not available until device_initcall time.  The
latch reset operation, which will be replaced with GPIO initialization,
must also be moved to late_initcall for the same reason.

Since there was already another, separate arch_initcall function for
setting up one of those latch dependent devices, the on-board modem
device, reuse that function, i.e., rename it to a name that matches the
new purpose, extend with other device setup relocated from
.machine_init, and move down to the late_initcall level.

While being at it, add missing gpio_free() in case the modem platform
device registration fails.

Thanks to Tony Lindgren <tony@atomide.com> who suggested this approach
instead of shifting up the gpio-generic driver initialization.

In addition, defer registration of the Amstrad Delta ASoC and serio
devices, done from their device driver files, until late_initcall time,
as those drivers will depend on their GPIO pins already requested from
the board late_init() function until updated to register their GPIO pins
themselves.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-12-21 10:47:01 -08:00
Mark Brown 82150101df ASoC: Remove ifdefs for GPIO_SYSFS
It is part of the GPIO API so should be stubbed appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-21 00:12:28 +00:00
Axel Lin 3f7cec0493 ASoC: Convert cs42l51 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 12:04:33 +00:00
Axel Lin f4f8e4c32c ASoC: Convert 88pm860x-codec to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 12:04:33 +00:00
Axel Lin 52ec35f64e ASoC: Use dai_fmt in imote2 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:15:53 +00:00
Axel Lin 673847cfb0 ASoC: Use dai_fmt in hx4700 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:15:53 +00:00
Axel Lin 5b48a5a6df ASoC: Convert ak4671 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 2ff49eea9b ASoC: Convert ak4642 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 4273fcfd71 ASoC: Convert ak4641 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 7246492dcf ASoC: Convert ak4535 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:58 +00:00
Axel Lin 3922d5180f ASoC: Convert ak4104 to devm_kzalloc()
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 10:13:57 +00:00
Stephen Warren 07cdf36d8c ASoC: Tegra+WM8903 machine: Add device tree binding
This driver is parameterized in two ways:

a) Platform data, which supplies the set of GPIOs used by the driver.
   These GPIOs can now be parsed out of device tree.

b) Machine-specific DAPM route arrays embedded into the ASoC machine
   driver itself. Historically, the driver picks the appropriate array
   to use using machine_is_*(). The driver now requires this array to
   be parsed from device tree when instantiated through device tree,
   using the core ASoC support for this parsing.

Based on work by John Bonesio, but significantly reworked since then.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 01:05:34 +00:00
Stephen Warren a4a54dd5bb ASoC: Add utility to parse DAPM routes from device tree
Implement snd_soc_of_parse_audio_routing(), a utility function that can
parses a simple DAPM route table from device tree.The machine driver
specifies the DT property to use, since this is binding-specific.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 01:05:34 +00:00
Stephen Warren bec4fa05e2 ASoC: Add utility to set a card's name from device tree
Implement snd_soc_of_parse_card_name(), a utility function that sets a
card's name from device tree. The machine driver specifies the DT
property to use, since this is binding-specific.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 01:05:34 +00:00
Axel Lin 6048ef768e ASoC: Rename rt562[1|2]_vol_snd_controls to alc562[1|2]_vol_snd_controls
The module desciption says this is ASoC alc5621/2/3 driver.
Make the naming consistent with the reset of the code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:58:08 +00:00
Mark Brown 0a1fe66698 Merge branch 'for-3.2' into for-3.3 2011-12-20 00:53:23 +00:00
Axel Lin f49f85108b ASoC: Use dai_fmt in snappercl15 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:52:13 +00:00
Axel Lin f521812b03 ASoC: Use dai_fmt in edb93xx machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:51:59 +00:00
Shawn Guo dbec3b30a6 ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
The commit 49920bc (dmaengine: add new enum dma_transfer_direction)
changes the type of parameter 'direction' of device_prep_dma_cyclic
from dma_data_direction to dma_transfer_direction.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:49:33 +00:00
Axel Lin 5ab2ab6a43 ASoC: Remove export of s3c_pcm_dai
We don't need to export s3c_pcm_dai after multi-component patch.
Thus remove export of s3c_pcm_dai and make it static.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:48:13 +00:00
Leon Romanovsky 58783faf28 ASoC: Tegra machine ASoC driver for boards using ALC5332 codec
At this stage only Toshiba AC100/Dynabook supported.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:41:29 +00:00
Axel Lin 58fa8e456c ASoC: Convert uda1380 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:32:24 +00:00
Axel Lin 5ee65ec628 ASoC: Convert max9850 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-20 00:32:24 +00:00
Mark Brown 202a51a8d9 ASoC: Use standard cache sync code in wm8961
We write the reset register with the default value so it should not be
mistakenly written.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:44 +00:00
Mark Brown 2ec2a9061d ASoC: Convert wm8961 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:43 +00:00
Mark Brown 69be6660f3 ASoC: Remove I2C ifdefs from wm8961 driver
The driver only supports I2C so no need to conditionalise its use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:42 +00:00
Mark Brown b9791c0109 ASoC: Convert WM8960 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:39:41 +00:00
Axel Lin 1eb0202dc7 ASoC: pxa: Convert e800_wm9712 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:31 +00:00
Axel Lin f285b8c83a ASoC: pxa: Convert tosa to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:30 +00:00
Axel Lin ac1e89860a ASoC: pxa: Convert imote2 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:29 +00:00
Axel Lin 5eb2c3d927 ASoC: pxa: Convert e750_wm9705 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:29 +00:00
Axel Lin 62133829fa ASoC: pxa: Convert e740_wm9705 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:28 +00:00
Peter Ujfalusi 7243a4b1eb ASoC: omap-mcbsp: Enable FIFO usage on OMAP4
Allow McBSP FIFO configuration from ASoC dai driver
on OMAP4 platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-17 09:31:28 +00:00
Mark Brown d78930f422 Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into for-3.3 2011-12-17 10:05:46 +01:00
Linus Torvalds 5885b9b3f0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: HDA: Use LPIB Position fix for Intel SCH Poulsbo
  ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
  ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based device
  ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
  ASoC: WM8958: correctly show firmware magic on mismatch
  ASoC: mxs: Add appropriate MODULE_ALIAS()
  ASoC: mxs: Add missing MODULE_LICENSE("GPL")
  ASoC: Fix WM8996 24.576MHz clock operation
  ASoC: Include linux/module.h for smdk2443_wm9710
  ASoC: Fix a typo in jive_wm8750
  ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
  ASoC: Include linux/io.h for jz4740 codec
2011-12-16 11:14:42 -08:00