]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoASoC: Fix an obvious copy paste error in an error message
Lothar Waßmann [Fri, 9 Dec 2011 13:16:29 +0000 (14:16 +0100)]
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>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Sat, 10 Dec 2011 19:01:33 +0000 (03:01 +0800)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Fix WM8996 24.576MHz clock operation
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
12 years agoASoC: Convert wm8770 to devm_kzalloc()
Mark Brown [Thu, 8 Dec 2011 08:24:16 +0000 (16:24 +0800)]
ASoC: Convert wm8770 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix comments for disabling amplifier and PGA
Axel Lin [Fri, 9 Dec 2011 10:43:20 +0000 (18:43 +0800)]
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>
12 years agoASoC: Convert WM8900 to table based DAPM and control init
Mark Brown [Thu, 8 Dec 2011 08:53:47 +0000 (16:53 +0800)]
ASoC: Convert WM8900 to table based DAPM and control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert WM8804 to table based control init
Mark Brown [Thu, 8 Dec 2011 08:52:19 +0000 (16:52 +0800)]
ASoC: Convert WM8804 to table based control init

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Make WM8770 SPI usage unconditional
Mark Brown [Thu, 8 Dec 2011 08:46:59 +0000 (16:46 +0800)]
ASoC: Make WM8770 SPI usage unconditional

The device only supports SPI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert WM8776 to devm_kzalloc()
Mark Brown [Thu, 8 Dec 2011 08:45:22 +0000 (16:45 +0800)]
ASoC: Convert WM8776 to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Refactor some conditions and loop in soc_bind_dai_link()
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>
12 years agoASoC: Tegra: Move DAS configuration into DAS driver
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>
12 years agoASoC: wm8960: Use snd_soc_update_bits for read-modify-write
Axel Lin [Thu, 8 Dec 2011 03:09:15 +0000 (11:09 +0800)]
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>
12 years agoASoC: Rely on core enabling the wm8994 with runtime PM
Mark Brown [Mon, 5 Dec 2011 15:17:36 +0000 (15:17 +0000)]
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>
12 years agoASoC: Take a pm_runtime reference on DAPM devices that are enabled
Mark Brown [Mon, 5 Dec 2011 15:17:06 +0000 (15:17 +0000)]
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>
12 years agoASoC: Use core pm_runtime callbacks for omap-mcpdm
Mark Brown [Sat, 3 Dec 2011 20:20:47 +0000 (20:20 +0000)]
ASoC: Use core pm_runtime callbacks for omap-mcpdm

Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
12 years agoASoC: Use core pm_runtime callbacks for omap-dmic
Mark Brown [Sat, 3 Dec 2011 20:20:02 +0000 (20:20 +0000)]
ASoC: Use core pm_runtime callbacks for omap-dmic

Now that the core holds a pm_runtime reference to the device while the
link is active there is no need for the driver to do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
12 years agoASoC: Hold runtime PM references to components of active DAIs
Mark Brown [Sat, 3 Dec 2011 20:14:31 +0000 (20:14 +0000)]
ASoC: Hold runtime PM references to components of active DAIs

Every device that implements runtime power management for DAIs is doing
it in pretty much the same way: in the startup callback they take a
runtime PM reference and then in the shutdown callback they release that
reference, keeping the device active while the DAI is active. Given the
frequency with which this is done and the obviousness of the need to keep
the device active in this period factor the code out into the core, taking
references on the device for each CPU DAI, CODEC DAI and DMA device in the
core.

As runtime PM is reference counted this shouldn't interfere with any
other reference holding by the drivers, and since (in common with the
existing implementations) we don't check for errors on enabling it
shouldn't matter if the device actually has runtime PM enabled or not.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Wed, 7 Dec 2011 16:15:39 +0000 (00:15 +0800)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Convert e800_wm9712 to use gpio_request_one()
Axel Lin [Wed, 7 Dec 2011 02:03:12 +0000 (10:03 +0800)]
ASoC: Convert e800_wm9712 to use gpio_request_one()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix error handling in e800_init to free gpios
Axel Lin [Wed, 7 Dec 2011 02:01:30 +0000 (10:01 +0800)]
ASoC: Fix error handling in e800_init to free gpios

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert e750_wm9705 to use gpio_request_one()
Axel Lin [Wed, 7 Dec 2011 02:04:07 +0000 (10:04 +0800)]
ASoC: Convert e750_wm9705 to use gpio_request_one()

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix a typo in s3c24xx_simtec_tlv320aic23 driver
Axel Lin [Wed, 7 Dec 2011 10:04:10 +0000 (18:04 +0800)]
ASoC: Fix a typo in s3c24xx_simtec_tlv320aic23 driver

Fix a typo introduced by commit e00c3f55
"ASoC: Convert Samsung directory to module_platform_driver".

This fixes the build error:
  CC      sound/soc/samsung/s3c24xx_simtec_tlv320aic23.o
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c: In function 'simtec_audio_tlv320aic32_driver_init':
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: 'simtec_audio_tlv320aic32_driver' undeclared (first use in this function)
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: (Each undeclared identifier is reported only once
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: for each function it appears in.)
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c: In function 'simtec_audio_tlv320aic32_driver_exit':
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c:105: error: 'simtec_audio_tlv320aic32_driver' undeclared (first use in this function)
make[3]: *** [sound/soc/samsung/s3c24xx_simtec_tlv320aic23.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

I think we had better naming it with *driver, thus I change
it to simtec_audio_tlv320aic23_driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Include linux/module.h for smdk2443_wm9710
Axel Lin [Wed, 7 Dec 2011 09:52:19 +0000 (17:52 +0800)]
ASoC: Include linux/module.h for smdk2443_wm9710

Include linux/module.h to fix below build error:
  CC      sound/soc/samsung/smdk2443_wm9710.o
sound/soc/samsung/smdk2443_wm9710.c:64: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:64: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:64: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
sound/soc/samsung/smdk2443_wm9710.c:64: warning: function declaration isn't a prototype
sound/soc/samsung/smdk2443_wm9710.c:65: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:65: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:65: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
sound/soc/samsung/smdk2443_wm9710.c:65: warning: function declaration isn't a prototype
sound/soc/samsung/smdk2443_wm9710.c:66: error: expected declaration specifiers or '...' before string constant
sound/soc/samsung/smdk2443_wm9710.c:66: warning: data definition has no type or storage class
sound/soc/samsung/smdk2443_wm9710.c:66: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
sound/soc/samsung/smdk2443_wm9710.c:66: warning: function declaration isn't a prototype
make[3]: *** [sound/soc/samsung/smdk2443_wm9710.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix a typo in jive_wm8750
Axel Lin [Wed, 7 Dec 2011 09:44:47 +0000 (17:44 +0800)]
ASoC: Fix a typo in jive_wm8750

Fix a typo in jive_wm8750 that introduces below build error.
Also removes an unused err variable.

  CC      sound/soc/samsung/jive_wm8750.o
sound/soc/samsung/jive_wm8750.c: In function 'jive_wm8750_init':
sound/soc/samsung/jive_wm8750.c:104: warning: unused variable 'err'
sound/soc/samsung/jive_wm8750.c: At top level:
sound/soc/samsung/jive_wm8750.c:134: error: unknown field 'dapm_widgtets' specified in initializer
sound/soc/samsung/jive_wm8750.c:134: warning: initialization from incompatible pointer type
make[3]: *** [sound/soc/samsung/jive_wm8750.o] Error 1
make[2]: *** [sound/soc/samsung] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert Samsung I2S driver to devm_kzalloc()
Mark Brown [Sat, 3 Dec 2011 20:30:37 +0000 (20:30 +0000)]
ASoC: Convert Samsung I2S driver to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
12 years agoASoC: WM8903: Add of_match_table
Stephen Warren [Tue, 6 Dec 2011 21:15:41 +0000 (14:15 -0700)]
ASoC: WM8903: Add of_match_table

This allows the device to be matched against the device tree using the
compatible flag directly, as is standard, rather than falling back to
matching .id_table against the non-vendor portion of the first compatible
property value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 6 Dec 2011 11:01:38 +0000 (11:01 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Fix build dependency for SND_SOC_JZ4740_CODEC
Axel Lin [Tue, 6 Dec 2011 07:38:51 +0000 (15:38 +0800)]
ASoC: Fix build dependency for SND_SOC_JZ4740_CODEC

Currently SND_SOC_JZ4740_CODEC depends on SOC_JZ4740 but SOC_JZ4740 is not
defined in any Kconfig. Thus the codec driver will not be built when select
"Build all ASoC CODEC drivers".
(Unless it is selected by SND_JZ4740_SOC_QI_LB60).
Remove the dependency with SOC_JZ4740, then this code driver can be built when
select "Build all ASoC CODEC drivers".

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: Include linux/io.h for jz4740 codec
Axel Lin [Tue, 6 Dec 2011 07:19:00 +0000 (15:19 +0800)]
ASoC: Include linux/io.h for jz4740 codec

Include linux/io.h to fix below build errors:

  CC      sound/soc/codecs/jz4740.o
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_read':
sound/soc/codecs/jz4740.c:82: error: implicit declaration of function 'readl'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_write':
sound/soc/codecs/jz4740.c:92: error: implicit declaration of function 'writel'
sound/soc/codecs/jz4740.c: In function 'jz4740_codec_probe':
sound/soc/codecs/jz4740.c:373: error: implicit declaration of function 'ioremap'
sound/soc/codecs/jz4740.c:373: warning: assignment makes pointer from integer without a cast
sound/soc/codecs/jz4740.c:393: error: implicit declaration of function 'iounmap'
make[3]: *** [sound/soc/codecs/jz4740.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

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: Don't fail if we can't read the IRQ type in WM8903
Mark Brown [Tue, 6 Dec 2011 10:30:24 +0000 (10:30 +0000)]
ASoC: Don't fail if we can't read the IRQ type in WM8903

If we fail to read the IRQ type from the interrupt controller don't
fail, just assume a value and solider on - we may fail later when we try
to request the IRQ but it's possible we'll succeed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: WM8903: Add device tree binding
Stephen Warren [Fri, 2 Dec 2011 22:08:41 +0000 (15:08 -0700)]
ASoC: WM8903: Add device tree binding

Document the device tree binding for the WM8903 codec, and modify the
driver to extract platform data from the device tree, if present.

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>
12 years agoASoC: WM8903: Get default irq_active_low from IRQ controller
Stephen Warren [Fri, 2 Dec 2011 22:08:40 +0000 (15:08 -0700)]
ASoC: WM8903: Get default irq_active_low from IRQ controller

If the WM8903 is hooked up to an interrupt, set the irq_active_low flag
in the default platform data based on the IRQ's IRQ_TYPE. Map IRQ_TYPE_NONE
(a lack of explicit configuration/restriction) to irq_active_low = false;
the previous default.

This code is mainly added to support device tree interrupt bindings,
although will work perfectly well in a non device tree system too.

Any interrupt controller that supports only a single IRQ_TYPE could
set each IRQ's type based on that restriction. This applies equally
with and without device tree. To cater for interrupt controllers
that don't do this, for which irqd_get_trigger_type() will return
IRQ_TYPE_NONE, the platform data irq_active_low field may be used
in systems that don't use device tree.

With device tree, every IRQ must have some IRQ_TYPE set.

Controllers that support DT and multiple IRQ_TYPEs must define the
interrupts property (as used in interrupt source nodes) such that it
defines the IRQ_TYPE to use. When the core DT setup code initializes
wm8903->irq, the interrupts property will be parsed, and as a side-
effect, set the IRQ's IRQ_TYPE for the WM8903 probe() function to read.

Controllers that support DT and a single IRQ_TYPE could arrange to
set the IRQ_TYPE somehow during their initialization, or hard-code
it during the processing of the child interrupts property.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: WM8903: Remove conditionals checking pdata != NULL
Stephen Warren [Fri, 2 Dec 2011 22:08:39 +0000 (15:08 -0700)]
ASoC: WM8903: Remove conditionals checking pdata != NULL

The pdata pointer is now always valid. Remove any conditions that check
its validity.

This patch is mostly just removing an indentation level. One variable had
to be moved due to the removal of a scope, and one comment was split into
two. Viewing the patch with git show/diff -b will show that it's actually
very small.

Note that WM8903_MIC_BIAS_CONTROL_0 is now written unconditionally,
whereas it used to be written only if pdata was supplied. Since
defpdata.micdet_cfg = 0, this unconditional write simply echos the HW
defaults in the case where pdata is not supplied.

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>
12 years agoASoC: WM8903: Fix platform data gpio_cfg confusion
Stephen Warren [Fri, 2 Dec 2011 22:08:37 +0000 (15:08 -0700)]
ASoC: WM8903: Fix platform data gpio_cfg confusion

wm8903_platform_data.gpio_cfg[] was intended to be interpreted as follows:
0:       Don't touch this GPIO's configuration register
1..7fff: Write that value to the GPIO's configuration register
8000:    Write zero to the GPIO's configuration register
other:   Undefined (invalid)

The rationale is that platform data is usually global data, and a value of
zero means that the field wasn't explicitly set to anything (e.g. because
the field was new to the pdata type, and existing users weren't update to
initialize it) and hence the value zero should be ignored. 0x8000 is an
explicit way to get 0 in the register.

The code worked this way until commit 7cfe561 "ASoC: wm8903: Expose GPIOs
through gpiolib", where the behaviour was changed due to my lack of
awareness of the above rationale.

This patch reverts to the intended behaviour, and updates all in-tree users
to use the correct scheme. This also makes WM8903 consistent with other
devices that use a similar scheme.

WM8903_GPIO_NO_CONFIG is also renamed to WM8903_GPIO_CONFIG_ZERO so that
its name accurately reflects its purpose.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Tue, 6 Dec 2011 10:09:55 +0000 (10:09 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Provide a more complete DMA driver stub
Mark Brown [Mon, 5 Dec 2011 20:50:45 +0000 (20:50 +0000)]
ASoC: Provide a more complete DMA driver stub

Allow userspace applications to do more parameter setting by providing a
more complete stub DMA driver specifying a wildcard set of formats and
channels and essentially random values for the DMA parameters. This is
required for useful runtime operation of the dummy DMA driver until we
are able to figure out how to power up links and do hw_params() from DAPM.

Sending to stable as without this the dummy driver is not terribly
useful.

Reported-by: Kyung-Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Tested-by: Kyung-Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agoMerge branch 'for-3.2' into for-3.3
Mark Brown [Mon, 5 Dec 2011 19:30:05 +0000 (19:30 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Remove references to corgi and spitz from machine driver document
Mark Brown [Mon, 5 Dec 2011 18:27:25 +0000 (18:27 +0000)]
ASoC: Remove references to corgi and spitz from machine driver document

They're not currently actively worked on, the hardware being rather
obsolete by now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: sst_platform: fix the dsp driver interface
Vinod Koul [Mon, 5 Dec 2011 13:43:41 +0000 (19:13 +0530)]
ASoC: sst_platform: fix the dsp driver interface

lower level drivers typically register with upper layers.
So fix by exporting symbols from sst_platform driver for dsp driver to
register to sst platform driver

Now this driver doesnt depend on sst driver, so remove the dependency
and the header files

Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix reg_cache_size for stac9766
Axel Lin [Mon, 5 Dec 2011 02:06:04 +0000 (10:06 +0800)]
ASoC: Fix reg_cache_size for stac9766

reg_cache_size is supposed to be the number of elements in the register cache,
not the size in bytes.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: uda1380: Convert to gpio_request_one()
Axel Lin [Sun, 4 Dec 2011 23:58:25 +0000 (07:58 +0800)]
ASoC: uda1380: Convert to gpio_request_one()

Using gpio_request_one can make the error handling simpler.

Also remove a redundant "Failed to issue reset" error message.
We already show the error message in uda1380_reset() error path.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Convert e740_wm9705 to use gpio_request_one()
Axel Lin [Mon, 5 Dec 2011 09:09:11 +0000 (17:09 +0800)]
ASoC: Convert e740_wm9705 to use gpio_request_one()

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 [Sun, 4 Dec 2011 23:47:39 +0000 (23:47 +0000)]
Merge branch 'for-3.2' into for-3.3

12 years agoASoC: Make SND_SOC_MX27VIS_AIC32X4 depend on I2C
Axel Lin [Sun, 4 Dec 2011 08:11:16 +0000 (16:11 +0800)]
ASoC: Make SND_SOC_MX27VIS_AIC32X4 depend on I2C

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

  CC      sound/soc/codecs/tlv320aic32x4.o
sound/soc/codecs/tlv320aic32x4.c: In function 'aic32x4_read':
sound/soc/codecs/tlv320aic32x4.c:323: error: implicit declaration of function 'i2c_smbus_read_byte_data'
sound/soc/codecs/tlv320aic32x4.c: In function 'aic32x4_probe':
sound/soc/codecs/tlv320aic32x4.c:641: error: 'i2c_master_send' undeclared (first use in this function)
sound/soc/codecs/tlv320aic32x4.c:641: error: (Each undeclared identifier is reported only once
sound/soc/codecs/tlv320aic32x4.c:641: error: for each function it appears in.)
sound/soc/codecs/tlv320aic32x4.c: In function 'aic32x4_modinit':
sound/soc/codecs/tlv320aic32x4.c:763: error: implicit declaration of function 'i2c_add_driver'
sound/soc/codecs/tlv320aic32x4.c: In function 'aic32x4_exit':
sound/soc/codecs/tlv320aic32x4.c:774: error: implicit declaration of function 'i2c_del_driver'
make[3]: *** [sound/soc/codecs/tlv320aic32x4.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Fix dependency for SND_SOC_RAUMFELD and SND_PXA2XX_SOC_HX4700
Axel Lin [Sun, 4 Dec 2011 08:30:18 +0000 (16:30 +0800)]
ASoC: Fix dependency for SND_SOC_RAUMFELD and SND_PXA2XX_SOC_HX4700

SND_SOC_RAUMFELD selects SND_SOC_CS4270 which needs CONFIG_I2C,
and also selects SND_SOC_AK4104 which needs SPI_MASTER.
Thus make SND_SOC_RAUMFELD depend on I2C && SPI_MASTER.

Add depend on SPI_MASTER to fix below build error if CONFIG_SPI_MASTER
is not selected.

  LD      .tmp_vmlinux1
sound/built-in.o: In function `ak4104_spi_write':
last.c:(.text+0x290cc): undefined reference to `spi_sync'
sound/built-in.o: In function `ak4104_probe':
last.c:(.text+0x292a0): undefined reference to `spi_write_then_read'
sound/built-in.o: In function `ak4104_spi_probe':
last.c:(.text+0x29398): undefined reference to `spi_setup'
sound/built-in.o: In function `ak4104_init':
last.c:(.init.text+0x4ec): undefined reference to `spi_register_driver'
make: *** [.tmp_vmlinux1] Error 1

Add depend on I2C to fix below build error if CONFIG_I2C is not selected:
  CC      sound/soc/codecs/cs4270.o
sound/soc/codecs/cs4270.c: In function 'cs4270_i2c_probe':
sound/soc/codecs/cs4270.c:657: error: implicit declaration of function 'i2c_smbus_read_byte_data'
sound/soc/codecs/cs4270.c: In function 'cs4270_init':
sound/soc/codecs/cs4270.c:730: error: implicit declaration of function 'i2c_add_driver'
sound/soc/codecs/cs4270.c: In function 'cs4270_exit':
sound/soc/codecs/cs4270.c:736: error: implicit declaration of function 'i2c_del_driver'
make[3]: *** [sound/soc/codecs/cs4270.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

SND_PXA2XX_SOC_HX4700 selects SND_SOC_AK4641 which needs CONFIG_I2C.
Thus make SND_PXA2XX_SOC_HX4700 depend on I2C.

Add depend on I2C to fix below build error if CONFIG_I2C is not selected:
  CC      sound/soc/codecs/ak4641.o
sound/soc/codecs/ak4641.c: In function 'ak4641_modinit':
sound/soc/codecs/ak4641.c:646: error: implicit declaration of function 'i2c_add_driver'
sound/soc/codecs/ak4641.c: In function 'ak4641_exit':
sound/soc/codecs/ak4641.c:656: error: implicit declaration of function 'i2c_del_driver'
make[3]: *** [sound/soc/codecs/ak4641.o] Error 1
make[2]: *** [sound/soc/codecs] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: uda1380: Return proper error in uda1380_modinit failure path
Axel Lin [Sun, 4 Dec 2011 11:35:20 +0000 (19:35 +0800)]
ASoC: uda1380: Return proper error in uda1380_modinit failure path

Return proper error for uda1380_modinit if i2c_add_driver() fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Make SND_SOC_LITTLEMILL select MFD_WM8994
Axel Lin [Sun, 4 Dec 2011 00:15:17 +0000 (08:15 +0800)]
ASoC: Make SND_SOC_LITTLEMILL select MFD_WM8994

SND_SOC_LITTLEMILL selects SND_SOC_WM8994, but SND_SOC_WM8994 needs MFD_WM8994.
Thus we need to select MFD_WM8994 to fix below build error:

  LD      .tmp_vmlinux1
sound/built-in.o: In function `wm8994_write':
sound/soc/codecs/wm8994.c:201: undefined reference to `wm8994_reg_write'
sound/built-in.o: In function `wm8994_read':
sound/soc/codecs/wm8994.c:222: undefined reference to `wm8994_reg_read'
sound/built-in.o: In function `wm8994_resume':
sound/soc/codecs/wm8994.c:2847: undefined reference to `wm8994_reg_read'
sound/built-in.o: In function `wm8994_codec_probe':
sound/soc/codecs/wm8994.c:3501: undefined reference to `wm8994_reg_read'
sound/soc/codecs/wm8994.c:3660: undefined reference to `wm8994_reg_read'
sound/soc/codecs/wm8994.c:3672: undefined reference to `wm8994_reg_read'
sound/built-in.o: In function `wm8958_dsp2_fw':
sound/soc/codecs/wm8958-dsp2.c:154: undefined reference to `wm8994_bulk_write'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Sort WM9090 in with the CODEC drivers
Mark Brown [Fri, 2 Dec 2011 22:00:39 +0000 (22:00 +0000)]
ASoC: Sort WM9090 in with the CODEC drivers

The driver itself has been a regular CODEC driver for a while now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>