GitHub/moto-9609/android_kernel_motorola_exynos9610.git
13 years agoASoC: Convert WM2000 into a standard CODEC driver
Mark Brown [Fri, 2 Dec 2011 21:59:18 +0000 (21:59 +0000)]
ASoC: Convert WM2000 into a standard CODEC driver

We've been able to handle external amps for a while now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm2000 to use regmap API
Mark Brown [Fri, 2 Dec 2011 21:57:19 +0000 (21:57 +0000)]
ASoC: Convert wm2000 to use regmap API

The driver wasn't even using the ASoC common code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused struct wm2000_setup_data
Mark Brown [Fri, 2 Dec 2011 21:29:50 +0000 (21:29 +0000)]
ASoC: Remove unused struct wm2000_setup_data

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8728 to table based control init
Mark Brown [Sat, 3 Dec 2011 11:49:02 +0000 (11:49 +0000)]
ASoC: Convert WM8728 to table based control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8711 to table based control init
Mark Brown [Sat, 3 Dec 2011 11:47:23 +0000 (11:47 +0000)]
ASoC: Convert WM8711 to table based control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8750 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 17:21:43 +0000 (17:21 +0000)]
ASoC: Convert WM8750 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8741 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 17:15:06 +0000 (17:15 +0000)]
ASoC: Convert WM8741 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8580 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 11:42:01 +0000 (11:42 +0000)]
ASoC: Convert WM8580 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8510 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 11:41:45 +0000 (11:41 +0000)]
ASoC: Convert WM8510 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8400 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 11:34:34 +0000 (11:34 +0000)]
ASoC: Convert WM8400 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8350 to table based DAPM and control init
Mark Brown [Sat, 3 Dec 2011 11:31:58 +0000 (11:31 +0000)]
ASoC: Convert WM8350 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM9090 to devm_kzalloc()
Mark Brown [Fri, 2 Dec 2011 22:09:47 +0000 (22:09 +0000)]
ASoC: Convert WM9090 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8750 to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 17:18:37 +0000 (17:18 +0000)]
ASoC: Convert WM8750 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8741 to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 17:17:05 +0000 (17:17 +0000)]
ASoC: Convert WM8741 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8400 to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 11:41:27 +0000 (11:41 +0000)]
ASoC: Convert WM8400 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8350 to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 11:29:38 +0000 (11:29 +0000)]
ASoC: Convert WM8350 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM2000 to devm_kzalloc()
Mark Brown [Fri, 2 Dec 2011 21:28:31 +0000 (21:28 +0000)]
ASoC: Convert WM2000 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused AUDIO_NAME define from WM8960
Mark Brown [Fri, 2 Dec 2011 21:20:58 +0000 (21:20 +0000)]
ASoC: Remove unused AUDIO_NAME define from WM8960

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove I2C ifdefs from WM8960
Mark Brown [Fri, 2 Dec 2011 21:20:37 +0000 (21:20 +0000)]
ASoC: Remove I2C ifdefs from WM8960

The driver only supports I2C as the control interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused -codec from Wolfson device driver names
Mark Brown [Fri, 2 Dec 2011 22:08:49 +0000 (22:08 +0000)]
ASoC: Remove unused -codec from Wolfson device driver names

Devices that aren't MFDs don't need to distinguish this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8903: Create default platform data structure
Stephen Warren [Fri, 2 Dec 2011 22:08:38 +0000 (15:08 -0700)]
ASoC: WM8903: Create default platform data structure

When no platform data is supplied, point pdata at a default platform
structure. This enables two future changes:

a) Defines the default platform data values in a single place.
b) There is always a valid pdata pointer, so some conditional code can
   be simplified by a later patch.

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

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Sat, 3 Dec 2011 11:07:43 +0000 (11:07 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agoASoC: Move initial WM8903 identification and reset to I2C probe
Mark Brown [Fri, 2 Dec 2011 18:39:17 +0000 (18:39 +0000)]
ASoC: Move initial WM8903 identification and reset to I2C probe

Get control of the device earlier and avoid trying to do an ASoC probe
on a card that won't work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Convert WM8903 to direct regmap API usage
Mark Brown [Fri, 2 Dec 2011 18:33:32 +0000 (18:33 +0000)]
ASoC: Convert WM8903 to direct regmap API usage

Converting to an rbtree cache as regcache doesn't have a flat cache.
Since the top of the register map is fairly sparse this should be an
overall win.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Don't resync WM8903 register cache on reset
Mark Brown [Fri, 2 Dec 2011 18:24:40 +0000 (18:24 +0000)]
ASoC: Don't resync WM8903 register cache on reset

We only do this on initial power on so it's at best a waste of time as
the core will have already defaulted to the same values.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Use a normal cache sync for WM8903
Mark Brown [Fri, 2 Dec 2011 18:23:37 +0000 (18:23 +0000)]
ASoC: Use a normal cache sync for WM8903

The driver used to use a complicated method to sync the register cache
after having brought the bias level up to standby in resume due to the
use of the write sequencer to manage the initial power up. Now that we
don't use the write sequencer there is no need for this and we can just
use snd_soc_cache_sync() directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: WM8903 only supports I2C so don't ifdef it
Mark Brown [Fri, 2 Dec 2011 18:21:52 +0000 (18:21 +0000)]
ASoC: WM8903 only supports I2C so don't ifdef it

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Use table based control init for WM8903
Mark Brown [Fri, 2 Dec 2011 18:21:28 +0000 (18:21 +0000)]
ASoC: Use table based control init for WM8903

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Convert WM8903 to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 10:59:32 +0000 (10:59 +0000)]
ASoC: Convert WM8903 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: kirkwood: Make SND_KIRKWOOD_SOC_OPENRD and SND_KIRKWOOD_SOC_T5325 depend on I2C
Axel Lin [Sat, 3 Dec 2011 10:38:25 +0000 (18:38 +0800)]
ASoC: kirkwood: Make SND_KIRKWOOD_SOC_OPENRD and SND_KIRKWOOD_SOC_T5325 depend on I2C

SND_KIRKWOOD_SOC_T5325 selects SND_SOC_ALC5623, but SND_SOC_ALC5623 needs
CONFIG_I2C. So we need to make SND_KIRKWOOD_SOC_T5325 depend on I2C,
otherwise I got below build error if CONFIG_I2C is not selected.

  CC      sound/soc/codecs/alc5623.o
sound/soc/codecs/alc5623.c: In function 'alc5623_i2c_probe':
sound/soc/codecs/alc5623.c:1002: error: implicit declaration of function 'i2c_smbus_read_word_data'
sound/soc/codecs/alc5623.c:1009: error: implicit declaration of function 'i2c_smbus_read_byte_data'
sound/soc/codecs/alc5623.c: In function 'alc5623_modinit':
sound/soc/codecs/alc5623.c:1096: error: implicit declaration of function 'i2c_add_driver'
sound/soc/codecs/alc5623.c: In function 'alc5623_modexit':
sound/soc/codecs/alc5623.c:1108: error: implicit declaration of function 'i2c_del_driver'
make[3]: *** [sound/soc/codecs/alc5623.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Also fix the same issue for SND_KIRKWOOD_SOC_OPENRD.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Fri, 2 Dec 2011 17:44:55 +0000 (17:44 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agoASoC: Mark WM8994 ADC muxes as virtual
Mark Brown [Sun, 14 Aug 2011 04:39:20 +0000 (13:39 +0900)]
ASoC: Mark WM8994 ADC muxes as virtual

Since they don't actually have power bits but do have events associated
with them it's important that we bootstrap their state properly which
making them virtual does.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Map microphones on Littlemill
Mark Brown [Fri, 2 Dec 2011 17:36:06 +0000 (17:36 +0000)]
ASoC: Map microphones on Littlemill

Littlemill has one analogue microphone on the board (connected to IN1LN)
and an array of four DMICs connected to both DMICDAT lines. The biases
can be selected by jumpers but pick the default jumper fit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8994 MICBIASes to supply widgets
Mark Brown [Fri, 2 Dec 2011 16:01:41 +0000 (16:01 +0000)]
ASoC: Convert WM8994 MICBIASes to supply widgets

There are some in tree systems using the driver but none use the MICBIAS
widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add WM8958 based headset detection on Littlemill
Mark Brown [Fri, 2 Dec 2011 15:55:52 +0000 (15:55 +0000)]
ASoC: Add WM8958 based headset detection on Littlemill

The board supports CODECs that won't work with this but the CODEC driver
will check to see if it's running on the right chip for us.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add missing err label
Mark Brown [Fri, 2 Dec 2011 10:55:12 +0000 (10:55 +0000)]
ASoC: Add missing err label

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: fsl/powerpc: don't rely on the cell-index property
Timur Tabi [Fri, 2 Dec 2011 01:52:47 +0000 (19:52 -0600)]
ASoC: fsl/powerpc: don't rely on the cell-index property

Instead of using the 'cell-index' property in the I2C adapter node to
determine the adapter number, just query the i2c_adapter object directly.

Previously, the I2C nodes always appeared in cell-index order, so the
dynamic numbering coincided with the cell-index property.  With commit
ab827d97 ("powerpc/85xx: Rework P1022DS device tree"), the I2C nodes are
unintentionally reversed in the device tree, and so the machine driver
guesses the wrong I2C adapter number.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: p1022ds: add support for fsl,P1022 and fsl,P1022DS model names
Timur Tabi [Fri, 2 Dec 2011 01:52:46 +0000 (19:52 -0600)]
ASoC: p1022ds: add support for fsl,P1022 and fsl,P1022DS model names

Commit ab827d97 ("powerpc/85xx: Rework P1022DS device tree") renamed the
the /model property of the P1022DS device tree from "fsl,P1022" to
"fsl,P1022DS".  To support both old and new device trees, the ASoC
machine driver for the P1022DS needs to query the /model property and
update the platform driver object dynamically.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8903: Disallow all invalid gpio_cfg pdata values
Stephen Warren [Thu, 1 Dec 2011 20:49:19 +0000 (13:49 -0700)]
ASoC: WM8903: Disallow all invalid gpio_cfg pdata values

The GPIO registers are 15 bits wide. Hence values, higher than 0x7fff are
not legal GPIO register values. Modify the pdata.gpio_cfg handling code
to reject all illegal values, not just WM8903_GPIO_NO_CONFIG (0x8000). This
will allow the later use of 0xffffffff as an invalid value in future device
tree bindings, meaning "don't touch this GPIO's configuration".

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Drop unused state parameter from CODEC suspend callback
Lars-Peter Clausen [Fri, 2 Dec 2011 09:18:28 +0000 (10:18 +0100)]
ASoC: Drop unused state parameter from CODEC suspend callback

The existence of this parameter is purely historical. None of the CODEC drivers
uses it and we always pass in the same value anyway, so it should be safe to
remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Make WM8962 beep a signal generator
Mark Brown [Sun, 27 Nov 2011 16:24:18 +0000 (16:24 +0000)]
ASoC: Make WM8962 beep a signal generator

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Make WM5100 tone generator widgets signal generators
Mark Brown [Sun, 27 Nov 2011 16:24:05 +0000 (16:24 +0000)]
ASoC: Make WM5100 tone generator widgets signal generators

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Add signal generator widget type
Mark Brown [Sun, 27 Nov 2011 16:21:51 +0000 (16:21 +0000)]
ASoC: Add signal generator widget type

A signal generator behaves as an input would but is not considered for
any of the special behaviour associated with external input pins. This
is especially useful when automatically working out not connected widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoASoC: Convert WM8994 to devm_kzalloc()
Mark Brown [Thu, 1 Dec 2011 14:00:19 +0000 (14:00 +0000)]
ASoC: Convert WM8994 to devm_kzalloc()

Still have a manual free in there for some realloc()ed memory as there's
no devm version of that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add platform data for WM8958/WM1811 microphone detection rates
Mark Brown [Thu, 1 Dec 2011 13:44:25 +0000 (13:44 +0000)]
ASoC: Add platform data for WM8958/WM1811 microphone detection rates

Allow systems to override the default microphone detection rates using
platform data in case the settings are not suitable (eg, due to an
unusually noisy jack).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Ensure we reconfigure WM8958 microphone detection on rate changes
Mark Brown [Thu, 1 Dec 2011 12:43:26 +0000 (12:43 +0000)]
ASoC: Ensure we reconfigure WM8958 microphone detection on rate changes

We don't need to rerun DAPM if the clock source is the same but we do
need to adjust the microphone detection rate in case we are moving from
an audio to a non-audio rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Implement support for WM1811A jack detection
Mark Brown [Wed, 30 Nov 2011 20:32:05 +0000 (20:32 +0000)]
ASoC: Implement support for WM1811A jack detection

The WM1811A features an advanced low power accessory detection subsystem
which allows the device to be maintained in a very low power state while
the system is idle without sacrificing any accessory detection features.

Implement software support for this, automatically managing the power
configuration of the device depending on the detected accessory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Rename WM8994 detecting flag to mic_detecting
Mark Brown [Wed, 30 Nov 2011 13:43:51 +0000 (13:43 +0000)]
ASoC: Rename WM8994 detecting flag to mic_detecting

More specific and avoids confusion with a following change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Allow more WM8958/WM1811 button levels with default handler
Mark Brown [Wed, 30 Nov 2011 10:55:14 +0000 (10:55 +0000)]
ASoC: Allow more WM8958/WM1811 button levels with default handler

The WM8958 and WM1811 support detecting a range of buttons. Allow the
user to provide platform data enabling more of these levels without
having to write a custom detection handler.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tune down active mode detection rate for WM8958 mic detection
Mark Brown [Thu, 1 Dec 2011 12:51:25 +0000 (12:51 +0000)]
ASoC: Tune down active mode detection rate for WM8958 mic detection

Saves a little power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Don't use control_data to get struct wm8994
Mark Brown [Sun, 24 Jul 2011 11:20:41 +0000 (12:20 +0100)]
ASoC: Don't use control_data to get struct wm8994

This will support refactoring to make use of the regmap API more directly
in the core.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Provide debug log of accessory status on WM8958
Mark Brown [Wed, 30 Nov 2011 14:56:40 +0000 (14:56 +0000)]
ASoC: Provide debug log of accessory status on WM8958

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Rename Speyside WM8962 to Tobermory
Mark Brown [Wed, 30 Nov 2011 13:30:27 +0000 (13:30 +0000)]
ASoC: Rename Speyside WM8962 to Tobermory

All the other machine drivers for non-default configurations are named
after the relevant audio module so do so for Tobermory also.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tegra I2S: Add device tree binding
Stephen Warren [Wed, 30 Nov 2011 01:36:48 +0000 (18:36 -0700)]
ASoC: Tegra I2S: Add device tree binding

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Enhance default WM8958 microphone detection
Mark Brown [Sat, 13 Aug 2011 02:57:18 +0000 (11:57 +0900)]
ASoC: Enhance default WM8958 microphone detection

Actively manage the detection rate for microphones with WM8958, providing
improved power consumption and maximising the benefit from the hardware
debounce.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audio
Mark Brown [Tue, 29 Nov 2011 19:58:19 +0000 (19:58 +0000)]
ASoC: Put WM8958 and WM1811 MICBIAS into bypass mode when no audio

When we don't have any active audio we can put the microphone biases into
bypass mode to save power at the expense of performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix __iomem annotation for IDMA registers
Mark Brown [Sun, 27 Nov 2011 21:35:40 +0000 (21:35 +0000)]
ASoC: Fix __iomem annotation for IDMA registers

We always store the register address as __iomem but pass it around as a
plain void * which upsets sparse.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Ensure SYSCLK is enabled for WM8958 accessory detection
Mark Brown [Tue, 29 Nov 2011 14:36:17 +0000 (14:36 +0000)]
ASoC: Ensure SYSCLK is enabled for WM8958 accessory detection

Ensure SYSCLK is enabled while running accessory detection on WM8958.
It is always required so there is no sense in requiring machine drivers
to individually do this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SigmaDSP: Add regmap support
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:20 +0000 (09:44 +0100)]
ASoC: SigmaDSP: Add regmap support

Add support for loading the SigmaDSP firmware using regmap. This allows us
to transparently use SPI or I2C as the transport protocol on devices which
support them.

For now we keep the old I2C support since we have one user of this which is not
straight forward to convert to regmap, due to variable length registers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SigmaDSP: Move private structs and functions to C file
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:19 +0000 (09:44 +0100)]
ASoC: SigmaDSP: Move private structs and functions to C file

Move the structs and functions only used by SigmaDSP firmware loader itself
from the header to the C file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SigmaDSP: Provide diagnostic error messages
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:18 +0000 (09:44 +0100)]
ASoC: SigmaDSP: Provide diagnostic error messages

Provide some error messages when loading the firmware fails, so it is possible
to diagnose the reason for the failure.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Move SigmaDSP firmware loader to ASoC
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:17 +0000 (09:44 +0100)]
ASoC: Move SigmaDSP firmware loader to ASoC

It has been pointed out previously, that the firmware subsystem is not the right
place for the SigmaDSP firmware loader. Furthermore the SigmaDSP is currently
only used in audio products and we are aiming for better integration into the
ASoC framework in the future, with support for ALSA controls for firmware
parameters and support dynamic power management as well. So the natural choice
for the SigmaDSP firmware loader is the ASoC subsystem.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 29 Nov 2011 12:00:17 +0000 (12:00 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agofirmware: Sigma: Fix endianess issues
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:16 +0000 (09:44 +0100)]
firmware: Sigma: Fix endianess issues

Currently the SigmaDSP firmware loader only works correctly on little-endian
systems. Fix this by using the proper endianess conversion functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agofirmware: Sigma: Skip header during CRC generation
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:15 +0000 (09:44 +0100)]
firmware: Sigma: Skip header during CRC generation

The firmware header is not part of the CRC, so skip it. Otherwise the firmware
will be rejected due to non-matching CRCs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agofirmware: Sigma: Prevent out of bounds memory access
Lars-Peter Clausen [Mon, 28 Nov 2011 08:44:14 +0000 (09:44 +0100)]
firmware: Sigma: Prevent out of bounds memory access

The SigmaDSP firmware loader currently does not perform enough boundary size
checks when processing the firmware. As a result it is possible that a
malformed firmware can cause an out of bounds memory access.

This patch adds checks which ensure that both the action header and the payload
are completely inside the firmware data boundaries before processing them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt
Axel Lin [Tue, 29 Nov 2011 11:47:38 +0000 (19:47 +0800)]
ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmt

What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits,
but current code clears BIT[2:0].

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert smdk_wm8994pcm to use module_platform_driver()
Axel Lin [Mon, 28 Nov 2011 10:53:57 +0000 (18:53 +0800)]
ASoC: Convert smdk_wm8994pcm to use module_platform_driver()

Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Mon, 28 Nov 2011 23:18:39 +0000 (23:18 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agoASoC: Supply dcs_codes for newer WM1811 revisions
Mark Brown [Mon, 28 Nov 2011 18:48:46 +0000 (18:48 +0000)]
ASoC: Supply dcs_codes for newer WM1811 revisions

Based on initial data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Mon, 28 Nov 2011 22:13:14 +0000 (22:13 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agoASoC: Convert CS42L73 to devm_kzalloc()
Brian Austin [Mon, 28 Nov 2011 21:49:31 +0000 (15:49 -0600)]
ASoC: Convert CS42L73 to devm_kzalloc()

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert tegra_spdif to use module_platform_driver()
Axel Lin [Mon, 28 Nov 2011 10:55:03 +0000 (18:55 +0800)]
ASoC: Convert tegra_spdif to use module_platform_driver()

Use the module_platform_driver() macro which makes
the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add basic 1277-EV1 Littlemill audio driver
Mark Brown [Mon, 28 Nov 2011 22:05:41 +0000 (22:05 +0000)]
ASoC: Add basic 1277-EV1 Littlemill audio driver

The Littlemill audio card supports a number of pluggable miniboards,
normally for the WM8994 family of devices. As all these devices look
mostly the same from an external configuration point of view and are
runtime enumerable we can write a standard machine driver which will
work out of the box with any of them. Start doing that with the bare
bones of a driver, only supporting AIF1.

Future patches will flesh this out to be more fully featured.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Error out if we can't generate a LRCLK at all for WM8994
Mark Brown [Mon, 28 Nov 2011 21:16:56 +0000 (21:16 +0000)]
ASoC: Error out if we can't generate a LRCLK at all for WM8994

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Convert to direct regmap API usage
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:12 +0000 (17:28 +0100)]
ASoC: ad193x: Convert to direct regmap API usage

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Use snd_soc_update_bits where appropriate
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:11 +0000 (17:28 +0100)]
ASoC: ad193x: Use snd_soc_update_bits where appropriate

We can reduce the code size here a bit by using snd_soc_update_bits instead of
open-coding the read-modify-write cycle. The conversion done in this patch is
not completely straightforward and some minor code restructuring has been
incorporated to further reduce the code size.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Add sysclk DAPM supply
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:10 +0000 (17:28 +0100)]
ASoC: ad193x: Add sysclk DAPM supply

Add a DAPM supply widget for the internal sysclk, so it can be disabled
automatically when not needed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Remove non-functional DAPM route controls
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:09 +0000 (17:28 +0100)]
ASoC: ad193x: Remove non-functional DAPM route controls

DAPM route controls only take effect on paths where the sink is a mixer or a
mux, furthermore the control must be a control assigned to the mixer or mux.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Make enum items const char * const
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:08 +0000 (17:28 +0100)]
ASoC: ad193x: Make enum items const char * const

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Provide dB ranges for the volume controls
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:07 +0000 (17:28 +0100)]
ASoC: ad193x: Provide dB ranges for the volume controls

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ad193x: Use table based DAPM and controls setup
Lars-Peter Clausen [Mon, 28 Nov 2011 16:28:06 +0000 (17:28 +0100)]
ASoC: ad193x: Use table based DAPM and controls setup

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert fsl directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:10:55 +0000 (10:10 +0800)]
ASoC: Convert fsl directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sdp4430: Add support for digital microphones
Peter Ujfalusi [Mon, 28 Nov 2011 13:45:43 +0000 (15:45 +0200)]
ASoC: sdp4430: Add support for digital microphones

OMAP4 SDP/Blaze boards have digital microphones.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: OMAP4: omap-dmic: Initial support for OMAP DMIC
Peter Ujfalusi [Mon, 28 Nov 2011 13:45:40 +0000 (15:45 +0200)]
ASoC: OMAP4: omap-dmic: Initial support for OMAP DMIC

Add support for OMAP4 Digital Microphone interface.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8903 MICBIAS to a supply widget
Mark Brown [Sun, 27 Nov 2011 12:20:08 +0000 (12:20 +0000)]
ASoC: Convert WM8903 MICBIAS to a supply widget

Also rename it to MICBIAS to reflect the pin name and help any out of tree
users notice the change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
13 years agoASoC: Convert CODEC drivers to module_platform_driver
Mark Brown [Wed, 23 Nov 2011 22:52:08 +0000 (22:52 +0000)]
ASoC: Convert CODEC drivers to module_platform_driver

Factors out a bit of boilerplate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert WM8962 to devm_kzalloc()
Mark Brown [Sun, 27 Nov 2011 19:56:52 +0000 (19:56 +0000)]
ASoC: Convert WM8962 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Log automatic pin disconnection per CODEC rather than per card
Mark Brown [Sun, 27 Nov 2011 19:42:20 +0000 (19:42 +0000)]
ASoC: Log automatic pin disconnection per CODEC rather than per card

This makes the output a bit less confusing on multi-CODEC systems as the
same pin may appear in multiple CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix CODEC enumeration for auto_nc_codec_pins
Mark Brown [Sun, 27 Nov 2011 19:38:34 +0000 (19:38 +0000)]
ASoC: Fix CODEC enumeration for auto_nc_codec_pins

We need to enumerate all the CODECs that are part of the card we're
instantiating, not all the CODECs that are in the system as the system
may have multiple cards.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Sun, 27 Nov 2011 16:04:45 +0000 (16:04 +0000)]
Merge branch 'for-3.2' into for-3.3

13 years agoASoC: Convert wm8996 to use devm_kzalloc()
Mark Brown [Sun, 27 Nov 2011 15:59:23 +0000 (15:59 +0000)]
ASoC: Convert wm8996 to use devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm9081 driver to use devm_kzalloc()
Mark Brown [Sun, 27 Nov 2011 15:57:44 +0000 (15:57 +0000)]
ASoC: Convert wm9081 driver to use devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert wm1250-ev1 driver to use devm_kzalloc()
Mark Brown [Sun, 27 Nov 2011 15:56:55 +0000 (15:56 +0000)]
ASoC: Convert wm1250-ev1 driver to use devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Correct name of Speyside Main Speaker widget
Mark Brown [Sun, 27 Nov 2011 15:54:49 +0000 (15:54 +0000)]
ASoC: Correct name of Speyside Main Speaker widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unneeded platform_device.h inclusions from CODECs
Mark Brown [Sun, 27 Nov 2011 12:14:37 +0000 (12:14 +0000)]
ASoC: Remove unneeded platform_device.h inclusions from CODECs

They've not been needed for a long time if they were ever required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove driver versioning from ak4642
Mark Brown [Sun, 27 Nov 2011 12:11:46 +0000 (12:11 +0000)]
ASoC: Remove driver versioning from ak4642

It's never been updated so it can't be that useful and it makes the
driver needlessly chatty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert omap directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:12:16 +0000 (10:12 +0800)]
ASoC: Convert omap directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert davinci directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:09:27 +0000 (10:09 +0800)]
ASoC: Convert davinci directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Convert txx9 directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:16:10 +0000 (10:16 +0800)]
ASoC: Convert txx9 directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>