safe/jmp/linux-2.6
13 years agoASoC: tlv320aic3x: Add platform data and reset gpio handling
Jarkko Nikula [Wed, 5 May 2010 10:02:03 +0000 (13:02 +0300)]
ASoC: tlv320aic3x: Add platform data and reset gpio handling

Handle the reset GPIO within the codec driver in order to follow
the startup protocol for the tlv320aic3x codecs.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-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: omap: Add basic audio support for Nokia RX-51/N900
Jarkko Nikula [Wed, 5 May 2010 08:14:22 +0000 (11:14 +0300)]
ASoC: omap: Add basic audio support for Nokia RX-51/N900

This patch adds support for integrated stereo speakers and digital
microphone found on Nokia RX-51 hardware. This is a cut down version based
on Maemo kernel sources and earlier patchset by Eduardo Valentin et al.

http://mailman.alsa-project.org/pipermail/alsa-devel/2009-October/022033.html

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-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: tpa6130a2: TLV mapping for tpa6140a2
Peter Ujfalusi [Tue, 4 May 2010 08:08:18 +0000 (11:08 +0300)]
ASoC: tpa6130a2: TLV mapping for tpa6140a2

Both tpa6130a2, and tpa6140a2 is supported by the
same driver, but the gain dB scaling is different on
the amplifiers.

Provide different mixer control for the chips with correct
TLV mapping.

User space will see:
"TPA6130A2 Headphone Playback Volume" in case of 6130
"TPA6140A2 Headphone Playback Volume" in case of 6140

The way machine drivers are using this amplifier remained
the same.

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: Support for turning off the codec
Peter Ujfalusi [Fri, 30 Apr 2010 11:59:36 +0000 (14:59 +0300)]
ASoC: tlv320dac33: Support for turning off the codec

Let the codec to hit OFF instead of STANDBY, when there is no activity.
When the codec is off, than the associated regulator can be also turned
off (if the number of users on the regulator is 0).

After initialization, the codec remains in power off, it is only turned
on for reading the ID registers (also testing the regulators).

The codec power is enabled, when the codec is moving from BIAS_OFF
to BIAS_STANDBY.
The codec is turned off, when it hits BIAS_OFF.

There are few scenarios, which has to be taken care::
1. Analog bypass caused BIAS_OFF -> BIAS_ON
   We need to power on the codec, and do the chip init, but we does not
   need to execute the playback related configuration
2. Playback caused  BIAS_OFF -> BIAS_ON
   We need to power on the codec, and do the chip init, and also we need
   to execute the playback related configuration.
3. Playback start, while Analog bypass is on (BIAS_ON -> BIAS_ON)
   We need to execute the playback related configuration. The codec is
   already on.
4. Analog bypass enable, while playback (BIAS_ON -> BIAS_ON)
   Nothing need to be done.
5. Playback start withing soc power down timeout (BIAS_ON -> BIAS_ON)
   We need to execute the playback related configuration. The codec is
   still on.

Since the power up, and the codec init is optimized, the added overhead
in stream start is minimal.

Withing this patch, the hard_power function is now only doing what it
supposed to: only handle the powers, and GPIO reset line.
The codec initialization and state restore has been moved out.

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: Manage a pointer for snd_pcm_substream in private structure
Peter Ujfalusi [Fri, 30 Apr 2010 11:59:35 +0000 (14:59 +0300)]
ASoC: tlv320dac33: Manage a pointer for snd_pcm_substream in private structure

As a preparation for supporting codec to be turned off,
when we are in BIAS_STANDBY.

The substream must be easily available in other places than
pcm_* callbacks.

Manage a pointer in _startup, and _shutdown for this.

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: Revised module loading, and DAC33 ID read
Peter Ujfalusi [Fri, 30 Apr 2010 11:59:34 +0000 (14:59 +0300)]
ASoC: tlv320dac33: Revised module loading, and DAC33 ID read

Optimize the way how tlv320dac33 is powered uppon module and
soc initialization.
Also read the DAC33 ID registers, and update the reg_cache
to reflect it.

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: Optimize power up, and restore
Peter Ujfalusi [Fri, 30 Apr 2010 11:59:33 +0000 (14:59 +0300)]
ASoC: tlv320dac33: Optimize power up, and restore

On power up we only need to initialize the codec, and
restore only registers, which are not in either in DAPM
nor in the playback start sequence.
These are mostly gain related registers.

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: TWL4030: Remove OUTL/R outputs
Peter Ujfalusi [Thu, 29 Apr 2010 07:58:09 +0000 (10:58 +0300)]
ASoC: TWL4030: Remove OUTL/R outputs

OUTL/R are leftovers from the original driver, and they
are no longer needed.

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: TWL4030: AIF/APLL fix in DAPM domain
Peter Ujfalusi [Thu, 29 Apr 2010 07:58:08 +0000 (10:58 +0300)]
ASoC: TWL4030: AIF/APLL fix in DAPM domain

This patch orders the APLL and AIF power sequence in
case of HiFi (audio in TWL4030 terms) playback/capture.

We also need to make sure that the AIF is running during
playback/capture, when there is no valid DAPM route
available. For this purpose I introduce these virtual
widgets:
/* To have complete playback route all the time */
DAPM_OUTPUT("Virtual HiFi OUT") /* Will keep AIF/APLL enabled */

/* To have complete capture route all the time */
DAPM_INPUT("Virtual HiFi IN") /* Will keep AIF/APLL enabled */

/* To have complete playback route for the voice module */
DAPM_OUTPUT("Virtual Voice OUT") /* Will keep APLL enabled */

The DAPM_SUPPLY widgets for APLL and AIF are placed in a way,
that during any audio activity the needed configuration of AIF
and APLL will be enabled (playback, capture, analog loopback,
digital loopback, and voice activity).

The apll reference counting code has been lifted,
and modified from Liam Girdwood's earlier patch.

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>
14 years agoASoC: tlv320dac33 - disable regulators at i2c remove()
Liam Girdwood [Fri, 26 Mar 2010 20:05:54 +0000 (20:05 +0000)]
ASoC: tlv320dac33 - disable regulators at i2c remove()

Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: zoom2 - update DAPM pins
Liam Girdwood [Mon, 22 Mar 2010 19:35:06 +0000 (19:35 +0000)]
ASoC: zoom2 - update DAPM pins

Remove bogus twl4030 pins

Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: pandora - update DAPM pins
Liam Girdwood [Mon, 22 Mar 2010 19:30:54 +0000 (19:30 +0000)]
ASoC: pandora - update DAPM pins

Remove bogus TWL4030 pins.

Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Tue, 27 Apr 2010 13:35:59 +0000 (15:35 +0200)]
Merge branch 'for-2.6.35' of git://git./linux/kernel/git/lrg/asoc-2.6 into topic/asoc

14 years agoASoC: tlv320aic3x: Add basic regulator support
Jarkko Nikula [Mon, 26 Apr 2010 12:49:14 +0000 (15:49 +0300)]
ASoC: tlv320aic3x: Add basic regulator support

This patch adds the TLV320AIC3x supplies and enables all of them for the
entire lifetime of the device.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: tlv320aic3x: Change bias management semantics
Jarkko Nikula [Mon, 26 Apr 2010 12:49:13 +0000 (15:49 +0300)]
ASoC: tlv320aic3x: Change bias management semantics

Move PLL enable from BIAS_ON state to BIAS_PREPARE to be pair with
BIAS_STANDBY where PLL is disabled. Remove also old comments about power
control.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: tlv320aic3x: Remove needless power off from aic3x_set_bias_level
Jarkko Nikula [Mon, 26 Apr 2010 12:49:12 +0000 (15:49 +0300)]
ASoC: tlv320aic3x: Remove needless power off from aic3x_set_bias_level

These ADC, DAC and output pin power off commands are needless in
aic3x_set_bias_level since they are not enabled in aic3x_init and they are
defined in aic3x_dapm_widgets so the ASoC DAPM will take care of them
anyway.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: tlv320aic3x: Remove unused version string
Jarkko Nikula [Mon, 26 Apr 2010 12:49:11 +0000 (15:49 +0300)]
ASoC: tlv320aic3x: Remove unused version string

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: UDA134X: Add UDA1345 CODEC support
Vladimir Zapolskiy [Mon, 26 Apr 2010 10:56:57 +0000 (14:56 +0400)]
ASoC: UDA134X: Add UDA1345 CODEC support

This patch adds support for Philips UDA1345 CODEC. The CODEC has only
volume control, de-emphasis, mute, DC filtering and power control features.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Warn on low WM8994 AIFCLK
Mark Brown [Sun, 25 Apr 2010 11:20:30 +0000 (12:20 +0100)]
ASoC: Warn on low WM8994 AIFCLK

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Correct inversion of speaker mixer PCM switch
Mark Brown [Fri, 23 Apr 2010 16:39:23 +0000 (17:39 +0100)]
ASoC: Correct inversion of speaker mixer PCM switch

Reported-by: Anti Sullin <anti.sullin@artecdesign.ee>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: tlv320dac33: FIFO caused delay reporting
Peter Ujfalusi [Fri, 23 Apr 2010 07:10:01 +0000 (10:10 +0300)]
ASoC: tlv320dac33: FIFO caused delay reporting

Delay reporting for the three implemented DAC33 FIFO modes.
DAC33 has FIFO depth status register(s), but it can not be used, since
inside of pcm_pointer we can not send I2C commands.
Timestamp based estimation need to be used. The method of calculating
the delay depends on the active FIFO mode.

Bypass mode: FIFO is bypassed, report 0 as delay

Mode1: nSample fill mode. In this mode I need to use two timestamp
ts1: taken when the interrupt has been received
ts2: taken before writing to nSample register.

Interrupts are coming when DAC33 FIFO depth goes under alarm threshold.

Phase1: when we received the alarm threshold, but our workqueue has
        not been executed (safeguard phase). Just count the played out
        samples since ts1 and subtract it from the alarm threshold
        value.
Phase2: During nSample burst (after writing to nSample register), count
        the played out samples since ts1, count the samples received
        since ts2 (in a burst). Estimate the FIFO depth using these and
        alarm threshold value.
Phase3: Draining phase (after the burst read), count the played out
        samples since ts1. Estimate the FIFO depth using the nSample
        configuration and the alarm threshold value.

Mode7: Threshold based fill mode. In this mode one timestamp is enough.
ts1: taken when the interrupt has been received

Interrupts are coming when DAC33 FIFO depth reaches upper threshold.

Phase1: Draining phase (after the burst), counting the played out
        samples since ts1, and subtract it from the upper threshold
        value.
Phase2: During burst operation. Using the pre calculated time needed to
        play out samples from the buffer during the drain period (from
        upper to lower threshold), move the time window to cover the
        estimated time from the burst start to the current time.
        Calculate the samples played out since lower threshold and also
        the samples received during the same time.

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>
14 years agoASoC: tlv320dac33: Calculate the interface speed during bursts
Peter Ujfalusi [Fri, 23 Apr 2010 07:10:00 +0000 (10:10 +0300)]
ASoC: tlv320dac33: Calculate the interface speed during bursts

When the DAC33 FIFO is in use the dai interface is running in
much higher speed than the sampling frequency.
Calculate the rate based on the internal base frequency and
the bclk divider.

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>
14 years agoASoC: tlv320dac33: Change magic numbers used in Mode7
Peter Ujfalusi [Fri, 23 Apr 2010 07:09:59 +0000 (10:09 +0300)]
ASoC: tlv320dac33: Change magic numbers used in Mode7

Upper and Lower threshold values are used as magic
numbers. Replace them with defines for later use.

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>
14 years agoASoC: tlv320dac33: Skip calculations in FIFO Bypass mode
Peter Ujfalusi [Fri, 23 Apr 2010 07:09:58 +0000 (10:09 +0300)]
ASoC: tlv320dac33: Skip calculations in FIFO Bypass mode

There is no need for calculations for FIFO bypass mode.
Just in case set the nsample maximum limit, which
has been done in the calculation phase.

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>
14 years agoASoC: tlv320dac33: Fix for early interrupt in FIFO Mode1
Peter Ujfalusi [Fri, 23 Apr 2010 07:09:57 +0000 (10:09 +0300)]
ASoC: tlv320dac33: Fix for early interrupt in FIFO Mode1

Alarm threshold interrupt is triggered right after the
playback start.
This interrupt is recieved during the first burst period,
and caused the state machine to write additional nSample
command, which has to be avoided.
To fix this issue move the DAC33 interrupt unmasking
after we configured the PREFILL register with a small
delay.

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>
14 years agoASoC: Allow reporting of NULL jacks
Mark Brown [Mon, 29 Mar 2010 19:31:14 +0000 (20:31 +0100)]
ASoC: Allow reporting of NULL jacks

Follow the core jack implementation and allow reporting on the status
of NULL jacks, avoiding the need to check in detection implementations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: ad193x: fix typo, delete redundant space
Barry Song [Wed, 21 Apr 2010 09:36:49 +0000 (17:36 +0800)]
ASoC: ad193x: fix typo, delete redundant space

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: ad193x: fix wrong register setting in ad193x_set_dai_fmt
Barry Song [Wed, 21 Apr 2010 09:36:48 +0000 (17:36 +0800)]
ASoC: ad193x: fix wrong register setting in ad193x_set_dai_fmt

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Allow unspecified source when stopping WM8994 FLLs
Mark Brown [Wed, 21 Apr 2010 17:29:01 +0000 (02:29 +0900)]
ASoC: Allow unspecified source when stopping WM8994 FLLs

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Tone down debugging for WM8994 class W
Mark Brown [Tue, 20 Apr 2010 04:57:08 +0000 (13:57 +0900)]
ASoC: Tone down debugging for WM8994 class W

It's a little verbose during path changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Set full range of WM8994 FLL Fratio values
Mark Brown [Tue, 20 Apr 2010 04:36:11 +0000 (13:36 +0900)]
ASoC: Set full range of WM8994 FLL Fratio values

Use all the available Fratio values when configuring the WM8994 FLL, not
just 0 and 3, following more complete characterisation of the device
performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Support FLL input clock selection on WM8994
Mark Brown [Tue, 20 Apr 2010 03:56:18 +0000 (12:56 +0900)]
ASoC: Support FLL input clock selection on WM8994

The WM8994 FLL can be clocked from one of four inputs, the two MCLKs and
the LRCLK and BCLK of the AIF associated with the FLL. Allow all four
inputs to be used rather than defaulting to MCLK1.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: da7210: Fencepost error in reg cache read
Phil Carmody [Wed, 14 Apr 2010 14:03:13 +0000 (17:03 +0300)]
ASoC: da7210: Fencepost error in reg cache read

An index equal to the array size may not be accessed.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Acked-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>
14 years agoASoC: missing conversions to snd_soc_codec_*_drvdata()
Takashi Iwai [Tue, 20 Apr 2010 06:20:31 +0000 (08:20 +0200)]
ASoC: missing conversions to snd_soc_codec_*_drvdata()

Conversions to snd_soc_codec_{get|set}_drvdata() were missing in some files
in the previous commit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: Add indirection for CODEC private data
Mark Brown [Wed, 14 Apr 2010 06:35:19 +0000 (15:35 +0900)]
ASoC: Add indirection for CODEC private data

One of the features of the multi CODEC work is that it embeds a struct
device in the CODEC to provide diagnostics via a sysfs class rather than
via the device tree, at which point it's much better to use the struct
device private data rather than having two places to store it. Provide
an accessor function to allow this change to be made more easily, and
update all the CODEC drivers are updated.

To ensure use of the accessor the private data structure member is
renamed, meaning that if code developed with older an older core that
still uses private_data is merged it will fail to build.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge branch 'for-2.6.34' into for-2.6.35
Mark Brown [Sat, 17 Apr 2010 01:45:54 +0000 (10:45 +0900)]
Merge branch 'for-2.6.34' into for-2.6.35

14 years agoASoC: imx-ssi: do not call hrtimer_disable in trigger function
Sascha Hauer [Wed, 14 Apr 2010 07:17:30 +0000 (09:17 +0200)]
ASoC: imx-ssi: do not call hrtimer_disable in trigger function

Doing so causes a deadlock, so just signal the timer to stop
using an atomic variable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: imx-ssi: increase minimum periods to 4
Sascha Hauer [Wed, 14 Apr 2010 07:17:31 +0000 (09:17 +0200)]
ASoC: imx-ssi: increase minimum periods to 4

Currently the notification of elapsed periods is not very exact.
Increase minimum periods to 4 as suggested by Liam Girdwood.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Zipit Z2 WM8750 ASoC driver
Marek Vasut [Mon, 5 Apr 2010 04:13:38 +0000 (06:13 +0200)]
ASoC: Zipit Z2 WM8750 ASoC driver

This patch adds support for sound through the WM8750 codec on Zipit Z2.
Also, this patch incorporates support for detecting headset jack
insertion through the jack detection API.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Use SNDRV_PCM_RATE_8000_96000 macro for WM8731
Bill Gatliff [Fri, 9 Apr 2010 17:08:08 +0000 (18:08 +0100)]
ASoC: Use SNDRV_PCM_RATE_8000_96000 macro for WM8731

Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: WM8750: Convert to new API
Marek Vasut [Thu, 8 Apr 2010 18:48:51 +0000 (20:48 +0200)]
ASoC: WM8750: Convert to new API

Register the WM8750 as a SPI or I2C device. This patch mostly shuffles code
around. Hugely inspired by WM8753 which was already converted.

Also, this patch fixes the Jive and Spitz machine.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: imx-ssi: Use a hrtimer in FIQ mode
Sascha Hauer [Thu, 8 Apr 2010 09:31:26 +0000 (11:31 +0200)]
ASoC: imx-ssi: Use a hrtimer in FIQ mode

Using a regular timer results in poll times < 1 jiffie with small
buffers, so we loaded the timer with the actual jiffie value. We can
be more accurate using a hrtimer. Also, we have to call
snd_pcm_period_elapsed after playing period_bytes and not
runtime->period_size (which is in samples and not in bytes).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: imx-pcm-dma-mx2: restart DMA after an error
Sascha Hauer [Thu, 8 Apr 2010 09:31:25 +0000 (11:31 +0200)]
ASoC: imx-pcm-dma-mx2: restart DMA after an error

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: imx-ssi: honor IMX_SSI_DMA flag
Sascha Hauer [Thu, 8 Apr 2010 09:31:24 +0000 (11:31 +0200)]
ASoC: imx-ssi: honor IMX_SSI_DMA flag

When checking if we are DMA capable we have to check for the
IMX_SSI_DMA flag which is already set from platform_data instead
of setting it again when we want to do DMA.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@Slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: wm2000: remove unused #include <linux/version.h>
Huang Weiyi [Thu, 8 Apr 2010 11:50:08 +0000 (19:50 +0800)]
ASoC: wm2000: remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/wm2000.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'for-2.6.34' into for-2.6.35
Mark Brown [Mon, 5 Apr 2010 18:19:32 +0000 (19:19 +0100)]
Merge branch 'for-2.6.34' into for-2.6.35

Conflicts due to context changes next to the backported DMA data change:
include/sound/soc.h

14 years agoASoC: Implement interrupt based WM8994 microphone detection
Mark Brown [Mon, 29 Mar 2010 19:57:12 +0000 (20:57 +0100)]
ASoC: Implement interrupt based WM8994 microphone detection

Support interrupt based microphone bias detection. The WM8994 has two
microphone bias supplies, with detection supported on both. Detection
using GPIOs together with the standard GPIO based jack framework is
already supported via the platform data for the WM8994 core driver.

Note that as well as the microphone bias itself the system clock and
whichever AIF clock is supplying the system clock will need to be
enabled for detection to function.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agogpiolib: Implement gpio_to_irq for WM8994 GPIO controller
Mark Brown [Fri, 2 Apr 2010 13:51:59 +0000 (14:51 +0100)]
gpiolib: Implement gpio_to_irq for WM8994 GPIO controller

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agomfd: Add WM8994 interrupt controller support
Mark Brown [Fri, 26 Mar 2010 16:49:15 +0000 (16:49 +0000)]
mfd: Add WM8994 interrupt controller support

The WM8994 has an interrupt controller which supports interrupts for
both CODEC and GPIO portions of the chip. Support this using genirq,
while allowing for systems that do not have an interrupt hooked up.

Wrapper functions are provided for the IRQ request and free to simplify
the code in consumer drivers when handling cases where IRQs are not
set up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
14 years agoALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
Daniel Mack [Mon, 22 Mar 2010 09:11:15 +0000 (10:11 +0100)]
ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

[Note that this is a backported version for 2.6.34.
 Upstream commit is fd23b7dee]

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Only do WM8994 bias off transition from standby
Mark Brown [Tue, 30 Mar 2010 13:29:14 +0000 (14:29 +0100)]
ASoC: Only do WM8994 bias off transition from standby

Otherwise we may try to power down multiple times when the using
idle bias off and the driver is removed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
Mark Brown [Mon, 29 Mar 2010 16:18:41 +0000 (17:18 +0100)]
ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices

The DCS_DATAPATH_BUSY bit used to monitor the completion of DC servo
operations has been deprecated and with some more recente revisions
may perform incorrectly, especially when only analogue bypass paths
are in use. Switch to using readback from the DC servo command
register instead, which is supported for all devices. Without this
unacceptably long timeouts may be observed in some circumstances.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
Mark Brown [Mon, 29 Mar 2010 15:34:42 +0000 (16:34 +0100)]
ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction

If we need to offset correct the DC servo then don't use runtime
recalibration since that is likely to introduce further offsets
which will be evident on powerdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Support second DC servo readback method for wm_hubs
Mark Brown [Mon, 29 Mar 2010 16:09:45 +0000 (17:09 +0100)]
ASoC: Support second DC servo readback method for wm_hubs

More recent Wolfson hubs devices add the ability to read back the DC
servo calibration information from the register used to write offsets,
and later still ones remove the old readback registers. Add support
for the new scheme, and use it for WM8994 device revisions that
support it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Avoid wraparound in wm_hubs DC servo correction
Mark Brown [Mon, 29 Mar 2010 14:24:40 +0000 (15:24 +0100)]
ASoC: Avoid wraparound in wm_hubs DC servo correction

If the correction wraps around then a substantial offset would be
introduced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent...
Janusz Krzysztofik [Sun, 28 Mar 2010 20:29:29 +0000 (22:29 +0200)]
ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code

With recent (2.6.34) chnages in PCM handling, capture stopped working on my
OMAP1510 based Amstrad Delta videophone.

Using 2.6.34-rc2, I was able to correct the problem in 3 different ways:

1. reverting commit 7b3a177b0d4f92b3431b8dca777313a07533a710,
2. enabling additional jiffies check with
echo 4 >/proc/asound/card0/pcm0c0/xrun_debug
3. applying the patch below.

Since I wasn't able to reproduce the problem on my i686 PC, I guess the
problem is probably machine specific.

The patch reuses the method for software emulation of missing hardware
pointer, already implemented for playback on OMAP1510. It's possible that
event if a hardware pointer is available for capture on this machine, its
behaviour may be not compatible with what upper layer expects.

If you think the problem may be more general and should be solved differently,
on a higher level, I can try to work more on it if you give me a hint.

If the patch gets accepted, I suggest it goes as a fix in the current release
cycle.

Created and tested against linux-2.6.34-rc2.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agomfd: update gfp/slab.h includes
Tejun Heo [Mon, 29 Mar 2010 17:52:40 +0000 (02:52 +0900)]
mfd: update gfp/slab.h includes

Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'for-2.6.34' into for-2.6.35
Mark Brown [Mon, 29 Mar 2010 20:03:20 +0000 (21:03 +0100)]
Merge branch 'for-2.6.34' into for-2.6.35

14 years agoASoC: ad193x: move codec register/unregister to bus probe/remove
Barry Song [Mon, 29 Mar 2010 03:16:00 +0000 (11:16 +0800)]
ASoC: ad193x: move codec register/unregister to bus probe/remove

The way i've factored out the bus probe and removal functions so
that there's no code in the individual I2C and SPI functions means
that the register() and unregister() functions could just be squashed
into the bus_probe() and bus_remove() functions.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Fix passing platform_data to ac97 bus users and fix a leak
Graham Gower [Thu, 25 Mar 2010 00:22:12 +0000 (10:52 +1030)]
ASoC: Fix passing platform_data to ac97 bus users and fix a leak

[The issue is an attempt to write the pdata without the AC97 device
allocated when using ac97.c - also added a comment in soc-core.c for the
special case for ac97. -- broonie]

Signed-off-by: Graham Gower <graham.gower@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoMerge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Mark Brown [Mon, 29 Mar 2010 20:00:04 +0000 (21:00 +0100)]
Merge branch 'topic/asoc' of git://git./linux/kernel/git/tiwai/sound-2.6 into for-2.6.35

14 years agoASoC: update gfp/slab.h includes
Tejun Heo [Mon, 29 Mar 2010 17:52:29 +0000 (02:52 +0900)]
ASoC: update gfp/slab.h includes

Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: Fix file permission of soc/codecs/twl6040.c
Takashi Iwai [Mon, 29 Mar 2010 07:31:57 +0000 (09:31 +0200)]
ASoC: Fix file permission of soc/codecs/twl6040.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: TWL6040: use of kzalloc/kfree requires the include of slab.h
Stephen Rothwell [Mon, 29 Mar 2010 06:55:51 +0000 (17:55 +1100)]
ASoC: TWL6040: use of kzalloc/kfree requires the include of slab.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: update for removeal of slab.h from percpu.h
Stephen Rothwell [Mon, 29 Mar 2010 04:32:18 +0000 (15:32 +1100)]
ASoC: update for removeal of slab.h from percpu.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoASoC: fsi: Add FSI2 device support
Kuninori Morimoto [Thu, 25 Mar 2010 10:15:53 +0000 (19:15 +0900)]
ASoC: fsi: Add FSI2 device support

ARM-SHMOBILE series have FIFO-buffered serial interface 2 (FSI2)
device which is advanced version of FSI.
This patch add simple support for it.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: fsi: Add FIFO size calculate
Kuninori Morimoto [Thu, 25 Mar 2010 10:15:51 +0000 (19:15 +0900)]
ASoC: fsi: Add FIFO size calculate

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: wm8994: playback => capture
Dan Carpenter [Wed, 24 Mar 2010 11:58:34 +0000 (14:58 +0300)]
ASoC: wm8994: playback => capture

Sparse caught that initialize "playback" two times instead of
initializing "capture".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: fsi: IRQ related process had be united
Kuninori Morimoto [Tue, 23 Mar 2010 02:47:54 +0000 (11:47 +0900)]
ASoC: fsi: IRQ related process had be united

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: fsi: ensures process inside master lock
Kuninori Morimoto [Wed, 24 Mar 2010 06:27:24 +0000 (15:27 +0900)]
ASoC: fsi: ensures process inside master lock

Bit operation for fsi_master should be done inside master lock.
But soft-reset/interrupt operation were outside of it.
This patch modify this problem.
It still allow to INT_ST outside-operation on fsi_interrupt,
but it is not problem.
Because this register doesn't need the bit operation.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: ak4642: Add enhanced sampling rate
Kuninori Morimoto [Tue, 23 Mar 2010 07:27:38 +0000 (16:27 +0900)]
ASoC: ak4642: Add enhanced sampling rate

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: ak4642: Add set_fmt function for snd_soc_dai_ops
Kuninori Morimoto [Mon, 15 Mar 2010 09:10:50 +0000 (18:10 +0900)]
ASoC: ak4642: Add set_fmt function for snd_soc_dai_ops

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: ak4642: Add pll select support
Kuninori Morimoto [Tue, 23 Mar 2010 07:27:28 +0000 (16:27 +0900)]
ASoC: ak4642: Add pll select support

Current ak4642 was not able to select pll.
This patch add support it.
It still expect PLL base input pin is MCKI.
see Table 5 "setting of PLL Mode" of datasheet

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Implement WM8994 DAI tristate support
Mark Brown [Mon, 22 Mar 2010 22:05:10 +0000 (22:05 +0000)]
ASoC: Implement WM8994 DAI tristate support

This also adds the first DAI operation for AIF3 so fill out the ID and
the ops for that too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge branch 'for-2.6.34' into for-2.6.35
Mark Brown [Mon, 22 Mar 2010 17:23:46 +0000 (17:23 +0000)]
Merge branch 'for-2.6.34' into for-2.6.35

14 years agoASoC: Allow WM8903 mic detect disable and don't force bias on
Mark Brown [Mon, 22 Mar 2010 16:37:01 +0000 (16:37 +0000)]
ASoC: Allow WM8903 mic detect disable and don't force bias on

Don't force enable the microphone bias on WM8903 when doing jack
detection, and don't force enable microphone bias. This allows
platforms to only enable microphone detection when a jack has been
inserted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Allow disabling of WM835x jack detection
Mark Brown [Mon, 22 Mar 2010 15:30:30 +0000 (15:30 +0000)]
ASoC: Allow disabling of WM835x jack detection

If no report is specified then disable detection. Note that we don't
disable the slow clock, though the power consumption from it should
be negligable. That should be reference counted, ideally through DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Move WM8350 microphone detection bias managment out of driver
Mark Brown [Mon, 22 Mar 2010 13:48:36 +0000 (13:48 +0000)]
ASoC: Move WM8350 microphone detection bias managment out of driver

Allow machines to control exactly when the bias is turned on and off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Allow force enabled pins to be disabled
Mark Brown [Mon, 22 Mar 2010 13:36:13 +0000 (13:36 +0000)]
ASoC: Allow force enabled pins to be disabled

Some systems, such as those with mechanical jack detection, may wish
to force enable a pin (typically mic bias) only some of the time.
Support such systems by having disable_pin() also coveer force enabled
pins.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: Add a notifier for jack status changes
Mark Brown [Mon, 22 Mar 2010 12:06:30 +0000 (12:06 +0000)]
ASoC: Add a notifier for jack status changes

Some systems provide both mechanical and electrical detection of jack
status changes. On such systems power savings can be achieved by only
enabling the electrical detection methods when physical insertion has
been detected.

Begin supporting such systems by providing a notifier for jack status
changes which can be used to trigger any reconfiguration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoASoC: TWL4030: PM fix for output amplifiers
Peter Ujfalusi [Mon, 22 Mar 2010 15:46:37 +0000 (17:46 +0200)]
ASoC: TWL4030: PM fix for output amplifiers

Gain controls on outputs affect the power consumption
when the gain is set to non 0 value.

Outputs with amps have one register to configure the
routing and the gain:
PREDL_CTL (0x25):
bit 0: Voice enable
bit 1: Audio L1 enable
bit 2: Audio L2 enable
bit 3: Audio R2 enable
bit 4-5: Gain (0x0 - power down, 0x1 - 6dB, 0x2 - 0dB, 0x3 - -6dB)

bit 0 - 3: is handled in DAPM domain (DAPM_MIXER)
bit 4 - 5: has simple volume control

If there is no audio activity (BIAS_STANDBY), and
user changes the volume, than the output amplifier will
be enabled.
If the user changes the routing (but the codec remains in
BIAS_STANDBY), than the cached gain value also be written
to the register, which enables the amplifier.

The existing workaround for this is to have virtual
PGAs associated with the outputs, and whit DAPM PMD
the gain on the output will be forced to 0 (off) by
bypassing the regcache.
This failed to disable the amplifiers in several
scenario (as mentioned above).

Also if the codec is in BIAS_ON state, and user modifies
a volume control, which path is actually not enabled, than
that amplifier will be enabled as well, but it will
be not turned off, since there is no DAPM path, which
would make mute it.

To prevent amps being enabled, when they are not
needed, introduce the following workaround:
Track the state of each of this type of output.
In twl4030_write only allow actual write, when the
given output is enabled, otherwise only update
the reg_cache.
The PGA event handlers on power up will write the cached
value to the chip (restoring gain, routing selection).
On power down 0 is written to the register (disabling
the amp, and also just in case clearing the routing).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: Remove BROKEN from i.MX audio after dependencies merged
Mark Brown [Fri, 12 Feb 2010 14:39:36 +0000 (14:39 +0000)]
ASoC: Remove BROKEN from i.MX audio after dependencies merged

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge commit 'v2.6.34-rc2' into for-2.6.34
Mark Brown [Mon, 22 Mar 2010 11:17:26 +0000 (11:17 +0000)]
Merge commit 'v2.6.34-rc2' into for-2.6.34

14 years agoLinux 2.6.34-rc2 v2.6.34-rc2
Linus Torvalds [Sat, 20 Mar 2010 01:17:57 +0000 (18:17 -0700)]
Linux 2.6.34-rc2

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sat, 20 Mar 2010 01:16:20 +0000 (18:16 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  serial: sh-sci: remove duplicated #include
  sh: Export uncached helper symbols.
  sh: Fix up NUMA build for 29-bit.
  serial: sh-sci: Fix build failure for non-sh architectures.
  sh: Fix up uncached offset for legacy 29-bit mode.
  sh: Support CPU affinity masks for INTC controllers.

14 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Sat, 20 Mar 2010 01:14:22 +0000 (18:14 -0700)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: remove duplicate cpu_to_le16()
  uwb: declare MODULE_FIRMWARE() in i1480 DFU driver
  uwb: make USB device id table constant
  uwb: wlp: refactor wlp_get_<attribute>() macros

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88...
Linus Torvalds [Fri, 19 Mar 2010 20:49:29 +0000 (13:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mattst88/alpha-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
  alpha: fix compile errors in dma-mapping-common.h
  alpha: remove trailing spaces in messages
  alpha: use __ratelimit

14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 19 Mar 2010 20:42:43 +0000 (13:42 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Remove IOMMU_VMERGE config option
  powerpc: Fix swiotlb to respect the boot option
  powerpc: Do not call prink when CONFIG_PRINTK is not defined
  powerpc: Use correct ccr bit for syscall error status
  powerpc/fsl-booke: Get coherent bit from PTE
  powerpc/85xx: Make sure lwarx hint isn't set on ppc32

14 years agoMerge branch 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:42:00 +0000 (13:42 -0700)]
Merge branch 'zerolen' of git://git./linux/kernel/git/jgarzik/misc-2.6

* 'zerolen' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  Delete zero-length file drivers/mtd/maps/omap_nor.c

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:40:03 +0000 (13:40 -0700)]
Merge git://git./linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  tty_port,usb-console: Fix usb serial console open/close regression
  tty: cpm_uart: use resource_size()
  tty_buffer: Fix distinct type warning
  hvc_console: Fix race between hvc_close and hvc_remove
  uartlite: Fix build on sparc.
  tty: Take a 256 byte padding into account when buffering below sub-page units
  Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:42 +0000 (13:39 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  driver core: numa: fix BUILD_BUG_ON for node_read_distance
  driver-core: document ERR_PTR() return values
  kobject: documentation: Update to refer to kset-example.c.
  sysdev: the cpu probe/release attributes should be sysdev_class_attributes
  kobject: documentation: Fix erroneous example in kobject doc.
  driver-core: fix missing kernel-doc in firmware_class
  Driver core: Early platform kernel-doc update
  sysfs: fix sysfs lockdep warning in mlx4 code
  sysfs: fix sysfs lockdep warning in infiniband code
  sysfs: fix sysfs lockdep warning in ipmi code
  sysfs: Initialised pci bus legacy_mem field before use
  sysfs: use sysfs_bin_attr_init in firmware class driver

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Fri, 19 Mar 2010 20:39:21 +0000 (13:39 -0700)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (45 commits)
  USB: gadget/multi: cdc_do_config: remove redundant check
  usb: r8a66597-hcd: fix removed from an attached hub
  USB: xhci: Make endpoint interval debugging clearer.
  USB: Fix usb_fill_int_urb for SuperSpeed devices
  USB: cp210x: Remove double usb_control_msg from cp210x_set_config
  USB: Remove last bit of CONFIG_USB_BERRY_CHARGE
  USB: gadget: add gadget controller number for s3c-hsotg driver
  USB: ftdi_sio: Fix locking for change_speed() function
  USB: g_mass_storage: fixed module name in Kconfig
  USB: gadget: f_mass_storage::fsg_bind(): fix error handling
  USB: g_mass_storage: fix section mismatch warnings
  USB: gadget: fix Blackfin builds after gadget cleansing
  USB: goku_udc: remove potential null dereference
  USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is 0xff
  USB: serial: Fix module name typo for qcaux Kconfig entry.
  usb: cdc-wdm: Fix deadlock between write and resume
  usb: cdc-wdm: Fix order in disconnect and fix locking
  usb: cdc-wdm:Fix loss of data due to autosuspend
  usb: cdc-wdm: Fix submission of URB after suspension
  usb: cdc-wdm: Fix race between disconnect and debug messages
  ...

14 years agoMerge branch 'for-2.6.34' into for-2.6.35
Mark Brown [Fri, 19 Mar 2010 19:39:23 +0000 (19:39 +0000)]
Merge branch 'for-2.6.34' into for-2.6.35

14 years agoASoC: remove a card from the list, if instantiation failed
Guennadi Liakhovetski [Thu, 18 Mar 2010 07:23:33 +0000 (08:23 +0100)]
ASoC: remove a card from the list, if instantiation failed

If instantiation of a card failed, we still have to remove it from the
card list on unregistration. This fixes an Oops on Migo-R, triggering,
when after a failed firmware load attempt the driver modules are removed
and re-inserted again.

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>
14 years agoASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
Daniel Mack [Fri, 19 Mar 2010 14:52:55 +0000 (14:52 +0000)]
ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream

This fixes a memory corruption when ASoC devices are used in
full-duplex mode. Specifically for pxa-ssp code, where this pointer
is dynamically allocated for each direction and destroyed upon each
stream start.

All other platforms are fixed blindly, I couldn't even compile-test
them. Sorry for any breakage I may have caused.

Reported-by: Sven Neumann <s.neumann@raumfeld.com>
Reported-by: Michael Hirsch <m.hirsch@raumfeld.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoDelete zero-length file drivers/mtd/maps/omap_nor.c
Jeff Garzik [Fri, 19 Mar 2010 18:25:45 +0000 (14:25 -0400)]
Delete zero-length file drivers/mtd/maps/omap_nor.c

The content was deleted in cc87edb173effdf74e680ee6d622a935ff0c1d6f,
but the file remained as a zero-length file.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Fri, 19 Mar 2010 16:43:06 +0000 (09:43 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (205 commits)
  ceph: update for write_inode API change
  ceph: reset osd after relevant messages timed out
  ceph: fix flush_dirty_caps race with caps migration
  ceph: include migrating caps in issued set
  ceph: fix osdmap decoding when pools include (removed) snaps
  ceph: return EBADF if waiting for caps on closed file
  ceph: set osd request message front length correctly
  ceph: reset front len on return to msgpool; BUG on mismatched front iov
  ceph: fix snaptrace decoding on cap migration between mds
  ceph: use single osd op reply msg
  ceph: reset bits on connection close
  ceph: remove bogus mds forward warning
  ceph: remove fragile __map_osds optimization
  ceph: fix connection fault STANDBY check
  ceph: invalidate_authorizer without con->mutex held
  ceph: don't clobber write return value when using O_SYNC
  ceph: fix client_request_forward decoding
  ceph: drop messages on unregistered mds sessions; cleanup
  ceph: fix comments, locking in destroy_inode
  ceph: move dereference after NULL test
  ...

Fix trivial conflicts in Documentation/ioctl/ioctl-number.txt

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Fri, 19 Mar 2010 16:36:18 +0000 (09:36 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: trivial white space
  [CIFS] checkpatch cleanup
  cifs: add cifs_revalidate_file
  cifs: add a CIFSSMBUnixQFileInfo function
  cifs: add a CIFSSMBQFileInfo function
  cifs: overhaul cifs_revalidate and rename to cifs_revalidate_dentry

14 years agoASoC: pxa-pcm-lib: initialize DMA channel to -1
Daniel Mack [Sun, 28 Feb 2010 02:42:38 +0000 (10:42 +0800)]
ASoC: pxa-pcm-lib: initialize DMA channel to -1

This fixes a warning ("pxa_free_dma: trying to free channel 0 which is
already freed") when a device was opened but the hw_params() call
failed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoUSB: gadget/multi: cdc_do_config: remove redundant check
Peter Korsgaard [Fri, 12 Mar 2010 11:33:15 +0000 (12:33 +0100)]
USB: gadget/multi: cdc_do_config: remove redundant check

cdc_do_config() had a double ret check after fsg_add().

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>