platform/kernel/linux-stable.git
12 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>
12 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>
12 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>
12 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>
12 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>
12 years agoASoC: Convert sh directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:15:07 +0000 (10:15 +0800)]
ASoC: Convert sh 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>
12 years agoASoC: Convert pxa directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:13:37 +0000 (10:13 +0800)]
ASoC: Convert pxa directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert au1x directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:06:59 +0000 (10:06 +0800)]
ASoC: Convert au1x 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>
12 years agoASoC: Convert atmel directory to module_platform_driver
Axel Lin [Fri, 25 Nov 2011 02:05:45 +0000 (10:05 +0800)]
ASoC: Convert atmel directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Use devm_kzalloc() in wm5100
Mark Brown [Thu, 24 Nov 2011 18:28:51 +0000 (18:28 +0000)]
ASoC: Use devm_kzalloc() in wm5100

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Staticise non-exported symbols in sta32x
Mark Brown [Thu, 24 Nov 2011 17:31:12 +0000 (17:31 +0000)]
ASoC: Staticise non-exported symbols in sta32x

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Johannes Stezenbach <js@sig21.net>
12 years agoASoC: Convert Samsung directory to module_platform_driver
Mark Brown [Wed, 23 Nov 2011 15:20:13 +0000 (15:20 +0000)]
ASoC: Convert Samsung directory to module_platform_driver

Saves some boilerplate code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
12 years agoASoC: Convert mid-x86 directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 03:51:56 +0000 (11:51 +0800)]
ASoC: Convert mid-x86 directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert kirkwood directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 03:43:09 +0000 (11:43 +0800)]
ASoC: Convert kirkwood 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>
12 years agoASoC: Convert nuc900 directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 02:45:32 +0000 (10:45 +0800)]
ASoC: Convert nuc900 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>
12 years agoASoC: Convert jz4740 directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 02:13:03 +0000 (10:13 +0800)]
ASoC: Convert jz4740 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>
12 years agoASoC: Convert imx directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 07:03:50 +0000 (15:03 +0800)]
ASoC: Convert imx 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>
12 years agoASoC: Convert blackfin directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 06:44:52 +0000 (14:44 +0800)]
ASoC: Convert blackfin directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert mxs directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 06:21:29 +0000 (14:21 +0800)]
ASoC: Convert mxs directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert s6000 directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 04:14:56 +0000 (12:14 +0800)]
ASoC: Convert s6000 directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert ep93xx directory to module_platform_driver
Axel Lin [Thu, 24 Nov 2011 04:07:55 +0000 (12:07 +0800)]
ASoC: Convert ep93xx directory to module_platform_driver

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsi-ak4642: modify specification method of FSI / ak464x
Kuninori Morimoto [Thu, 24 Nov 2011 00:55:34 +0000 (16:55 -0800)]
ASoC: fsi-ak4642: modify specification method of FSI / ak464x

Current fsi-ak4642 was using id_entry name in order to specify
FSI port and ak464x codec.
But it was no sense, no flexibility.
Platform can specify FSI/ak464x pair by this patch.

Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Add fully_routed flag to Speyside machines
Mark Brown [Wed, 23 Nov 2011 21:33:07 +0000 (21:33 +0000)]
ASoC: Add fully_routed flag to Speyside machines

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: TrimSlice machine: Set the new fully_routed flag
Stephen Warren [Wed, 23 Nov 2011 19:42:06 +0000 (12:42 -0700)]
ASoC: TrimSlice machine: Set the new fully_routed flag

Set card.fully_routed to request the ASoC core calculated unused codec
pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
calls.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra+WM903 machine: Set the new fully_routed flag
Stephen Warren [Wed, 23 Nov 2011 19:42:05 +0000 (12:42 -0700)]
ASoC: Tegra+WM903 machine: Set the new fully_routed flag

Set card.fully_routed to request the ASoC core calculated unused codec
pins, and call snd_soc_dapm_nc_pin() for them. Remove the open-coded
calls.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Implement fully_routed card property
Stephen Warren [Wed, 23 Nov 2011 19:42:04 +0000 (12:42 -0700)]
ASoC: Implement fully_routed card property

A card is fully routed if the DAPM route table describes all connections on
the board.

When a card is fully routed, some operations can be automated by the ASoC
core. The first, and currently only, such operation is described below, and
implemented by this patch.

Codecs often have a large number of external pins, and not all of these pins
will be connected on all board designs. Some machine drivers therefore call
snd_soc_dapm_nc_pin() for all the unused pins, in order to tell the ASoC core
never to activate them.

However, when a card is fully routed, the information needed to derive the
set of unused pins is present in card->dapm_routes. In this case, have
the ASoC core automatically call snd_soc_dapm_nc_pin() for each unused
codec pin.

This has been tested with soc/tegra/tegra_wm8903.c and soc/tegra/trimslice.c.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra I2S: Remove dependency on pdev->id
Stephen Warren [Wed, 23 Nov 2011 20:33:25 +0000 (13:33 -0700)]
ASoC: Tegra I2S: Remove dependency on pdev->id

When devices are instantiated from device-tree, pdev->id is set to -1.
Rework the driver so it doesn't depend on the ID.

Tegra I2S instantiated from board files are configured with pdev
name "tegra-i2s" and ID 0 or 1. The driver core then names the
device "tegra-i2s.0" or "tegra-i2s.1". This is not changing.

When a device is instantiated from device-tree, it will have
pdev->name="" and pdev->id=-1. For this reason, the pdev->id value is
not something we can rely on.

This patch doesn't actually change any names though:

When a device is instantiated from device-tree, the overall device name
will be "${unit_address}.${node_name}". This causes issues such as
clk_get() failures due to lack of a device-name match. To solve that,
AUXDATA was invented, to force a specific device name, thus allowing
dev_name() to return the same as the non-device-tree case. Tegra
currently uses AUXDATA for the I2S controllers. Eventually, AUXDATA will
go away, most likely replaced by phandle-based references within the
device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove unused variable in wm8776 driver
Mark Brown [Wed, 23 Nov 2011 14:59:54 +0000 (14:59 +0000)]
ASoC: Remove unused variable in wm8776 driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Wed, 23 Nov 2011 14:58:37 +0000 (14:58 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: skip resume of soc-audio devices without codecs
Eric Miao [Wed, 23 Nov 2011 14:37:00 +0000 (22:37 +0800)]
ASoC: skip resume of soc-audio devices without codecs

There are cases where there is no working codec on the soc-audio devices,
and snd_soc_suspend() will skip such device when suspending. Yet its
counterpart snd_soc_resume() does not check this, causing complaints
about spinlock lockup:

[  176.726087] BUG: spinlock lockup on CPU#0, kworker/0:2/1067, d8ab82a8
[  176.732539] [<80014a14>] (unwind_backtrace+0x0/0xec) from [<805b3fc8>] (dump_stack+0x20/0x24)
[  176.741082] [<805b3fc8>] (dump_stack+0x20/0x24) from [<80322208>] (do_raw_spin_lock+0x118/0x158)
[  176.749882] [<80322208>] (do_raw_spin_lock+0x118/0x158) from [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68)
[  176.759723] [<805b7874>] (_raw_spin_lock_irqsave+0x5c/0x68) from [<8002a020>] (__wake_up+0x2c/0x5c)
[  176.768781] [<8002a020>] (__wake_up+0x2c/0x5c) from [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0)
[  176.777666] [<804a6de8>] (soc_resume_deferred+0x3c/0x2b0) from [<8004ee20>] (process_one_work+0x2e8/0x50c)
[  176.787334] [<8004ee20>] (process_one_work+0x2e8/0x50c) from [<8004fd08>] (worker_thread+0x1c8/0x2e0)
[  176.796566] [<8004fd08>] (worker_thread+0x1c8/0x2e0) from [<80053ec8>] (kthread+0xa4/0xb0)
[  176.804843] [<80053ec8>] (kthread+0xa4/0xb0) from [<8000ea70>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Wed, 23 Nov 2011 13:12:38 +0000 (13:12 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Cleanup duplicated const
Lars-Peter Clausen [Wed, 23 Nov 2011 13:11:21 +0000 (14:11 +0100)]
ASoC: Cleanup duplicated const

Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally
introduced a few duplicated consts. This patch cleans it up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs42l51: Fix off-by-one for reg_cache_size
Axel Lin [Wed, 23 Nov 2011 04:46:11 +0000 (12:46 +0800)]
ASoC: cs42l51: Fix off-by-one for reg_cache_size

Just checking the code in cs42l51_fill_cache():
The cache pointer points to codec->reg_cache + 1.
I think it is because CS42L51_FIRSTREG is 0x01,
so codec->reg_cache[0] is not used here.

Then we read CS42L51_NUMREGS bytes to cache.
So we need reg_cache_size to be CS42L51_NUMREGS + 1.

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

12 years agoASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driver
Stephen Warren [Wed, 23 Nov 2011 01:21:21 +0000 (18:21 -0700)]
ASoC: Tegra TrimSlice machine: Use devm_ APIs and module_platform_driver

module_platform_driver saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driver
Stephen Warren [Wed, 23 Nov 2011 01:21:20 +0000 (18:21 -0700)]
ASoC: Tegra+WM8903 machine: Use devm_ APIs and module_platform_driver

module_platform_driver saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra DAS: Add device tree binding
Stephen Warren [Wed, 23 Nov 2011 01:21:18 +0000 (18:21 -0700)]
ASoC: Tegra DAS: Add device tree binding

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Constify snd_soc_dai_ops structs
Lars-Peter Clausen [Wed, 23 Nov 2011 10:40:40 +0000 (11:40 +0100)]
ASoC: Constify snd_soc_dai_ops structs

Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: drop support for PlayPaq with WM8510
Paul Bolle [Wed, 23 Nov 2011 09:39:10 +0000 (10:39 +0100)]
ASoC: drop support for PlayPaq with WM8510

SoC Audio support for PlayPaq with WM8510 got added in commit 9aaca9683b
("[ALSA] Revised AT32 ASoC Patch"). That support depends on
BOARD_PLAYPAQ. That Kconfig symbol didn't exist when that support got
added in v2.6.27. It still doesn't. It has never been possible to even
build this driver. Drop it.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra I2S: Use devm_ APIs and module_platform_driver
Stephen Warren [Wed, 23 Nov 2011 01:21:16 +0000 (18:21 -0700)]
ASoC: Tegra I2S: Use devm_ APIs and module_platform_driver

module_platform_drive saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra: Move DAS configuration into machine drivers
Stephen Warren [Wed, 23 Nov 2011 01:21:13 +0000 (18:21 -0700)]
ASoC: Tegra: Move DAS configuration into machine drivers

This removes potentially machine-specific routing knowledge from the
I2S driverinto the machine drivers, which is better equipped to know
what the appropriate routing configuration is.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra DAS: Use devm_ APIs and module_platform_driver
Stephen Warren [Wed, 23 Nov 2011 01:21:15 +0000 (18:21 -0700)]
ASoC: Tegra DAS: Use devm_ APIs and module_platform_driver

module_platform_drive saves some boiler-plate code.

The devm_ APIs remove the need to manually clean up allocations,
thus removing some code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Tegra PCM: Use module_platform_driver
Stephen Warren [Wed, 23 Nov 2011 01:21:14 +0000 (18:21 -0700)]
ASoC: Tegra PCM: Use module_platform_driver

This saves some boiler-plate code.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert wm8776 to table based control and DAPM init
Mark Brown [Tue, 22 Nov 2011 23:19:41 +0000 (23:19 +0000)]
ASoC: Convert wm8776 to table based control and DAPM init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Staticise and constify cs42l73_reg_defaults
Mark Brown [Tue, 22 Nov 2011 15:13:30 +0000 (15:13 +0000)]
ASoC: Staticise and constify cs42l73_reg_defaults

It's not exported and doesn't need to change.

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

12 years agoASoC: mpc8610: tell the CS4270 codec that it's the master
Timur Tabi [Tue, 22 Nov 2011 20:38:59 +0000 (14:38 -0600)]
ASoC: mpc8610: tell the CS4270 codec that it's the master

Commit ac601555 ("ASoC: Return early with -EINVAL if invalid dai format is
detected") requires the machine driver to tell the CS4270 codec driver
whether the CS4270 should be configured for master or slave operation.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs4720: use snd_soc_cache_sync()
Daniel Mack [Tue, 22 Nov 2011 16:17:23 +0000 (17:17 +0100)]
ASoC: cs4720: use snd_soc_cache_sync()

Replace the manual register restore mechanism in cs4270.c and call the
generic snd_soc_cache_sync() handler instead.

This factors code out in favour of core facilities and also fixes a
bus confusion that is most probably caused by intermixing i2c-regmap
functions and i2c_smbus_* accessors.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 22 Nov 2011 19:40:47 +0000 (19:40 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: SAMSUNG: Fix build error
Boojin Kim [Tue, 22 Nov 2011 02:03:22 +0000 (11:03 +0900)]
ASoC: SAMSUNG: Fix build error

This patch adds <linux/modules.h> to fix following build errors.

sound/soc/codecs/wm8994.c: In function 'wm8994_readable':
sound/soc/codecs/wm8994.c:58: warning: unused variable 'wm8994'
sound/soc/samsung/smdk_wm8994.c:176: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk_wm8994.c:176: warning: data definition has no type or storage class
sound/soc/samsung/smdk_wm8994.c:176: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
sound/soc/samsung/smdk_wm8994.c:176: warning: function declaration isn't a prototype
sound/soc/samsung/smdk_wm8994.c:177: error: expected declaration specifiers or '...' before string constant

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 22 Nov 2011 13:09:03 +0000 (13:09 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: max9877: Update register if either val or val2 is changed
Axel Lin [Tue, 22 Nov 2011 06:47:44 +0000 (14:47 +0800)]
ASoC: max9877: Update register if either val or val2 is changed

In the case of ((max9877_regs[reg] >> shift) & mask) != val
but ((max9877_regs[reg2] >> shift) & mask) == val2,
current code does not update the registers.

Fix the logic to update registers if either val or val2 is changed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET
Axel Lin [Tue, 22 Nov 2011 01:46:51 +0000 (09:46 +0800)]
ASoC: Fix wrong define for AD1836_ADC_WORD_OFFSET

According to the datasheet:
The BIT[5:4] of ADC Control Register 2 is to control the word width.
        00 = 25 Bits
        01 = 20 Bits
        10 = 16 Bits
        11 = Invalid

Thus, the AD1836_ADC_WORD_OFFSET should be defined as 4.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoASoC: cs42l73: Make inv and format to be unsigned int
Axel Lin [Fri, 18 Nov 2011 09:16:22 +0000 (17:16 +0800)]
ASoC: cs42l73: Make inv and format to be unsigned int

Fix below smatch warning:

sound/soc/codecs/cs42l73.c +1030 cs42l73_set_dai_fmt(53) error: inv is never equal to 1024 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1032 cs42l73_set_dai_fmt(55) error: inv is never equal to 768 (wrong type 0 - 255).
sound/soc/codecs/cs42l73.c +1036 cs42l73_set_dai_fmt(59) error: inv is never equal to 1024 (wrong type 0 - 255).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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>
12 years agoASoC: cs42l73: Unify the way to define bits of register
Axel Lin [Fri, 18 Nov 2011 08:05:13 +0000 (16:05 +0800)]
ASoC: cs42l73: Unify the way to define bits of register

Current code defines some bits with left shift to the proper bit defined in
datasheet, but some don't.
Unify the definition with proper left shift and adjust the code accordingly.

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>
12 years agoASoC: Remove conditional I2C usage from tlv320aic3x driver
Mark Brown [Mon, 21 Nov 2011 12:11:37 +0000 (12:11 +0000)]
ASoC: Remove conditional I2C usage from tlv320aic3x driver

The driver only supports I2C so doesn't need to do things conditionally.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
12 years agoASoC: Remove WM5100 DSP memory windows from register default data
Mark Brown [Wed, 2 Nov 2011 14:47:24 +0000 (14:47 +0000)]
ASoC: Remove WM5100 DSP memory windows from register default data

They're all volatile so shouldn't have defaults and as we've got pages
into the DSP memory the registers themselves aren't that useful - a
further patch adding support for the DSPs will provide direct diagnostic
access to the DSP memories.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert WM8753 to table based DAPM and control init
Mark Brown [Mon, 21 Nov 2011 15:46:51 +0000 (15:46 +0000)]
ASoC: Convert WM8753 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove redundant regcache_sync call in cs42l73_resume
Axel Lin [Sat, 19 Nov 2011 05:45:34 +0000 (13:45 +0800)]
ASoC: Remove redundant regcache_sync call in cs42l73_resume

It's done in cs42l73_set_bias_level when the dapm.bias_level is switching
from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs42l73: Show correct revision id
Axel Lin [Sat, 19 Nov 2011 02:17:36 +0000 (10:17 +0800)]
ASoC: cs42l73: Show correct revision id

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs42l73: Return proper error code if device id mismatch
Axel Lin [Sat, 19 Nov 2011 02:15:53 +0000 (10:15 +0800)]
ASoC: cs42l73: Return proper error code if device id mismatch

Return -ENODEV instead of 0 if device id mismatch.

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

12 years agoASoC: Use table based init for wm8731_snd_controls
Mark Brown [Mon, 21 Nov 2011 12:59:52 +0000 (12:59 +0000)]
ASoC: Use table based init for wm8731_snd_controls

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Ensure WM8731 register cache is synced when resuming from disabled
Mark Brown [Mon, 21 Nov 2011 11:55:41 +0000 (11:55 +0000)]
ASoC: Ensure WM8731 register cache is synced when resuming from disabled

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Mon, 21 Nov 2011 11:28:19 +0000 (11:28 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoMerge branch 'DB_RANGE-size-fixes' of git://git.alsa-project.org/alsa-kprivate into...
Mark Brown [Mon, 21 Nov 2011 11:28:11 +0000 (11:28 +0000)]
Merge branch 'DB_RANGE-size-fixes' of git://git.alsa-project.org/alsa-kprivate into for-3.2

12 years agodevicetree: Document Wolfson prefix
Mark Brown [Mon, 17 Oct 2011 21:59:05 +0000 (22:59 +0100)]
devicetree: Document Wolfson prefix

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
Axel Lin [Sat, 19 Nov 2011 06:41:07 +0000 (14:41 +0800)]
ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm_hubs: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:15:31 +0000 (15:15 +0100)]
ASoC: wm_hubs: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: wm9090: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:14:55 +0000 (15:14 +0100)]
ASoC: wm9090: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: wm8993: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:14:11 +0000 (15:14 +0100)]
ASoC: wm8993: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: wm8962: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:13:27 +0000 (15:13 +0100)]
ASoC: wm8962: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: sgtl5000: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:12:26 +0000 (15:12 +0100)]
ASoC: sgtl5000: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: rt5631: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:11:54 +0000 (15:11 +0100)]
ASoC: rt5631: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
the last entry from being omitted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: adau1373: fix DB_RANGE size
Clemens Ladisch [Sun, 20 Nov 2011 14:10:27 +0000 (15:10 +0100)]
ASoC: adau1373: fix DB_RANGE size

Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
12 years agoASoC: alc5632: Remove volatile registers from regmap defaults
Leon Romanovsky [Thu, 17 Nov 2011 16:48:42 +0000 (18:48 +0200)]
ASoC: alc5632: Remove volatile registers from regmap defaults

There is no need to provide defaults for the volatile
registers and doing so might cause confusion.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Thu, 17 Nov 2011 16:48:57 +0000 (16:48 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: wm8753: Skip noop reconfiguration of DAI mode
Timo Juhani Lindfors [Thu, 17 Nov 2011 00:52:50 +0000 (02:52 +0200)]
ASoC: wm8753: Skip noop reconfiguration of DAI mode

This patch makes it possible to set DAI mode to its currently applied
value even if codec is active. This is necessary to allow

aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom &
alsactl store -f backup.state
alsactl restore -f backup.state

to work without returning errors. This patch is based on a patch sent
by Klaus Kurzmann <mok@fluxnetz.de>.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoASoC: alc5632: Update of i2c_probe function to use regmap API only
Leon Romanovsky [Thu, 17 Nov 2011 10:01:30 +0000 (12:01 +0200)]
ASoC: alc5632: Update of i2c_probe function to use regmap API only

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: alc5632: Added support of two undocumented registers
Leon Romanovsky [Thu, 17 Nov 2011 10:01:29 +0000 (12:01 +0200)]
ASoC: alc5632: Added support of two undocumented registers

There are two undocumented registers in use in alc5632_i2c_probe
function. It must be added to support future rewrite of this
function to use regmap API completely.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: alc5632: Remove unrelevant registers and name the relevant
Leon Romanovsky [Thu, 17 Nov 2011 10:01:28 +0000 (12:01 +0200)]
ASoC: alc5632: Remove unrelevant registers and name the relevant

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Add support for CS42L73 codec
Brian Austin [Wed, 16 Nov 2011 18:32:27 +0000 (12:32 -0600)]
ASoC: Add support for CS42L73 codec

This patch adds support for the Cirrus Logic CS42L73 low power stereo
codec.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Georgi Vlaev <joe@nucleusys.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Say how long short WM8958 DSP2 firmwares are
Mark Brown [Wed, 16 Nov 2011 13:38:28 +0000 (13:38 +0000)]
ASoC: Say how long short WM8958 DSP2 firmwares are

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: alc5632: rename volume/switch contols for master and speaker volumes.
Andrey Danin [Sun, 13 Nov 2011 19:53:13 +0000 (21:53 +0200)]
ASoC: alc5632: rename volume/switch contols for master and speaker volumes.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert ALC5632 codec to use regmap API
Leon Romanovsky [Wed, 16 Nov 2011 10:06:58 +0000 (12:06 +0200)]
ASoC: Convert ALC5632 codec to use regmap API

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: alc5632: Fix compile without CONFIG_PM
Leon Romanovsky [Wed, 16 Nov 2011 10:07:00 +0000 (12:07 +0200)]
ASoC: alc5632: Fix compile without CONFIG_PM

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl_ssi: properly initialize the sysfs attribute object
Timur Tabi [Mon, 14 Nov 2011 22:35:26 +0000 (16:35 -0600)]
ASoC: fsl_ssi: properly initialize the sysfs attribute object

Commit 6992f533 ("sysfs: Use one lockdep class per sysfs attribute")
requires 'struct attribute' objects to be initialized with sysfs_attr_init().

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agoASoC: Remove unused control_data and mutex fields from struct alc5632_priv
Axel Lin [Sun, 13 Nov 2011 03:56:28 +0000 (11:56 +0800)]
ASoC: Remove unused control_data and mutex fields from struct alc5632_priv

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sta32x: add workaround for ESD reset issue
Johannes Stezenbach [Mon, 14 Nov 2011 16:23:18 +0000 (17:23 +0100)]
ASoC: sta32x: add workaround for ESD reset issue

sta32x resets and loses all configuration during ESD test.
Work around by polling the CONFA register once a second
and restore all coeffcients and registers when CONFA
changes unexpectedly.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sta32x: add platform data definition
Johannes Stezenbach [Mon, 14 Nov 2011 16:23:17 +0000 (17:23 +0100)]
ASoC: sta32x: add platform data definition

Add a structure for platform specific configuration and use it,
thereby removing a few FIXMEs which marked hard-coded values.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Mon, 14 Nov 2011 21:33:17 +0000 (21:33 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: sta32x: preserve coefficient RAM
Johannes Stezenbach [Mon, 14 Nov 2011 16:23:16 +0000 (17:23 +0100)]
ASoC: sta32x: preserve coefficient RAM

The coefficient RAM must be saved in a shadow so it can
be restored when the codec is powered on using
regulator_bulk_enable().

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
12 years agoASoC: ak4642: add ak4648 support
Kuninori Morimoto [Fri, 11 Nov 2011 00:22:05 +0000 (16:22 -0800)]
ASoC: ak4642: add ak4648 support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4642: add Line out support
Kuninori Morimoto [Fri, 11 Nov 2011 00:21:55 +0000 (16:21 -0800)]
ASoC: ak4642: add Line out support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4642: add headphone mute switch control
Kuninori Morimoto [Fri, 11 Nov 2011 00:21:42 +0000 (16:21 -0800)]
ASoC: ak4642: add headphone mute switch control

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4642: add DAPM support for HeadPhone Output
Kuninori Morimoto [Fri, 11 Nov 2011 00:21:31 +0000 (16:21 -0800)]
ASoC: ak4642: add DAPM support for HeadPhone Output

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4642: add ak4642_set_bias_level()
Kuninori Morimoto [Fri, 11 Nov 2011 00:21:01 +0000 (16:21 -0800)]
ASoC: ak4642: add ak4642_set_bias_level()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove unnecessary backslash from alc5632 codec
Leon Romanovsky [Thu, 10 Nov 2011 19:22:16 +0000 (21:22 +0200)]
ASoC: Remove unnecessary backslash from alc5632 codec

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove unused defines in alc5632 codec
Leon Romanovsky [Thu, 10 Nov 2011 19:22:15 +0000 (21:22 +0200)]
ASoC: Remove unused defines in alc5632 codec

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert WM8995 to direct regmap usage
Mark Brown [Thu, 10 Nov 2011 17:15:54 +0000 (17:15 +0000)]
ASoC: Convert WM8995 to direct regmap usage

Large code size increase due to the addition of readability information
and the reformatting of the defaults table.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>