Commit graph

4714 commits

Author SHA1 Message Date
Mark Brown
29fdc3605c 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>
2012-02-21 10:57:47 +00:00
Peter Ujfalusi
3b8a079516 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>
2012-02-21 09:58:47 +00:00
Mark Brown
26422625d5 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>
2012-02-21 09:52:09 +00:00
Mark Brown
fdd48f9d19 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>
2012-02-21 09:13:59 +00:00
Mark Brown
38d78bafb9 ASoC: ak4104: Convert to module_spi_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:01:01 +00:00
Mark Brown
65b30bee58 ASoC: ak4104: Remove uninformative print on probe()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:00:54 +00:00
Shawn Guo
cbdfb661ff 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>
2012-02-20 07:45:43 -08:00
Kuninori Morimoto
7da9ced606 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>
2012-02-19 18:36:16 -08:00
Mark Brown
fa2c8f4017 Linux 3.3-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPQDoTAAoJEHm+PkMAQRiGMpYH/ibfyIFBrKMD1v/s9oNvp8rS
 c7J7E7mHZOylCHrpIS3lX3ZbOfOe33Ln0Z59f1/TcV4CMMz0NrKYcTC8erj/H/DA
 8DRYegiczWKqiXRgktwaZXkJcwXYdOOL1WQYxuzzbZcwRrNBY2QpH7Zu8Bj+TPAy
 d4fvJHWdlh4sbWVdQmLRbp04UB9J/Z5/uWmSNvVQjLLdRlD+mEBbt7JjiNY6sUVC
 2sJoAs9F3UlHu7VaN+JIhMOGZ3GqOpHGBxN/aWxJ/7GsXdXuAfCrxoPxaAe4xzOa
 HndN5ZDyg02Vy5uDeUzj+HJPW3M8L4Q0nwxAYb3ZnQ5tbpu1Q2cHfIBealomWCQ=
 =R91X
 -----END PGP SIGNATURE-----

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
2012-02-19 18:35:12 -08:00
Axel Lin
a387419612 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>
2012-02-19 18:13:02 -08:00
Fabio Estevam
0837fc6243 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>
2012-02-17 13:51:01 -08:00
Mark Brown
d5a7f23f9c 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>
2012-02-17 13:50:51 -08:00
Mark Brown
8005f394ab ASoC: wm8996: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:40 -08:00
Mark Brown
7813561a39 ASoC: wm8993: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:39 -08:00
Mark Brown
9d50a764b5 ASoC: wm8962: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:36 -08:00
Mark Brown
1a8b2d9d5b 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>
2012-02-17 08:10:33 -08:00
Mark Brown
5567d8c621 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>
2012-02-17 08:10:28 -08:00
Mark Brown
fe360685f9 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>
2012-02-17 08:10:21 -08:00
Mark Brown
888df395eb 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>
2012-02-17 08:10:10 -08:00
Mark Brown
3056557f3b 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>
2012-02-17 08:10:06 -08:00
Mark Brown
7bd3a6f34c 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>
2012-02-17 08:10:01 -08:00
Mark Brown
5ba06fc969 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>
2012-02-17 08:09:56 -08:00
Mark Brown
ce0e9f0ede 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>
2012-02-17 08:09:52 -08:00
Axel Lin
059ad76028 ASoC: Change spitz_ext_control to take dapm as argument.
This fixes below build warning:
  CC      sound/soc/pxa/spitz.o
sound/soc/pxa/spitz.c: In function 'spitz_startup':
sound/soc/pxa/spitz.c:116: warning: passing argument 1 of 'spitz_ext_control' from incompatible pointer type
sound/soc/pxa/spitz.c:47: note: expected 'struct snd_soc_card *' but argument is of type 'struct snd_soc_codec *'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:09:33 -08:00
Mark Brown
a1fa92130c ASoC: ak4535: Convert to direct regmap API usage
I suspect the timer register may also be volatile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown
7e11a53516 ASoC: ak4535: Remove bitrotted driver version
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown
b08c576434 ASoC: ak4535: Make I2C usage unconditional
Convert to module_i2c_driver() too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown
d69280be41 ASoC: ak4535: Remove -codec from driver name
Redundant, the device is only a CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown
d23031a4d3 ASoC: wm8962: Convert to runtime PM for bias off management
This allows userspace control of final power off, allowing policy decisions
for register configuration retention.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:04 -08:00
Mark Brown
a968d9db3b ASoC: wm8962: Don't automatically enable and disable FLL
Only enable and disable the FLL when explicitly told to, supporting some
additional use cases and making the driver behaviour more standard.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:03 -08:00
Mark Brown
5aa9b858ef ASoC: wm8962: Clean up register dump cruft
No longer needed with regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown
07fabd1bfb ASoC: wm8962: Add new SYSCLK ratios for new device revisions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown
eeba1f8b6a ASoC: wm8962: Log the selected SYSCLK ratio
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:01 -08:00
Mark Brown
1993502d24 ASoC: wm8962: Only configure BCLK in hw_params when audio is active
Otherwise we might not have a sensible clocking setup ready.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:00 -08:00
Mark Brown
71de4d27c8 ASoC: wm8962: Update the clocking when setting system clock
Make sure we update for any changes in cases where we reconfigure while
live (eg, for analogue bypass).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:31:59 -08:00
Liam Girdwood
0e66821f63 ASoC: spitz: Fix kcontrols to use card instead of codec
Machine kcontrols now use card instead of codec for thier "chip".

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 08:24:40 -08:00
Axel Lin
905b41956c ASoC: Show device id in the debug message
Show the id we read when the id mismatch is detected.
This is useful for debugging.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 22:19:55 -08:00
Axel Lin
916be22c15 ASoC: Get correct revision id for wm2200
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 18:18:56 -08:00
Sebastien Guiriec
731f1ab290 ASoC: core: add platform DAPM debugfs support
Allow platform widgets to be visible in debugfs like codec widgets.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 08:05:18 -08:00
Mark Brown
48a8c3943d ASoC: dapm: Convert pin switches to use snd_soc_card
Since the addition of the non-CODEC control adds card controls like the
DAPM pin switch have been broken as they are expecting the private data
for the control to be the CODEC but it's now the card. Fix that for the
pin switches, an audit of other drivers is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-15 08:01:31 -08:00
Liam Girdwood
64e60f9f9e ASoC: core: Convert CODEC debugfs init to use dev_warn()
Update the codec debugfs initialisation to use dev_warn() instead of
printk(KERN_WARNING).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:59:04 -08:00
Liam Girdwood
8078d87f9d ASoC: dapm: Notify stream event to all card components.
Currently when DAPM widgets are power sequenced the stream_event()
completion callback is only called for the stream_event originator
DAPM context. Other components in the card may also be interested so
make sure they are also notified of any widget power events.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Liam Girdwood
6c120e19fa ASoC: dapm - Make DAPM reset code a separate function.
It's useful to export the DAPM reset as a static function for future use
by other DAPM functions. e.g. The dynamic PCM query widgets resets the DAPM
graph before working out active paths.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Mark Brown
65f01ef09e ASoC: wm8994: Use slow start for VMID
Improves performance on power up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:17 -08:00
Mark Brown
da157875cd ASoC: wm9081: Use idle_bias_off
The main role of the WM9081 is as a class D speaker amplifier so there
is no concern about pops. There are also very few registers and a fast
power up time so we can happily mark the driver as idle_bias_off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:06 -08:00
Mark Brown
68fcde97e4 ASoC: wm9081: Move WM9081 IRQ platform data handling into I2C probe
Better style and better supports idle_bias_off which we're going to
implement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:05 -08:00
Mark Brown
1f5cafb2c8 ASoC: wm8988: Remove unneded -codec from driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:22 -08:00
Mark Brown
d2dc0a7782 ASoC: wm8988: Convert to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:21 -08:00
Mark Brown
2dbc34d827 ASoC: wm9081: Use module_i2c_driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:01 -08:00
Leon Romanovsky
dd7d3a2417 ASoC: tegra+alc5632: Added digital microphone DAPM widget.
ALC5632 codec supports digital microphone. This patch adds DAPM widget.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:37:35 -08:00