platform/kernel/linux-exynos.git
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: 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

13 years agoARM: tegra: Add to struct harmony_audio_platform_data
Stephen Warren [Mon, 31 Jan 2011 22:37:15 +0000 (15:37 -0700)]
ARM: tegra: Add to struct harmony_audio_platform_data

Add fields to describe all the audio-related GPIOs on Harmony, except for
the codec's GPIO IRQ, which will be passed in its i2c_board_info.

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: CX20442: fix NULL pointer dereference
Janusz Krzysztofik [Tue, 1 Feb 2011 12:01:17 +0000 (13:01 +0100)]
ASoC: CX20442: fix NULL pointer dereference

The CX20442 codec driver never provided the snd_soc_codec_driver's
.reg_cache_default member. With the latest ASoC framework changes, it
seems to be referred unconditionally, resulting in a NULL pointer
dereference if missing. Provide it.

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

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: Amstrad Delta: fix const related build error
Janusz Krzysztofik [Tue, 1 Feb 2011 10:11:55 +0000 (11:11 +0100)]
ASoC: Amstrad Delta: fix const related build error

The Amstrad Delta ASoC driver used to override the digital_mute()
callback, expected to be not provided by the on-board CX20442 CODEC
driver, with its own implementation. While this is still posssible when
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct
after the snd_soc_dai_driver.ops member has been constified, and results
in build error.

Drop this actually not used code path in hope the CX20442 driver never
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

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: Tegra: Harmony: Remove redundant !!
Stephen Warren [Mon, 31 Jan 2011 18:00:17 +0000 (11:00 -0700)]
ASoC: Tegra: Harmony: Remove redundant !!

gpio_set_value* should accept logic values not just 0 or 1. The WM8903 GPIO
driver has been fixed to work this way, so remove the redundant !!
previously required when it didn't accept values >1.

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: omap: rx51: Add earphone support
Jarkko Nikula [Mon, 31 Jan 2011 12:43:48 +0000 (14:43 +0200)]
ASoC: omap: rx51: Add earphone support

Earphone in Nokia RX-51/N900 is connected to left HP output of B part of the
TLV320AIC34 dual codec. In RX-51 the codec A is used as a traditional codec
and the codec B as an auxiliary device.

Audio from codec A goes via the codec B to earphone:
MONO_LOUT of A -> LINE2R of B (B interconnects) -> HPLOUT of B -> Earphone.

Take earphone into use by utilizing the recent ASoC auxiliary and
cross-device support.

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>
13 years agoASoC: Accept any logical value WM8903 GPIO set()
Mark Brown [Mon, 31 Jan 2011 13:41:17 +0000 (13:41 +0000)]
ASoC: Accept any logical value WM8903 GPIO set()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Accept any logical value for WM8962 GPIO set()
Mark Brown [Mon, 31 Jan 2011 13:41:03 +0000 (13:41 +0000)]
ASoC: Accept any logical value for WM8962 GPIO set()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: neo1973_wm8753 audio support does not require scoop
H Hartley Sweeten [Fri, 28 Jan 2011 19:00:18 +0000 (12:00 -0700)]
ASoC: neo1973_wm8753 audio support does not require scoop

This driver does not use any of the functionality provided by the scoop
hardware.  Remove the unneeded header.

Signed-off-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: Tegra: I2S: Use dev_err not pr_err
Stephen Warren [Fri, 28 Jan 2011 21:26:41 +0000 (14:26 -0700)]
ASoC: Tegra: I2S: Use dev_err not pr_err

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: utils: Don't use global variables
Stephen Warren [Fri, 28 Jan 2011 21:26:40 +0000 (14:26 -0700)]
ASoC: Tegra: utils: Don't use global variables

Instead, have the machine driver provide storage for the utility data
somehow.

For Harmony in particular, store this within struct tegra_harmony, itself
referenced by snd_soc_card's drvdata.

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: Use dev_err not pr_err
Stephen Warren [Fri, 28 Jan 2011 21:26:39 +0000 (14:26 -0700)]
ASoC: Tegra: Harmony: Use dev_err not pr_err

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: Fix indentation issue.
Stephen Warren [Fri, 28 Jan 2011 21:26:38 +0000 (14:26 -0700)]
ASoC: Tegra: Harmony: Fix indentation issue.

Indent with TABs not spaces.

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: Support the internal speaker
Stephen Warren [Fri, 28 Jan 2011 21:26:37 +0000 (14:26 -0700)]
ASoC: Tegra: Harmony: Support the internal speaker

Add DAPM widget definitions for the internal speaker paths. Currently, this
path is always enabled while playback is active.

Add code to control the speaker amplifier GPIO.

The GPIO is requested during _init, since that's the first time it is
guaranteed that the WM8903 module is loaded, probed, and hence has exported
its GPIO chip.

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: Don't use soc-audio platform device
Stephen Warren [Fri, 28 Jan 2011 21:26:36 +0000 (14:26 -0700)]
ASoC: Tegra: Harmony: Don't use soc-audio platform device

Previously, snd-soc-tegra-harmony internally instantiated a platform device
object whenever the module was loaded. Instead, switch to a more typical model
where arch/arm/mach-tegra defines a platform device, and snd-soc-tegra-harmony
acts as a driver for such a platform device.

Define a new struct tegra_harmony to store driver data in the future.

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: Move card list initialization to snd_soc_register_card
Stephen Warren [Fri, 28 Jan 2011 21:26:35 +0000 (14:26 -0700)]
ASoC: Move card list initialization to snd_soc_register_card

All ASoC cards need snd_soc_initialize_card_lists called. Previously, it was
only called for cards backed by a "soc-audio" platform device, via
soc_probe(). However, it's also needed for cards backed by other platform
devices, and registered directly via snd_soc_register_card().

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: mid-x86: Add support for capture in machine driver
Harsha Priya [Fri, 28 Jan 2011 16:58:32 +0000 (22:28 +0530)]
ASoC: mid-x86: Add support for capture in machine driver

This configures the capture unused pins

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: sst_platform: add support for capture stream on headset dai
Harsha Priya [Fri, 28 Jan 2011 16:57:26 +0000 (22:27 +0530)]
ASoC: sst_platform: add support for capture stream on headset dai

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 capture support
Harsha Priya [Fri, 28 Jan 2011 16:56:53 +0000 (22:26 +0530)]
ASoC: sn95031: add capture support

This patch adds the support for capture path in sn95031 codec.
This codec supports upto 6DMICs, 2 AMICs and Linein. The linein and AMICs
are connected through a MUX to ADC. The TX paths can be assigned to any of the
ADCs or DMICs.

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, 28 Jan 2011 13:22:14 +0000 (13:22 +0000)]
Merge branch 'for-2.6.38' into for-2.6.39

13 years agoASoC: Add card driver data
Mark Brown [Fri, 28 Jan 2011 13:11:47 +0000 (13:11 +0000)]
ASoC: Add card driver data

Provide driver data for cards within the card structure. To simplify the
implementation of the PM operations we don't use the struct device driver
data as this is used by the core to retrieve the card in callbacks from
the device model and PM core.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
Stephen Warren [Thu, 27 Jan 2011 21:54:05 +0000 (14:54 -0700)]
ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()

snd_soc_dapm_put_volsw() has variables for both the unshifted and
shifted mask for updates commit 97404f (ASoC: Do DAPM control updates in
the middle of DAPM sequences) got confused between the two of these.
Since there's no need to keep a copy of the unshifted mask fix this and
simplify the code by using only one mask variable.

[Completely rewrote the changelog to describe the issue -- broonie.]

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>