platform/kernel/linux-stable.git
12 years agoASoC: imx: separate imx-pcm bits from imx-ssi driver
Shawn Guo [Mon, 5 Mar 2012 14:30:55 +0000 (22:30 +0800)]
ASoC: imx: separate imx-pcm bits from imx-ssi driver

Currently the imx-ssi.c[h] accommodates the imx-pcm common bits which
are shared between imx-pcm-dma-mx2 and imx-pcm-fiq drivers.  It assumes
that imx-pcm-dma-mx2 and imx-pcm-fiq will always be used together with
imx-ssi driver.  However this becomes untrue when we see that driver
sound/soc/fsl/fsl_ssi could possibly work with imx-pcm-dma-mx2 too.

The patch moves the imx-pcm common bits from imx-ssi.c[h] into new
files imx-pcm.c[h], and let imx-pcm-dma-mx2 and imx-pcm-fiq drivers
build it in, so that imx-pcm-dma-mx2 can work with no dependency on
imx-ssi driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: rename audmux prefix mxc to imx
Shawn Guo [Mon, 5 Mar 2012 14:30:54 +0000 (22:30 +0800)]
ASoC: imx: rename audmux prefix mxc to imx

It renames the legacy name mxc used in audmux function and macro
to imx.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: move audmux driver into sound/soc/imx
Shawn Guo [Mon, 5 Mar 2012 14:30:53 +0000 (22:30 +0800)]
ASoC: imx: move audmux driver into sound/soc/imx

As audmux becomes a platform driver and its callers are all ASoC
machine drivers, there is no reason to keep it in arch folder, so
move it to sound/soc/imx.

One bonus point would be those ASoC machine drivers stop including
mach/audmux.h, since it's been moved to sound/soc/imx/imx-audmux.h.
This should be a move to the right direction in terms of single kernel
image goal.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoARM: imx: convert audmux to a platform driver
Richard Zhao [Mon, 5 Mar 2012 14:30:52 +0000 (22:30 +0800)]
ARM: imx: convert audmux to a platform driver

It coverts audmux to a platform driver, so that it can be moved into
sound/soc/imx and adopt device tree support later.

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoARM: imx: merge audmux-v1 and audmux-v2
Shawn Guo [Mon, 5 Mar 2012 14:30:51 +0000 (22:30 +0800)]
ARM: imx: merge audmux-v1 and audmux-v2

It merges audmux-v1 and audmux-v2 under arch/arm/plat-mxc into one.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: move phycore audmux call into ASoC machine driver
Shawn Guo [Mon, 5 Mar 2012 14:30:50 +0000 (22:30 +0800)]
ASoC: imx: move phycore audmux call into ASoC machine driver

It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97 to ease converting audmux into a platform
driver later.
It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97, so that it gets aligned with wm1133-ev1
and mx27vis-aic32x4, and more importantly it will ease the moving of
audmux into sound/soc/imx as a platform driver later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: move eukrea audmux call into ASoC machine driver
Shawn Guo [Mon, 5 Mar 2012 14:30:49 +0000 (22:30 +0800)]
ASoC: imx: move eukrea audmux call into ASoC machine driver

It moves eukrea audmux configuration call from board file into ASoC
machine driver eukrea-tlv320, so that it gets aligned wm1133-ev1 and
mx27vis-aic32x4, and more importantly it will ease the moving of audmux
into sound/soc/imx as a platform driver later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Show if widgets are forced in debugfs
Mark Brown [Sat, 3 Mar 2012 18:01:01 +0000 (18:01 +0000)]
ASoC: dapm: Show if widgets are forced in debugfs

The information was not otherwise visible.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: wm8753: fix initialization
Denis 'GNUtoo' Carikli [Sun, 26 Feb 2012 18:21:53 +0000 (19:21 +0100)]
ASoC: wm8753: fix initialization

Without that fix the wm8753 SPI initialization fails, and then produces
  a kernel panic during boot with the following call trace:
    Unable to handle kernel paging request at virtual address 37386d9b
    [<c01ccafc>] (regmap_get_val_bytes+0x0/0x14) from [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc)
    [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc) from [<c0244a4c>] (wm8753_probe+0x5c/0x1c4)
    [<c0244a4c>] (wm8753_probe+0x5c/0x1c4) from [<c023bb24>] (soc_probe_codec+0x174/0x284)
    [<c023bb24>] (soc_probe_codec+0x174/0x284) from [<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28)
    [<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28) from [<c023d278>] (snd_soc_register_card+0x240/0x2d4)
    [<c023d278>] (snd_soc_register_card+0x240/0x2d4) from [<c023d330>] (soc_probe+0x24/0x40)
    [<c023d330>] (soc_probe+0x24/0x40) from [<c01c3900>] (platform_drv_probe+0x14/0x18)
    [...]

The commit d3398ff05907167f463e119421b053ce043741d1
 ( ASoC: Convert WM8753 to direct regmap API usage ) introduced
 the problem.

Thanks to Lars-Peter Clausen for helping me a bit during the debugging.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Split the union for CODEC/platform in the DAI
Mark Brown [Fri, 2 Mar 2012 16:18:30 +0000 (16:18 +0000)]
ASoC: core: Split the union for CODEC/platform in the DAI

There's now core code which falls back to global CODEC operations for
DAI calls that needs to be able to tell if it's dealing with a CPU or
CODEC DAI and given the small number of DAIs in a typical system and
overall memory usage pattern saving a pointer per DAI is really not
worth the effort.

Reported-by: Ian Lartey <ian@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: sgtl5000: rename device tree binding document
Shawn Guo [Sat, 3 Mar 2012 15:20:00 +0000 (23:20 +0800)]
ASoC: sgtl5000: rename device tree binding document

It moves and renames sgtl5000 device tree binding document to make
it aligned with other codecs.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: move SND_SOC_AC97_BUS selection down to machine driver
Shawn Guo [Sat, 3 Mar 2012 15:19:48 +0000 (23:19 +0800)]
ASoC: imx: move SND_SOC_AC97_BUS selection down to machine driver

SND_SOC_AC97_BUS is selected to enable the AC97 support in soc-core.
Rather than selecting the option under SND_IMX_SOC, it's better to
leave the selection to individual machine driver which knows if AC97
support is needed or not.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: initialize dma_params burstsize just in imx-ssi
Shawn Guo [Sat, 3 Mar 2012 15:19:49 +0000 (23:19 +0800)]
ASoC: imx: initialize dma_params burstsize just in imx-ssi

It's not necessary for imx-pcm-dma-mx2 to access imx_ssi.dma_params
for burstsize initialization.  Instead, it can just be done in imx-ssi
probe function once.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Factor out WM1811A detection mode setting
Mark Brown [Sat, 3 Mar 2012 20:02:49 +0000 (20:02 +0000)]
ASoC: wm8994: Factor out WM1811A detection mode setting

Push everything through one function for active use cases, should be
no practical effect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Don't bother updating the jackdet mode needlessly
Mark Brown [Sat, 3 Mar 2012 00:10:02 +0000 (00:10 +0000)]
ASoC: wm8994: Don't bother updating the jackdet mode needlessly

If we're not doing jackdet it's not needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Disable JACKDET when disabling detecton
Mark Brown [Sat, 3 Mar 2012 18:46:36 +0000 (18:46 +0000)]
ASoC: wm8994: Disable JACKDET when disabling detecton

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changes
Mark Brown [Sat, 3 Mar 2012 18:46:06 +0000 (18:46 +0000)]
ASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changes

Normally this will have no effect as we set detection up at system startup
before DAPM syncs take effect, this will only be useful if the system
enables and disables detection at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm_hubs: Disable cache of the DC servo calibration for WM1811
Mark Brown [Wed, 29 Feb 2012 16:40:08 +0000 (16:40 +0000)]
ASoC: wm_hubs: Disable cache of the DC servo calibration for WM1811

The WM1811 DC servo is able to run much faster than previous devices so
the benefit of skipping calibration is not useful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Suppress noop updates of FLL K
Mark Brown [Sat, 3 Mar 2012 15:33:23 +0000 (15:33 +0000)]
ASoC: wm8994: Suppress noop updates of FLL K

Using snd_soc_write() means we always write to the register even if it
already contains the newly calculated value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Push wm8994 private data allocation out into device probe
Mark Brown [Sat, 3 Mar 2012 23:24:39 +0000 (23:24 +0000)]
ASoC: wm8994: Push wm8994 private data allocation out into device probe

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Log a warning when machines use soc-audio
Mark Brown [Fri, 2 Mar 2012 13:07:41 +0000 (13:07 +0000)]
ASoC: core: Log a warning when machines use soc-audio

snd_soc_register_card() has been available and strongly preferred since
2.6.38 but we're still seeing new drivers using it and the conversion rate
for older machines has been low. Help address both issues by logging a
warning when the soc-audio device probes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: core: cleanup platform debugfs on probe failure.
Liam Girdwood [Fri, 2 Mar 2012 16:13:44 +0000 (16:13 +0000)]
ASoC: core: cleanup platform debugfs on probe failure.

Make sure we cleanup the platform debugfs when probe fails.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mxs-pcm: Use dmaengine PCM helper functions
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:10 +0000 (10:49 +0100)]
ASoC: mxs-pcm: Use dmaengine PCM helper functions

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm-dma: Use dmaengine PCM helper functions
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:09 +0000 (10:49 +0100)]
ASoC: imx-pcm-dma: Use dmaengine PCM helper functions

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Add dmaengine PCM helper functions
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:08 +0000 (10:49 +0100)]
ASoC: Add dmaengine PCM helper functions

This patch adds a set of functions which are intended to be used when
implementing a dmaengine based sound PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8962: Run the headphone in class G mode when sidetone is enabled
Mark Brown [Thu, 1 Mar 2012 16:40:51 +0000 (16:40 +0000)]
ASoC: wm8962: Run the headphone in class G mode when sidetone is enabled

Class W mode with sidetone is not fully supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Disable debounce of jack detection on inserted jack
Mark Brown [Thu, 1 Mar 2012 19:01:43 +0000 (19:01 +0000)]
ASoC: wm8994: Disable debounce of jack detection on inserted jack

Don't debounce jack detection for inserted jacks, giving improved
responsiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8962: Remove register default for PLL2
Mark Brown [Thu, 1 Mar 2012 12:07:15 +0000 (12:07 +0000)]
ASoC: wm8962: Remove register default for PLL2

The initial value can be changed depending on system configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Samsung: Update email id of the author
Jaswinder Singh [Sat, 25 Feb 2012 10:54:36 +0000 (16:24 +0530)]
ASoC: Samsung: Update email id of the author

I moved on from a great employer and the email-id no longer exists.
Update email-id to a personal one, assuming I don't move on from
myself anytime soon. And when I do, people don't get the eulogies
bounced.

Signed-off-by: Jaswinder Singh <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Samsung: Merge two identical if-else clauses
Jassi Brar [Sat, 25 Feb 2012 11:12:34 +0000 (16:42 +0530)]
ASoC: Samsung: Merge two identical if-else clauses

Saves two lines and a hell of a lot of embarrassment looking at the code.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Remove stub of register access code
Mark Brown [Wed, 29 Feb 2012 15:26:54 +0000 (15:26 +0000)]
ASoC: wm8994: Remove stub of register access code

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm_hubs: Bomb out if we can't read back the DC servo result
Mark Brown [Wed, 29 Feb 2012 15:39:56 +0000 (15:39 +0000)]
ASoC: wm_hubs: Bomb out if we can't read back the DC servo result

Should have no practical impact but it's safer than trying to soldier on.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Remove stub register cache
Mark Brown [Wed, 29 Feb 2012 17:28:39 +0000 (17:28 +0000)]
ASoC: wm8996: Remove stub register cache

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Fix /RESET bounce ordering
Mark Brown [Wed, 29 Feb 2012 17:45:12 +0000 (17:45 +0000)]
ASoC: wm8996: Fix /RESET bounce ordering

We want to leave the device out of rather than in reset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode
Mark Brown [Tue, 28 Feb 2012 19:03:37 +0000 (19:03 +0000)]
ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: DT: Update digital microphone binding documentation to PAZ00 board.
Leon Romanovsky [Mon, 27 Feb 2012 19:18:19 +0000 (21:18 +0200)]
ASoC: DT: Update digital microphone binding documentation to PAZ00 board.

This patch updates device tree binding documentation to add digital
microphone to PAZ00 board.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: Remove unnecessary -codec from cs4270 driver name
Shawn Guo [Fri, 24 Feb 2012 14:09:38 +0000 (22:09 +0800)]
ASoC: Remove unnecessary -codec from cs4270 driver name

Similar to what commit 1e3ad57 (ASoC: Remove redundant -codec from
WM8776 driver name) does for wm8776 driver, this patch does the same
thing for cs4270 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
Shawn Guo [Fri, 24 Feb 2012 14:09:37 +0000 (22:09 +0800)]
ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node

Align mpc8610_hpcd with p1022_ds on getting codec node by just calling
of_parse_phandle.  The bonus point of doing that is we can save
exporting get_node_by_phandle_name() when we consolidate the common
bits between mpc8610_hpcd and p1022_ds into a module, which can be
shared by more machine drivers added later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsl: correct get_dma_channel parameter name
Shawn Guo [Fri, 24 Feb 2012 14:09:36 +0000 (22:09 +0800)]
ASoC: fsl: correct get_dma_channel parameter name

The second parameter of function get_dma_channel is actually a property
name rather than a compatible string, so rename it for less confusing.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8753: Convert to devm_kzalloc()
Mark Brown [Mon, 27 Feb 2012 15:24:10 +0000 (15:24 +0000)]
ASoC: wm8753: Convert to devm_kzalloc()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fix trivial build error in mpc5200_dma.c
Paul Gortmaker [Sat, 25 Feb 2012 21:12:30 +0000 (16:12 -0500)]
ASoC: fix trivial build error in mpc5200_dma.c

Add the obvious header to fix this:

sound/soc/fsl/mpc5200_dma.c:301: error: implicit declaration of function 'DMA_BIT_MASK'
sound/soc/fsl/mpc5200_dma.c:301: error: initializer element is not constant

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx: let SND_MXC_SOC_FIQ select FIQ
Shawn Guo [Wed, 22 Feb 2012 08:40:26 +0000 (16:40 +0800)]
ASoC: imx: let SND_MXC_SOC_FIQ select FIQ

CONFIG_FIQ is only needed when CONFIG_SND_MXC_SOC_FIQ is selected to
build imx-pcm-fiq.c, so let SND_MXC_SOC_FIQ select FIQ.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops
Viresh Kumar [Fri, 24 Feb 2012 10:55:49 +0000 (16:25 +0530)]
ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops

SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it
again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the
second one overwrites the first one, this is not the correct way. Fix this by
expanding SET_SYSTEM_SLEEP_PM_OPS in our structure.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8962: Convert interrupt handler to direct regmap usage
Mark Brown [Thu, 23 Feb 2012 21:49:37 +0000 (21:49 +0000)]
ASoC: wm8962: Convert interrupt handler to direct regmap usage

Avoids potential locking issues with anything that needs the CODEC lock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8962: Remove mistakenly committed debug logging
Mark Brown [Wed, 22 Feb 2012 20:23:01 +0000 (20:23 +0000)]
ASoC: wm8962: Remove mistakenly committed debug logging

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4104: Convert to direct regmap API usage
Mark Brown [Fri, 17 Feb 2012 20:14:18 +0000 (12:14 -0800)]
ASoC: ak4104: Convert to direct regmap API usage

Since the cache is currently open coded this is more of a win than for
most devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
12 years agoASoC: ak4104: Use snd_soc_write() rather than internal write function
Mark Brown [Fri, 17 Feb 2012 20:05:51 +0000 (12:05 -0800)]
ASoC: ak4104: Use snd_soc_write() rather than internal write function

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
12 years agoASoC: ak4104: Use snd_soc_update_bits() for read/modify/write
Mark Brown [Fri, 17 Feb 2012 20:04:41 +0000 (12:04 -0800)]
ASoC: ak4104: Use snd_soc_update_bits() for read/modify/write

Don't use the internal I/O functions directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
12 years agoASoC: mxs-pcm: Request DMA channel early
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:07 +0000 (10:49 +0100)]
ASoC: mxs-pcm: Request DMA channel early

Request the DMA channel in the PCM open callback instead of the hwparams
callback, this allows us to let open fail if no dma channel is available. This
also fixes a bug where the channel will be requested multiple times if hwparams
is called multiple times.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm: Request DMA channel early
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:06 +0000 (10:49 +0100)]
ASoC: imx-pcm: Request DMA channel early

Request the DMA channel in the pcm open callback. This allows us to let open
fail if there is no dma channel available.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-ssi: Set dma data early
Lars-Peter Clausen [Wed, 22 Feb 2012 09:49:05 +0000 (10:49 +0100)]
ASoC: imx-ssi: Set dma data early

Move the call to snd_soc_dai_set_dma_data from the hw_params callback to the
startup callback. This allows us to use the dma data in the pcm driver's open
callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Move wm_hubs callback before we start ramping VMID
Mark Brown [Tue, 21 Feb 2012 16:24:00 +0000 (16:24 +0000)]
ASoC: wm8994: Move wm_hubs callback before we start ramping VMID

Allows the generic code to set up for that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Convert to use DAPM routes for stream connections
Mark Brown [Fri, 17 Feb 2012 21:02:48 +0000 (13:02 -0800)]
ASoC: wm8996: Convert to use DAPM routes for stream connections

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm5100: Implement DRC coefficient configuration
Mark Brown [Mon, 10 Oct 2011 17:31:44 +0000 (18:31 +0100)]
ASoC: wm5100: Implement DRC coefficient configuration

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Implement DRC coefficient configuration
Mark Brown [Tue, 21 Feb 2012 19:13:10 +0000 (19:13 +0000)]
ASoC: wm8996: Implement DRC coefficient configuration

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: core: Add support for masking out parts of coefficient blocks
Mark Brown [Sat, 18 Feb 2012 00:20:33 +0000 (16:20 -0800)]
ASoC: core: Add support for masking out parts of coefficient blocks

Chip designers frequently include things like the enable and disable
controls for algorithms in the register blocks which also hold the
coefficients. Since it's desirable to split out the enable/disable
control from userspace the plain SND_SOC_BYTES() isn't optimal for
these devices.

Add a SND_SOC_BYTES_MASK() which allows a bitmask from the first word
of the block to be excluded from the control. This supports the needs
of devices I've looked at and lets us have a reasonably simple API.
Further controls can be added in future if that's needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: core: Add SND_SOC_BYTES control for coefficient blocks
Mark Brown [Mon, 10 Oct 2011 17:31:26 +0000 (18:31 +0100)]
ASoC: core: Add SND_SOC_BYTES control for coefficient blocks

Allow devices to export blocks of registers to the application layer,
intended for use for reading and writing coefficient data which can't
usefully be worked with by the kernel at runtime (for example, due to
requiring complex and expensive calculations or being the results of
callibration procedures). Currently drivers are using platform data to
provide configurations for coefficient blocks which isn't at all
convenient for runtime management or configuration development.

Currently only devices using regmap are supported, an error will be
generated for any attempt to work with a byte control on a non-regmap
device. There's no fundamental block to other devices so support could
be added if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: io: Retrieve val_bytes from the regmap API
Mark Brown [Fri, 17 Feb 2012 22:33:29 +0000 (14:33 -0800)]
ASoC: io: Retrieve val_bytes from the regmap API

Allow us to build infrastructure which needs to know the size of a value
without requiring regmap based drivers to supply this information to both
ASoC and regmap by asking regmap for the value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoMerge tag 'topic/introspection' of git://git.kernel.org/pub/scm/linux/kernel/git...
Mark Brown [Tue, 21 Feb 2012 19:34:01 +0000 (19:34 +0000)]
Merge tag 'topic/introspection' of git://git./linux/kernel/git/broonie/regmap into HEAD

New interfaces to allow other subsystems to gather information about the
regmap, allowing them to build further subsystem specific generic
features on top of the regmap.

Merged into ASoC in order to allow us to implement SND_SOC_BYTES_MASK()
controls which need to know the word size of the underlying registers.

12 years agoASoC: mxs-pcm: Remove unused fields from struct mxs_pcm_runtime_data
Lars-Peter Clausen [Tue, 21 Feb 2012 16:47:57 +0000 (17:47 +0100)]
ASoC: mxs-pcm: Remove unused fields from struct mxs_pcm_runtime_data

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm: Remove unused fields from imx_pcm_runtime_data struct
Lars-Peter Clausen [Tue, 21 Feb 2012 16:47:56 +0000 (17:47 +0100)]
ASoC: imx-pcm: Remove unused fields from imx_pcm_runtime_data struct

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx-pcm: Remove empty prepare callback
Lars-Peter Clausen [Tue, 21 Feb 2012 16:47:55 +0000 (17:47 +0100)]
ASoC: imx-pcm: Remove empty prepare callback

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Support external capacitors on MICBIAS2 with jack detection
Mark Brown [Tue, 21 Feb 2012 16:23:35 +0000 (16:23 +0000)]
ASoC: wm8994: Support external capacitors on MICBIAS2 with jack detection

When an external capacitor is connected to MICBIAS2 on devices with
jack detection (which is not required but may be done in some systems)
then the loading may mean that better performance is obtained when
the microphone bias is enabled normally rather than using the low power
mode. Provide platform data allowing systems to indicate if they require
this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Actively discharge idle MICBIAS with jack detect
Mark Brown [Tue, 21 Feb 2012 13:45:53 +0000 (13:45 +0000)]
ASoC: wm8994: Actively discharge idle MICBIAS with jack detect

This minimises the chance of any external capacitors that are fitted
being discharged into headphones as they insert.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8994: Enable headphone startup mode 1 for WM1811 and WM8958
Mark Brown [Tue, 21 Feb 2012 10:50:50 +0000 (10:50 +0000)]
ASoC: wm8994: Enable headphone startup mode 1 for WM1811 and WM8958

The latest recommendation for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: twl4030: Debug code cleanup
Peter Ujfalusi [Tue, 21 Feb 2012 07:34:20 +0000 (09:34 +0200)]
ASoC: twl4030: Debug code cleanup

Replace the printk(KERN_ERR* instances with dev_err in the driver.
While we are here clean up some of the debug messages as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm_hubs: Convert headphone driver to output driver widget
Mark Brown [Tue, 21 Feb 2012 09:36:49 +0000 (09:36 +0000)]
ASoC: wm_hubs: Convert headphone driver to output driver widget

Mostly for neatness, though it may help with sequencing in some
situations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8776: Add WM8775 device ID to the WM8776
Mark Brown [Tue, 21 Feb 2012 09:12:25 +0000 (09:12 +0000)]
ASoC: wm8776: Add WM8775 device ID to the WM8776

The WM8775 is register compatible with the WM8776 so can be supported with
the same driver though it is an ADC only part. Add the device ID to the
WM8776 driver, further updates will be added in the future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4104: Convert to module_spi_driver()
Mark Brown [Fri, 17 Feb 2012 06:50:35 +0000 (22:50 -0800)]
ASoC: ak4104: Convert to module_spi_driver()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: ak4104: Remove uninformative print on probe()
Mark Brown [Fri, 17 Feb 2012 06:50:18 +0000 (22:50 -0800)]
ASoC: ak4104: Remove uninformative print on probe()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoregmap: Allow users to query the size of register values
Mark Brown [Fri, 17 Feb 2012 22:20:14 +0000 (14:20 -0800)]
regmap: Allow users to query the size of register values

Generic infrastructure based on top of regmap may want to operate on
blocks of data and therefore find it useful to find the size of the
register values. Provide an accessor operation for this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: imx/mxs: remove redundant SND_PCM selection
Shawn Guo [Mon, 20 Feb 2012 07:05:24 +0000 (15:05 +0800)]
ASoC: imx/mxs: remove redundant SND_PCM selection

SND_PCM is already selected by SND_SOC, there is no need for
SND_IMX_SOC and SND_MXS_SOC to select it again.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: fsi: Add DMAEngine support
Kuninori Morimoto [Fri, 3 Feb 2012 08:59:33 +0000 (00:59 -0800)]
ASoC: fsi: Add DMAEngine support

This patch supports DMAEngine to FSI driver.
It supports only Tx case at this point.
If platform/cpu doesn't support DMAEngine, FSI driver will
use PIO transfer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
Mark Brown [Mon, 20 Feb 2012 02:35:12 +0000 (18:35 -0800)]
Merge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
resolved below within the FSI driver and allow the application of the
dmaeengine conversion that depends on this resolution.

Linux 3.3-rc4

Conflicts:
sound/soc/sh/fsi.c

12 years agoASoC: Add __devinit annotation for pxa2xx_ac97_probe
Axel Lin [Mon, 20 Feb 2012 00:04:50 +0000 (08:04 +0800)]
ASoC: Add __devinit annotation for pxa2xx_ac97_probe

This fixes below build warning:
WARNING: vmlinux.o(.text+0x1e632c): Section mismatch in reference from the function pxa2xx_ac97_probe() to the function .devinit.text:pxa2xx_ac97_hw_probe()
The function pxa2xx_ac97_probe() references
the function __devinit pxa2xx_ac97_hw_probe().
This is often because pxa2xx_ac97_probe lacks a __devinit
annotation or the annotation of pxa2xx_ac97_hw_probe is wrong.

Also rename pxa_ac97_dai to pxa_ac97_dai_driver to fix below build warning:

  LD      sound/soc/pxa/built-in.o
WARNING: sound/soc/pxa/built-in.o(.data+0x18c): Section mismatch in reference from the variable pxa_ac97_dai to the function .devinit.text:pxa2xx_ac97_probe()
The variable pxa_ac97_dai references
the function __devinit pxa2xx_ac97_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoLinux 3.3-rc4 v3.3-rc4
Linus Torvalds [Sat, 18 Feb 2012 23:53:33 +0000 (15:53 -0800)]
Linux 3.3-rc4

12 years agoMerge tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sat, 18 Feb 2012 23:40:00 +0000 (15:40 -0800)]
Merge tag 'fixes-3.3-rc4' of git://git./linux/kernel/git/arm/arm-soc

These are the bug fixes that have accumulated since 3.3-rc3 in arm-soc.
The majority of them are regression fixes for stuff that broke during
the merge 3.3 window.

The notable ones are:

* The at91 ata drivers both broke because of an earlier cleanup patch that
  some other patches were based on. Jean-Christophe decided to remove
  the legacy at91_ide driver and fix the new-style at91-pata driver while
  keeping the cleanup patch. I almost rejected the patches for being too
  late and too big but in the end decided to accept them because they
  fix a regression.

* A patch fixing build breakage from the sysdev-to-device conversion
  colliding with other changes touches a number of mach-s3c files.

b0654037 "ARM: orion: Fix Orion5x GPIO regression from MPP cleanup"
  is a mechanical change that unfortunately touches a lot of lines
  that should up in the diffstat.

* tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  ARM: at91: drop ide driver in favor of the pata one
  pata/at91: use newly introduced SMC accessors
  ARM: at91: add accessor to manage SMC
  ARM: at91:rtc/rtc-at91sam9: ioremap register bank
  ARM: at91: USB AT91 gadget registration for module
  ep93xx: fix build of vision_ep93xx.c
  ARM: OMAP2xxx: PM: fix OMAP2xxx-specific UART idle bug in v3.3
  ARM: orion: Fix USB phy for orion5x.
  ARM: orion: Fix Orion5x GPIO regression from MPP cleanup
  ARM: EXYNOS: Add cpu-offset property in gic device tree node
  ARM: EXYNOS: Bring exynos4-dt up to date
  ARM: OMAP3: cm-t35: fix section mismatch warning
  ARM: OMAP2: Fix the OMAP2 only build break seen with 2011+ ARM tool-chains
  ARM: tegra: paz00: fix wrong UART port on mini-pcie plug
  ARM: tegra: paz00: fix wrong SD1 power gpio
  i2c: tegra: Add devexit_p() for remove
  ARM: EXYNOS: Correct M-5MOLS sensor clock frequency on Universal C210 board
  ARM: EXYNOS: Correct framebuffer window size on Nuri board
  ARM: SAMSUNG: Fix missing api-change from subsys_interface change
  ARM: EXYNOS: Fix "warning: initialization from incompatible pointer type"
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sat, 18 Feb 2012 23:38:12 +0000 (15:38 -0800)]
Merge git://git./linux/kernel/git/davem/net

1) VETH_INFO_PEER netlink attribute needs to have it's size validated,
   from Thomas Graf.

2) 'poll' module option of bnx2x driver crashes the machine, just remove
   it.  From Michal Schmidt.

3) ks8851_mll driver reads the irq number from two places, but only
   initializes one of them, oops.  Use only one location and fix this
   problem, from Jan Weitzel.

4) Fix buffer overrun and unicast sterring bugs in mellanox mlx4 driver,
   from Eugenia Emantayev.

5) Swapped kcalloc() args in RxRPC and mlx4, from Axel Lin.

6) PHY MDIO device name regression fixes from Florian Fainelli.

7) If the wake event IRQ line is different from the netdevice one, we
   have to properly route it to the stmmac interrupt handler.  From
   Francesco Virlinzi.

8) Fix rwlock lock initialization ordering bug in mac80211, from
   Mohammed Shafi Shajakhan.

9) TCP lost_cnt can get out of sync, and in fact go negative, in certain
   circumstances.  Fix the way we specify what sequence range to operate
   on in tcp_sacktag_one() to fix this bug.  From Neal Cardwell.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
  net/ethernet: ks8851_mll fix irq handling
  veth: Enforce minimum size of VETH_INFO_PEER
  stmmac: update the driver version to Feb 2012 (v2)
  stmmac: move hw init in the probe (v2)
  stmmac: request_irq when use an ext wake irq line (v2)
  stmmac: do not discard frame on dribbling bit assert
  ipheth: Add iPhone 4S
  mlx4: add unicast steering entries to resource_tracker
  mlx4: fix QP tree trashing
  mlx4: fix buffer overrun
  3c59x: shorten timer period for slave devices
  netpoll: netpoll_poll_dev() should access dev->flags
  RxRPC: Fix kcalloc parameters swapped
  bnx2x: remove the 'poll' module option
  tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
  ks8851: Fix NOHZ local_softirq_pending 08 warning
  bnx2x: fix bnx2x_storm_stats_update() on big endian
  ixp4xx-eth: fix PHY name to match MDIO bus name
  octeon: fix PHY name to match MDIO bus name
  fec: fix PHY name to match fixed MDIO bus name
  ...

12 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Linus Torvalds [Sat, 18 Feb 2012 23:37:25 +0000 (15:37 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/broonie/regmap

Fixes a bootstrapping issue for some registers when a less commonly used
method for register cache initialisation is used.  Only affects a fairly
small proportion of users that both don't use explicit register defaults
and do use the cache.

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fix cache defaults initialization from raw cache defaults

12 years agoMerge tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 18 Feb 2012 23:28:56 +0000 (15:28 -0800)]
Merge tag 'ecryptfs-3.3-rc4-fixes' of git://git./linux/kernel/git/tyhicks/ecryptfs

Fixes maximum filename length and filesystem type reporting in statfs() calls
and also fixes stale inode mode bits on eCryptfs inodes after a POSIX ACL was
set on the lower filesystem's inode.

* tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  ecryptfs: remove the second argument of k[un]map_atomic()
  eCryptfs: Copy up lower inode attrs after setting lower xattr
  eCryptfs: Improve statfs reporting

12 years agoMerge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
Linus Torvalds [Sat, 18 Feb 2012 23:27:40 +0000 (15:27 -0800)]
Merge tag 'pinctrl' of git://git./linux/kernel/git/linusw/linux-pinctrl

pinctrl fixes for v3.3

* tag 'pinctrl-for-torvalds-20120216' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: restore pin naming

12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 18 Feb 2012 23:26:37 +0000 (15:26 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Here are a few more fixes for powerpc.  Some are regressions, the rest
is simple/obvious/nasty enough that I deemed it good to go now.

Here's also step one of deprecating legacy iSeries support: we are
removing it from the main defconfig.

Nobody seems to be using it anymore and the code is nasty to maintain,
(involves horrible hacks in various low level areas of the kernel) so we
plan to actually rip it out at some point.  For now let's just avoid
building it by default.  Stephen will proceed to do the actual removal
later (probably 3.4 or 3.5).

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events
  powerpc/adb: Use set_current_state()
  powerpc: Disable interrupts early in Program Check
  powerpc: Remove legacy iSeries from ppc64_defconfig
  powerpc/fsl/pci: Fix PCIe fixup regression
  powerpc: Fix kernel log of oops/panic instruction dump

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Linus Torvalds [Sat, 18 Feb 2012 23:26:11 +0000 (15:26 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci

One regression fix for SR-IOV on PPC and a couple of misc fixes from
Yinghai.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
  PCI: Fix pci cardbus removal
  PCI: set pci sriov page size before reading SRIOV BAR
  PCI: workaround hard-wired bus number V2

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 18 Feb 2012 23:25:39 +0000 (15:25 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

3 radeon fixes, I have some exynos fixes to push later but I'll queue
them separately once I've looked them over a bit.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon/kms: fix MSI re-arm on rv370+
  drm/radeon/kms/atom: bios scratch reg handling updates
  drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 18 Feb 2012 23:24:05 +0000 (15:24 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: sha512 - use standard ror64()

12 years agoi387: re-introduce FPU state preloading at context switch time
Linus Torvalds [Sat, 18 Feb 2012 20:56:35 +0000 (12:56 -0800)]
i387: re-introduce FPU state preloading at context switch time

After all the FPU state cleanups and finally finding the problem that
caused all our FPU save/restore problems, this re-introduces the
preloading of FPU state that was removed in commit b3b0870ef3ff ("i387:
do not preload FPU state at task switch time").

However, instead of simply reverting the removal, this reimplements
preloading with several fixes, most notably

 - properly abstracted as a true FPU state switch, rather than as
   open-coded save and restore with various hacks.

   In particular, implementing it as a proper FPU state switch allows us
   to optimize the CR0.TS flag accesses: there is no reason to set the
   TS bit only to then almost immediately clear it again.  CR0 accesses
   are quite slow and expensive, don't flip the bit back and forth for
   no good reason.

 - Make sure that the same model works for both x86-32 and x86-64, so
   that there are no gratuitous differences between the two due to the
   way they save and restore segment state differently due to
   architectural differences that really don't matter to the FPU state.

 - Avoid exposing the "preload" state to the context switch routines,
   and in particular allow the concept of lazy state restore: if nothing
   else has used the FPU in the meantime, and the process is still on
   the same CPU, we can avoid restoring state from memory entirely, just
   re-expose the state that is still in the FPU unit.

   That optimized lazy restore isn't actually implemented here, but the
   infrastructure is set up for it.  Of course, older CPU's that use
   'fnsave' to save the state cannot take advantage of this, since the
   state saving also trashes the state.

In other words, there is now an actual _design_ to the FPU state saving,
rather than just random historical baggage.  Hopefully it's easier to
follow as a result.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoi387: move TS_USEDFPU flag from thread_info to task_struct
Linus Torvalds [Sat, 18 Feb 2012 05:48:54 +0000 (21:48 -0800)]
i387: move TS_USEDFPU flag from thread_info to task_struct

This moves the bit that indicates whether a thread has ownership of the
FPU from the TS_USEDFPU bit in thread_info->status to a word of its own
(called 'has_fpu') in task_struct->thread.has_fpu.

This fixes two independent bugs at the same time:

 - changing 'thread_info->status' from the scheduler causes nasty
   problems for the other users of that variable, since it is defined to
   be thread-synchronous (that's what the "TS_" part of the naming was
   supposed to indicate).

   So perfectly valid code could (and did) do

ti->status |= TS_RESTORE_SIGMASK;

   and the compiler was free to do that as separate load, or and store
   instructions.  Which can cause problems with preemption, since a task
   switch could happen in between, and change the TS_USEDFPU bit. The
   change to TS_USEDFPU would be overwritten by the final store.

   In practice, this seldom happened, though, because the 'status' field
   was seldom used more than once, so gcc would generally tend to
   generate code that used a read-modify-write instruction and thus
   happened to avoid this problem - RMW instructions are naturally low
   fat and preemption-safe.

 - On x86-32, the current_thread_info() pointer would, during interrupts
   and softirqs, point to a *copy* of the real thread_info, because
   x86-32 uses %esp to calculate the thread_info address, and thus the
   separate irq (and softirq) stacks would cause these kinds of odd
   thread_info copy aliases.

   This is normally not a problem, since interrupts aren't supposed to
   look at thread information anyway (what thread is running at
   interrupt time really isn't very well-defined), but it confused the
   heck out of irq_fpu_usable() and the code that tried to squirrel
   away the FPU state.

   (It also caused untold confusion for us poor kernel developers).

It also turns out that using 'task_struct' is actually much more natural
for most of the call sites that care about the FPU state, since they
tend to work with the task struct for other reasons anyway (ie
scheduling).  And the FPU data that we are going to save/restore is
found there too.

Thanks to Arjan Van De Ven <arjan@linux.intel.com> for pointing us to
the %esp issue.

Cc: Arjan van de Ven <arjan@linux.intel.com>
Reported-and-tested-by: Raphael Prevost <raphael@buro.asia>
Acked-and-tested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoASoC: soc-core: Show the returned values on error messages
Fabio Estevam [Fri, 17 Feb 2012 21:40:38 +0000 (19:40 -0200)]
ASoC: soc-core: Show the returned values on error messages

Showing the returned values on error messages is useful information.

While at it, use pr_err/pr_warn whenever possible.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Make sure we bounce /RESET to reset
Mark Brown [Fri, 17 Feb 2012 21:12:21 +0000 (13:12 -0800)]
ASoC: wm8996: Make sure we bounce /RESET to reset

While it matches the current code only bringing the device out of reset
isn't actually doing what the function says so make sure we set the GPIO
high before we pull it low.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8996: Convert to module_i2c_driver()
Mark Brown [Fri, 17 Feb 2012 06:44:04 +0000 (22:44 -0800)]
ASoC: wm8996: Convert to module_i2c_driver()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8993: Convert to module_i2c_driver()
Mark Brown [Fri, 17 Feb 2012 06:43:52 +0000 (22:43 -0800)]
ASoC: wm8993: Convert to module_i2c_driver()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: wm8962: Convert to module_i2c_driver()
Mark Brown [Fri, 17 Feb 2012 06:43:39 +0000 (22:43 -0800)]
ASoC: wm8962: Convert to module_i2c_driver()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: dapm: Only mark pin widgets as dirty if we actually change state
Mark Brown [Thu, 16 Feb 2012 19:50:07 +0000 (11:50 -0800)]
ASoC: dapm: Only mark pin widgets as dirty if we actually change state

Small optimisation for noop state updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: wm8994: Convert to use DAI widget routing rather than streams
Mark Brown [Fri, 17 Feb 2012 05:43:29 +0000 (21:43 -0800)]
ASoC: wm8994: Convert to use DAI widget routing rather than streams

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Convert stream events to use DAI widgets
Mark Brown [Fri, 17 Feb 2012 03:43:20 +0000 (19:43 -0800)]
ASoC: dapm: Convert stream events to use DAI widgets

This means we don't need to walk through every single widget in the system
for each stream event which is a bit less silly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Implement and instantiate DAI widgets
Mark Brown [Fri, 17 Feb 2012 03:37:51 +0000 (19:37 -0800)]
ASoC: dapm: Implement and instantiate DAI widgets

In order to allow us to do smarter things with DAI links create DAPM
widgets which directly represent the DAIs in the DAPM graph. These are
automatically created from the DAIs as we probe the card with references
held in both directions between the widget and the DAI.

The widgets are not made available for direct instantiation by drivers,
they are created automatically from the DAIs.  Drivers should be updated
to create stream routes using DAPM maps rather than by annotating AIF
and DAC widgets with streams.

In order to ease transition to this model from existing drivers we
automatically create DAPM routes between the DAI widgets and the existing
stream widgets which are started and stopped by the DAI widgets, though
the old stream handling mechanism is still in place.  This also has the
nice effect of removing non-DAPM devices as any device with a DAI
acquires a widget automatically which will allow future simplifications
to the core DAPM logic.

The intention is that in future the AIF and DAI widgets will gain the
ability to interact such that we are able to manage activity on
individual channels independantly rather than powering up and down the
entire AIF as we do currently.

Currently we only generate these for CODECs, mostly as I have no systems
with non-CODEC DAPM to integrate with. It should be a simple matter of
programming to add the additional hookup for these.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Constify lots of names that are never modified
Mark Brown [Fri, 17 Feb 2012 01:07:42 +0000 (17:07 -0800)]
ASoC: dapm: Constify lots of names that are never modified

Neater and avoids warnings when used in other places where const strings
are desired.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Supply the DAI and substream when calling stream events
Mark Brown [Thu, 16 Feb 2012 23:03:27 +0000 (15:03 -0800)]
ASoC: dapm: Supply the DAI and substream when calling stream events

In order to allow us to do something smarter than iterate through widgets
doing strcmp() to work out what to power up for stream events change the
interface used to generate them to be based on the combination of a DAI
and a stream direction rather than just a simple string identifying the
stream.

At some point we'll probably want a set of channels too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Refactor snd_soc_dapm_new_widget() to return the widget
Mark Brown [Thu, 16 Feb 2012 19:07:13 +0000 (11:07 -0800)]
ASoC: dapm: Refactor snd_soc_dapm_new_widget() to return the widget

Let the caller fiddle with the widget after we're done in order to
facilitate further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
12 years agoASoC: dapm: Unexport snd_soc_dapm_new_control()
Mark Brown [Thu, 16 Feb 2012 19:02:11 +0000 (11:02 -0800)]
ASoC: dapm: Unexport snd_soc_dapm_new_control()

Everything now uses snd_soc_dapm_new_controls() instead so we don't need
to make it part of the external API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>