Commit Graph

6844 Commits

Author SHA1 Message Date
Mark Brown
06b753d6fd Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next 2013-06-17 17:20:15 +01:00
Mark Brown
9912b30f95 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-06-17 17:20:14 +01:00
Mark Brown
e768f4e12f Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-06-17 17:20:14 +01:00
Mark Brown
0ee6f75016 Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next 2013-06-17 17:20:13 +01:00
Mark Brown
b27729344d Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next 2013-06-17 17:20:13 +01:00
Mark Brown
c38a881ebb Merge remote-tracking branch 'asoc/fix/wm8962' into asoc-linus 2013-06-17 17:20:12 +01:00
Mark Brown
a87c863c7b Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-06-17 17:20:11 +01:00
Mark Brown
d48fb4232d Merge remote-tracking branch 'asoc/fix/adsp' into asoc-linus 2013-06-17 17:20:11 +01:00
Mark Brown
27e9a69759 Merge remote-tracking branch 'asoc/fix/adav80x' into asoc-linus 2013-06-17 17:20:10 +01:00
Tushar Behera
fc09cfbe3e ASoC: spear: Convert to use devm_ioremap_resource
Commit 75096579c3 ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

devm_request_mem_region is called in devm_ioremap_resource(). Hence that
part can also be removed.

Since devm_ioremap_resource prints error message on failure, there is
no need to print an explicit warning message.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: alsa-devel@alsa-project.org
CC: Liam Girdwood <lgirdwood@gmail.com>
CC: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17 17:19:58 +01:00
Mark Brown
1d26f752ac ASoC: spear: Normalise module names
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17 11:18:24 +01:00
Sekhar Nori
4867e99d21 ASoC: davinci: remove sffsdr machine support
sffsdr machine support does not build since at least v2.6.36
(~3 years). There is little hope of it being fixed, so remove
the support.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17 09:59:31 +01:00
Mark Brown
fc7fe01518 ASoC: spear: Remove nonexistant EVM options
The source wasn't added.

Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17 09:04:12 +01:00
Olof Johansson
2c3165ebb6 Second set of DMA40 changes: refactorings and device tree
support for the DMA40. Now with MUSB and some platform
 data removal.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJRrctTAAoJEEEQszewGV1zoFkP/0ZS3Hw4sGX4CRcVZysFZXon
 tEWMtNq3WvugmAMos1BJtVYjbu9oaI0kPnTZOU83rF8YzEGvRUy+3AlZXwGmkyYq
 NgdfDElAY815F9pJ3ffFL74Dd36paWPtO55JuUEsdxLZE7c4/qOBHykURU0NzMtK
 at70fgVLaNo+mjB+Q2M1ouI5tBCrdwso+vI9SHYlof2wt8TiAmbBTOcKO35nUzlk
 brcrTeTtdWCc2foP7cFgmjrsct3CzB4Dfl49MiCv1zsiQL5a+qB0EAMd4xYyuVqb
 GE1WQDvDwzEDre0pAb/io/NwnlF81tgr6dhFTeFxB44knqbkptQFw9XCDnTQTy5C
 dda5HSJ31ES3N2IUj5K0tlSm3/cBywt5IU79FwhFN4Ndq/nzDtZQ+Y2/X0IA99is
 eTpLM+/20juOyTxt4vHhdp4aL4r4ZdmOb0GAsyAg/TtsG5LJhZPIctZ+xexKqAhX
 wPkvHubv87ruQC6AOjVXwez+3tzTLuU7H8a9IOHi+oHk4r+mdba3kAKTyEl717Bk
 44N0hcSLbZYktE9gdBJWuuySmfLXnbb/lc+2OjFYNWMHIgDbEwS2ZeVnKB8G+Eil
 iGDIMMnbCc9vA6fiDARZ3DvLFvahnUbO4BqcFozc/hHbhTceSn9xkXX3NcM8NCWF
 EAWWZlx4dtAbzB7ReTDm
 =rn7t
 -----END PGP SIGNATURE-----

Merge tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers

From Linus Walleij:
Second set of DMA40 changes: refactorings and device tree
support for the DMA40. Now with MUSB and some platform
data removal.

* tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  dmaengine: ste_dma40: Fetch disabled channels from DT
  dmaengine: ste_dma40: Fetch the number of physical channels from DT
  ARM: ux500: Stop passing DMA platform data though AUXDATA
  dmaengine: ste_dma40: Allow memcpy channels to be configured from DT
  dmaengine: ste_dma40_ll: Replace meaningless register set with comment
  dmaengine: ste_dma40: Convert data_width from register bit format to value
  dmaengine: ste_dma40_ll: Use the BIT macro to replace ugly '(1 << x)'s
  ARM: ux500: Remove recently unused stedma40_xfer_dir enums
  dmaengine: ste_dma40: Replace ST-E's home-brew DMA direction defs with generic ones
  ARM: ux500: Replace ST-E's home-brew DMA direction definition with the generic one
  dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s
  ARM: ux500: Remove empty function u8500_of_init_devices()
  ARM: ux500: Remove ux500-musb platform registation when booting with DT
  usb: musb: ux500: add device tree probing support
  usb: musb: ux500: attempt to find channels by name before using pdata
  usb: musb: ux500: harden checks for platform data
  usb: musb: ux500: take the dma_mask from coherent_dma_mask
  usb: musb: ux500: move the MUSB HDRC configuration into the driver
  usb: musb: ux500: move channel number knowledge into the driver
2013-06-14 16:53:54 -07:00
Charles Keepax
5be9c5b477 ASoC: wm5110: Correct rate control for DSP4
Reported-by: Dennis May <dennis.may@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 15:59:55 +01:00
Nicolin Chen
f5055f9373 ASoC: wm8962: Enable start-up and normal bias after reset in runtime resume
This part of bias settings are essential for WM8962 to power up. Without it
"wm8962 0-001a: DC servo timed out" might be prompted due to power-up failure
that happens to FLL if being used.

The driver's also bringing the bias down in the suspend path so it needs to be
powered up in the resume path for symmetry.

According to dapm_pre_sequence_async(), DAPM would call pm_runtime_get_sync()
to let driver finish the bias settings in pm_runtime_resume() before the bias
level being set to STANDBY. So no need to worry about disordered settings for
VMID of WM8962.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:43:16 +01:00
Lars-Peter Clausen
efc77e36ae ASoC: dapm: Add snd_soc_dapm_switch to the power up/down sequence table
The power up/down sequence order for DAPM switch widgets is not explicitly
initialized, causing them to be run always as the first widget type for both
power up and down. Move it to the same position in the sequence as other mixer
widget types.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:35:23 +01:00
Lars-Peter Clausen
656ca9d327 ASoC: dapm: Remove unused long_name field from snd_soc_dapm_path struct
Since commit 85762e71 ("ASoC: dapm: Implement mixer control sharing") the
long_name field of the snd_soc_dapm_path struct is unused. All of the name
handling now happens entirely in dapm_create_or_share_mixmux_kcontrol(). So we
can remove the long_name field from the snd_soc_dapm_path struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:34:11 +01:00
Lars-Peter Clausen
8872293fc3 ASoC: dapm: Add a helper function to free a DAPM path
We have the same code for freeing a DAPM path in three different locations.
Introduce a new helper function to take care of this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:34:11 +01:00
Lars-Peter Clausen
58fee775b7 ASoC: dapm: Remove unnecessary loop
The condition 'i == item' is only true when, well, 'i' equals 'item'.
So just use 'item' directly as the index into the array.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:34:10 +01:00
Lars-Peter Clausen
6b75bf0c5b ASoC: dapm: Setup private_free callback for dapm kcontrols
The private data containing the widget list that is a assigned to a DAPM
kcontrol is never freed. Setup the private_free for DAPM kcontrols to take care
of this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:34:10 +01:00
Mark Brown
41139938cd ASoC: SPEAr: Hide component drivers in Kconfig
The individual component drivers are only useful with a machine driver and
should be selected by the machine drivers so shouldn't have help text of
their own in order to hide them in interactive configuration.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:28:46 +01:00
Mark Brown
6df2610c15 ASoC: SPEAr: Add dependency on dmaengine helpers
I'd be very surprised if anyone has used the Kconfig...

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 12:26:20 +01:00
Emil Goode
55dafe5dc2 ASoC: Fix double assignment of .owner in struct snd_soc_card
In struct snd_soc_card zylonite .owner is assigned THIS_MODULE
twice, remove one of them.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-14 11:00:03 +01:00
Mark Brown
384b834558 Merge branch 'fix/wm8962' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-wm8962
Conflicts:
	sound/soc/codecs/wm8962.c
2013-06-14 10:16:06 +01:00
Nicolin Chen
2e7ee15ced ASoC: wm8962: Remove remaining direct register cache accesses
Also fix return values for headphone switch updates.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-06-14 10:13:53 +01:00
Stephen Warren
9be94aeabf ASoC: rt5640: fix sparse warnings
This fixes:
975:9: sparse: Using plain integer as NULL pointer
1917:24: sparse: symbol 'rt5640_aif_dai_ops' was not declared. Should it be static?
1924:27: sparse: symbol 'rt5640_dai' was not declared. Should it be static?
2079:19: sparse: symbol 'rt5640_i2c_driver' was not declared. Should it be static?

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-13 10:26:57 +01:00
Uwe Kleine-König
d8f4e17fdd ASoC: SPEAr spdif_{in,out}: fix fallout of previous cleanup
The patch that resulted in

	bfcc74e (ASoC: SPEAr spdif_{in,out}: use devm for clk and a few
more cleanups)

was broken and applied on a newer tree than it was created for. So
bfcc74e introduced unbalanced clk handling, two warnings about unused
variables and passed 3 arguments to a function only taking 2. This
commit fixes that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-13 10:25:52 +01:00
Stephen Warren
040a62cf1c ASoC: tegra: add tegra+RT5640 machine driver
Initially, this binding and driver only describe/support playback to
headphones and speakers.

This driver will support Beaver and Dalmore.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 19:28:16 +01:00
Stephen Warren
dcad9f0312 ASoC: rt5640: add device tree support
Modify the RT5640 driver to parse platform data from device tree. Write
a DT binding document to describe those properties.

Slight re-ordering of rt5640_i2c_probe() to better fit the DT parsing.

Since ldo1_en is optional, guard usage of it with gpio_is_valid(), rather
than open-coding an if (gpio) check.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 19:25:22 +01:00
Charles Keepax
7c470373e0 ASoC: wm5102: Expose controls for DRE
Certain use cases may require specific DRE settings so expose control
of these.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 18:06:49 +01:00
Bard Liao
997b05203b ASoC: add RT5640 CODEC driver
This patch adds the ALC5640 codec driver.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 17:46:54 +01:00
Fabio Baltieri
eef6473ff3 ASoC: ux500: Add DMA slave config prepare routine
Implement a DMA slave config prepare routine, as until now the MSP
driver depended on the DMA controller completing the channel
configuration on its own, but this is not the case anymore since the
recent DMA driver updates.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 17:02:52 +01:00
Fabio Baltieri
20413113ff ASoC: ux500: Set DMA address during device init
Add a field with the tx/rx register address to the DMA parameters
structure, and set it to the correct address during device
initialization.

This address used to be hardcoded in the DMA controller driver, it now
needs to be explicitly figured out by the device driver.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 17:02:48 +01:00
Fabio Baltieri
f3fe53dd97 ASoC: ux500: Move DMA parameters into ux500_msp
Move struct ux500_msp_dma_params declaration from ux500_msp_i2s_drvdata
to ux500_msp, this saves some confusing pointer passing and allows to
access all DMA configuration fields from ux500_msp_i2s.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 17:01:42 +01:00
Rajeev Kumar
e58070ee4f ASoC: Add Kconfig and Makefile to support SPEAr audio driver
This patch adds Kconfig and Makefile to support SPEAr Audio driver.

Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:25:22 +01:00
Axel Lin
4119c0c0c6 ASoC: adav80x: Select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI
This driver is useless if both SPI and I2C are not configured.
Thus don't build this driver if both SPI and I2C are not configured.

This patch silences below build warning if both SPI and I2C are not configured.

  CC      sound/soc/codecs/adav80x.o
sound/soc/codecs/adav80x.c:842:12: warning: 'adav80x_bus_probe' defined but not used [-Wunused-function]
sound/soc/codecs/adav80x.c:863:12: warning: 'adav80x_bus_remove' defined but not used [-Wunused-function]

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:23:40 +01:00
Daniel Mack
f724ba3b07 ASoC: codecs: adau1701: factor out firmware reset
Some runtime-determined constraints might need to be satisfied prior to
firmware loading, so the actual download and releasing the device from
reset has to be postponed. Factor it out first, so we have everything at
one place.

This also changes the behaviour in a way that adau1701_i2c_probe() will
assert the reset line, and wait for the codec probe to release it.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:21:27 +01:00
Axel Lin
1aad4e574b ASoC: ssm2518: Fix trivial typo in checking tx_mask and rx_mask values
Otherwise, ssm2518_set_tdm_slot() always returns error if slots != 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:20:44 +01:00
Rajeev Kumar
22a4adf258 ASoC: dwc: Folder path correction in file header.
Folder path correction in file header.

Signed-off-by: Rajeev Kumar <rajeevk-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:19:01 +01:00
Rajeev Kumar
5e83c160d8 ASoC: dwc: debug message correction.
Debug message correction.

Signed-off-by: Rajeev Kumar <rajeevk-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:15:13 +01:00
Nicolin Chen
8de2ae2a7f ASoC: fsl: add imx-wm8962 machine driver
This is the initial imx-wm8962 device-tree-only machine driver working with
fsl_ssi driver. More features can be added on top of it later.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:08:24 +01:00
Fabio Estevam
b9840124d6 ASoC: imx-sgtl5000: Use devm_clk_get()
Commit 9e13f345 (ASoC: sgtl5000: Let the codec acquire its clock) removed the
clk_put calls.

Let's use devm_clk_get() instead, so that we do not need to call them anymore.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:06:48 +01:00
Fabio Estevam
7c647af43f ASoC: sgtl5000: Use i2c_get_clientdata()
We should use i2c_get_clientdata() to get the codec private structure.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-12 16:06:36 +01:00
Mark Brown
9c24b16722 ASoC: wm8962: Restore device state after reset in runtime resume
After the device has been reset we need to repeat the same
initialisation we do on probe to make sure that the device is in
a known state.

Tested-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-10 13:50:44 +01:00
Mark Brown
902a75cdc4 Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-06-10 10:28:51 +01:00
Mark Brown
4351ac5b9f Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus 2013-06-10 10:28:50 +01:00
Mark Brown
ed75019204 Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus 2013-06-10 10:28:49 +01:00
Mark Brown
56f1275b85 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2013-06-10 10:28:49 +01:00
Fabio Estevam
9e13f34588 ASoC: sgtl5000: Let the codec acquire its clock
On a mx6qsabrelite board the following error happens on probe:

sgtl5000: probe of 0-000a failed with error -5
imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered
imx-sgtl5000 sound.13: snd_soc_register_card failed (-517)
platform sound.13: Driver imx-sgtl5000 requests probe defer

Prior to reading the codec ID we need to turn the SYS_MCLK clock, so let's
enable the codec clock inside sgtl5000_i2c_probe().

Also remove the codec clock enable/disable functions from the machine driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-10 10:26:23 +01:00
Mark Brown
915b2c750e Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sgtl5000 2013-06-10 10:26:16 +01:00
Andreas Irestål
2894770ec1 ASoC: tlv320aic3x: Remove deadlock from snd_soc_dapm_put_volsw_aic3x()
When calling snd_soc_dapm_sync(), it eventually tries to lock the same mutex
already locked in snd_soc_dapm_put_volsw_aic3x() and a deadlock occurs. By
moving the mutex unlock to just before snd_soc_dapm_sync(), this deadlock is
prevented. This problem was introduced in Linux 3.5

Signed-off-by: Andreas Irestål <Andreas.Irestal@axis.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-07 17:57:16 +01:00
Mark Brown
4616274d33 ASoC: dapm: Treat DAI widgets like AIF widgets for power
Even though they are virtual widgets DAI widgets still get counted for the
DAPM context power management so we can't just use the active state to
check if they should be powered as they may not be part of a complete path.

Instead split them into input and output widgets and do the same power
checks as we perform on AIFs.

Reported-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-07 15:54:50 +01:00
Nicolin Chen
d74e9e7090 ASoC: wm8962: Add device tree binding
Document the device tree binding for the WM8962 codec, and modify the
driver to extract platform data from the device tree, if present.

Based on work of WM8903 by Stephen Warren <swarren@nvidia.com>

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-07 10:35:17 +01:00
Nicolin Chen
e75a52c672 ASoC: WM8962: Create default platform data structure
Embed a copy of struct wm8962_pdata in stuct wm8962_priv
so that there's no need to check validity of pdata any more.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-06 14:26:29 +01:00
Mark Brown
3722dc8ebf ASoC: max98090: Guard runtime PM callbacks
Otherwise the functions will be defined but unreferenced when runtime PM
is disabled, generating warnings.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-06 09:59:13 +01:00
Mark Brown
2bdc1bb2b4 ASoC: sgtl5000: Make device cache only when powered off
When the regulators have been disabled mark the device as cache only so
that we don't try to interact with the hardware.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-05 19:38:15 +01:00
Barry Song
bf7c6e6ccb ASoC: omap-hdmi-codec: make the driver common for other SoCs
to support HDMI on CSR SiRFprimaII and atlasVI, we need one more HDMI pseudo
codec, rather than add a new driver, we can make omap HDMI codec common for
other SoCs as well. then the omap-hdmi codec becomes a generic HDMI pseudo-
codec as HDMI audio features depend on HDMI specification not on SoCs.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-05 16:54:55 +01:00
Charles Keepax
6dc6a3f81e ASoC: arizona: Hookup SYSCLK to inputs and noise generators
All sources and sinks should enable SYSCLK.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-05 15:46:01 +01:00
Charles Keepax
ee4b7c7fe0 ASoC: arizona: Correct AEC loopback enable
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-05 15:45:42 +01:00
Stephen Warren
249e66c326 ASoC: tegra: add runtime PM to resume functions
Tegra HW needs clocks etc. active when touching registers. Make sure they
are active during resume, by calling pm_runtime_get_sync() before touching
HW.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-04 20:47:11 +01:00
Marek Vasut
dd4d2d6dfb ASoC: sgtl5000: Fix VAG_POWER enabling/disabling order
The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER
and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000
datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order
will result in ugly loud "POP" noise at the end of playback.

To achieve such order, use the _PRE and _POST DAPM widgets to trigger
the power_vag_event, where the event type check has to be fixed
accordingly as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-04 18:46:57 +01:00
Lee Jones
43f2e1a3be dmaengine: ste_dma40: Convert data_width from register bit format to value
When a DMA client requests and configures a DMA channel, it requests
data_width in Bytes. The DMA40 driver then swiftly converts it over to
the necessary register bit value. Unfortunately, for any subsequent
calculations we have to shift '1' by the bit pattern (1 << data_width)
times to make any sense of it.

This patch flips the semantics on its head and only converts the value
to its respective register bit pattern when writing to registers. This
way we can use the true data_width (in Bytes) value.

Cc: Dan Williams <djbw@fb.com>
Cc: Per Forlin <per.forlin@stericsson.com>
Cc: Rabin Vincent <rabin@rab.in>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-06-04 11:12:09 +02:00
Stephen Warren
5c5b08286f ASoC: tegra: implement suspend/resume for Tegra30 I2S
Add tegra30_i2s_{suspend,resume}. These use regcache functions to
restore all HW registers after power loss during a suspend/resume cycle.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03 19:53:07 +01:00
Stephen Warren
2f41a3f48a ASoC: tegra: implement suspend/resume for Tegra30 AHUB
Add tegra30_ahub_{suspend,resume}. These use regcache functions to
restore all HW registers after power loss during a suspend/resume cycle.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03 19:53:07 +01:00
Sachin Kamat
ea421eb18d ASoC: davinci: Remove redundant use of of_match_ptr macro
'mcasp_dt_ids' is always compiled in. Hence of_match_ptr is not
necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03 16:46:05 +01:00
Charles Keepax
fd8b965744 ASoC: wm0010: Clear IRQ as wake source and include missing header
Both clear the IRQ as being a wake source when we are finished with it
and include a missing header file that is required.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-03 16:38:06 +01:00
Mark Brown
056790923e ASoC: pcm: Require both CODEC and CPU support when declaring stream caps
When declaring playback and capture capabilities check for both CODEC
side and CPU side support rather than only checking for CODEC side
support.  While it is unusual some CPUs do have unidirectional DAIs.

Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2013-06-03 09:55:00 +01:00
Mark Brown
2da1c4bf76 ASoC: wm8994: Allow debounce before MICDET identification
For systems which do not have a jack detection feature allow some debounce
to be specified before we perform accessory identification, improving
robustness without impacting button detection responsiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-06-01 19:28:58 +01:00
Mark Brown
2d01e39b90 ASoC: wm8994: Remove unused variable
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-06-01 19:28:54 +01:00
Mark Brown
50941968fc ASoC: wm8994: Add digital loopback paths
There is loopback control within the audio interfaces, provide control of
this as there are some obscure scenarios where this could be used in
production.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 13:48:08 +01:00
Mark Brown
7afce3f5e5 ASoC: wm8994: Ensure microphone detection state is reset on removal
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 13:47:46 +01:00
Lars-Peter Clausen
cc37961b21 ASoC: blackfin: Remove bf5xx-tdm driver
Now that the bf5xx-i2s driver supports TDM mode and all users of the bf5xx-tdm
driver have been switch over to using the bf5xx-i2s driver there is no need to
keep the b5fxx-tdm driver around.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:41 +01:00
Lars-Peter Clausen
34f4095564 ASoC: blackfin: Switch bf5xx-ad1836 from bf5xx-tdm to bf5xx-i2s
The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is
going to be removed soon, so switch the driver over to bf5xx-i2s.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:41 +01:00
Lars-Peter Clausen
b88546324e ASoC: blackfin: Switch bf5xx-ad193x from bf5xx-tdm to bf5xx-i2s
The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is
going to be removed soon, so switch the driver over to bf5xx-i2s.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
8b5e2e396b ASoC: blackfin: bf5xx-i2s: Add support for TDM mode
The bf5xx-i2s{,-pcm} and bf5xx-tdm{-pcm} drivers are nearly identical. Both are
for the same hardware each supporting a slight different subset of the hardware.
The bf5xx-i2s driver supports 2 channel I2S mode while the bf5xx-tdm driver
supports TDM mode and channel remapping. This patch adds support for TDM mode
and channel remapping to the bf5xx-i2s driver so that we'll eventually be able
to retire the bf5xx-tdm driver. Unfortunately the hardware is fixed to using 8
channels in TDM mode. The bf5xx-tdm driver jumps through a few hoops to make it
work well with other channel counts as well:
	* Don't support mmap
	* Translate between internal frame size (which is always 8 * sample_size)
	  and ALSA frame size (which depends on the channel count)
	* Have special copy and silence callbacks which are aware of the mismatch
	  between internal and ALSA frame size
	* Reduce the maximum buffer size to ensure that there is enough headroom for
	  dummy data.

The bf5xx-i2s driver is going to use the same mechanisms when being used int
TDM mode.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
a3935a29f6 ASoC: blackfin: bf5xx-i2s-pcm: Use snd_pcm_lib_preallocate_pages_for_all()
Use snd_pcm_lib_preallocate_pages_for_all() for pre-allocating the DMA buffers
instead of re-implementing the same functionality.  Note that there is no need
to call snd_pcm_lib_free_pages_for_all() since the ALSA core takes care of this
for us.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
569ef65a97 ASoC: blackfin: bf5xx-i2s: Allocate buffer only as large as requested
There is no need to always allocate the maximum buffer size. While we are at it
also pass errors returned by snd_pcm_lib_malloc_pages() on to the upper layers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
6344260484 ASoC: blackfin: bf5xx-sport: Allow setting rx and tx mask independently
Since the hardware supports it there is no need to artificially limit this to
just being able to set the same mask for both tx and rx.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
b7ede5dea0 ASoC: blackfin: bf5xx-i2s: Use dev_{err, dbg} instead of pr_{error, debug}
Using dev_{err,dbg} instead of pr_{error,debug} makes it easier to recognize
which device created the message.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Lars-Peter Clausen
d65f63da22 ASoC: blackfin: Remove unused bf5xx-{i2s, tdm, ac97}-pcm.h
The structs defined in these files are completely unused, so remove both the
structs and the files.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:33:40 +01:00
Mark Brown
9e43088bb0 ASoC: wm8994: Avoid leaking pm_runtime reference on removed jack race
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:10:02 +01:00
Paul Bolle
18b494527b ASoC: OMAP: Remove obsolete Makefile line
Support for omap2evm was removed in v3.0. But only one of its two
lines in this Makefile was removed. Remove the second line too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 11:49:24 +01:00
Charles Keepax
e684533b10 ASoC: wm0010: Set IRQ as a wake source
The DSPs IRQ should be a wake source as several of the possible
algorithms may run whilst the AP is asleepi and require to wake the AP
to push or pull more data, such as compressed playback.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 11:48:04 +01:00
Mark Brown
70bd3b298b ASoC: wm8994: Defer declaration of open circuit microphones
Provide a bit of debounce to handle pathological cases with slow input
better by allowing the microphone detection to run for a bit longer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29 20:31:33 +01:00
Nicolas Schichan
7d8acf2cba ASoC: cs42l52: fix hp_gain_enum shift value.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29 19:24:39 +01:00
Nicolas Schichan
8ac60a6866 ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29 19:24:36 +01:00
Mark Brown
f7dbd399ef ASoC: wm8994: Ensure lambda is zeroed for WM8994
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:57:38 +01:00
Mark Brown
287d03e9cd ASoC: wm8994: Remove restore of DAC enable state
It's not been needed since the regmap conversion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:57:34 +01:00
Mark Brown
1ab9ecc248 Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-05-28 15:41:37 +01:00
Mark Brown
9f1b2556c5 Merge remote-tracking branch 'asoc/fix/max98090' into asoc-linus 2013-05-28 15:41:36 +01:00
Mark Brown
72322e6362 Merge remote-tracking branch 'asoc/fix/davinci' into asoc-linus 2013-05-28 15:41:36 +01:00
Mark Brown
7ae3433628 Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus 2013-05-28 15:41:35 +01:00
Mark Brown
d63aaee1fe Merge remote-tracking branch 'asoc/fix/compress' into asoc-linus 2013-05-28 15:41:35 +01:00
Mark Brown
c6859959fc Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus 2013-05-28 15:41:34 +01:00
Nicolas Schichan
04d245b789 ASoC: cs42l52: fix default value for MASTERA_VOL.
The default register value for MASTERA_VOL is 0x00, the same as
MASTERB_VOL.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-05-28 15:40:50 +01:00
Vinod Koul
7d6898be8d ASoC: wm8994: check for array index returned
The array 'drc_cfg' of size 3 may use index value -22 (EINVAL)
The array 'retune_mobile_cfg' of size 3 may use index value -22 (EINVAL)

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:36:45 +01:00
Kuninori Morimoto
c375b2d7ef ASoC: fsi: fixup sparse errors
This patch fixup below sparse errors

${LINUX}/sound/soc/sh/fsi.c:1459:9: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1634:25: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:1639:17: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2093:9: \
	error: incompatible types in conditional expression (different base types)
${LINUX}/sound/soc/sh/fsi.c:2105:9: \
	error: incompatible types in conditional expression (different base types)

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:35:46 +01:00
Dimitris Papastamos
0c2e3f3420 ASoC: wm_adsp: Ensure set controls are synced on each boot
Rename `dirty' to `set' as it is a bit more descriptive.  A set
control is any control that has been set by the user.  We need to ensure
that everytime we boot the DSP we sync out any controls that were
set.

We could at some point start keeping track of the default values of
the controls to suppress some of the device I/O.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:34:26 +01:00
Fabio Baltieri
a130243b96 ASoC: ux500: Ensure consistent configuration between DAIs
Current implementation of mop500_ab8500 allows for inconsistent sample
rate and channel count configuration between the playback and recording
interfaces, through in the hardware the two MSP controllers share
common clock and frame sync signals.

This patch adds the necessary code to ensure that the two device are
configure consistently.  The check is added at machine driver level, as
how to lock DAI configuration depend of the actual hardware
implementation.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 10:23:23 -04:00
Mark Brown
9767a58b8b ASoC: wm8994: Fix reporting of accessory removal on WM8958
During recent refactoring the code to report removal when MICDET reports
an absent microphone was removed, causing problems for systems which rely
solely on the MICDET for this functionality. Restore it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 10:22:36 -04:00
Vinod Koul
d3134e211e ASoC: wm8994: use the correct pointer to get the control value
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 10:10:09 -04:00
Charles Keepax
939d3c6a6c ASoC: bells: Hookup DMICs for Bells
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-27 08:05:19 -04:00
Fabio Baltieri
f82030f978 ASoC: ux500: Drop redundant msp id enumerations
Ux500 has two equivalent enum for device id, one in platform_data and
one in a local header.  Fix this by dropping the local one.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:35 -04:00
Fabio Baltieri
06b9671ee6 ASoC: ux500: Add missing mop500_ab8500.h include
Add a missing include that was resulting in some sparse warning for
non-static structure without forward declaration.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:34 -04:00
Fabio Baltieri
2a357137fa ASoC: ux500: Drop unused code from msp headers
Drop unused fields and structures from ux500_msp_i2s header file, as
those looks like leftover from a previous implementation of the driver.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:34 -04:00
Fabio Baltieri
b7230d7e4c ASoC: ux500: Drop dangling struct i2s_controller
Drop struct i2s_controller from the ux500 ASoC driver as right now it is
instantiated but not used anywhere.  Also drop a mismatched
device_unregister in the process.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:33 -04:00
Fabio Baltieri
7f92581b21 ASoC: ab8500-codec: Move codec ops on a separate structure
Define ab8500 codec operations structure on its own rather than inline
with snd_soc_dai_drivers to clean up the code and make the style
coherent with other codec drivers.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:33 -04:00
Fabio Baltieri
6ee0b4b0ef ASoC: ux500: Drop pinctrl sleep support
Drop pinctrl default/sleep state switching code, as it was breaking the
capture interface by putting the I2S pins in hi-z mode regardless of its
usage status, and not giving any real benefit.

Pinctrl default mode configuration is already managed automatically by a
specific pinctrl hog.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 15:58:21 -04:00
Daniel Mack
04561eacaa ASoC: codecs: adau1701: add DT bindings
Apart from pure matching, the bindings also support setting the the
reset gpio line.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 10:34:45 -04:00
Lars-Peter Clausen
b6b5e76bb8 ASoC: Add ssm2518 support
This patch adds a ASoC CODEC driver for the SSM2516. The SSM2516 is a stereo
Class-D audio amplifier with an I2S interface for audio in and a built-in
dynamic range control processor.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-25 10:33:30 -04:00
Charles Keepax
39d4ecdb71 ASoC: wm5110: Correct DSP4R Mixer control name
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-05-25 09:29:10 -05:00
Daniel Mack
47f5b692e0 ASoC: adau1701: refactor firmware loading function
Pass a struct i2c_client * to adau1701_load_firmware directly to make
the code more readable.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-23 08:59:55 -05:00
Lars-Peter Clausen
cf1f7c6e87 ASoC: Fix early event callback list iteration
The power_list field is used when adding a widget to a power sequence list. Use
the same field when iterating the list using list_for_each_entry, otherwise
we'll see undefined behavior.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 17:32:58 -05:00
Nicolas Schichan
40e2516acb ASoC: cs42l52: fix master playback mute mask.
The mask should define the bits to change in the register, not the
bits to preserve.

This fixes the inadvertent changes of the "Headphone Analog Gain"
value during mute/unmute.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:37:07 -05:00
Nicolas Schichan
99674c721f ASoC: cs42l52: fix bogus shifts in "Speaker Volume" and "PCM Mixer Volume" controls.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:37:02 -05:00
Nicolas Schichan
0b6e81d165 ASoC: cs42l52: microphone bias is controlled by IFACE_CTL2 register.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:36:38 -05:00
Daniel Mack
7967189251 ASoC: davinci: fix sample rotation
McASP serial audio engine needs different rotation values on TX and RX
channels. Commit dde109fb46 ("ASoC: McASP: Fix data rotation for
playback. Enables 24bit audio playback") changed the calculation to fix
the playback format, but broke the capture stream by doing it for both
TXFMT and RXFMT.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org [3.9 only]
2013-05-21 13:21:09 -05:00
Barry Song
200ceb962f ASoC: dfbmcs320: make the driver common for other BT modules
DFBM-CS320 is only one of bluetooth modules using CSR bluetooth chips,
we don't want everyone to have a seperate codec driver. anyway, the
feature of Bluetooth SCO is same on all platforms, so this patch
makes the DFBM-CS320 driver become a common BT SCO link driver.

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-21 13:17:08 -05:00
Fabio Baltieri
da33d723bc ASoC: ab8500-codec: Set rx dai slots from rx_mask
Replace hard coded rx slot numbers from ab8500_codec_set_dai_tdm_slot
using the ones requested by the machine driver in rx_mask instead.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-21 11:39:34 -05:00
Mark Brown
4510dbe324 Linux 3.10-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQEcBAABAgAGBQJRmpexAAoJEHm+PkMAQRiGrRIH/1uWFW38RvaCV/PXm/ia6Z+x
 BfBJfBIvPxGwb4n7aQNQlhU25xkfrPZ6szO4WiBH5/KPH3xYi2I2OZ1AzffkYqMF
 BWkPmsPK6EsTdp16zsi6JtH2aXArG4SpYA7ZamPvDkmfigHuiZg7GlL/9eHTRPNV
 P7Q8JToOrcnP8RoGgNj0uFiQeQbc62Kmoq7WuPtUhVlpQCCCknXgOJiYgz9w6Xe9
 /i79YFS8WRrzAquExT1NbIOh4ZMqB9MvuroaVWy8JDDLUyz7QUvOCe3tCDNguwgi
 FdWvU6nfkdQq5SLaWCWXDE9Rp/pL1MvfBn9vCOwFcp42aw0aQ0PgJVIXvsqufd0=
 =jgDI
 -----END PGP SIGNATURE-----

Merge tag 'v3.10-rc2' into asoc-ux500

Linux 3.10-rc2
2013-05-21 11:39:21 -05:00
Fabio Baltieri
b296263398 ASoC: ab8500-codec: Set tx dai slots from tx_mask
Replace hard-coded tx slot numbers from ab8500_codec_set_dai_tdm_slot
using the ones requested by the machine driver in tx_mask instead.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-21 11:35:17 -05:00
Mark Brown
62cc4d595f ASoC: wm5110: Add missing speaker initialisation
Add callback to initialise the speaker in the core following the recent
changes to handling of integration with the thermal interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 11:33:51 -05:00
Mark Brown
d217f90556 ASoC: wm5110: Stub hookup for Slimbus interface
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 11:27:59 -05:00
Mark Brown
1804aff60d ASoC: wm5102: Stub hookup for Slimbus interface
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 11:27:58 -05:00
Mark Brown
bd1dd88569 ASoC: arizona: Provide simple DAI ops for autoconfiguring interfaces
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 11:27:58 -05:00
Mark Brown
435705e892 ASoC: wm8994: Handle LRCLK inversion for WM8958 and WM1811A
On WM8958 and WM1811A separate control of the LRCLK inversion bit is
available for the DAC and ADC LRCLKs which for compatibility reasons is
done in a new register bit.

Since writes to each scheme have no effect on parts using the other just
always write to both for simplicity.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Samreen Nilofer <samreen.nilofer@intel.com>
2013-05-20 11:27:06 -05:00
Charles Keepax
2c071ed7c3 ASoC: soc-compress: Send correct stream event for capture start
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 08:01:48 -05:00
Andrew Bresticker
3d15aacbb8 ASoC: max98090: request IRQF_ONESHOT interrupt
request_threaded_irq() rejects calls which both do not specify a handler
(indicating that the primary IRQ handler should be used) and do not set
IRQF_ONESHOT because the combination is unsafe with level-triggered
interrupts.  It is safe in this case, though, since max98090 IRQs are
edge-triggered and the interrupts aren't ACK'ed until the codec's IRQ
status register is read.  Because of this, an IRQF_ONESHOT interrupt
doesn't really make a difference, but request one anyway in order to make
request_threaded_irq() happy.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 13:58:49 +01:00
Linus Torvalds
e51066824a Merge branch 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull devm usage cleanup from Wolfram Sang:
 "Lately, I have been experimenting how to improve the devm interface to
  make writing device drivers easier and less error prone while also
  getting rid of its subtle issues.  I think it has more potential but
  still needs work and definately conistency, especiall in its usage.

  The first thing I come up with is a low hanging fruit regarding
  devm_ioremap_resouce().  This function already checks if the passed
  resource is valid and gives an error message if not.  So, we can
  remove similar checks from the drivers and get rid of a bit of code
  and a number of inconsistent error strings.

  This series only removes the unneeded check iff devm_ioremap_resource
  follows platform_get_resource directly.  The previous version tried to
  shuffle code if needed, too, what lead to an embarrasing bug.  It
  turned out to me that shuffling code for all cases found will make the
  automated script too complex, so I am unsure if an automated cleanup
  is the proper tool for this case.  Removing the easy stuff seems
  worthwhile to me, though.

  Despite various architectures and platform dependencies, I managed to
  compile test 45 out of 57 modified files locally using heuristics and
  defconfigs."

Pulled because: 296 deletions, 0 additions.

* 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (33 commits)
  sound/soc/kirkwood: don't check resource with devm_ioremap_resource
  sound/soc/fsl: don't check resource with devm_ioremap_resource
  arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
  arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  drivers/watchdog: don't check resource with devm_ioremap_resource
  drivers/w1/masters: don't check resource with devm_ioremap_resource
  drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
  drivers/video/omap2: don't check resource with devm_ioremap_resource
  drivers/usb/phy: don't check resource with devm_ioremap_resource
  drivers/usb/host: don't check resource with devm_ioremap_resource
  drivers/usb/gadget: don't check resource with devm_ioremap_resource
  drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  drivers/thermal: don't check resource with devm_ioremap_resource
  drivers/staging/nvec: don't check resource with devm_ioremap_resource
  drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  drivers/spi: don't check resource with devm_ioremap_resource
  drivers/rtc: don't check resource with devm_ioremap_resource
  drivers/pwm: don't check resource with devm_ioremap_resource
  drivers/pinctrl: don't check resource with devm_ioremap_resource
  ...
2013-05-18 10:54:54 -07:00
Dan Carpenter
571ab6c6f3 ASoC: wm8994: missing break in wm8994_get_fll_config()
Smatch complains that:

	sound/soc/codecs/wm8994.c:2087 wm8994_get_fll_config()
		warn: missing break? reassigning 'fll->k'

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-18 12:25:49 +01:00
Wolfram Sang
12716cd44d sound/soc/kirkwood: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:59:45 +02:00
Wolfram Sang
5f68d04d39 sound/soc/fsl: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:59:44 +02:00
Uwe Kleine-König
7d0cd22382 ASoC: simplify registration of snd-soc-dummy device
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17 12:07:49 +01:00
Andrew Bresticker
fd5f940f82 ASoC: max98090: add digital mic mux to record path
The max98090 driver currently treats the digital mic enable as a supply
on the record path, causing the digital mic enable to always be turned on
when attempting to record.  This is incorrect, however, since the digital
mic enable is also a mux control where 0 selects the ADC output as input
to the record-path DSP and 1 selects the digital mic.  This patch adds
a virtual DMIC mux to the reocrd path so that we can switch between the
ADC and the digital mic for recording.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-17 12:07:18 +01:00
Charles Keepax
a64cbb949a ASoC: wm5102: Correct OSR control name for EPOUT
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-16 18:29:03 +01:00
Shawn Guo
dbdf6b5434 ASoC: fsl: remove imx-pcm driver
With imx-pcm-dma moving to generic dmaengine pcm driver and the removal
of imx-pcm-audio/imx-fiq-pcm-audio platform device use, now imx-pcm
driver contains a few functions that are only used by imx-pcm-fiq.c.
Move these functions into imx-pcm-fiq.c and remove imx-pcm.c completely.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:27 +04:00
Shawn Guo
2bf9d4bbd0 ASoC: fsl: remove use of imx-fiq-pcm-audio from imx-ssi
Rather than instantiating imx-fiq-pcm-audio to call imx_pcm_fiq_init(),
imx-ssi can just directly call it to save the use of imx-fiq-pcm-audio.
With this change, imx-ssi becomes not only a cpu DAI but also a platform
device, so updates platform device setup in eukrea-tlv320, phycore-ac97
and wm1133-ev1 accordingly.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:27 +04:00
Shawn Guo
88e89f5548 ASoC: fsl: create function imx_pcm_fiq_exit()
Create function imx_pcm_fiq_exit() to be paired with imx_pcm_fiq_init()
just like the pair of imx_pcm_dma_init() and imx_pcm_dma_exit().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:27 +04:00
Shawn Guo
3b7d46380b ASoC: fsl: remove use of imx-pcm-audio from imx-ssi
Rather than instantiating imx-pcm-audio to call imx_pcm_dma_init(),
imx-ssi can just directly call it to save the use of imx-pcm-audio.
With this change, imx-ssi becomes not only a cpu DAI but also a
platform device, so updates platform device setup in imx-mc13783 and
mx27vis-aic32x4 accordingly.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:27 +04:00
Shawn Guo
bd41bc9696 ASoC: fsl: remove use of imx-pcm-audio from fsl_ssi
Rather than instantiating imx-pcm-audio to call imx_pcm_dma_init(),
fsl_ssi can just directly call it to save the use of imx-pcm-audio.
With this change, fsl_ssi becomes not only a cpu DAI but also a platform
device, so updates platform device setup in imx-sgtl5000 accordingly.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:26 +04:00
Paul Bolle
7ae6871fe5 ASoC: remove saarb and tavorevb3 machine drivers
Support for PXA95x was removed in v3.8. This means that the Kconfig
symbols MACH_SAARB and MACH_TAVOREVB3 are no longer available. This
leaves the SoC Audio support for Marvell Saarb and Marvell Tavor EVB3
unbuildable. Remove these drivers too.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:59:29 +04:00
Lars-Peter Clausen
cde11aedea ASoC: davinci-sffsdr: Staticize non exported struct
The pcm3008_codec struct is not used outside of davinci-sffsdr.c, so make it
static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:54:14 +04:00
Lars-Peter Clausen
3eb28d3ca8 ASoC: sn95031: Staticize non exported struct
The sn95031_codec struct is not used outside of sn95031.c, so make it static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:53:05 +04:00
Lars-Peter Clausen
aba1e2be4d ASoC: mop500: Staticize non exported struct
The mop500_dai_links struct is not used outside of mop500.c, so make it static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:52:02 +04:00
Lars-Peter Clausen
cdeecac4e6 ASoC: mop500_ab8500: Staticize non exported functions
The mop500_ab8500_startup(), the mop500_ab8500_shutdown() and the
mop500_ab8500_hw_params() function are not used outside of mop500_ab8500, so
make them static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:51:58 +04:00
Lars-Peter Clausen
19b6317b8c ASoC: bf5xx-tdm-pcm: Staticize non exported struct
The bf5xx_tdm_pcm_ops struct is only used in bf5xx-tdm-pcm.c, so make it static.

Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:50:28 +04:00
Lars-Peter Clausen
5d9ff40215 ASoC: mmp-sspa: Staticize non exported struct
The mmp_sspa_dai struct is only used in mmp-sspa.c, so make it static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:50:00 +04:00
Lars-Peter Clausen
60e10d2fb0 ASoC: mmp-pcm: Staticize non exported structs and functions
The mmp_pcm_ops and mmp_soc_platform struct as well as the mmp_pcm_new()
function are only used in mmp-pcm.c, so make them static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:49:34 +04:00
Lars-Peter Clausen
19c7efcd24 ASoC: spear: spdif_out: Staticize unexported function
The spdif_soc_dai_probe function is only used in spdif_out.c, so make it static.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 08:48:37 +04:00