openwrt/staging/blogic.git
12 years agoARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:28 +0000 (13:46 +0300)]
ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO

Remove the use of set_hs_extmute callback and let the codec driver to
handle the extmute GPIO.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: twl4030: Move hs_extmute GPIO handling to driver
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:27 +0000 (13:46 +0300)]
ASoC: twl4030: Move hs_extmute GPIO handling to driver

The external mute (if it is in use) is handled by a GPIO line. Prepare to
remove the set_hs_extmute callback and replace it with:
hs_extmute_gpio: the GPIO number to use for external mute

When the users of set_hs_extmute has been converted the callback can be removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoInput: twl4030-vibra: Support for DT booted kernel
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:26 +0000 (13:46 +0300)]
Input: twl4030-vibra: Support for DT booted kernel

Add support when the kernel has been booted with DT blob. In this case the
pdata is NULL, we need to reach up to the core node and check if the codec
part has been enabled to determine if we need to coexist with the codec or
not.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl4030-audio: Add DT support
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:25 +0000 (13:46 +0300)]
mfd: twl4030-audio: Add DT support

Support for loading the twl4030 audio module via devicetree.
Sub devices for codec and vibra will be created as mfd devices once the
core MFD driver is loaded when the kernel is booted with a DT blob.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agodt: Add empty of_find_node_by_name() function
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:24 +0000 (13:46 +0300)]
dt: Add empty of_find_node_by_name() function

This commit adds an empty of_find_node_by_name() function for !CONFIG_OF
builds.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl4030-audio: Get audio MCLK via twl-core API instead of pdata
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:23 +0000 (13:46 +0300)]
mfd: twl4030-audio: Get audio MCLK via twl-core API instead of pdata

twl-core has API to get the boot time configured HFCLK rate which has the
same rate as the audio MCLK.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl-core: Add API to query the HFCLK rate
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:22 +0000 (13:46 +0300)]
mfd: twl-core: Add API to query the HFCLK rate

CFG_BOOT register's HFCLK_FREQ field hold information about the used HFCLK
frequency.
Add possibility for users to get the configured rate based on this
register.
This register was configured during boot, without it the chip would not
operate correctly, so we can trust on this information.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl4030-audio: Rearange and clean-up the probe function
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:21 +0000 (13:46 +0300)]
mfd: twl4030-audio: Rearange and clean-up the probe function

To facilitate the device tree support the probe function need to be rearanged.
Small cleanup in the APLL frequency selection part as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl4030-audio: Convert to use devm_kzalloc
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:20 +0000 (13:46 +0300)]
mfd: twl4030-audio: Convert to use devm_kzalloc

To clean up the module probe and remove functions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agomfd: twl4030-audio: Clean up MODULE_* and platform_driver part
Peter Ujfalusi [Mon, 10 Sep 2012 10:46:19 +0000 (13:46 +0300)]
mfd: twl4030-audio: Clean up MODULE_* and platform_driver part

Place the MODULE_* lines in the same block and add MODULE_DESCRIPTION.
Rearange the platform_driver structure at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-pcm: Convert to use dmaengine
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:58 +0000 (15:05 +0300)]
ASoC: omap-pcm: Convert to use dmaengine

Original author: Russell King <rmk+kernel@arm.linux.org.uk>

Switch the omap-pcm to use dmaengine.
Certain features are not supported by after dmaengine conversion:
1. No period wakeup mode
   DMA engine has no way to communicate this information through
   standard channels.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup time
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:57 +0000 (15:05 +0300)]
ASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup time

Set the dma_data for the stream (snd_soc_dai_set_dma_data) at dai_startup
time so omap-pcm will have access to the needed information regarding to
the DMA channel earlier.
This is needed for the clean dmaengine support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:56 +0000 (15:05 +0300)]
ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type

Instead of the OMAP DMA data type definition the data_type will be used to
specify the number of bits the DMA word should be configured or 0 in case
when based on the stream's format the omap-pcm can decide the needed DMA
word size.
This feature is needed for the omap-hdmi where the sDMA need to be
configured for 32bit word type regardless of the audio format used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_type
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:55 +0000 (15:05 +0300)]
ASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_type

omap-pcm can figure out the correct dma_type based on the stream's format.
In this way we can get rid of the plat/dma.h include from these drivers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-mcpdm: Use platform_get_resource_* to get resources
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:54 +0000 (15:05 +0300)]
ASoC: omap-mcpdm: Use platform_get_resource_* to get resources

Get the needed resources in a correct way and avoid using defines for them.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoARM: OMAP4: hwmod_data: Add resource names to McPDM memory ranges
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:53 +0000 (15:05 +0300)]
ARM: OMAP4: hwmod_data: Add resource names to McPDM memory ranges

To help the driver to get the correct memory range to access McPDM
registers.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-pcm: Prepare to configure the DMA data_type based on stream properties
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:52 +0000 (15:05 +0300)]
ASoC: omap-pcm: Prepare to configure the DMA data_type based on stream properties

Based on the format of the stream the omap-pcm can decide alone what data
type should be used with by the sDMA.
Keep the possibility for OMAP dai drivers to tell omap-pcm if they want to
use different data type. This is needed for the omap-hdmi for example which
needs 32bit data type even if the stream format is S16_LE.

The check if (dma_data->data_type) is safe at the moment since omap-pcm
does not support 8bit samples (OMAP_DMA_DATA_TYPE_S8 == 0x00).

The next step is to redefine the meaning of dma_data->data_type to unblock
this limitation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: OMAP: Remove sync_mode from omap_pcm_dma_data struct
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:51 +0000 (15:05 +0300)]
ASoC: OMAP: Remove sync_mode from omap_pcm_dma_data struct

The omap-pcm platform driver no longer needs this parameter to select
between ELEMENT and PACKET mode. The selection is based on the configured
packet_size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-pcm: Select sDMA synchronization based on packet_size
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:50 +0000 (15:05 +0300)]
ASoC: omap-pcm: Select sDMA synchronization based on packet_size

Since we only have element or packet synchronization we can use the
dma_data->packet_size to select the desired mode:
if packet_size is 0 we use ELEMENT mode
if packet_size is not 0 we use PACKET mode for sDMA synchronization.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: omap-mcbsp: Use sDMA packet mode instead of frame mode
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:49 +0000 (15:05 +0300)]
ASoC: omap-mcbsp: Use sDMA packet mode instead of frame mode

When McBSP is configured in threshold mode we can use sDMA packet mode in
all cases.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agodmaengine: omap-dma: Add support to suppress interrupts in cyclic mode
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:48 +0000 (15:05 +0300)]
dmaengine: omap-dma: Add support to suppress interrupts in cyclic mode

When requested (DMA_PREP_INTERRUPT is cleared in flags) disable all DMA
interrupts for the channel. In this mode user space does not expect
periodic reports from kernel about the progress of the audio stream.
PulseAudio for example support this type of mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agodmaengine: Pass flags via device_prep_dma_cyclic() callback
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:47 +0000 (15:05 +0300)]
dmaengine: Pass flags via device_prep_dma_cyclic() callback

Change the parameter list of device_prep_dma_cyclic() so the DMA drivers
can receive the flags coming from clients.
This feature can be used during audio operation to disable all audio
related interrupts when the DMA_PREP_INTERRUPT is cleared from the flags.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agodmaengine: omap: Add support for pause/resume in cyclic dma mode
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:45 +0000 (15:05 +0300)]
dmaengine: omap: Add support for pause/resume in cyclic dma mode

The audio stack used omap_stop_dma/omap_start_dma to pause/resume the DMA.
This method has been used for years on OMAP based products.
We only allow pause/resume when the DMA has been configured in cyclic mode
which is used by the audio stack.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agodmaengine: omap: Support for element mode in cyclic DMA
Peter Ujfalusi [Fri, 14 Sep 2012 12:05:44 +0000 (15:05 +0300)]
dmaengine: omap: Support for element mode in cyclic DMA

When src_maxburst/dst_maxburst is set to 0 by the users of cyclic DMA
(mostly audio) indicates that we should configure the omap DMA to element
sync mode instead of packet mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: register the wm9712-codec
Eric Millbrandt [Thu, 20 Sep 2012 14:36:45 +0000 (10:36 -0400)]
ASoC: fsl: register the wm9712-codec

The mpc5200-psc-ac97 driver does not enumerate attached ac97 devices, so
register the device here.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: pcm030-audio-fabric use snd_soc_register_card
Eric Millbrandt [Thu, 20 Sep 2012 14:36:44 +0000 (10:36 -0400)]
ASoC: fsl: pcm030-audio-fabric use snd_soc_register_card

Convert pcm030-audio-fabric to use the new snd_soc_register_card api
instead of the older method of registering a separate platform device.
Create the dai_link to the mpc5200_psc_ac97 platform using the device tree.
Convert the pcm030-audio-fabric driver to a platform-driver and add a
remove function.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: add PPC_MPC52xx dependency to SND_POWERPC_SOC
Eric Millbrandt [Thu, 20 Sep 2012 14:36:43 +0000 (10:36 -0400)]
ASoC: fsl: add PPC_MPC52xx dependency to SND_POWERPC_SOC

mpc52xx socs do not define FSL_SOC but need SND_POWERPC_SOC defined to build
ASoC drivers.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: twl6040: Convert to use DAI DAPM widgets
Peter Ujfalusi [Thu, 20 Sep 2012 13:32:15 +0000 (16:32 +0300)]
ASoC: twl6040: Convert to use DAI DAPM widgets

Use DAPM mapping for stream events and give unique names for the streams.
This change also fixes the following warning:
twl6040-codec twl6040-codec: Failed to create Capture debugfs file

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: twl4030: Convert to use DAI DAPM widgets
Peter Ujfalusi [Thu, 20 Sep 2012 13:32:02 +0000 (16:32 +0300)]
ASoC: twl4030: Convert to use DAI DAPM widgets

Use DAPM mapping for stream events and give unique names for the streams.
This change also fixes the following warning:
twl4030-codec twl4030-codec: Failed to create Capture debugfs file

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8960: remove 'dres' field from platform data structure
Timur Tabi [Thu, 20 Sep 2012 18:57:27 +0000 (13:57 -0500)]
ASoC: wm8960: remove 'dres' field from platform data structure

The 'dres' field (discharge resistance for headphone outputs) is no longer
used in the driver, so remove it.

It was used in the original version of the driver when entering standby
from off, but we stopped using it when we switched from having a single
startup sequence to having separate cap and capless sequences.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8961: Move device identification and reset to I2C probe
Mark Brown [Thu, 13 Sep 2012 05:31:38 +0000 (13:31 +0800)]
ASoC: wm8961: Move device identification and reset to I2C probe

This is more idiomatic as it means we verify that the device is there
prior to trying to do the card probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8961: Convert to direct regmap API usage
Mark Brown [Thu, 13 Sep 2012 04:53:59 +0000 (12:53 +0800)]
ASoC: wm8961: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8960: Support shared LRCLK
Mark Brown [Thu, 13 Sep 2012 03:46:58 +0000 (11:46 +0800)]
ASoC: wm8960: Support shared LRCLK

If the LRCLK is shared and the WM8960 is clock master then we should
enable the LRCM bit to tell the device that it should drive LRCLK when
either ADC or DAC is enabled rather than separately driving the two
LRCLKs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8776: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 12:15:22 +0000 (20:15 +0800)]
ASoC: wm8776: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: cleanup headers in pcm030-audio-fabric
Eric Millbrandt [Thu, 13 Sep 2012 21:43:13 +0000 (17:43 -0400)]
ASoC: fsl: cleanup headers in pcm030-audio-fabric

Remove unreferenced header files.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: mpc5200 add missing information to snd_soc_dai_driver
Eric Millbrandt [Thu, 13 Sep 2012 21:43:12 +0000 (17:43 -0400)]
ASoC: fsl: mpc5200 add missing information to snd_soc_dai_driver

Add missing dai_driver information to avoid these runtime errors

[   16.433788] asoc: error - multiple DAI f0002c00.i2s registered with no name
[   16.453551] Failed to register DAI
[   16.461222] mpc5200-psc-i2s: probe of f0002c00.i2s failed with error -22
[   16.475242] asoc: error - multiple DAI f0002000.ac97 registered with no name
[   16.488087] mpc5200-psc-ac97 f0002000.ac97: Failed to register DAI
[   16.502222] mpc5200-psc-ac97: probe of f0002000.ac97 failed with error -22

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: mpc5200 combine psc_dma platform data
Eric Millbrandt [Thu, 13 Sep 2012 21:43:11 +0000 (17:43 -0400)]
ASoC: fsl: mpc5200 combine psc_dma platform data

The mpc5200_psc_ac97 and mpc5200_psc_i2s modules rely on shared platform data
with mpc5200_dma.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-audmux: remove null check of audmux_base in audmux_read_file
Richard Zhao [Tue, 18 Sep 2012 08:38:30 +0000 (16:38 +0800)]
ASoC: imx-audmux: remove null check of audmux_base in audmux_read_file

When audmux_read_file is called, it means the driver is already
initialised successfully, so we don't need to check audmux_base.

It also fix smatch warning:
sound/soc/fsl/imx-audmux.c:78 audmux_read_file() warn: possible memory leak of 'buf'

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm-dma: open function failed when snd_dmaengine_pcm_open fail
Richard Zhao [Tue, 18 Sep 2012 09:20:06 +0000 (17:20 +0800)]
ASoC: imx-pcm-dma: open function failed when snd_dmaengine_pcm_open fail

snd_imx_open should return error code returned by snd_dmaengine_pcm_open.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm-dma: check kzalloc return value in function snd_imx_open
Richard Zhao [Tue, 18 Sep 2012 09:20:05 +0000 (17:20 +0800)]
ASoC: imx-pcm-dma: check kzalloc return value in function snd_imx_open

It fixed smatch warning:
sound/soc/fsl/imx-pcm-dma.c:112 snd_imx_open() error: potential null dereference 'dma_data'.  (kzalloc returns null)

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Avoid recalculating the bitmask for SOC_ENUM controls
Lars-Peter Clausen [Fri, 14 Sep 2012 11:57:27 +0000 (13:57 +0200)]
ASoC: Avoid recalculating the bitmask for SOC_ENUM controls

For ENUM controls the bitmask is calculated based on the number of items.
Currently this is done each time the control is accessed. And while the
performance impact of this should be negligible we can easily do better. The
roundup_pow_of_two macro performs the same calculation which is currently done
manually, but it is also possible to use this macro with compile time constants
and so it can be used to initialize static data. So we can use it to initialize
the mask field of a ENUM control during its declaration.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8960: add support for big-endian audio samples
Timur Tabi [Fri, 14 Sep 2012 21:14:37 +0000 (16:14 -0500)]
ASoC: wm8960: add support for big-endian audio samples

PowerPC ASoC drivers frequently use the _BE variants of the SNDRV_PCM_FORMAT
macros, so we need to look for those as well.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: remove unnecessary call to dma_unmap_single
Timur Tabi [Fri, 14 Sep 2012 21:14:36 +0000 (16:14 -0500)]
ASoC: fsl: remove unnecessary call to dma_unmap_single

Remove a call to dma_unmap_single() from the PowerPC ASoC DMA driver.  The
buffer is allocated and not actually mapped, so the unmap call doesn't
make sense.  It was probably left over from some early version of the driver.

This bug was unnoticed for so long because the DMA mapping functions normally
don't do anything on PowerPC.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: use snd_soc_register_card to register the card
Timur Tabi [Fri, 14 Sep 2012 21:14:34 +0000 (16:14 -0500)]
ASoC: fsl: use snd_soc_register_card to register the card

Use snd_soc_register_card() instead of platform_device_alloc("soc-audio")
to register the sound card from the machine drivers.  The use of
platform_device_alloc is deprecated.

Although several other drivers still use platform_device_alloc(), the
Freescale drivers were not using it to pass driver data.  Instead of fixing
the driver data usage, it's better to replace the deprecated code.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mx27vis: retrieve gpio numbers from platform_data
Shawn Guo [Mon, 17 Sep 2012 05:34:31 +0000 (13:34 +0800)]
ASoC: mx27vis: retrieve gpio numbers from platform_data

Rather than including mach/iomux-mx27.h to define gpio numbers and set
up the pins, the patch moves all these into machine code and has the
gpio numbers passed to driver via platform_data.  As the result, we
can remove the mach/iomux-mx27.h inclusion from driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ad1836: Convert to direct regmap usage.
Lars-Peter Clausen [Thu, 13 Sep 2012 10:04:51 +0000 (12:04 +0200)]
ASoC: ad1836: Convert to direct regmap usage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ad193x: Use managed regmap init
Lars-Peter Clausen [Thu, 13 Sep 2012 10:03:23 +0000 (12:03 +0200)]
ASoC: ad193x: Use managed regmap init

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Remove useless kfree
Peter Senna Tschudin [Wed, 12 Sep 2012 15:06:46 +0000 (17:06 +0200)]
ASoC: core: Remove useless kfree

Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Mark regmap CODEC register maps as dirty when suspending
Mark Brown [Wed, 12 Sep 2012 04:21:52 +0000 (12:21 +0800)]
ASoC: core: Mark regmap CODEC register maps as dirty when suspending

The core has for a long time had support for marking the register maps of
devices dirty when suspending so that they are resynced on resume. Also
implement this feature for CODECs using regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: arizona: Clarify logging for FLL lock status interrupt
Mark Brown [Wed, 12 Sep 2012 10:44:40 +0000 (18:44 +0800)]
ASoC: arizona: Clarify logging for FLL lock status interrupt

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8737: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 04:48:48 +0000 (12:48 +0800)]
ASoC: wm8737: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8737: Move regulator acquisition to device registration
Mark Brown [Wed, 12 Sep 2012 04:36:28 +0000 (12:36 +0800)]
ASoC: wm8737: Move regulator acquisition to device registration

This is better style as we acquire resources we will need before we go into
the ASoC card probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8728: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 04:30:01 +0000 (12:30 +0800)]
ASoC: wm8728: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8711: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 04:15:20 +0000 (12:15 +0800)]
ASoC: wm8711: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8580: Move regulator acquisition to I2C probe
Mark Brown [Wed, 12 Sep 2012 04:03:51 +0000 (12:03 +0800)]
ASoC: wm8580: Move regulator acquisition to I2C probe

Better style as we get all the resources we need prior to starting the
ASoC level probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8580: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 03:59:51 +0000 (11:59 +0800)]
ASoC: wm8580: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8510: Convert to direct regmap API usage
Mark Brown [Wed, 12 Sep 2012 03:43:44 +0000 (11:43 +0800)]
ASoC: wm8510: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8991: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:28:08 +0000 (09:28 +0800)]
ASoC: wm8991: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8990: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:26:53 +0000 (09:26 +0800)]
ASoC: wm8990: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8737: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:26:38 +0000 (09:26 +0800)]
ASoC: wm8737: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8728: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:26:25 +0000 (09:26 +0800)]
ASoC: wm8728: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8711: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:26:12 +0000 (09:26 +0800)]
ASoC: wm8711: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8580: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:25:59 +0000 (09:25 +0800)]
ASoC: wm8580: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8510: Convert to devm_kzalloc()
Mark Brown [Wed, 12 Sep 2012 01:24:12 +0000 (09:24 +0800)]
ASoC: wm8510: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8900: Fix typo of name to wm9700
Mark Brown [Tue, 11 Sep 2012 01:26:09 +0000 (09:26 +0800)]
ASoC: wm8900: Fix typo of name to wm9700

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8900: Convert to direct regmap API usage
Mark Brown [Tue, 11 Sep 2012 01:25:41 +0000 (09:25 +0800)]
ASoC: wm8900: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8900: Convert to devm_kzalloc()
Mark Brown [Tue, 11 Sep 2012 01:19:19 +0000 (09:19 +0800)]
ASoC: wm8900: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoRevert "ASoC: AC97 doesn't use regmap by default"
Fabio Estevam [Mon, 10 Sep 2012 16:10:10 +0000 (13:10 -0300)]
Revert "ASoC: AC97 doesn't use regmap by default"

Since commit 98d3088e5 (SoC: core: Fix check before defaulting to regmap)
, it is not necessary to provide codec->control_data anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Revert "ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements"
Fabio Estevam [Mon, 10 Sep 2012 16:10:09 +0000 (13:10 -0300)]
ASoC: Revert "ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements"

Since commit 98d3088e5 (SoC: core: Fix check before defaulting to regmap)
, it is not necessary to provide codec->control_data anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Revert "ASoC: mc13783: Provide codec->control_data"
Fabio Estevam [Mon, 10 Sep 2012 16:10:08 +0000 (13:10 -0300)]
ASoC: Revert "ASoC: mc13783: Provide codec->control_data"

Since commit 98d3088e5 (SoC: core: Fix check before defaulting to regmap)
, it is not necessary to provide codec->control_data anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: am3517evm: Remove unused cpu_dai from hw_params
Peter Ujfalusi [Mon, 10 Sep 2012 12:55:17 +0000 (15:55 +0300)]
ASoC: am3517evm: Remove unused cpu_dai from hw_params

cpu_dai is not in use in this function and just generates warning at
compile time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs4270: Convert to direct regmap API usage
Mark Brown [Mon, 10 Sep 2012 04:57:03 +0000 (12:57 +0800)]
ASoC: cs4270: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
12 years agoASoC: cs4270: Move regulator acquisition to I2C probe()
Mark Brown [Mon, 10 Sep 2012 04:53:12 +0000 (12:53 +0800)]
ASoC: cs4270: Move regulator acquisition to I2C probe()

This is better style since it has us obtaining all resources before we
try the ASoC probe. This change also fixes a potential issue where we
don't enable the regulators before trying to confirm the device ID which
could cause a failure during probe in some system configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
12 years agoASoC: cs4270: Conver to data based control init
Mark Brown [Mon, 10 Sep 2012 04:48:11 +0000 (12:48 +0800)]
ASoC: cs4270: Conver to data based control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
12 years agoASoC: wm8960: Convert to direct regmap API usage
Mark Brown [Mon, 10 Sep 2012 11:23:57 +0000 (19:23 +0800)]
ASoC: wm8960: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8904: remove redundant code
Bo Shen [Mon, 10 Sep 2012 09:50:33 +0000 (17:50 +0800)]
ASoC: wm8904: remove redundant code

The core_intercon is added two times, remove the redundant one

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8741: Convert to direct regmap API usage
Mark Brown [Mon, 10 Sep 2012 10:00:21 +0000 (18:00 +0800)]
ASoC: wm8741: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8741: Move regulator acquisition to I2C/SPI probe()
Mark Brown [Mon, 10 Sep 2012 09:52:59 +0000 (17:52 +0800)]
ASoC: wm8741: Move regulator acquisition to I2C/SPI probe()

Better style as we acquire resources before trying the ASoC card probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsi: convert to devm_xxx()
Kuninori Morimoto [Mon, 10 Sep 2012 09:14:31 +0000 (02:14 -0700)]
ASoC: fsi: convert to devm_xxx()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsi: tidyup: remove un-necessary operation from fsi_probe()
Kuninori Morimoto [Mon, 10 Sep 2012 09:14:10 +0000 (02:14 -0700)]
ASoC: fsi: tidyup: remove un-necessary operation from fsi_probe()

struct fsi_master *master became member of struct fsi_priv from
71f6e0645be42f93c0f90dfcc93b9d2d277c2ee6
(ASoC: sh_fsi: avoid using global variable)

So, master = NULL is not necessary on fsi_probe() now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsi: fixup pm_runtime_disable() timing on fsi_probe()
Kuninori Morimoto [Mon, 10 Sep 2012 09:13:52 +0000 (02:13 -0700)]
ASoC: fsi: fixup pm_runtime_disable() timing on fsi_probe()

pm_runtime_disable() error handling timing on fsi_probe() was wrong.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sta32x: Convert to regmap
Mark Brown [Mon, 10 Sep 2012 02:59:56 +0000 (10:59 +0800)]
ASoC: sta32x: Convert to regmap

Long term all drivers should be using regmap directly. This is more
idiomatic and moves us towards the removal of the ASoC level cache
code.

The initialiasation of reserved register bits in probe() is slightly odd
as the defaults being written don't appear to match the silicon defaults
but the new code should have the same effect as the old code.

The watchdog code will now unconditionally do a mute and unmute when
resyncing but since we only sync when we are very sure there is something
to sync this should have no impact.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
12 years agoASoC: sta32x: Move regulator acquisition to I2C probe
Mark Brown [Mon, 10 Sep 2012 02:59:51 +0000 (10:59 +0800)]
ASoC: sta32x: Move regulator acquisition to I2C probe

This is better style as it ensures we don't try to do the ASoC probe
without required resources. Also convert to devm_ while we're at it,
saving a bit of code, and fix a leak of enable on error.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
12 years agoASoC: wm8523: Move device ID verification and reset to I2C probe
Mark Brown [Mon, 10 Sep 2012 09:07:24 +0000 (17:07 +0800)]
ASoC: wm8523: Move device ID verification and reset to I2C probe

Ensure that we have confirmed that we've got the device in place before
we register with ASoC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8523: Convert to direct regmap API usage
Mark Brown [Mon, 10 Sep 2012 08:27:45 +0000 (16:27 +0800)]
ASoC: wm8523: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8523: Move regulator acquisition to I2C probe()
Mark Brown [Mon, 10 Sep 2012 08:23:34 +0000 (16:23 +0800)]
ASoC: wm8523: Move regulator acquisition to I2C probe()

This is better style since we acquire all needed resources before we try
to do the ASoC card probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8523: Convert to devm_kzalloc()
Mark Brown [Mon, 10 Sep 2012 08:18:56 +0000 (16:18 +0800)]
ASoC: wm8523: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8983: Convert to direct regmap API usage
Mark Brown [Mon, 10 Sep 2012 07:28:19 +0000 (15:28 +0800)]
ASoC: wm8983: Convert to direct regmap API usage

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8983: Convert to devm_kzalloc()
Mark Brown [Mon, 10 Sep 2012 07:14:16 +0000 (15:14 +0800)]
ASoC: wm8983: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Add flags to regulator supplies
Mark Brown [Fri, 7 Sep 2012 02:54:32 +0000 (10:54 +0800)]
ASoC: dapm: Add flags to regulator supplies

This will be used to enable additional control of the regulators.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: imx-mc13783: use defines instead of numerical address of register
Gaëtan Carlier [Thu, 6 Sep 2012 07:40:12 +0000 (09:40 +0200)]
ASoC: imx-mc13783: use defines instead of numerical address of register

This uses already defined name of registers and makes code more readable.

Signed-off-by: Gaëtan Carlier <gcembed@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Revert 'ASoC: imx-ssi: Remove mono support'
Javier Martin [Thu, 6 Sep 2012 00:30:10 +0000 (21:30 -0300)]
ASoC: Revert 'ASoC: imx-ssi: Remove mono support'

Revert 0865a75(ASoC: imx-ssi: Remove mono support).

The bug this patch is meant to solve doesn't occur in Visstrim_M10 boards.
Furthermore, after applying this patch sound in Visstrim_M10 is played
at slower rates.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Ensure bypass paths are suspended and resumed
Mark Brown [Sat, 1 Sep 2012 00:38:32 +0000 (17:38 -0700)]
ASoC: dapm: Ensure bypass paths are suspended and resumed

Since bypass paths aren't part of DAPM streams and we may not have any
DAPM streams there may not be anything that triggers a DAPM sync for
them. Mark all input and output widgets as dirty and then sync to do so
at the end of suspend and resume.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: Davinci: McASP: add support new McASP IP Variant
Hebbar, Gururaja [Mon, 3 Sep 2012 08:10:40 +0000 (13:40 +0530)]
ASoC: Davinci: McASP: add support new McASP IP Variant

The OMAP2+ variant of McASP is different from Davinci variant w.r.to
some register offset.

Changes
- Add new MCASP_VERSION_3 to identify new variant. New DT compatible
  "ti,omap2-mcasp-audio" to identify version 3 controller.
- The register offsets are handled depending on the version.

Note:
    DMA parameters (dma fifo offset) are not updated and will be done later.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove unused 'saved_value' field from snd_soc_dapm_widget struct
Lars-Peter Clausen [Mon, 3 Sep 2012 08:34:26 +0000 (10:34 +0200)]
ASoC: Remove unused 'saved_value' field from snd_soc_dapm_widget struct

The only user was removed over two years ago in commit a6c65736 ("ASoC: Remove
current PGA control handling").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: tegra: move platform data header
Stephen Warren [Wed, 5 Sep 2012 16:27:14 +0000 (10:27 -0600)]
ASoC: tegra: move platform data header

Move the Tegra+WM8903 ASoC platform data header out of
arch/arm/mach-tegra, as a pre-requisite of single zImage.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm0010: Fix warning, use format %zu for type size_t
Emil Goode [Wed, 5 Sep 2012 20:22:24 +0000 (22:22 +0200)]
ASoC: wm0010: Fix warning, use format %zu for type size_t

Fix warning by using format specifier %zu for type size_t

Sparse warning:
sound/soc/codecs/wm0010.c:411:2: warning:
        format ‘%d’ expects argument of type ‘int’,
        but argument 4 has type ‘size_t’ [-Wformat]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm0010: unlock on error path
Dan Carpenter [Wed, 5 Sep 2012 12:29:46 +0000 (15:29 +0300)]
ASoC: wm0010: unlock on error path

We're holding the wm0010->lock mutex when we goto err_core.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm0010: Add missing IRQF_ONESHOT
Fengguang Wu [Thu, 30 Aug 2012 15:16:52 +0000 (08:16 -0700)]
ASoC: wm0010: Add missing IRQF_ONESHOT

FYI, there are new coccinelle warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-3.7
head:   e3523e01869da20fdd12ffd19ae1df7bf492650e
commit: e3523e01869da20fdd12ffd19ae1df7bf492650e [95/95] ASoC: wm0010: Add initial wm0010 DSP driver

All coccinelle warnings:

+ sound/soc/codecs/wm0010.c:850:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT
--
+ sound/soc/codecs/wm0010.c:660:1-7: preceding lock on line 359

vim +850 sound/soc/codecs/wm0010.c
   847 trigger = IRQF_TRIGGER_FALLING;
   848 trigger |= IRQF_ONESHOT;
   849
 > 850 ret = request_threaded_irq(irq, NULL, wm0010_irq, trigger,
   851    "wm0010", wm0010);
   852 if (ret)
   853 dev_err(wm0010->dev, "Failed to request IRQ %d: %d\n",

Please consider folding the attached diff :-)

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'asoc-omap' into for-3.7
Mark Brown [Wed, 5 Sep 2012 12:05:11 +0000 (20:05 +0800)]
Merge branch 'asoc-omap' into for-3.7