platform/kernel/linux-exynos.git
13 years agoASoC: Add platform data for WM9081 IRQ pin configuration
Mark Brown [Tue, 1 Mar 2011 20:10:46 +0000 (20:10 +0000)]
ASoC: Add platform data for WM9081 IRQ pin configuration

The WM9081 IRQ output can be either active high or active low and can
support either CMOS or open drain modes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove module probe announcements from CODEC drivers
Mark Brown [Thu, 24 Feb 2011 20:25:45 +0000 (20:25 +0000)]
ASoC: Remove module probe announcements from CODEC drivers

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix burstsize and DSP_B format problems in imx-ssi.
Javier Martin [Tue, 1 Mar 2011 14:02:06 +0000 (15:02 +0100)]
ASoC: Fix burstsize and DSP_B format problems in imx-ssi.

When choosing IMX_DMA flag, burtsizes are set to its default
value (0) which leads to driver malfunction. Change them to 4.

DSP_B interface needs additional flag to match DSP_B formats
as described in several codecs as wm8741 and aic3205.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: WM8994: Ensure MICBIAS is provided with a clock
Dimitris Papastamos [Tue, 1 Mar 2011 12:54:39 +0000 (12:54 +0000)]
ASoC: WM8994: Ensure MICBIAS is provided with a clock

The patch 'ASoC: WM8994: Improve Playback Robustness' did not handle
this case properly.

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' into for-2.6.39
Mark Brown [Tue, 1 Mar 2011 23:29:04 +0000 (23:29 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: WM8994: Ensure late enable events are processed for the ADCs
Dimitris Papastamos [Tue, 1 Mar 2011 11:47:10 +0000 (11:47 +0000)]
ASoC: WM8994: Ensure late enable events are processed for the ADCs

Ensure that the ADCs are provided with a clock as the previous patch
"ASoC: WM8994: Improve playback robustness" did not handle this case
properly.

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: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly
Dimitris Papastamos [Mon, 28 Feb 2011 17:24:11 +0000 (17:24 +0000)]
ASoC: WM8994: Don't disable the AIF[1|2]CLK_ENA unconditionaly

Since we began using the late clock disable functionality, ensure that
we don't disable the clock if any of the ADC or DAC paths are still
enabled.  This happens when we have simultaneous playback and recording.

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: Fix WM9081 platform data initialisation
Mark Brown [Tue, 1 Mar 2011 20:05:23 +0000 (20:05 +0000)]
ASoC: Fix WM9081 platform data initialisation

It went AWOL in the multi-component conversion.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
13 years agoASoC: Tegra: Fix error handling in DMA channel alloc
Stephen Warren [Wed, 23 Feb 2011 03:16:34 +0000 (20:16 -0700)]
ASoC: Tegra: Fix error handling in DMA channel alloc

tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Staticise non-exported symbols in SGTL5000
Mark Brown [Mon, 28 Feb 2011 14:33:01 +0000 (14:33 +0000)]
ASoC: Staticise non-exported symbols in SGTL5000

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: remove unnecessary header including in SGTL5000 codec driver
Zeng Zhaoming [Sun, 27 Feb 2011 19:45:21 +0000 (03:45 +0800)]
ASoC: remove unnecessary header including in SGTL5000 codec driver

Remove unnecessary headers:
 - mach/hardware.h in sgtl5000.c
 - linux/i2c.h in sgtl5000.h

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Sat, 26 Feb 2011 09:50:01 +0000 (09:50 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: eukrea-tlv320: add MBIMXSD51 support
Eric Bénard [Fri, 25 Feb 2011 12:48:15 +0000 (13:48 +0100)]
ASoC: eukrea-tlv320: add MBIMXSD51 support

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Liam Girdwood <lrg@slimogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Move WM2000 to dev_pm_ops
Mark Brown [Fri, 25 Feb 2011 12:25:18 +0000 (12:25 +0000)]
ASoC: Move WM2000 to dev_pm_ops

There's a general move to use dev_pm_ops rather than bus specific functions
in order to facilitate work on the PM core. Do this conversion to WM2000.
The driver ought to be updated to work better in a multi-component model
but the mechanical conversion ensures that we avoid blocking PM core work
until that happens.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoeukrea-tlv320: fix platform_name
Eric Bénard [Fri, 25 Feb 2011 12:47:46 +0000 (13:47 +0100)]
eukrea-tlv320: fix platform_name

commit f0fba2ad1b6b53d5360125c41953b7afcd6deff0 included a mistake
on the name of the platform in the snd_soc_dai_link structure.

Signed-off-by: Eric Bénard <eric@eukrea.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: Add Freescale SGTL5000 codec support
Zeng Zhaoming [Wed, 23 Feb 2011 18:08:21 +0000 (02:08 +0800)]
ASoC: Add Freescale SGTL5000 codec support

Add Freescale SGTL5000 codec support.
Supported features:
 - line-in and mic input
 - headphone and line-out output
 - line-in bypass ADC and DAC to headphone
 - 16, 20, 24, 32 bit audio
 - 8 ~ 96k sample rates

Signed-off-by: Zeng Zhaoming <zhaoming.zeng@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: remove one to many l's in the word
Justin P. Mattock [Fri, 25 Feb 2011 06:16:37 +0000 (22:16 -0800)]
ASoC: remove one to many l's in the word

The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@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 agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Fri, 25 Feb 2011 11:45:09 +0000 (11:45 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Tegra: Move utilities to separate module
Stephen Warren [Wed, 23 Feb 2011 00:23:56 +0000 (17:23 -0700)]
ASoC: Tegra: Move utilities to separate module

The utilities will be required by every machine driver. Including the
utility object directly into every machine driver causes a build failure
if the modules are actually built into the kernel, since each will define
the symbols exported by the utility file. Solve this by moving the
utility object into a separate module.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: soc-dapm: Include quotes around contents in debugfs entries
Dimitris Papastamos [Thu, 24 Feb 2011 17:09:32 +0000 (17:09 +0000)]
ASoC: soc-dapm: Include quotes around contents in debugfs entries

Sometimes the name of the control switch of a dapm route contains
spaces which makes it impossible to distinguish it from the source widget.
Add quotes around the names of the widgets to makes these parsable.

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: Remove -codec suffix from WM9081 driver
Mark Brown [Thu, 24 Feb 2011 20:26:02 +0000 (20:26 +0000)]
ASoC: Remove -codec suffix from WM9081 driver

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: correct pxa AC97 DAI names
Dmitry Eremin-Solenikov [Tue, 22 Feb 2011 23:29:11 +0000 (02:29 +0300)]
ASoC: correct pxa AC97 DAI names

Correct names for pxa AC97 DAI are pxa2xx-ac97 and pxa2xx-ac97-aux. Fix
that for all PXA platforms.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.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: Pass the jack to jack notifiers
Mark Brown [Tue, 22 Feb 2011 20:42:35 +0000 (12:42 -0800)]
ASoC: Pass the jack to jack notifiers

We're currently not passing anything and this will make the card and so on
more discoverable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Simplify default WM8958 jack detection code
Mark Brown [Tue, 22 Feb 2011 04:51:13 +0000 (20:51 -0800)]
ASoC: Simplify default WM8958 jack detection code

The default WM8958 jack detection handler implements a full set of buttons
and also support for video detection. Support for multi-button jacks is
fairly system specific and will usually require some tuning for headsets
so simplify the implementation to only report a simple short to ground
button, leaving multi-button headsets to be handled by system specific
code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Support configuration of WM8958 microphone bias analogue parameters
Mark Brown [Tue, 22 Feb 2011 01:11:59 +0000 (17:11 -0800)]
ASoC: Support configuration of WM8958 microphone bias analogue parameters

The WM8958 has a different microphone bias architecture to WM8994 so needs
different configuration to WM8994. Support this in platform data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Support WM8958 direct microphone detection IRQ
Mark Brown [Fri, 18 Feb 2011 04:05:44 +0000 (20:05 -0800)]
ASoC: Support WM8958 direct microphone detection IRQ

Allow direct routing of the WM8958 microphone detection signal to a GPIO
to be used, saving the need to demux the interrupt.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Mark WM8958 microphone bias registers as readable
Mark Brown [Sat, 19 Feb 2011 00:57:22 +0000 (16:57 -0800)]
ASoC: Mark WM8958 microphone bias registers as readable

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Run bias level changes for all DAPM contexts in parallel
Mark Brown [Fri, 18 Feb 2011 19:49:43 +0000 (11:49 -0800)]
ASoC: Run bias level changes for all DAPM contexts in parallel

As bias level changes can be quite time consuming and the bias changes
for multiple devices aren't strongly tied to each other (if anything it
can be advantageous to bring different devices up together) we can improve
the state transition time for multi-component systems by running the bias
level changes for all the devices in parallel. This is very simple to
achieve using the kernel async functionality so use that to schedule the
work.

This should have no practical effect for the overwhelming majority of
systems which have a single DAPM context - we'll bounce into another
thread to do the bias level change but otherwise everything will happen
in exactly the same order as it did before.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove card from snd_soc_dapm_set_bias_level()
Mark Brown [Fri, 18 Feb 2011 19:12:42 +0000 (11:12 -0800)]
ASoC: Remove card from snd_soc_dapm_set_bias_level()

We can get the card from the DAPM context so don't bother passing it as
an argument.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Tue, 22 Feb 2011 18:38:13 +0000 (10:38 -0800)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Hook wm_hubs micbiases up to CLK_SYS
Mark Brown [Fri, 18 Feb 2011 23:05:53 +0000 (15:05 -0800)]
ASoC: Hook wm_hubs micbiases up to CLK_SYS

The microphone detection functionality requires a clock to work. In any
non-detection case where the MICBIAS is enabled CLK_SYS will be needed
anyway so there is no negative impact on power consumption.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Correct definition of WM8903_VMID_RES_5K
Mark Brown [Mon, 21 Feb 2011 18:44:42 +0000 (10:44 -0800)]
ASoC: Correct definition of WM8903_VMID_RES_5K

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix WM8958 default microphone detection argument ordering
Mark Brown [Tue, 22 Feb 2011 04:41:25 +0000 (20:41 -0800)]
ASoC: Fix WM8958 default microphone detection argument ordering

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Hook wm_hubs micbiases up to CLK_SYS
Mark Brown [Fri, 18 Feb 2011 23:05:53 +0000 (15:05 -0800)]
ASoC: Hook wm_hubs micbiases up to CLK_SYS

The microphone detection functionality requires a clock to work. In any
non-detection case where the MICBIAS is enabled CLK_SYS will be needed
anyway so there is no negative impact on power consumption.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Mark WM8958 microphone detection registers readable
Mark Brown [Fri, 18 Feb 2011 22:47:02 +0000 (14:47 -0800)]
ASoC: Mark WM8958 microphone detection registers readable

So they show up in codec_reg.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Add kerneldoc for jack_status_check callback
Mark Brown [Fri, 18 Feb 2011 00:41:42 +0000 (16:41 -0800)]
ASoC: Add kerneldoc for jack_status_check callback

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Allow GPIO jack detection to be configured as a wake source
Mark Brown [Fri, 18 Feb 2011 00:35:55 +0000 (16:35 -0800)]
ASoC: Allow GPIO jack detection to be configured as a wake source

Some systems wish to use jacks as wake sources. Provide a wake flag in the
GPIO configuration which causes the driver to enable the IRQ as a wake
source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Log wm_hubs DC servo operation code when reporting a timeout
Mark Brown [Thu, 17 Feb 2011 20:05:46 +0000 (12:05 -0800)]
ASoC: Log wm_hubs DC servo operation code when reporting a timeout

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove export of snd_soc_dapm_stream_event()
Mark Brown [Thu, 17 Feb 2011 03:24:39 +0000 (19:24 -0800)]
ASoC: Remove export of snd_soc_dapm_stream_event()

The only thing that should ever be calling this is soc-core and that is
built as part of the same module so doesn't need the export.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix missing space in WM8994
Mark Brown [Wed, 16 Feb 2011 22:57:17 +0000 (14:57 -0800)]
ASoC: Fix missing space in WM8994

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: sst_platform: fix the pulseaudio error
Vinod Koul [Tue, 15 Feb 2011 12:58:54 +0000 (18:28 +0530)]
ASoC: sst_platform: fix the pulseaudio error

Pulseaudio doesnt work with current driver and it was root caused to absense of
hw_params function and malloc_pages in it.
This patch adds this and allows pa to work fine with these drivers

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: mfld_machine: make use of soc_register_card API
Vinod Koul [Tue, 15 Feb 2011 12:58:55 +0000 (18:28 +0530)]
ASoC: mfld_machine: make use of soc_register_card API

This patch removes the old method of soc-audio device creation in mfld machine
and makes use of new soc_register_card API to register the card

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: sn95031: fix the amic tlv scale
Vinod Koul [Tue, 15 Feb 2011 12:58:53 +0000 (18:28 +0530)]
ASoC: sn95031: fix the amic tlv scale

The tlv scale is defined as (min, step, mute). The mute is not supported here so
put the value to 0

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: sn95031: fix the DMIC path routing
Vinod Koul [Tue, 15 Feb 2011 12:58:52 +0000 (18:28 +0530)]
ASoC: sn95031: fix the DMIC path routing

This patch makes the DMIC dynamically connect to TX Mux, earlier code had
erroneously made this as static path

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: sn95031: make playback rails depend on actual pins they control
Vinod Koul [Tue, 15 Feb 2011 12:58:51 +0000 (18:28 +0530)]
ASoC: sn95031: make playback rails depend on actual pins they control

This patch makes the codec playback rails (headset and speaker) depend on
actual pins they control. This enables better power management of the codec

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 agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Sun, 13 Feb 2011 19:51:04 +0000 (19:51 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Warn if WM8903 platform data is used to enable microphone IRQ
Mark Brown [Fri, 11 Feb 2011 14:39:13 +0000 (14:39 +0000)]
ASoC: Warn if WM8903 platform data is used to enable microphone IRQ

The WM8903 interrupts are clear on read so if the WM8903 detection is
enabled from platform data when the IRQ is in use (rather than using a
direct signal from a GPIO) status may be lost during startup. Help users
spot this misconfiguration by adding a WARN_ON().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Tegra: Add MODULE_ALIAS
Stephen Warren [Thu, 10 Feb 2011 22:37:19 +0000 (15:37 -0700)]
ASoC: Tegra: Add MODULE_ALIAS

With the appropriate MODULE_ALIAS in place, the audio modules will be
automatically loaded; there is no longer a need for manual modprobes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tegra: Harmony: Explicitly set mic enables
Stephen Warren [Thu, 10 Feb 2011 22:37:18 +0000 (15:37 -0700)]
ASoC: Tegra: Harmony: Explicitly set mic enables

Harmony has both an external mic (a regular mic jack) and an internal mic
(a 0.1" two-pin header on the board).

The external mic is connected to the WM8903's IN1L pin, and is supported
by the current driver.

The internal mic is connected to the WM8903's IN1R pin, and is not supported
by the current driver.

It appears that no Harmony systems were shipped with any internal mic
connected; users were expected to provide their own. This makes the
internal mic connection less interesting.

The WM8903's Mic Bias signal is used for both of these mics. For each mic,
a GPIO drives a transistor which gates whether the mic bias signal is
actively connected to that mic, or isolated from it.

The dual use of the mic bias for both mics makes a general-purpose complete
implementation of mic detection using the mic bias complex. So, for
simplicity, the internal mic is currently ignored by the driver.

This patch configures the relevant GPIOs to enable the mic bias connection
to the external mic, and disable the mic bias connection to the internal
mic. Note that in practice, this is the default state if these GPIOs aren't
configured.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Harmony: Call snd_soc_dapm_nc_pin
Stephen Warren [Thu, 10 Feb 2011 22:37:17 +0000 (15:37 -0700)]
ASoC: Harmony: Call snd_soc_dapm_nc_pin

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tegra: Harmony: Implement mic detection
Stephen Warren [Thu, 10 Feb 2011 22:37:16 +0000 (15:37 -0700)]
ASoC: Tegra: Harmony: Implement mic detection

* Add jack definition for mic jack
* Request wm8903 to enable mic detection
* Force mic bias on, since it's required for mic detection

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Ensure supplies are maintained for force enabled widgets
Mark Brown [Fri, 11 Feb 2011 11:42:19 +0000 (11:42 +0000)]
ASoC: Ensure supplies are maintained for force enabled widgets

If a widget has been force enabled then not only do we need to keep the
widget itself enabled, we also need to keep any supplies the widget
requires enabled. The user could force all the individual widgets on but
this requires too much knowledge of device internals.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: WM8994: Improve playback robustness
Dimitris Papastamos [Fri, 11 Feb 2011 16:32:12 +0000 (16:32 +0000)]
ASoC: WM8994: Improve playback robustness

On WM8994 revision D and earlier ensure proper playback robustness
as some rare use cases can trigger issues.

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: WM8994: Improve robustness in some use cases
Dimitris Papastamos [Fri, 11 Feb 2011 16:32:11 +0000 (16:32 +0000)]
ASoC: WM8994: Improve robustness in some use cases

Ensure that on disabling certain registers such as AIF1DAC1L,
AIF1DAC1R etc. the AIF1CLK and AIF2CLK remain enabled.  Similarly
when enabling those registers, AIF1CLK and AIF2CLK will remain
disabled.

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: WM8903: Fix mic detection enable logic
Stephen Warren [Thu, 10 Feb 2011 22:37:14 +0000 (15:37 -0700)]
ASoC: WM8903: Fix mic detection enable logic

The mic detection HW should be enabled when either mic or short detection
is required, not when only both are required.

Signed-off-by: Stephen Warren <swarren@nvidia.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: WM8903: Fix mic detection register definitions
Stephen Warren [Thu, 10 Feb 2011 22:37:13 +0000 (15:37 -0700)]
ASoC: WM8903: Fix mic detection register definitions

* There is no hysteresis enable field in the current datasheet.
* Mic detection threshold field is only 2 bits wide.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Allow use sleeping gpio in soc-jack
Jarkko Nikula [Thu, 10 Feb 2011 15:22:23 +0000 (17:22 +0200)]
ASoC: Allow use sleeping gpio in soc-jack

It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not
called from interrupt context. This avoids WARN_ON from __gpio_get_value
if sleeping gpio is registered for jack.

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: mid-x86: Use the soc-jack apis for jack type detection
Vinod Koul [Thu, 10 Feb 2011 07:28:01 +0000 (12:58 +0530)]
ASoC: mid-x86: Use the soc-jack apis for jack type detection

This patch modifies the mfld_machine to use the new jack apis for adding the
voltage zones for jack type detection. It also modifed TI sn95031 codec driver
to use these new apis

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 agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Fri, 11 Feb 2011 11:14:20 +0000 (11:14 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Use explicit sequence for WM8903 bias off
Mark Brown [Thu, 10 Feb 2011 14:20:49 +0000 (14:20 +0000)]
ASoC: Use explicit sequence for WM8903 bias off

This makes no real difference compared to the write sequencer sequence
that was previously used but can run without a clock being provided.
Also remove the write sequencer support code as this was the last use
of it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Don't use write sequencer to power up WM8903
Mark Brown [Thu, 10 Feb 2011 14:01:38 +0000 (14:01 +0000)]
ASoC: Don't use write sequencer to power up WM8903

The write sequencer sequencer sequence takes longer than is desirable
as it brings up a full playback path which is not required at this
point. Open coding the sequence cuts the startup time by two thirds.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Convert WM8903 bias management to use snd_soc_update_bits()
Mark Brown [Thu, 10 Feb 2011 13:32:58 +0000 (13:32 +0000)]
ASoC: Convert WM8903 bias management to use snd_soc_update_bits()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: CX20442: fix wrong reg_cache_default content
Janusz Krzysztofik [Thu, 10 Feb 2011 12:24:32 +0000 (13:24 +0100)]
ASoC: CX20442: fix wrong reg_cache_default content

Content of the CX20442's snd_soc_codec_driver.reg_cache_default pointed
area, introduced with my recent NULL pointer dereferece fix (commit
f019ee5feb344ff0b22b58df4568676295aae14f), occured wrong after further
testing, more thorough than just booting successfully. There are two
problems with it:

1) It should read
(1 << CX20442_TELOUT) | (1 << CX20442_MIC),
   not
CX20442_TELOUT | CX20442_MIC.

2) While correctly matching actual codec hardware state on boot when
   fixed per 1), a few more code modifications would still be required
   to reflect that state not only into register cache, but also force
   them into DAPM pins state, otherwise an inconsitency occures which
   may prevent further codec state changes from being applied correctly.
   As a result, the phone stops ringing after reboot, until someone
   picks up the handset for the first time.

Revert that reg_cache_default content to a working, previous de facto
default value of 0, in hope this change can still be accepted as an rc
cycle fix.

Created and tested against linux-2.6.38-rc4

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Actively manage WM8903 DC servo configuration
Mark Brown [Wed, 9 Feb 2011 20:14:42 +0000 (20:14 +0000)]
ASoC: Actively manage WM8903 DC servo configuration

Explicitly cache the DC servo offsets for digital paths in the driver,
allowing them to be preserved over suspend and resume, and ensure that
we recalibrate analogue outputs paths when they are in use so that we
cover any changes in the input offset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: add support for multiple jack types
Vinod Koul [Wed, 9 Feb 2011 09:14:17 +0000 (14:44 +0530)]
ASoC: add support for multiple jack types

This patch adds soc-jack support for adding voltage zones and for
detecting jack type

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Wed, 9 Feb 2011 22:52:08 +0000 (22:52 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Sync initial widget state with hardware
Mark Brown [Wed, 9 Feb 2011 18:04:11 +0000 (18:04 +0000)]
ASoC: Sync initial widget state with hardware

ASoC generally uses the register defaults for everything, but in some
cases the hardware will default to enabling some of the DAPM widgets
(clocks for example). Ensure that DAPM knows about the actual widget
state at initialisation by reading the enable bits after instantiating
the widgets so they don't get left enabled needlessly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix WM8903 DAC mute default
Mark Brown [Wed, 9 Feb 2011 17:42:57 +0000 (17:42 +0000)]
ASoC: Fix WM8903 DAC mute default

The WM8903 register map does not mute the DAC by default at startup
so we need to explicitly do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Dynamically manage CLK_SYS in WM8903
Mark Brown [Wed, 9 Feb 2011 17:42:56 +0000 (17:42 +0000)]
ASoC: Dynamically manage CLK_SYS in WM8903

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Convert WM8903 to use PGA_S for output stage enables
Mark Brown [Wed, 9 Feb 2011 17:42:55 +0000 (17:42 +0000)]
ASoC: Convert WM8903 to use PGA_S for output stage enables

This simplfies the code and slightly reduces the startup time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Add support for AIF channel muxing on WM8903
Mark Brown [Wed, 9 Feb 2011 13:47:08 +0000 (13:47 +0000)]
ASoC: Add support for AIF channel muxing on WM8903

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Display WM8903 chip revision alphabetically
Mark Brown [Wed, 9 Feb 2011 13:47:07 +0000 (13:47 +0000)]
ASoC: Display WM8903 chip revision alphabetically

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Remove redundant -codec from WM8903 driver name
Mark Brown [Wed, 9 Feb 2011 13:47:06 +0000 (13:47 +0000)]
ASoC: Remove redundant -codec from WM8903 driver name

It causes noisy -codecs to appear in things like .codec_name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Davinci: Replace usage of IO_ADDRESS with ioremap()
Vaibhav Bedia [Wed, 9 Feb 2011 13:09:54 +0000 (18:39 +0530)]
ASoC: Davinci: Replace usage of IO_ADDRESS with ioremap()

This patch modifies the Davinci i2s and mcasp drivers to make use of
ioremap() instead of IO_ADDRESS()

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Davinci: Call clk_disable() and clk_put() in case of error
Vaibhav Bedia [Wed, 9 Feb 2011 13:09:53 +0000 (18:39 +0530)]
ASoC: Davinci: Call clk_disable() and clk_put() in case of error

In case of any error in probe() function, clk_disable() and clk_put()
should be called if clk_enable() and clk_get() went through.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Davinci: Use resource_size() helper function
Vaibhav Bedia [Wed, 9 Feb 2011 13:09:52 +0000 (18:39 +0530)]
ASoC: Davinci: Use resource_size() helper function

This patch modifies the Davinci i2s and mcasp drivers
to make use of the resource_size() helper function for readability.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: sn95031: Add support for reading mic bias
Vinod Koul [Wed, 9 Feb 2011 16:14:34 +0000 (21:44 +0530)]
ASoC: sn95031: Add support for reading mic bias

This patch adds support to read the mic bias voltage
when a jack is inserted. It uses ADC to measure.

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: mfld_machine: Add support for jack detection
Vinod Koul [Wed, 9 Feb 2011 16:14:33 +0000 (21:44 +0530)]
ASoC: mfld_machine: Add support for jack detection

This patch adds support for registering jack interupt
and registering jack with core

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: sn95031: Add jack support in the codec
Vinod Koul [Wed, 9 Feb 2011 16:14:32 +0000 (21:44 +0530)]
ASoC: sn95031: Add jack support in the codec

This patch adds support for jack detection and reporting in the codec
It however is not fully functional as it doesn't measure adc to figure
out what got inserted which will be added later

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: Tegra: Harmony: Add switch control for speaker
Stephen Warren [Thu, 3 Feb 2011 20:56:14 +0000 (13:56 -0700)]
ASoC: Tegra: Harmony: Add switch control for speaker

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Tegra: Harmony: Add headphone jack detection
Stephen Warren [Thu, 3 Feb 2011 20:56:13 +0000 (13:56 -0700)]
ASoC: Tegra: Harmony: Add headphone jack detection

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: soc-cache: dereferencing before checking
Dan Carpenter [Mon, 7 Feb 2011 19:01:41 +0000 (22:01 +0300)]
ASoC: soc-cache: dereferencing before checking

The patch c358e640a66 "ASoC: soc-cache: Add trace event for
snd_soc_cache_sync()" introduced a dereference of "codec->cache_ops"
before we had checked it for NULL.

I pulled the check forward, and then pulled everything in an indent
level.

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>
13 years agoASoC: CS4271: Move Chip Select control out of the CODEC code.
Alexander Sverdlin [Thu, 3 Feb 2011 00:11:45 +0000 (03:11 +0300)]
ASoC: CS4271: Move Chip Select control out of the CODEC code.

Move Chip Select control out of the CODEC code for CS4271.

Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: codecs: wm8753: Fix DAI mode switching
Lars-Peter Clausen [Sun, 6 Feb 2011 09:04:11 +0000 (10:04 +0100)]
ASoC: codecs: wm8753: Fix DAI mode switching

The wm8753 codec supports switching between different DAI modes.
The current drivers tries to implement this by changing the DAI driver at
runtime. But to properly work this would require support from the ASoC core.

So this patch takes a different approch on how the DAI mode switching is
implemented.

The only difference, from a driver point of view, between the different DAI modes
is how to program the DAI format to the hardware. So what this patch is, it
stores the current format for each DAI in the drivers private struct and when
the DAI mode is changed the format gets simply reprogrammed according to the
new DAI mode.

Futhermore this patch restricts the changing of the DAI format to when the
codec is inactive.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: mid-x86: Fix dependency on intel_sst driver
Vinod Koul [Sun, 6 Feb 2011 10:05:48 +0000 (15:35 +0530)]
ASoC: mid-x86: Fix dependency on intel_sst driver

Enabling medfield asoc driver causes compliation error when intel_sst
is not selected
ERROR: "register_sst_card" [sound/soc/mid-x86/snd-soc-sst-platform.ko]
undefined!

This patch puts proper dependency to elimate build error

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: ep93xx-ac97: remove extra empty line
Mika Westerberg [Fri, 4 Feb 2011 10:22:55 +0000 (12:22 +0200)]
ASoC: ep93xx-ac97: remove extra empty line

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Thu, 3 Feb 2011 20:17:54 +0000 (20:17 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Improve WM8994 digital power sequencing
Mark Brown [Thu, 3 Feb 2011 16:27:35 +0000 (16:27 +0000)]
ASoC: Improve WM8994 digital power sequencing

On WM8994 revision D and earlier ensure optimal sequencing with
simultaneous usage of AIF1 and AIF2 by tying the signals together
so if paths through both are connected the streams are started
simultaneously.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
13 years agoASoC: Create an AIF1ADCDAT signal widget to match AIF2
Mark Brown [Thu, 3 Feb 2011 16:27:34 +0000 (16:27 +0000)]
ASoC: Create an AIF1ADCDAT signal widget to match AIF2

Due to the different routing for AIF1 and AIF2 we weren't using a
single widget to represent the ADCDAT signal. For consistency add
one.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: stable@kernel.org
13 years agoasoc: davinci: da830/omap-l137: correct cpu_dai_name
Vaibhav Bedia [Thu, 3 Feb 2011 11:12:25 +0000 (16:42 +0530)]
asoc: davinci: da830/omap-l137: correct cpu_dai_name

McASP1 is used on the DA830/OMAP-L137 platform for the codec.
This is different from the DA850/OMAP-L138 platform which uses McASP0.

This is fixed by adding a new snd_soc_dai_link struct.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Sort ALC5623 in Kconfig and Makefile
Mark Brown [Thu, 3 Feb 2011 14:07:15 +0000 (14:07 +0000)]
ASoC: Sort ALC5623 in Kconfig and Makefile

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoMerge branch 'for-2.6.38' into for-2.6.39
Mark Brown [Wed, 2 Feb 2011 20:52:14 +0000 (20:52 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()
Janusz Krzysztofik [Wed, 2 Feb 2011 20:11:41 +0000 (21:11 +0100)]
ASoC: fill in snd_soc_pcm_runtime.card before calling snd_soc_dai_link.init()

The .card member of the snd_soc_pcm_runtime structure pointed to by the
snd_soc_dai_link.init() argument used to be initialized before the
function being called. This has changed, probably unintentionally,
after recent refactorings. Since the function implementations are free
to make use of this pointer, move its assignment back before the
function is called to avoid NULL pointer dereferences.

Created and tested on Amstrad Delta againts linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: soc-core: Support debugfs entries larger than PAGE_SIZE bytes
Dimitris Papastamos [Wed, 2 Feb 2011 13:58:58 +0000 (13:58 +0000)]
ASoC: soc-core: Support debugfs entries larger than PAGE_SIZE bytes

For some codecs with large register maps, it was not possible to dump
all registers via the codec_reg file but only up to PAGE_SIZE bytes.
This patch fixes this problem.

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: PXA: formatting
Sven Neumann [Mon, 31 Jan 2011 15:10:50 +0000 (16:10 +0100)]
ASoC: PXA: formatting

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Update PM ifdefs for exported suspend/resume
Mark Brown [Wed, 2 Feb 2011 10:43:26 +0000 (10:43 +0000)]
ASoC: Update PM ifdefs for exported suspend/resume

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Mark Brown [Tue, 1 Feb 2011 14:55:10 +0000 (14:55 +0000)]
Merge branch 'for-2.6.39' of git://git./linux/kernel/git/lrg/asoc-2.6 into for-2.6.39

13 years agoASoC: Use snd_pcm_format_width() in snd_soc_params_to_frame_size()
Mark Brown [Mon, 31 Jan 2011 20:14:38 +0000 (20:14 +0000)]
ASoC: Use snd_pcm_format_width() in snd_soc_params_to_frame_size()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: soc-core: Ensure codec_reg has fixed length fields
Dimitris Papastamos [Tue, 1 Feb 2011 12:24:08 +0000 (12:24 +0000)]
ASoC: soc-core: Ensure codec_reg has fixed length fields

Make the format of the codec_reg file more easily parsable.  Remove
the header field which gives the codec name.  These changes are important
when it comes to extend the debugfs codec_reg file to dump more than
PAGE_SIZE bytes to make it easier to calculate offsets within the
file.

We still need to handle the case when the snd_soc_read() call fails
and <no data: %d> is outputted.

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 branches 'for-2.6.38' and 'tegra-arch' into for-2.6.39
Mark Brown [Tue, 1 Feb 2011 14:21:09 +0000 (14:21 +0000)]
Merge branches 'for-2.6.38' and 'tegra-arch' into for-2.6.39