Axel Lin [Thu, 22 Dec 2011 02:53:15 +0000 (10:53 +0800)]
ASoC: samsung: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.
Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Thu, 22 Dec 2011 01:44:43 +0000 (09:44 +0800)]
ASoC: pxa: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.
Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stephen Warren [Wed, 21 Dec 2011 17:40:59 +0000 (10:40 -0700)]
ASoC: Allow DAI links to be specified using device tree nodes
DAI link endpoints and platform (DMA) devices are currently specified
by name. When instantiating sound cards from device tree, it may be more
convenient to refer to these devices by phandle in the device tree, and
for code to describe DAI links using the "struct device_node *"
("of_node") those phandles map to.
This change adds new fields to snd_soc_dai_link which can "name" devices
using of_node, enhances soc_bind_dai_link() to allow binding based on
of_node, and enhances snd_soc_register_card() to ensure that illegal
combinations of name and of_node are not used.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stephen Warren [Mon, 12 Dec 2011 22:55:36 +0000 (15:55 -0700)]
ASoC: Tegra+WM8903 machine: Add device tree binding
This driver is parameterized in two ways:
a) Platform data, which supplies the set of GPIOs used by the driver.
These GPIOs can now be parsed out of device tree.
b) Machine-specific DAPM route arrays embedded into the ASoC machine
driver itself. Historically, the driver picks the appropriate array
to use using machine_is_*(). The driver now requires this array to
be parsed from device tree when instantiated through device tree,
using the core ASoC support for this parsing.
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>
Stephen Warren [Mon, 12 Dec 2011 22:55:35 +0000 (15:55 -0700)]
ASoC: Add utility to parse DAPM routes from device tree
Implement snd_soc_of_parse_audio_routing(), a utility function that can
parses a simple DAPM route table from device tree.The machine driver
specifies the DT property to use, since this is binding-specific.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stephen Warren [Mon, 12 Dec 2011 22:55:34 +0000 (15:55 -0700)]
ASoC: Add utility to set a card's name from device tree
Implement snd_soc_of_parse_card_name(), a utility function that sets a
card's name from device tree. The machine driver specifies the DT
property to use, since this is binding-specific.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 17 Dec 2011 07:41:11 +0000 (15:41 +0800)]
ASoC: Use dai_fmt in snappercl15 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com> Reviewed-by: Mika Westerberg <mika.westerberg@iki.fi> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Sat, 17 Dec 2011 07:36:52 +0000 (15:36 +0800)]
ASoC: Use dai_fmt in edb93xx machine driver
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>
Shawn Guo [Wed, 14 Dec 2011 07:47:46 +0000 (15:47 +0800)]
ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
The commit 49920bc (dmaengine: add new enum dma_transfer_direction)
changes the type of parameter 'direction' of device_prep_dma_cyclic
from dma_data_direction to dma_transfer_direction.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Leon Romanovsky [Mon, 19 Dec 2011 19:51:52 +0000 (21:51 +0200)]
ASoC: Tegra machine ASoC driver for boards using ALC5332 codec
At this stage only Toshiba AC100/Dynabook supported.
Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Andrey Danin <danindrey@mail.ru> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Dec 2011 09:32:26 +0000 (11:32 +0200)]
OMAP4: mcbsp: Enable FIFO usage
All McBSP instances on OMAP4 has 128 word long FIFO
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Joerg Roedel [Thu, 15 Dec 2011 17:24:54 +0000 (18:24 +0100)]
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
Axel Lin [Wed, 14 Dec 2011 11:23:01 +0000 (19:23 +0800)]
ASoC: Staticise mfld_msic_dailink
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>
Axel Lin [Tue, 13 Dec 2011 09:13:45 +0000 (17:13 +0800)]
ASoC: Staticise sst_pcm_new and sst_soc_platform_drv
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by Vinod Koul <vinod.koul@linux.intel.com> Acked-by: Lu Guanqun <guanqun.lu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
Mark Brown [Tue, 25 Oct 2011 14:13:12 +0000 (16:13 +0200)]
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>
Mark Brown [Thu, 1 Dec 2011 13:55:49 +0000 (13:55 +0000)]
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>
Mark Brown [Wed, 30 Nov 2011 16:51:04 +0000 (16:51 +0000)]
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>
Mark Brown [Sat, 3 Dec 2011 17:10:32 +0000 (17:10 +0000)]
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>
Mark Brown [Tue, 25 Oct 2011 12:23:53 +0000 (14:23 +0200)]
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>
Mark Brown [Fri, 19 Aug 2011 09:37:58 +0000 (18:37 +0900)]
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>
Mark Brown [Thu, 3 Nov 2011 13:20:38 +0000 (13:20 +0000)]
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>
Mark Brown [Tue, 22 Nov 2011 18:22:29 +0000 (18:22 +0000)]
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>
Axel Lin [Mon, 12 Dec 2011 08:01:15 +0000 (16:01 +0800)]
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>
Mark Brown [Sun, 11 Dec 2011 03:31:22 +0000 (11:31 +0800)]
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>
Lothar Waßmann [Fri, 9 Dec 2011 13:38:12 +0000 (14:38 +0100)]
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>
Lothar Waßmann [Fri, 9 Dec 2011 13:38:11 +0000 (14:38 +0100)]
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>
Mark Brown [Sat, 10 Dec 2011 12:38:32 +0000 (20:38 +0800)]
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
Stephen Warren [Wed, 7 Dec 2011 20:58:27 +0000 (13:58 -0700)]
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>
Stephen Warren [Wed, 7 Dec 2011 20:58:29 +0000 (13:58 -0700)]
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>