Commit graph

276284 commits

Author SHA1 Message Date
Joerg Roedel
c45471eac2 ASoC: Fix compile error in sound/soc/mid-x86/sst_platform.c
The variable ret_val is used but not declared. This causes
the following compile error:

sound/soc/mid-x86/sst_platform.c: In function ‘sst_platform_open’:
sound/soc/mid-x86/sst_platform.c:274:2: error: ‘ret_val’ undeclared (first use in this function)
sound/soc/mid-x86/sst_platform.c:274:2: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [sound/soc/mid-x86/sst_platform.o] Error 1

Fix this.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-16 07:50:15 +01:00
Leon Romanovsky
9215aa4d96 ASoC: Rename ALC5632 MICBIAS to common name convention.
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 14:27:19 +08:00
Mark Brown
875fa8e948 Merge branch 'topic/cache' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into for-3.3 2011-12-13 13:26:25 +08:00
Lars-Peter Clausen
94f9ec9365 regmap: Move initialization of regcache related fields to regcache_init
Move the initialization regcache related fields of the regmap struct to
regcache_init. This allows us to keep regmap and regcache code better
separated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 12:55:06 +08:00
Axel Lin
796ba9001d ASoC: Staticise alchemy_pcm_soc_platform
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 12:10:33 +08:00
Axel Lin
bba59f3326 ASoC: Staticise au1xpsc_soc_platform
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 12:10:33 +08:00
Axel Lin
a0e17b4e3e ASoC: Staticise rx51_aux_dev
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 12:10:33 +08:00
Mark Brown
1dfb6efd87 ASoC: Remove rbtree register cache
All users now use regmap directly so delete the ASoC version of the code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 00:20:28 +08:00
Mark Brown
cae59c7b21 ASoC: Remove WM8994 register cache
Now that the mfd is using the register map cache there's no need for the
CODEC driver to do any register cache management or any funny dances to
interact with the other drivers using the device so just remove the cache
initialisation and volatility information.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 00:20:11 +08:00
Mark Brown
d9a7666ff3 ASoC: Remove ASoC-specific WM8994 I/O code
Just go directly to the regmap API, saving code and making integration
that bit more direct.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-13 00:20:06 +08:00
Mark Brown
68556ca1e0 Merge branch 'mfd/wm8994' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into for-3.3 2011-12-13 00:19:20 +08:00
Mark Brown
8ab3069182 mfd: Convert wm8994 to use generic regmap irq_chip
Factor out the irq_chip implementation, substantially reducing the code
size for the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:14:06 +08:00
Mark Brown
e292b578c9 Merge branch 'topic/irq' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into wm8994-mfd 2011-12-13 00:12:48 +08:00
Mark Brown
7ed5849c28 mfd: Mark WM1811 GPIO6 register volatile for later revisions
For later chip revisions the WM1811 GPIO6 register is always volatile so
store the device revision when initialising the driver and then check at
runtime if we're running on a newer device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:49 +08:00
Mark Brown
19f9557174 mfd: Add missing mutex.h inclusion to WM8994 core.h
struct wm8994 includes a mutex so we need to include mutex.h before we
declare it. All current users rely on this being done implicitly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:43 +08:00
Mark Brown
71d171847d mfd: Add WM1811A device ID to wm8994 driver
The WM1811A is a variant of the WM1811 with pin configuration changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:29 +08:00
Mark Brown
443e67ed8d mfd: Correct revision display for WM1811 revision D
As WM1811 revision C was transparent to software the revision IDs for
subsequent revisions are one less than they would normally be. Correct
for this in log messages.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:24 +08:00
Mark Brown
43913e5ef9 mfd: Constify WM8994 regulator_init_data
The driver has no need to modify the regulator_init_data so declare it
const to allow machine code to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:19 +08:00
Mark Brown
346978980a mfd: Initialise WM8994 register cache after reading chip ID registers
The different devices handled by the WM8994 can be distinguished using
their ID registers so we don't need to rely on the user having registered
the device correctly. Instead do the initial regmap setup with a minimal
configuration only supporting physical I/O and then configure the cache
once we have identified the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:13 +08:00
Mark Brown
c3f1386171 mfd: Enable register cache for wm8994 devices
As part of this we provide information about the registers that exist in
the device to the regmap core, drop the small amount of cache that the
core had been using and let regmap do the sync.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:11:05 +08:00
Mark Brown
4412823a0a Merge branch 'topic/cache' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into HEAD 2011-12-13 00:10:45 +08:00
Mark Brown
01ed260f22 mfd: Add wm8994 register access and default information
Describe the register map to the regmap core so that we can use its
diagnostic features and cache support.  This is split out from the patch
using it due to the size so that the actual code change is a bit clearer.

As the various devices are supersets of each other the access maps are
built up by layering the functions on top of each other, though the
interface for specifying the register defaults isn't currently amenable
to this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:15 +08:00
Mark Brown
4de45284d3 mfd: Define some additional wm8994 registers
Add a bunch of definitions for wm8994 registers that are not currently
used by software.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:06 +08:00
Mark Brown
be79cf2fd2 mfd: Don't hard code the reset value for WM8994 devices
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:10:01 +08:00
Mark Brown
26c34c25e5 mfd: Disable more pulls on WM8994
Disable more pulls by default on WM8994 for a small current saving. Since
some designs do leave SPKMODE floating provide platform data to allow that
to be left enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:34 +08:00
Mark Brown
2fa3349467 mfd: Convert wm8994 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:29 +08:00
Mark Brown
cf763c2e60 mfd: Add basic device tree binding for wm8994
Add a placeholder device tree binding for the wm8994 driver. At present
the binding is essentially null as none of the platform data is supported,
and at least some of that will depend on the pending regulator bindings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-12-13 00:09:11 +08:00
Mark Brown
583cca6e2b mfd: Remove some unused functions in wm8894-irq
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Oritz <sameo@linux.intel.com>
2011-12-13 00:07:47 +08:00
Axel Lin
0604ca48f1 ASoC: Add missed MODULE_LICENSE("GPL") for imx-pcm-fiq
This driver can be built as module and the file header indicates that
the driver is published under the GPL.
Thus add MODULE_LICENSE("GPL") for it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 18:10:02 +08:00
Mark Brown
3628137646 ASoC: Raise Speyside audio system clock rate to 512fs
To support advanced system functionality for additional components; the
actively used clocks will remain the same for current components. Also
factor the rate out to a single #define while we're at it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:59:11 +08:00
Mark Brown
0a105ddb35 Merge branch 'for-3.2' into for-3.3 2011-12-12 12:59:06 +08:00
Axel Lin
497d496598 ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:58:42 +08:00
Jonathan Neuschäfer
62e4a13e60 ASoC: WM8958: correctly show firmware magic on mismatch
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-12 12:44:02 +08:00
Mark Brown
43a9519758 Merge branch 'for-3.2' into for-3.3
Conflicts:
	sound/soc/mxs/mxs-pcm.c
2011-12-11 11:24:44 +08:00
Lothar Waßmann
7c08be84f8 ASoC: Fix an obvious copy paste error in an error message
The message was obviously copied from soc_init_codec_debugfs()

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:59:49 +08:00
Lothar Waßmann
9fd369b193 ASoC: mxs: Add appropriate MODULE_ALIAS()
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:59:02 +08:00
Lothar Waßmann
06c8eb9a91 ASoC: mxs: Add missing MODULE_LICENSE("GPL")
The sound driver refuses to load as module, because of the missing
MODULE_LICENSE("GPL").
The file header indicates that the driver is indeed published under
the GPL.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-11 10:58:55 +08:00
Mark Brown
f04b8d6ece Merge branch 'for-3.2' into for-3.3 2011-12-11 03:01:33 +08:00
Mark Brown
37d5993c5c ASoC: Fix WM8996 24.576MHz clock operation
Record the clock after the divider as that is what all SYSCLK users see.
Without this the other clock configuration in the device comes out at
half rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-12-11 03:01:09 +08:00
Mark Brown
3025ae45d6 ASoC: Convert wm8770 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:36:59 +08:00
Axel Lin
7fcadfd176 ASoC: Fix comments for disabling amplifier and PGA
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:28 +08:00
Mark Brown
46ce904f7d ASoC: Convert WM8900 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:18 +08:00
Mark Brown
5a37452421 ASoC: Convert WM8804 to table based control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:17 +08:00
Mark Brown
bc9c040d36 ASoC: Make WM8770 SPI usage unconditional
The device only supports SPI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:16 +08:00
Mark Brown
bf97ca9a0d ASoC: Convert WM8776 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 20:28:15 +08:00
Stephen Warren
2610ab7767 ASoC: Refactor some conditions and loop in soc_bind_dai_link()
Transform some loops from:

for_each(x) {
    if (f(x)) {
        work_on(x);
    }
}

to new structure:

for_each(x) {
    if (!f(x))
        continue;

    work_on(x);
}

This will allow future modification of f(x) with less impact to the code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-09 12:45:54 +08:00
Stephen Warren
7b9b5e1170 ASoC: Tegra: Move DAS configuration into DAS driver
Move DAS routing setup into the DAS driver itself. This removes the need
to duplicate this in each machine driver, of which we'll soon have three.

An added advantage is that the machine drivers no longer call the Tegra20-
specific DAS functions by name, so the machine driver no longer needs to
be split up into Tegra20 and Tegra30 versions.

If individual machine drivers need a different routing setup to this
default, they can still call the DAS functions to set that up.

Long-term, DAS will be a codec driver, and user-space will be able to
control its routing, possibly within constraints that the machine driver
sets up. Configuring the DAS routing from the DAS driver is a very slight
move in that direction.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 12:34:07 +08:00
Axel Lin
16b24881a0 ASoC: wm8960: Use snd_soc_update_bits for read-modify-write
Use snd_soc_update_bits for read-modify-write register access instead of
open-coding it using snd_soc_read and snd_soc_write

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 11:37:31 +08:00
Mark Brown
4105ab846c ASoC: Rely on core enabling the wm8994 with runtime PM
No need to do this in the driver now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 09:22:48 +08:00
Mark Brown
f1aac484f7 ASoC: Take a pm_runtime reference on DAPM devices that are enabled
As for PCMs take a runtime power management reference to devices that are
in a non-off bias, avoiding the need to do this in individual drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-08 09:22:36 +08:00