]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/log
mirror_ubuntu-disco-kernel.git
13 years agoASoC: Blackfin: fix DAI/SPORT config dependency issues
Barry Song [Wed, 12 Jan 2011 01:04:28 +0000 (20:04 -0500)]
ASoC: Blackfin: fix DAI/SPORT config dependency issues

While I2S/TDM/AC97 DAI is built-in, others are compiled as modules,
SND_BF5XX_SOC_SPORT will be module, then DAI can't get some symbols.
Except that, SND_BF5XX_AC97 depends on SND_BF5XX_SOC_AC97 too.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Blackfin TDM: use external frame syncs
Barry Song [Wed, 12 Jan 2011 07:59:55 +0000 (02:59 -0500)]
ASoC: Blackfin TDM: use external frame syncs

We don't want to use internal frame syncs otherwise we sometimes
get out of sync, so don't enable them when setting up the SPORT.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Blackfin AC97: fix build error after multi-component update
Mike Frysinger [Wed, 12 Jan 2011 00:57:33 +0000 (19:57 -0500)]
ASoC: Blackfin AC97: fix build error after multi-component update

We need to tweak how we query the active capture/playback state after
the recent overhauls of common code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: Blackfin TDM: fix missed snd_soc_dai_get_drvdata update
Mike Frysinger [Wed, 12 Jan 2011 04:08:19 +0000 (23:08 -0500)]
ASoC: Blackfin TDM: fix missed snd_soc_dai_get_drvdata update

One spot was missed in this driver when converting from
snd_soc_dai.private_data to snd_soc_dai_get_drvdata.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: documentation updates
Seungwhan Youn [Thu, 13 Jan 2011 02:08:21 +0000 (11:08 +0900)]
ASoC: documentation updates

This patch is only for RFC purpose of ASoC documentation updates which
match with current ASoC codes with documents. Mostly modify features
are modified to be sync with changes after multi-component patches.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: EP93xx: fixed LRCLK rate and DMA oper. in I2S code
Alexander Sverdlin [Sun, 16 Jan 2011 12:48:05 +0000 (15:48 +0300)]
ASoC: EP93xx: fixed LRCLK rate and DMA oper. in I2S code

Changelog:
1. I2S module of EP93xx should be feed by 32bit DMA transfers. This is
hardware limitation and that's the way original Cirrus's driver worked.
This will fix distorted sound playback and make capture actually work in
present ep93xx drivers.

I've found, that author of code, on which modern ep93xx-i2s.c and
ep93xx-pcm.c are based, had faced this problem also in 2007:
http://blog.gmane.org/gmane.linux.ports.arm.cirrus/month=20070101/page=3

Now SoC code uses his developments, but not overcomes the hardware
issues. Some details from EP93xx users guide:

Both I2S transmitter and receiver have similar 16x32bit FIFO, where they
store 8 samples for both left and right channels. The FIFO is always
32bit wide and should be properly aligned if you use samples of other
width. Transmitter and receiver have configuration registers for
selection of I2S word length (16, 24, 32). They are I2STXWrdLen and
I2SRXWrdLen.

Yes, EP93xx DMA can do byte, word and quad-word transfers. The width for
transfers to and from peripherals is selected by particular module
configuration. Lucky AC97 module has such configuration: AC97RXCRx
registers, bit CM (Compact mode enable) switches between 16 and 32 bit
samples. AC97TXCRx registers have the same bits for transmitters.
ep93xx-ac97.c enables this compact mode and so has all the rights to use
S16_LE format.
No one has found such a configuration in I2S module until now in any
Cirrus manuals. I2S module always feeds it's 32bit wide FIFO with 32bit
samples consecutively for left and right channels. You cannot use 32-bit
DMA transfers to transfer two 16-bit samples.

So we can use two formats for AC97, but should remove all but S32_LE for
I2S. Always using 32 bit chunks is not a problem for I2S, the codec I
use uses less bits too (24), it's permitted by I2S standard.

In proposed patch formats list shortened to just S32_LE, this makes all
the DMA transactions right, while ALSA will do all sample format
translation for us.

2. Incorrect setting of LRCLK (2 times slower) in original ep93xx-i2s.c
masks the first problem.

DMA takes two 16 bit samples instead of one, overall sound speed seems
to be normal, but you get actually 4000 sampling rate instead of
requested 8000 and therefore some noise... This is also the reason why
the capture function not worked at all in this driver...

If we take a look into I2S specification, we will figure that LRCLK MUST
be equal to sample rate, if we are talking about stereo (in mono too,
but it's not our case at all).

In proposed patch SCLK and LRCLK rates are corrected, assuming we always
send 32 bits * 2 channels to codec.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8990: msleep() takes milliseconds not jiffies
Dimitris Papastamos [Fri, 14 Jan 2011 15:59:13 +0000 (15:59 +0000)]
ASoC: WM8990: msleep() takes milliseconds not jiffies

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: WL1273 FM radio: Fix breakage with MFD API changes
Matti J. Aaltonen [Thu, 13 Jan 2011 13:22:45 +0000 (15:22 +0200)]
ASoC: WL1273 FM radio: Fix breakage with MFD API changes

These changes are needed to keep up with the changes in the
MFD core and V4L2 parts of the wl1273 FM radio driver.

Use function pointers instead of exported functions for I2C IO.
Also move all preprocessor constants from the wl1273.h to
include/linux/mfd/wl1273-core.h.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Wed, 12 Jan 2011 11:26:24 +0000 (12:26 +0100)]
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc

13 years agoMerge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Wed, 12 Jan 2011 06:20:30 +0000 (07:20 +0100)]
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc

13 years agoASoC: tpa6130a2: Fix compiler warning
Peter Ujfalusi [Tue, 28 Dec 2010 09:16:19 +0000 (11:16 +0200)]
ASoC: tpa6130a2: Fix compiler warning

sound/soc/codecs/tpa6130a2.c: In function 'tpa6130a2_add_controls':
sound/soc/codecs/tpa6130a2.c:342: warning: unused variable 'dapm'

Introduced by commit 39646871a47fd8808c08de0ce7d7ca8393af2805 ("ASoC:
tpa6130a2: Replace DAPM code with direct interface").

The DAPM code has been removed from the driver, but the
dapm struct remained.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: tlv320dac33: Add DAPM selection for LOM invert
Peter Ujfalusi [Mon, 10 Jan 2011 13:39:49 +0000 (15:39 +0200)]
ASoC: tlv320dac33: Add DAPM selection for LOM invert

The L/R LOM line can be invertined side of the
corresponding DAC, or inverted from the corresponding
LOP.
Add control for user space to select the source of the
LOM inversion.
When only the analog bypass is enabled, and the LOM
is inverted from DAC output, we need to power the
corresponding DAC.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: DMIC codec: Adding a generic DMIC codec
David Lambert [Thu, 6 Jan 2011 14:00:37 +0000 (08:00 -0600)]
ASoC: DMIC codec: Adding a generic DMIC codec

This codec is to be used by the DMIC driver to
control the DMIC codec.  This driver will be used on future
implementations of the DMIC driver to support codec specific
features.

At this time, the codec driver just registers the codec DAI.

Signed-off-by: David Lambert <dlambert@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
Dimitris Papastamos [Tue, 11 Jan 2011 11:24:02 +0000 (11:24 +0000)]
ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()

The size of the lzo syncing bitmap was incorrectly set to the size
of the cache times the word size, however, the correct size is the
size of the cache.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix section mismatch in wm8995.c
Takashi Iwai [Tue, 11 Jan 2011 16:58:26 +0000 (17:58 +0100)]
ASoC: Fix section mismatch in wm8995.c

__devinitconst can't be used for data referred in driver struct.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: fix migor audio build
Guennadi Liakhovetski [Tue, 11 Jan 2011 07:34:52 +0000 (08:34 +0100)]
ASoC: fix migor audio build

Commit 6d803ba736abb5e122dede70a4720e4843dd6df4 "ARM: 6483/1: arm & sh:
factorised duplicated clkdev.c" broke compilation of migor audio. Use the
correct header to fix the problem.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: cs4270: use the built-in register cache support
Timur Tabi [Mon, 10 Jan 2011 19:28:32 +0000 (13:28 -0600)]
ASoC: cs4270: use the built-in register cache support

Update the CS4270 driver to use ASoC's internal codec register cache feature.
This change allows ASoC to perform the low-level I2C operations necessary to
read the register cache.  Support is also added for initializing the register
cache with an array of known power-on default values.

The CS4270 driver was handling the register cache itself, but somwhere along
the conversion to multi-compaonent, this feature broke.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: RX1950: Enable Mic Jack during glue driver init
Vasily Khoruzhick [Thu, 6 Jan 2011 20:15:49 +0000 (22:15 +0200)]
ASoC: RX1950: Enable Mic Jack during glue driver init

Enable Mic Jack during glue driver init, otherwise capture will not work.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix the device references to codec and platform drivers
Harsha Priya [Wed, 5 Jan 2011 06:04:51 +0000 (11:34 +0530)]
ASoC: Fix the device references to codec and platform drivers

The soc-core takes the platform and codec driver reference during probe. Few of
these references are not released during remove. This cause the platform and
codec driver module unload to fail.

This patch fixes by the taking only one reference to platform and codec module
during probe and releases them correctly during remove. This allows load/unload
properly

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove needless inclusion of tlv320aic3x.h from machine drivers
Jarkko Nikula [Wed, 5 Jan 2011 10:05:44 +0000 (12:05 +0200)]
ASoC: Remove needless inclusion of tlv320aic3x.h from machine drivers

After multi-component conversion these machine drivers don't actually need
anything from sound/soc/codecs/tlv320aic3x.h so don't include it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.37' into for-2.6.38
Mark Brown [Wed, 5 Jan 2011 10:06:55 +0000 (10:06 +0000)]
Merge branch 'for-2.6.37' into for-2.6.38

Conflicts:
sound/soc/samsung/smartq_wm8987.c

13 years agoASoC: Fix SmartQ compilation
Maurus Cuelenaere [Sun, 2 Jan 2011 19:48:23 +0000 (20:48 +0100)]
ASoC: Fix SmartQ compilation

This makes the SmartQ sound driver compile again with recent ASoC changes.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Change Samsung Kconfig from ASOC_ to SND_SOC_
Mark Brown [Sun, 2 Jan 2011 14:07:46 +0000 (14:07 +0000)]
ASoC: Change Samsung Kconfig from ASOC_ to SND_SOC_

The rest of ASoC is using SND_SOC_ as the prefix for all the Kconfig
symbols so do so for the new Samsung drivers too, rather than using
ASOC_ as they currently are.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: sh: fsi-da7210: remove unnecessary format settings
Kuninori Morimoto [Tue, 28 Dec 2010 05:55:45 +0000 (14:55 +0900)]
ASoC: sh: fsi-da7210: remove unnecessary format settings

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agofbdev: sh_mobile_hdmi: fixup compile error
Kuninori Morimoto [Mon, 27 Dec 2010 04:42:20 +0000 (13:42 +0900)]
fbdev: sh_mobile_hdmi: fixup compile error

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Yet more x86 tracepoint workarounds
Mark Brown [Wed, 29 Dec 2010 13:05:21 +0000 (13:05 +0000)]
ASoC: Yet more x86 tracepoint workarounds

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.37' into for-2.6.38
Mark Brown [Tue, 28 Dec 2010 23:42:53 +0000 (23:42 +0000)]
Merge branch 'for-2.6.37' into for-2.6.38

13 years agoASoC: codecs: Remove unused reg_cache fields from device structs
Lars-Peter Clausen [Tue, 28 Dec 2010 20:37:55 +0000 (21:37 +0100)]
ASoC: codecs: Remove unused reg_cache fields from device structs

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but there are quite a few drivers left which now have an unused reg_cache field in
their private device struct.
This patch removes these unused fields.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: codecs: wm8753: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:38:03 +0000 (21:38 +0100)]
ASoC: codecs: wm8753: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8753 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Furthermore the generic cache uses zero-based numbering while the wm8753 cache
uses one-based numbering.
Thus we end up with two from each other incoherent caches, which leads to undefined
behaviour and crashes.
This patch fixes the issue by changing the wm8753 driver to use the generic
register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: codecs: wm9090: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:38:02 +0000 (21:38 +0100)]
ASoC: codecs: wm9090: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm9090 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm9090 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: wm8962: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:38:01 +0000 (21:38 +0100)]
ASoC: codecs: wm8962: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8962 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8962 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: wm8955: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:38:00 +0000 (21:38 +0100)]
ASoC: codecs: wm8955: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8955 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8955 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: wm8904: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:37:59 +0000 (21:37 +0100)]
ASoC: codecs: wm8904: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8904 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8904 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: wm8741: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:37:58 +0000 (21:37 +0100)]
ASoC: codecs: wm8741: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8741 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8741 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: wm8523: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:37:57 +0000 (21:37 +0100)]
ASoC: codecs: wm8523: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the wm8523 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the wm8523 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ian Lartey <ian@opensource.wolfsonmicro.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: max98088: Fix register cache incoherency
Lars-Peter Clausen [Tue, 28 Dec 2010 20:37:56 +0000 (21:37 +0100)]
ASoC: codecs: max98088: Fix register cache incoherency

The multi-component patch(commit f0fba2ad1) moved the allocation of the
register cache from the driver to the ASoC core. Most drivers where adjusted to
this, but the max98088 driver still uses its own register cache for its
private functions, while functions from the ASoC core use the generic cache.
Thus we end up with two from each other incoherent caches, which can lead to
undefined behaviour.
This patch fixes the issue by changing the max98088 driver to use the
generic register cache in its private functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Hsiang <Peter.Hsiang@maxim-ic.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: codecs: Add missing control_type initialization
Lars-Peter Clausen [Tue, 28 Dec 2010 20:08:57 +0000 (21:08 +0100)]
ASoC: codecs: Add missing control_type initialization

Some codec drivers do not initialize the control_type field in their private
device struct, but still use it when calling snd_soc_codec_set_cache_io.
This patch fixes the issue by properly initializing it in the drivers probe
functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org (for 2.6.37 only)
13 years agoASoC: One more x86 typo fix
Mark Brown [Tue, 28 Dec 2010 02:14:25 +0000 (02:14 +0000)]
ASoC: One more x86 typo fix

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Mark Brown [Mon, 27 Dec 2010 17:51:52 +0000 (17:51 +0000)]
Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38

13 years agoASoC: Fix double comment start
Mark Brown [Fri, 24 Dec 2010 16:59:36 +0000 (16:59 +0000)]
ASoC: Fix double comment start

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Fix typo in x86 workaround
Mark Brown [Mon, 27 Dec 2010 15:30:45 +0000 (15:30 +0000)]
ASoC: Fix typo in x86 workaround

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove WM8995 write sequencer bitfield definitions
Mark Brown [Thu, 23 Dec 2010 12:03:07 +0000 (12:03 +0000)]
ASoC: Remove WM8995 write sequencer bitfield definitions

They're very verbose and extremely repetitive so bulk up the kernel more
than is ideal. If required we can readd with WRITE_SEQUENCER_n type
definitions that cover the entire register bank in a few defines.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove incorrect WM8903 erratum workaround
Mark Brown [Thu, 23 Dec 2010 11:17:24 +0000 (11:17 +0000)]
ASoC: Remove incorrect WM8903 erratum workaround

Due to a typographical error in the erratum workaround it was never
functional so just remove it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: tlv320dac33: Add 32/24 bit audio support
Peter Ujfalusi [Wed, 22 Dec 2010 08:45:18 +0000 (10:45 +0200)]
ASoC: tlv320dac33: Add 32/24 bit audio support

Add support for 24 bit audio (with S32_LE msbits 24).
The reason to limit the msbits to 24, is that the FIFO
can be configured for 16 or 24 bit layout.
It is unknown how the codec would downsample from 32 to
24 bit, if the interface is configured to receive 32
bit data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: tlv320dac33: Some cleanup for 32/24 bit support
Peter Ujfalusi [Wed, 22 Dec 2010 08:45:17 +0000 (10:45 +0200)]
ASoC: tlv320dac33: Some cleanup for 32/24 bit support

Change the structure of FIFO handling in order to
pave the way for adding 32/24 bit audio support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: tlv320dac33: Remove manual FIFO configuration
Peter Ujfalusi [Wed, 22 Dec 2010 08:45:16 +0000 (10:45 +0200)]
ASoC: tlv320dac33: Remove manual FIFO configuration

The manual FIFO configuration was the first version to enable
the use of the FIFO in the codec.
It had served it's purpose as debugging aid, but the automatic
FIFO configuration is much safer to use.
The removal of the manual controls, and configuration makes
it easier to add new features for the codec later, since
the manual mode neded different ways to calculate, and
protect against misconfiguration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Convert HF and HS drivers to use DAPM OUT_DRV widget
Olaya, Margarita [Mon, 20 Dec 2010 16:39:20 +0000 (10:39 -0600)]
ASoC: twl6040: Convert HF and HS drivers to use DAPM OUT_DRV widget

Make the phoenix HS and HF drivers use the new DAPM driver
widget in order to guarantee power ON/OFF order sequence.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: mcbsp: Add McBSP support for OMAP4
Jorge Eduardo Candelaria [Mon, 20 Dec 2010 17:32:47 +0000 (11:32 -0600)]
ASoC: mcbsp: Add McBSP support for OMAP4

This patch adds McBSP support for the OMAP4 CPU

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoMerge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Thu, 23 Dec 2010 12:39:59 +0000 (13:39 +0100)]
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc

13 years agoASoC: ifdef out trace points from modules for x86
Mark Brown [Thu, 23 Dec 2010 01:56:20 +0000 (01:56 +0000)]
ASoC: ifdef out trace points from modules for x86

No idea why this works on ARM but not x86.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add initial WM8995 driver
Dimitris Papastamos [Wed, 22 Dec 2010 11:33:11 +0000 (11:33 +0000)]
ASoC: Add initial WM8995 driver

The WM8995 is a digital audio hub CODEC designed for smartphones.
The current driver supports most of the basic functionality of the
WM8995.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: don't pass the string as the format arguemtn for dev_info()
Takashi Iwai [Wed, 22 Dec 2010 13:08:40 +0000 (14:08 +0100)]
ASoC: don't pass the string as the format arguemtn for dev_info()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: SAMSUNG: Debug wrong parameter
Seungwhan Youn [Wed, 22 Dec 2010 09:46:24 +0000 (18:46 +0900)]
ASoC: SAMSUNG: Debug wrong parameter

snd_soc_jack_new()'s first parameter was changed from snd_soc_card to
snd_soc_codec after Multi-Component support patches. So, this patch
fixes parameter that we missed.

Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add jack IRQ trace to 88pm860x driver
Mark Brown [Sun, 5 Dec 2010 12:53:08 +0000 (12:53 +0000)]
ASoC: Add jack IRQ trace to 88pm860x driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Trace Wolfson jack detection IRQs
Mark Brown [Sun, 5 Dec 2010 12:50:12 +0000 (12:50 +0000)]
ASoC: Trace Wolfson jack detection IRQs

Add jack detection interrupt trace to Wolfson CODEC drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Use delayed work to debounce WM8350 jack IRQs
Mark Brown [Sun, 5 Dec 2010 12:41:52 +0000 (12:41 +0000)]
ASoC: Use delayed work to debounce WM8350 jack IRQs

This avoids blocking the IRQ thread and allows further bounces to extend
the debounce time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: sh: fsi: modify improper dependent
Kuninori Morimoto [Mon, 20 Dec 2010 01:03:13 +0000 (10:03 +0900)]
ASoC: sh: fsi: modify improper dependent

FSI-AK4642 and FSI-DA7210 are depend on I2C, not I2C_SH_MOBILE

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Make LZO cache compression optional
Mark Brown [Tue, 21 Dec 2010 17:19:56 +0000 (17:19 +0000)]
ASoC: Make LZO cache compression optional

Make LZO cache compression optional as it pulls in the kernel wide LZO
implementation and rbtree compression is generally more efficient for
typical register maps, especially in terms of CPU performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: If we can't find a cache compression type default to flat
Mark Brown [Tue, 21 Dec 2010 17:09:48 +0000 (17:09 +0000)]
ASoC: If we can't find a cache compression type default to flat

This makes it easier to make cache types build time configurable as we
don't have a hard dependency on a given cache being built in.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix WM8994/58 3D stereo control definitions
Mark Brown [Mon, 20 Dec 2010 14:35:09 +0000 (14:35 +0000)]
ASoC: Fix WM8994/58 3D stereo control definitions

Cut'n'paste in the register names.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove some unused defines from WM8903
Mark Brown [Mon, 20 Dec 2010 20:53:25 +0000 (20:53 +0000)]
ASoC: Remove some unused defines from WM8903

These would have been used if we'd done manual clock divider setup,
but we didn't.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: SMDKV310: Add I2S support
Jassi Brar [Mon, 20 Dec 2010 02:05:57 +0000 (11:05 +0900)]
ASoC: SMDKV310: Add I2S support

Add ASoC machine driver for SMDKV310/C210 boards that have
a WM8994 attached to I2S-0.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDKV310: Enable AC97 device
Jassi Brar [Mon, 20 Dec 2010 02:05:56 +0000 (11:05 +0900)]
ASoC: SMDKV310: Enable AC97 device

Enable AC97 audio device on SMDKV310/C210.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDKC110: Enable I2S device
Jassi Brar [Mon, 20 Dec 2010 02:05:55 +0000 (11:05 +0900)]
ASoC: SMDKC110: Enable I2S device

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDKV210: Enable I2S device
Jassi Brar [Mon, 20 Dec 2010 02:05:53 +0000 (11:05 +0900)]
ASoC: SMDKV210: Enable I2S device

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDK6442: Enable I2S device
Jassi Brar [Mon, 20 Dec 2010 02:05:52 +0000 (11:05 +0900)]
ASoC: SMDK6442: Enable I2S device

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDK6450: Enable I2S device
Jassi Brar [Mon, 20 Dec 2010 02:05:51 +0000 (11:05 +0900)]
ASoC: SMDK6450: Enable I2S device

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDK6440: Enable I2S device
Jassi Brar [Mon, 20 Dec 2010 02:05:50 +0000 (11:05 +0900)]
ASoC: SMDK6440: Enable I2S device

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: SMDK_WM8580: Make I2S0 as default dai
Jassi Brar [Mon, 20 Dec 2010 02:05:48 +0000 (11:05 +0900)]
ASoC: SMDK_WM8580: Make I2S0 as default dai

Since most newer SMDKs have I2S0 routed to the WM8580's Primary DAI,
future changes can be minimized if the default CPU DAIs are set to
0, rather than 2.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Samsung: I2S: Flush FIFO after stop
Jassi Brar [Mon, 20 Dec 2010 02:05:47 +0000 (11:05 +0900)]
ASoC: Samsung: I2S: Flush FIFO after stop

Flush the FIFO while stopping the channel rather than starting.
This saves time during stream start and keeps the FIFOs clean
when the channel is idling.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Samsung: Set default rclk source rate
Jassi Brar [Mon, 20 Dec 2010 02:05:46 +0000 (11:05 +0900)]
ASoC: Samsung: Set default rclk source rate

Since the rclk_srcrate is cleared upon startup, it should be
initialized upon second and later 'open' calls to the device
with same root-clock source. The bug is otherwise visible in
Codec-Slave mode.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Mark Brown [Fri, 17 Dec 2010 17:37:28 +0000 (17:37 +0000)]
Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.38

13 years agoASoC: soc-dapm: Introduce the new snd_soc_dapm_virt_mux type
Dimitris Papastamos [Thu, 16 Dec 2010 15:53:39 +0000 (15:53 +0000)]
ASoC: soc-dapm: Introduce the new snd_soc_dapm_virt_mux type

This new type is a virtual version of snd_soc_dapm_mux.  It is used
when a backing register value is not necessary for deciding which
input path to connect.  A simple virtual enumeration control e.g.
SOC_DAPM_ENUM_VIRT() can be exposed to userspace which will be used
to choose which path to connect.

The snd_soc_dapm_virt_mux type ensures that during the initial
path setup, the first (which is also the default) input path will
be connected.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Fri, 17 Dec 2010 15:43:17 +0000 (16:43 +0100)]
Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc

13 years agoASoC: sh: fsi: Add over/under run counter
Kuninori Morimoto [Fri, 17 Dec 2010 03:55:22 +0000 (12:55 +0900)]
ASoC: sh: fsi: Add over/under run counter

Current FSI driver had printed under/over run error
if status register have its error bit.
But runtime print cause the next error
because print out is slow.
This patch add error counter and print error when sound stop

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sh: fsi: move fsi_irq_enable function to fsi_dai_trigger
Kuninori Morimoto [Fri, 17 Dec 2010 03:52:56 +0000 (12:52 +0900)]
ASoC: sh: fsi: move fsi_irq_enable function to fsi_dai_trigger

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Do DAPM control updates in the middle of DAPM sequences
Mark Brown [Tue, 14 Dec 2010 16:13:57 +0000 (16:13 +0000)]
ASoC: Do DAPM control updates in the middle of DAPM sequences

Attempt to minimise audible effects from mixer and mux updates by
implementing the actual register changes between powering down widgets
that have become unused and powering up widgets that are newly used.

This means that we're making the change with the minimum set of widgets
powered, that the input path is connected when we're powering up widgets
(so things like DC offset correction can run with their signal active)
and that we bring things down to cold before switching away.  Since
hardware tends to be designed for the power on/off case more than for
dynamic reconfiguration this should minimise pops and clicks during
reconfiguration while active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Add ramp up/down volume for HS and HF
Margarita Olaya Cabrera [Wed, 15 Dec 2010 01:00:21 +0000 (19:00 -0600)]
ASoC: twl6040: Add ramp up/down volume for HS and HF

Add ramp functions for the headset and handsfree outputs
in order to reduce the pops during power on/off sequences.

In order to give more control to volume ramp, step size and delay
between steps can be specified.

The patches are based on wm8350 implementation from Liam
Girdwood.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Set default gains to minimun value
Olaya, Margarita [Wed, 15 Dec 2010 01:18:36 +0000 (19:18 -0600)]
ASoC: twl6040: Set default gains to minimun value

Updated default values to improve power consumption.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Extend DAPM to handle power changes on cross-device paths
Jarkko Nikula [Tue, 14 Dec 2010 10:18:32 +0000 (12:18 +0200)]
ASoC: Extend DAPM to handle power changes on cross-device paths

Power change event like stream start/stop or kcontrol change in a
cross-device path originates from one device but codec bias and widget power
changes must be populated to another devices on that path as well.

This patch modifies the dapm_power_widgets so that all the widgets on a
sound card are checked for a power change, not just those that are specific
to originating device. Also bias management is extended to check all the
devices. Only exception in bias management are widgetless codecs whose bias
state is changed only if power change is originating from that context.

DAPM context test is added to dapm_seq_run to take care of if power sequence
extends to an another device which requires separate register writes.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Move widgets from DAPM context to snd_soc_card
Jarkko Nikula [Tue, 14 Dec 2010 10:18:31 +0000 (12:18 +0200)]
ASoC: Move widgets from DAPM context to snd_soc_card

Decoupling widgets from DAPM context is required when extending the ASoC
core to cross-device paths. Even the list of widgets are now kept in
struct snd_soc_card, the widget listing in sysfs and debugs remain sorted
per device.

This patch makes possible to build cross-device paths but does not extend
yet the DAPM to handle codec bias and widget power changes of an another
device.

Cross-device paths are registered by listing the widgets from device A in
a map for device B. In case of conflicting widget names between the devices,
a uniform name prefix is needed to separate them. See commit ead9b91
"ASoC: Add optional name_prefix for kcontrol, widget and route names" for
help.

An example below shows a path that connects MONO out of A into Line In of B:

static const struct snd_soc_dapm_route mapA[] = {
{"MONO", NULL, "DAC"},
};

static const struct snd_soc_dapm_route mapB[] = {
{"Line In", NULL, "MONO"},
};

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Move DAPM paths from DAPM context to snd_soc_card
Jarkko Nikula [Tue, 14 Dec 2010 10:18:30 +0000 (12:18 +0200)]
ASoC: Move DAPM paths from DAPM context to snd_soc_card

Decoupling DAPM paths from DAPM context is a first prerequisite when
extending ASoC core to cross-device paths. This patch is almost a nullop and
does not allow to construct cross-device setup but the path clean-up part in
dapm_free_widgets is prepared to remove cross-device paths between a device
being removed and others.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Remove unused DAPM_DOUBLE control types
Mark Brown [Tue, 14 Dec 2010 17:16:56 +0000 (17:16 +0000)]
ASoC: Remove unused DAPM_DOUBLE control types

There are no users of these and it's not clear what they would do given
the mono flow modelling which DAPM does. If need arises we can add them
again.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Use correct offset for LineInAmp Right
Misael Lopez Cruz [Sat, 11 Dec 2010 03:06:34 +0000 (21:06 -0600)]
ASoC: twl6040: Use correct offset for LineInAmp Right

Gain for LineInAmp Right uses LINEGAIN[5:3], which means that
offset for right channel should be 4.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Fix TLV dB step values for gains
Olaya, Margarita [Sat, 11 Dec 2010 03:06:39 +0000 (21:06 -0600)]
ASoC: twl6040: Fix TLV dB step values for gains

Some gains were incorrectly configured for dB values.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Increase timeout for power up
Jorge Eduardo Candelaria [Sat, 11 Dec 2010 03:06:30 +0000 (21:06 -0600)]
ASoC: twl6040: Increase timeout for power up

After coming back from suspend, the timeout waiting for Phoenix
chip to complete its power up sequence is not enough, which leaves
the codec cache value for some registers in an outdated state.

Increase the timeout value to wait for the power up sequence
to correclty complete.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Enable plug detection interrupts
Misael Lopez Cruz [Sat, 11 Dec 2010 03:06:24 +0000 (21:06 -0600)]
ASoC: twl6040: Enable plug detection interrupts

Enable plug detection interrupt mask in order to get headset
PLUGINT/UNPLUGINT interrupts.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Clear interrupt status at boot time
Jorge Eduardo Candelaria [Sat, 11 Dec 2010 03:06:13 +0000 (21:06 -0600)]
ASoC: twl6040: Clear interrupt status at boot time

On Phoenix 1.1, the INTID register default value is an invalid
one, causing the interrupt handler to think the phoenix power on
sequence is ready before it actually finishes.

This causes some i2c errors when trying to configure twl.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Enable automatic power for phoenix 1.1
Olaya, Margarita [Sat, 11 Dec 2010 03:06:07 +0000 (21:06 -0600)]
ASoC: twl6040: Enable automatic power for phoenix 1.1

Phoenix 1.1 supports automatic power on sequence, a
verification is added to use it with new revision of
the chip.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Fix analog Mic L & R mux controls
Francois Mazard [Sat, 11 Dec 2010 03:06:03 +0000 (21:06 -0600)]
ASoC: twl6040: Fix analog Mic L & R mux controls

The mux control has 4 elements not 3

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Support other sample rates.
Olaya, Margarita [Sat, 11 Dec 2010 03:05:58 +0000 (21:05 -0600)]
ASoC: twl6040: Support other sample rates.

The twl6040 can support more sample rates other than 88.2 and 96k.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Fix PCM error handling ops
Olaya, Margarita [Sat, 11 Dec 2010 03:05:54 +0000 (21:05 -0600)]
ASoC: twl6040: Fix PCM error handling ops

This patch moves all the PCM error handling for clock config
out of trigger() and startup() and into prepare().

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Restore bias level at resume
Olaya, Margarita [Sat, 11 Dec 2010 03:05:46 +0000 (21:05 -0600)]
ASoC: twl6040: Restore bias level at resume

This patch restores the CODEC bias level at resume().

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Add headset and handset mux controls
Jorge Eduardo Candelaria [Sat, 11 Dec 2010 03:05:32 +0000 (21:05 -0600)]
ASoC: twl6040: Add headset and handset mux controls

This patch adds support for the twl6040 headset and handset
MUX controls.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Modify the IRQ handler
Olaya, Margarita [Sat, 11 Dec 2010 03:05:30 +0000 (21:05 -0600)]
ASoC: twl6040: Modify the IRQ handler

Multiples interrupts can be received. The irq handler is modified
to attend all of them.

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Update twl IO macro
Olaya, Margarita [Sat, 11 Dec 2010 03:05:24 +0000 (21:05 -0600)]
ASoC: twl6040: Update twl IO macro

Update the codec to use the new twl core register macros

Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: sdp4430: Add Jack support
Jorge Eduardo Candelaria [Sat, 11 Dec 2010 02:45:19 +0000 (20:45 -0600)]
ASoC: sdp4430: Add Jack support

Use jack framework to enable detection for the headset microphone
and stereo output in the sdp4430.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: twl6040: Add jack support for headset and handset
Jorge Eduardo Candelaria [Sat, 11 Dec 2010 02:45:17 +0000 (20:45 -0600)]
ASoC: twl6040: Add jack support for headset and handset

This patch adds support for reporting twl6040 headset and
handset jack events.

The machine driver retrieves and report the status  through
twl6040_hs_jack_detect.

A workq is used to debounce of the irq.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: TWL4030: Fix 24bit support
Peter Ujfalusi [Tue, 14 Dec 2010 11:45:29 +0000 (13:45 +0200)]
ASoC: TWL4030: Fix 24bit support

twl4030 series of codecs supports S32_LE with msbits=24.
Replace the S24_LE with S32_LE format, and add constraint
for 24msbit in case of 32 S32_LE format.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: soc-cache: A few minor stylistic changes
Dimitris Papastamos [Tue, 14 Dec 2010 15:15:36 +0000 (15:15 +0000)]
ASoC: soc-cache: A few minor stylistic changes

Remove redundant parentheses/spaces in the use of the sizeof
operator.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>