Commit Graph

4909 Commits

Author SHA1 Message Date
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 31794bc37b ASoC: wm8962: Fix sidetone enumeration texts
The sidetone enumeration texts have left and right swapped.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-14 13:54:45 -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
Mark Brown e85b26ce3a ASoC: wm8994: Actively discharge VMID when not in use
Ensure we're in a known state when we restart.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:22 +00:00
Mark Brown cc6d5a8c2b ASoC: wm8994: VMID management improvements
Raise the ramp time to 50ms to cover corner cases, use the startup bias
generator, explicitly reset the ramp circuit when complete and reorder
things all of which should improve performance somewhat for systems that
are sensitive to noise from VMID.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:21 +00:00
Mark Brown d60d6c3b65 ASoC: wm_hubs: Clamp inputs to VMID while we ramp
Reduces the amount of time taken to stabilise them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:21 +00:00
Mark Brown 5f2f389040 ASoC: wm_hubs: Improve single ended line output enable performance
The enable of the single ended line outputs on wm_hubs devices performs
better if the output is enabled prior to starting VMID. Since inactive
outputs are held at VMID anyway there is little cost to doing this for
unused outputs. Add callbacks into wm_hubs and keep track of which outputs
are really active so we can disable them once we're active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:20 +00:00
Andrey Danin 0f613c21d6 ASoC: alc5632: Allow 8kHz stream support.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Paul Fertser 5148aed229 ASoC: alc5632: Fix Capture/Playback attributes for microphone inputs
According to the mixer path diagram input sources' attenuators logically
belong to the playback path and DMIC boost only affects capture.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Paul Fertser abb015be83 ASoC: alc5632: Fix Boost Volume TLVs used for the external microphones
This brings the TLVs in sync with the documentation and allows to properly
manipulate mic boost controls with alsamixer.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:48 +00:00
Marc Dietrich 2435d46fe6 ASoC: alc5632: Connect HP/HPL/HPR mix'es to HPOut Mix
This patch should fix output through speakers using HP mixer.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 9e75177901 ASoC: alc5632: Fix I2S digital interface power for recording
Fix I2S digital interface power for recording.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 5e4e94a958 ASoC: alc5632: Add DMIC switches and controls
Add DMIC switches and controls to ALC5632 codec.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 75b3566f79 ASoC: alc5632: Refactored DAPM routes to add voice support
Refactored DAPM routes to add voice support.

- Added undocumented register
- Used AIF in/out
- Added missed voice items and routes
- Added DMIC input
- Romoved unrelevant items

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin 6002c22319 ASoC: alc5632: Remove unexisting route from Phone Mix to Mono Mix
There is no Phone Mix<->Mono Mix route in datasheet.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:02:47 +00:00
Andrey Danin a15a9af288 ASoC: alc5632: Rename capture switches to common scheme XXX2REC
Rename capture switches to common scheme XXX2REC.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 0a2c056e55 ASoC: alc5632: Add voice DAC playback switch
Add voice DAC playback switch.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 39be1aff50 ASoC: alc5632: Fixed voice DAC volume step.
Remove extra zero from volume step in DECLARE_TLV_DB_SCALE macro.

Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:54 +00:00
Andrey Danin 7fb7528acb ASoC: alc5632: Coding style. Remove two extra empty lines.
Signed-off-by: Andrey Danin <danindrey@mail.ru>
Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 22:55:53 +00:00
Mark Brown b803422979 ASoC: wm8993: Add register default for INPUTS_CLAMP
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 20:51:53 +00:00
Julia Lawall 830eb8767d ASoC: mxs-saif: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 20:21:05 +00:00
Mark Brown e2da26778c ASoC: wm8993: Correct typos in regmap conversion
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 18:10:30 +00:00
Axel Lin 625136eb4a ASoC: Fix build error in sound/soc/omap/n810.c
Fix below build error which is introduced by
commit 022658 "ASoC: core: Add support for DAI and machine kcontrols".

  CC [M]  sound/soc/omap/n810.o
sound/soc/omap/n810.c: In function 'n810_set_input':
sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this function)
sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported only once
sound/soc/omap/n810.c:194: error: for each function it appears in.)
sound/soc/omap/n810.c:188: warning: unused variable 'card'
make[3]: *** [sound/soc/omap/n810.o] Error 1
make[2]: *** [sound/soc/omap] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-10 11:38:00 +00:00
Masanari Iida 1f5ff88327 ASoC: Fix typo in twl4030.c
Correct spelling "memroy" to "memory" in
sound/soc/codecs/twl4030.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 23:03:52 +00:00
Mark Brown a08a499aa3 Linux 3.3-rc3
.. the number of the half-beast?
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPMzv8AAoJEHm+PkMAQRiGgeYIAJxxGCxSMLRIiPaGRmQbWifs
 eE3z6AUWitGfYvhmYdWVz+C/aa4pPCVWr3bAFxUQhu+ESmiFIiqiefvlTRf5f84e
 pcoJFobkFfhtK4gLvUr75WxXDFq/1HhKqW1OLzIW4gQsnhMdjGJ3lLK6ZoRYH8h4
 cGoN3DRII9mVLFcB2sgbeRvbQBA/O4n0aOQ2ryZkCcPQQMIKhR/rUEEV2pe/ovHE
 rumQgI3PVey816P4e5YnOvrEAllFZlaZ/F0ClJgNdfeQCVTZx9KNRbiNxHi6fcC5
 6Zgg7e5EvQTAy7QqQZ0hmS4k4CFmnswX3Nm+ZabRNqBdLSjPEDD9hk1o1dodYCg=
 =BBLC
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc3' as we've got several bugfixes in there which are
colliding annoyingly with development.

Linux 3.3-rc3

.. the number of the half-beast?

Conflicts:
	sound/soc/codecs/wm5100.c
	sound/soc/codecs/wm8994.c
2012-02-09 12:00:22 +00:00
Kuninori Morimoto 1987877d86 ASoC: fsi: fixup fsi_pointer() calculation method
current fsi_pointer() calculation was not correct for FSI driver.
This patch fix it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 10:50:53 +00:00
Mark Brown 17c0cee96f ASoC: wm2200: Ignore pmdown_time
The device is generally not succeptible to the issues that cause this to
be an issue.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-09 10:43:15 +00:00
Mark Brown a5d3a21a9a ASoC: twl6040: Move ignore_pmdown_time to driver struct
It's set unconditionally.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2012-02-09 10:43:10 +00:00
Mark Brown 5124e69e2b ASoC: core: Allow CODECs to set ignore_pmdown_time in the driver struct
This is usually not a use case dependant flag anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-09 10:42:56 +00:00
Mark Brown b5d1d036ea ASoC: pcm: If pmdown_time is zero then shut down DAPM immediately
Since we've already got logic to special case immediate teardown of the
stream we may as well use it if the pmdown_time has been set to zero by
the application layer instead of scheduling a work item with zero delay.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-09 10:42:55 +00:00
Mark Brown a7c4183be2 ASoC: wm8994: Disable line output discharge prior to ramping VMID
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-08 19:52:00 +00:00
Mark Brown f647e1526f ASoC: wm8994: Fix typo in VMID ramp setting
The VMID ramp rate is supposed to be 0x3, not 11b. Fix that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-08 19:51:53 +00:00
Mark Brown 4c6c0b5eee ASoC: wm8962: Support mono playback and record
Make sure we generate enough BCLKs for I2S style modes by always having
a minimum of two channels worth of clocks for the BCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-08 19:49:54 +00:00
Axel Lin 6d6761aa9b ASoC: Convert kirkwood-openrd to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:40:53 +00:00
Axel Lin 49915a54f0 ASoC: Convert kirkwood-t5325 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:40:52 +00:00
Mark Brown dc9c745437 ASoC: wm_hubs: Convert most output drivers to OUT_DRV widgets
No practical impact but now we have the control type we may as well use
it for the slightly nicer sequencing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07 19:03:00 +00:00
Mark Brown 6035bbcfc0 ASoC: tlv320aic3x: Remove even more unused code
Now that we're not implementing GPIO or microphone detection support
there's no users for the read() function any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2012-02-07 11:17:58 +00:00
Mark Brown 87092e3ca4 ASoC: wm8994: Bring WM8994 accessory detection up to date
Make the mechanism used for WM8994 more like that for WM1811 and WM8958:
provide the logic to distinguish between headphone and headset and hard
code the reporting of sensible SND_JACK values. Should integration with
other detection mechanisms be required we can add appropriate callbacks
(though some integrations should be able to use the subsystem ones).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:19 +00:00
Mark Brown 27060b3c64 ASoC: wm8994: Unsuspend the device while reading GPIO statuses
Otherwise we might get an error if the GPIO is configured as an input
since that makes the register volatile and a suspended device can't be
read from.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:18 +00:00
Mark Brown 5fab517476 ASoC: wm8994: We don't need to runtime resume by default
This is the default state that the runtime PM infrastructure expects so
instead just kick the runtime PM core to suspend us if we're not doing
anything (as is default).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 19:06:01 +00:00
Liam Girdwood 14ac91126b ASoC: max9768: Fix build and use new add control API.
Fix build breakage by using the correct API call to add kcontrols.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:52:16 +00:00
Felipe Contreras 24cace30c5 ASoC: tlv320aic3x: remove unused code
Looks like nobody is or will be using this code.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:44:50 +00:00
Liam Girdwood 612a3fec21 ASoC: dapm: Clean up header information.
Fix some spelling mistakes in the header and remove the todo items. Most
todo items are now available as kcontrol options now anyway.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:36:15 +00:00
Liam Girdwood 40f02cd9f2 ASoC: dapm: Export mixer|mux_update_power() to public API.
Allow for the operation of custom mixer and mux DAPM widgets that can call
snd_soc_dapm_mixer_update_power() and snd_soc_dapm_mux_update_power() directly
after updating their status. This is useful with complex DAPM Mixer operations
where we need to do additional work in addition to setting a few mixer register
bits.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 16:17:01 +00:00
Mark Brown 839e5fadc6 ASoC: wm8994: Don't bring up to STANDBY by default
In cases where we should enter STANDBY DAPM will power us up, otherwise
there is no need to power up and we can remain in OFF.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 14:05:27 +00:00
Mark Brown 654a28c9dc ASoC: samsung: Enable accessory detect for WM8994 on Littlemill
The WM8994 has a different accessory detect architecture, call its setup
function too. We ignore the errors and the driver will check for chip type
so it's safe to call the setup functions for both architectures.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-06 14:04:51 +00:00
Mark Brown db966f8abb ASoC: wm8994: Enabling VMID should take a runtime PM reference
We can enable VMID independently of the bias in some use cases so we need
to ensure that the core device is powered up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-06 12:08:33 +00:00
Liam Girdwood 022658beab ASoC: core: Add support for DAI and machine kcontrols.
Currently ASoC can only add kcontrols using codec and platform component device
handles. It's also desirable to add kcontrols for DAIs (i.e. McBSP) and for
SoC card machine drivers too. This allows the kcontrol to have a direct handle to
the parent ASoC component DAI/SoC Card/Platform/Codec device and hence easily
get it's private data.

This change makes snd_soc_add_controls() static and wraps it in the folowing
calls (card and dai are new) :-

snd_soc_add_card_controls()
snd_soc_add_codec_controls()
snd_soc_add_dai_controls()
snd_soc_add_platform_controls()

This patch also does a lot of small mechanical changes in individual codec drivers
to replace snd_soc_add_controls() with snd_soc_add_codec_controls().

It also updates the McBSP DAI driver to use snd_soc_add_dai_controls().

Finally, it updates the existing machine drivers that register controls to either :-

1) Use snd_soc_add_card_controls() where no direct codec control is required.
2) Use snd_soc_add_codec_controls() where there is direct codec control.

In the case of 1) above we also update the machine drivers to get the correct
component data pointers from the kcontrol (rather than getting the machine pointer
via the codec pointer).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-04 12:40:11 +00:00
Kuninori Morimoto 83344027ca ASoC: fsi: add .init/.quit handler support
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto fec691e73b ASoC: fsi: PortA/B information was controlled by sh_fsi_port_info
Current FSI got each PortA/B parameter by porta_flags/portb_flags from platform.
And .set_rate function was shared for PortA/B.
This structure was not readable and not flexible.
This patch adds sh_fsi_port_info, and its own settings was added on each platform.
it is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 97df81873e ASoC: fsi: fsi_stream_is_working() care substream->runtime
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 180346ede3 ASoC: fsi: add .start_stop handler to fsi_stream_handler
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 938e2a8da5 ASoC: fsi: don't use is_play as a parameter of fsi functions
is_play should be kept as local valuable.
it prepare cleanup for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:40 +00:00
Kuninori Morimoto 1b0ca1a0c0 ASoC: fsi: tidyup: fsi_pio_xxx() are gathered
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 5e97313ac4 ASoC: fsi: add fsi_stream_handler and PIO handler
This patch adds struct fsi_stream_handler and defined fsi_pio_push/pop_handler.
these are controled by fsi_steam_xxx() function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 7b1b3331e6 ASoC: fsi: use fsi_stream in fsi_get_current_fifo_samples() parameter
fsi_get_current_fifo_samples() uses fsi_stream instead of is_play.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto a449e46754 ASoC: fsi: re-define fsi_is_play() and fsi_stream_is_play()
This patch re-define fsi_is_play() and fsi_stream_is_play().
fsi_data_pop/push() function keeps direct value of "is_play" at this point,
but it will be removed soon.
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 95b0cf0597 ASoC: fsi: modify fsi_pio_get_area() parameter and using position
This patch modify fsi_pio_get_area() parameter to use
struct fsi_stream, and used it on fsi_fifo_data_ctrl().
This is just prepare cleanup for DMAEngine support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 8c4152951c ASoC: fsi: rename fsi_stream_push/pop() to fsi_stream_init/quit()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:39 +00:00
Kuninori Morimoto 41bba15193 ASoC: fsi: remove unnecessary parameter from fsi_hw_shutdown()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto b49e802781 ASoC: fsi: tidyup: move fsi_fifo_init() onto fsi_hw_startup()
fsi_fifo_init() is called only from fsi_hw_startup()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto d78629e2a4 ASoC: fsi: rename fsi_dma_soft_xxx() to fsi_pio_xxx()
This is preparation for DMAEngine support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto 376cf38a90 ASoC: fsi: data push/pop calculation part was divided
Next transfer data size of "push" and "pop" had calculated on shared function.
But it was not readable code.
This patch divided it into for push, and for pop.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto 4e62d84d9d ASoC: fsi: tidyup: fsi_stream_xx() functions were gathered
This patch gathered fsi_stream_xxx() functions in order to make it readable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Kuninori Morimoto c1e6f10ea9 ASoC: fsi: reduce runtime calculation by using pre-setting
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-03 11:55:38 +00:00
Leon Romanovsky 9f71770b88 ASoC: tegra: Remove unused DAPM route structure.
All DAPM routes are configured via device tree, and there is no need in
DAPM route structures in board file.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02 22:27:52 +00:00
Leon Romanovsky d559f1e5ad ASoC: Tegra+ALC5632: Enable headset autodetection on PAZ00 board.
This patch is adding device tree support of headset autodetection on PAZ00 board.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-02 22:27:52 +00:00
Mark Brown 25bfe662e8 ASoC: pcm: Improve error logging
Use the standard logging macros and use dev_ variants where we can, also
reporting error codes whenever we report an error. These changes (the
error codes in particular) make it noticeably easier to figure out what
went wrong just from the basic dmesg output.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-02 14:14:17 +00:00
Mark Brown 43b6cec27e ASoC: wm_hubs: Correct line input to line output 2 paths
The second line output mixer has the controls for the line input bypasses
in the opposite order.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-01 23:55:56 +00:00
Axel Lin bc6c117ef0 ASoC: Convert afeb9260 to table based DAPM init
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 21:52:54 +00:00
Axel Lin 5813db970d ASoC: Use dai_fmt in afeb9260 machine driver
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 21:52:54 +00:00
Lars-Peter Clausen 980b0bc692 ASoC: blackfin: Use dai_fmt
Use the dai_link's dai_fmt attribute to setup the DAI format instead of doing
this manually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 18:29:19 +00:00
Mark Brown 471280b715 ASoC: wm9712: Add TLV information for microphone input
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 12:54:12 +00:00
Mark Brown f3bafaa096 ASoC: wm9712: Remove driver specific version
I don't think it's been updated since the driver was merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 12:54:12 +00:00
Axel Lin 44bed4838d ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master mode
For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:42:24 +00:00
Mark Brown 2633f73647 ASoC: wm5100: Handle failures to determine accessory polarity
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:31:12 +00:00
Mark Brown 24e0c57b8e ASoC: wm8996: Use devm_regulator_bulk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:17:34 +00:00
Mark Brown 4a086e4cc4 ASoC: wm8996: Switch to using common code for managing CPVDD supply
Nice code saving.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01 10:17:24 +00:00
Mark Brown 177f72fd10 Linux 3.3-rc2
.. several days delayed. No reason, I just didn't think of it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPKF4KAAoJEHm+PkMAQRiGw/YH+wXg2DpZUuHeBK52zMGlJBPc
 DzX11/Uan3Y07gM0JbDzuVxwjX4vdxR2bV6r1qsLP8JEUnE8jyFC32DBGi5WAht7
 F4KU/Uov2Ds5/wzvY4Iuo01C+JftQHXuy/Sbhck1d0LI0yjLejRaw+zuJv0x2/eS
 7YqV+KTGE1lDuJs/Gyq1Vqr1g9831AuS1tv/g3gaqBuN6TcPBFCocaVxzwrUc+y6
 94h26XbbOhQRIz38oqUkiqAGnvYS61ocyBcEiRHf0dXkNSDIINqlgukvd7YTXouA
 jj/w/DWpMRcQuYAgqkrurr9+yWC9hVQcsvvQ5sAQnIPcxoR868sg1pO8Oheq+1g=
 =kUzV
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc2' into for-3.4

A reasonable amount of new development is causing fiddly merge conflicts
between different resource management changes (mostly fixing bugs in
resource management due to noticing things while doing enhancements in
the same area).

Linux 3.3-rc2

.. several days delayed. No reason, I just didn't think of it.
2012-02-01 10:08:15 +00:00
Susan Gao 2b6712b195 ASoC: wm8962: Fix word length configuration
Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-02-01 10:07:20 +00:00
Leon Romanovsky b4dc0a75af ASoC: Tegra+ALC5632: Implement device tree support in board file
This patch implements device tree support for Tegra boards with ALC5632
codec.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 19:34:48 +00:00
Mark Brown f959dee9c7 ASoC: wm_hubs: Push check for idle_bias_off out into drivers
For later wm_hubs devices we have much less need to keep the biases up
even when using single ended line outputs so flag idle_bias_off for
everything except the WM8993 and WM8994.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 19:29:58 +00:00
Mark Brown 5aa44b132e ASoC: core: Support suspend to disk
Use the same pm_ops for all system suspend and resume paths. This isn't
ideal for suspend to disk with older CODECs as we'll suspend and then
resume the CODEC before powering off all of which takes a long time due
to VMID ramps but it's very simple to implement and for modern CODECs the
overhead should be minimal.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-31 19:29:37 +00:00
Mark Brown 125a25da57 ASoC: core: Better support for idle_bias_off suspend ignores
If an idle_bias_off device is in any state other than off then it is still
active for some reason (typically a low power function such as accessory
detection). This wasn't an issue when the feature was implemented as we
always went to _ON for any active function, subsequent power improvements
have changed things.

With the modern way of doing things we should overhaul the infrastructure
to allow devices to explicitly take references for these functions but
that's a much more invasive change and will require driver updates to
deploy, this will bring the framework into line with the existing driver
set before we do that work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-31 19:29:07 +00:00
Mark Brown 489773c223 ASoC: wm8993: Convert to use a regmap patch
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 15:25:12 +00:00
Mark Brown 67f97f5c3e ASoC: wm8994: Remove ASoC level register cache sync
Now we've switched over to regmap the ASoC level cache sync will be
ineffectual and potentially harmful as there is no longer an ASoC level
cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 15:24:58 +00:00
Mark Brown ee76744c51 ASoC: wm_hubs: Fix routing of input PGAs to line output mixer
IN1L/R is routed to both line output mixers, we don't route IN1 to LINEOUT1
and IN2 to LINEOUT2.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-31 11:56:39 +00:00
Mark Brown bc122e3446 ASoC: fsi: Remove unneeded empty runtime PM callbacks
The runtime PM core no longer requires any callbacks so don't provide
empty ones for it any more.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-31 11:16:12 +00:00
Mark Brown 69edea8a50 ASoC: max9768: Fix up review comments in max9768 driver
The Mute Switch should be called Playback Switch to match the volume
and the regmap core has been updated so we don't need to mark all the
registers as non-volatile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
2012-01-31 11:15:46 +00:00
Wolfram Sang 394d2bbae3 ASoC: max9768: add driver for max9768 amplifier
Add a driver supporting the volume control and the mute pin. Shdn pin
and DAPM are not taken care of yet.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-30 21:50:55 +00:00
Denis 'GNUtoo' Carikli 1ae5cbc52e ASoC: neo1973_wm8753: remove references to the neo1973-gta01 machine
The Openmoko GTA01 machine has been removed from the machine ID database,
  so we need to remove references to it as well.

Without that fix we have:
  sound/soc/samsung/neo1973_wm8753.c: In function ‘neo1973_wm8753_init’:
  sound/soc/samsung/neo1973_wm8753.c:325:2: error: implicit declaration of function ‘machine_is_neo1973_gta01’

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-30 13:22:13 +00:00
Sascha Hauer c0fa6c8af7 ASoC: i.MX: Add missing dma_async_issue_pending
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
2012-01-30 14:34:11 +05:30
Mark Brown ffa8d9df55 ASoC: wm2200: Remove trailing whitespace
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-29 21:45:31 +00:00
UK KIM 114395c61a ASoC: wm_hubs: fix wrong bits for LINEOUT2 N/P mixer
Signed-off-by: UK KIM <w0806.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-27 20:25:47 +00:00
Mark Brown 2693efd660 ASoC: wm8962: Enable idle_bias_off
The WM8962 has ground referenced and class D outputs so can happily go
down to BIAS_OFF without a large startup time.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-27 20:18:55 +00:00
Axel Lin eb3032f8b9 ASoC: Set idle_bias_off flag in snd_soc_codec_driver
Since commit 33c5f969 "ASoC: Allow idle_bias_off to be specified in CODEC
drivers", now we can set idle_bias_off flag in struct snd_soc_codec_driver
for devices can unconditionally support idle_bias_off.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-27 11:22:05 +00:00
Mark Brown 77231abe55 ASoC: wm_hubs: Enable line out VMID buffer for single ended line outputs
For optimal performance the single ended line outputs require that the
line output VMID buffer be enabled.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-26 18:58:00 +00:00
Mark Brown 7c08b51f2f ASoC: wm8994: Report any low impedance accessory as a headphone
Report any accessory with a low impedance as a headphone, previously
anything other than a short or microphone would not be reported at all.
The most likely reason is a microphone with incorrect polarity.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:41:03 +00:00
Mark Brown d7b3557077 ASoC: wm8996: Handle failures to determine accessory polarity
If we get an indeterminate impedance with both headset polarities then
give up and report the accessory as a headphone rather than continually
retrying.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:40:55 +00:00
Mark Brown 62c1c40127 ASoC: wm5100: Use pm_runtime for powerdown managment
Using pm_runtime to decide if the device should go into full power down
has the dual advantage of allowing easier integration with non-DAPM
reasons to power on the device (like the FLL) and allowing userspace to
control the final power down which is useful for tuning retention of
DSP firmware.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:39:24 +00:00
Mark Brown 17e3e57b65 ASoC: wm5100: Convert to devm_regulator_bulk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 18:37:08 +00:00
Mark Brown afe62367e0 ASoC: dapm: Ignore isolated signal generators for power purposes
A signal generator has no power control itself and so shouldn't cause a
power up of the device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:22:53 +00:00
Mark Brown fb644e9ce0 ASoC: dapm: Drop runtime PM references asynchronously
We don't really care if any action is taken immediately so let the PM
core defer things if it wants to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:22:45 +00:00
Mark Brown d5315a23cc ASoC: wm2200: Add WM2200 CODEC driver
The WM2200 is a low power mobile CODEC with enhanced Wolfson myZone
Ambient Noise Cancellation (ANC) intended for mobile telephony
applications.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:07:55 +00:00
Mark Brown 1cf733569e ASoC: wm5100: Move regulator supplies over to DAPM infrastructure
Saves a nice block of code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 16:07:55 +00:00
Mark Brown 62ea874abc ASoC: Provide REGULATOR_SUPPLY widget type
Modern devices allow systems to enable and disable individual supplies on
the device, allowing additional power saving by switching off regulators
which power portions of the device which are not currently in use. Add a
new SND_SOC_DAPM_REGULATOR_SUPPLY widget type factoring out the code for
managing such widgets from individual drivers.

The widget name will be used as the supply name when requesting the
regulator from the regulator API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-26 16:07:54 +00:00
Peter Ujfalusi 6b21ed8516 ASoC: Kconfig: OMAP4: Enable support for PandaBoards
Enable ASoC audio support for OMAP4 based machines with
twl6040 codec via the omap-abe-twl6040 machine driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:58 +02:00
Peter Ujfalusi 62ba98ce4a ASoC: omap-abe-twl6040: Use provided MCLK frequency from pdata
Avoid using hardwired configuration for MCLK frequency.
Different board design might use other MCLK frequency.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:53 +02:00
Peter Ujfalusi 4ca07cb0cf ASoC: omap-abe-twl6040: Configure card according to platform data
Disable the not connected pins on the board based on the
received platform data.
DO not register the jack function on boards, which does not have
means to detect it (jack is always connected).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:52 +02:00
Peter Ujfalusi 8d946dd7dc ASoC: omap-abe-twl6040: DAI link selection based on platform data
We can have machines without DMIC connected. In this case there is
no need to create amother (unusable) capture PCM on the card.
The existence of the DMIC connection can be checked via
pdata->has_dmic.
Select the correct dai_link structure for the card based on
pdata->has_dmic.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:49 +02:00
Peter Ujfalusi b320883910 ASoC: omap-abe-twl6040: Add complete DAPM routing
SDP4430 is a reference platform, and as such it has all possible
audio routing implemented.
Correct the DAPM routing to be complete.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:46 +02:00
Peter Ujfalusi 778cee7afd ASoC: twl6040: Convert MICBIAS to SUPPLY widget
In order to avoid breakage change the omap-abe-twl6040
machine driver's routing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:40:43 +02:00
Peter Ujfalusi d1be1d2fd1 ASoC: omap-abe-twl6040: Convert to platform deriver
Convert the OMAP4 ABE/TWL6040 machine driver to platform
driver.
For the card name use the string provided via platform data.
The card's name for OMAP4 SDP4430 has been changed:
SDP4430 -> OMAP4-SDP4430

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:13 +02:00
Peter Ujfalusi 13f81d6595 ASoC: omap-abe-twl6040: Correct internal prefix, Kconfig entry
Change the internal prefixes within the driver from sdp4430.
At he same time correct the Kconfig text as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:39:05 +02:00
Peter Ujfalusi e15422edd4 ASoC: OMAP4: Rename the sdp4430 machine driver
The same machine driver will support other boards
with similar audio configuration (OMAP4, ABE, twl6040).
Rename the driver to have more generic name.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:47 +02:00
Peter Ujfalusi 8747a6b7d5 ASoC: sdp4430: Correct author e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-26 15:38:44 +02:00
Mark Brown 5c1b136b7b ASoC: wm5100: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:18:05 +00:00
Mark Brown 5539a10288 ASoC: wm8962: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:17:29 +00:00
Mark Brown 1b76d2ee40 ASoC: wm8996: Mark register cache as dirty when regulators are disabled
Otherwise we won't resync later.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 21:17:28 +00:00
Mark Brown a188fcba73 ASoC: wm5100: Fix microphone configuration
We need to write the configuration for each microphone to a different
register.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-01-25 18:20:21 +00:00
Mark Brown 9fb83526a8 ASoC: wm5100: Make sure we switch to button reporting mode
When we have identified an accessory make sure we've flagged that we've
done so in order to make sure we always report buttons and don't continue
to polarity flip.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 15:35:40 +00:00
Peter Ujfalusi 88e339541d ASoC: soc-pcm: msbits constraint: Drop 8 and 16 bit sample sizes
As per discussion we can safely ignore the 8 and 16 bit sample
sizes when applying the msbits constraint.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-25 11:17:16 +00:00
Mark Brown 182c51ce79 ASoC: wm8962: Optimise power consumption for IN4 DC measurement usage
When the hardware is configured with one or both of the IN4 inputs used
for DC measurement (with no DC blocking capacitor connected) then we can
improve power consumption slightly in idle modes by applying a register
write sequence. Provide platform data to enable this, implemented using
a regmap patch.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 21:19:45 +00:00
Mark Brown 5509f2f80c ASoC: wm5100: Fix warnings from recent patches
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 19:51:34 +00:00
Mark Brown 15b52f10ec ASoC: Convert the WM5100 revision A updates to a regmap patch
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 19:48:39 +00:00
Mark Brown e8770dd878 ASoC: wm5100: Fix mismerge of IRQ frees
We only want them at the device level, not at the CODEC level.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 12:11:20 +00:00
Mark Brown 05d448e2c9 ASoC: Convert WM8731 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 11:43:18 +00:00
Jesper Juhl c83f1d7e71 ASoC: wm2000: Fix use-after-free - don't release_firmware() twice on error
In wm2000_i2c_probe(), if we take the true branch in

"
  ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_wm2000,
                               NULL, 0);
  if (ret != 0)
          goto err_fw;
"

then we'll release_firmware(fw) at the 'err_fw' label. But we've already
done that just a few lines above. That's a use-after-free bug.

This patch restructures the code so that we always call
release_firmware(fw) before leaving the function, but only ever call
it once.
This means that we have to initialize 'fw' to NULL since some paths
may now end up calling it without having called request_firmware(),
but since request_firmware() deals gracefully with NULL pointers, we
are fine if we just NULL initialize it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-24 11:34:19 +00:00
Jesper Juhl 7edf1a4f27 ASoC: wm8958: Use correct format string in dev_err() call
To print a value of type size_t one should use %zd, not %d.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 21:10:22 +00:00
Axel Lin 5091f5b797 ASoC: Add __devinit/__devexit annotations at necessary places
Fix below build warning when CONFIG_HOTPLUG is not set.

  CC      sound/soc/codecs/alc5623.o
sound/soc/codecs/alc5623.c:1062: warning: ‘alc5623_i2c_remove’ defined but not used
  CC      sound/soc/codecs/alc5632.o
sound/soc/codecs/alc5632.c:1112: warning: ‘alc5632_i2c_remove’ defined but not used

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 10:21:16 +00:00
Mark Brown 5e0ac527fd ASoC: sgtl5000: It's sgtl5000 not sgtl500
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-23 10:16:31 +00:00
Fabio Estevam 8998963796 ASoC: sgtl5000: Convert to table based DAPM and control init
Convert to table based DAPM and control init.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-22 21:55:03 +00:00
Mark Brown a14304edcd ASoC: wm8996: Call _POST_PMU callback for CPVDD
We should be allowing a 5ms delay after the charge pump is started in
order to ensure it has finished ramping.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-22 16:14:06 +00:00
Mark Brown 82fa367057 ASoC: wm8988: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 23:28:22 +00:00
Mark Brown dd21353f35 ASoC: wm8988: Convert to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 23:28:22 +00:00
Mark Brown 411a3450c9 ASoC: wm8985: Convert to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:42 +00:00
Mark Brown 9f8cbae416 ASoC: wm8985 Don't directly reference the cache data structure
In preparation for conversion to regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:41 +00:00
Mark Brown 8b71d441f7 ASoC: wm8985: Use standard cache sync implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:41 +00:00
Mark Brown eb8f7693df ASoC: wm8985: Convert to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:40 +00:00
Mark Brown a1fea9404f ASoC: wm8985: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:40 +00:00
Javier Martin 78adaeb2ae ASoC: Add external amplifier controls for Visstrim_M10.
Visstrim_M10 has an external class D amplifier.
This patch provides support for controlling the 4
possible gain levels and per channel muting.

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:39 +00:00
Mark Brown 3a4cbf8896 ASoC: Fix build of tlv320dac33
The problem was introduced due to the obscure formatting some of the
older drivers use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:38 +00:00
Mark Brown 8a713da8d1 ASoC: Use regmap update bits operation for drivers using regmap
If a driver is using regmap directly ensure that we're coherent with
non-ASoC register updates by using the regmap API directly to do our
read/modify/write cycles. This will bypass the ASoC cache but drivers
using regmap directly should not be using the ASoC cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:38 +00:00
Mark Brown 278047fd65 ASoC: Don't tell applications about msbits unless we're ignoring input
On the off chance that an application both pays attention and gets
confused.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-21 21:15:37 +00:00
Fabio Estevam 6b35f924b8 ASoC: mxs: Fix mxs-saif timeout
On a mx28evk board the following errors happens on mxs-sgtl5000 probe:

[    0.660000] saif0_clk_set_rate: divider writing timeout
[    0.670000] mxs-sgtl5000: probe of mxs-sgtl5000.0 failed with error -110
[    0.670000] ALSA device list:
[    0.680000]   No soundcards found.

This timeout happens because clk_set_rate will result in writing to the DIV bits
of register HW_CLKCTRL_SAIF0 with the saif clock gated (CLKGATE bit set to one).

MX28 Reference states the following about CLKGATE:

"The DIV field can change ONLY when this clock gate bit field is low."

So call clk_prepare_enable prior to clk_set_rate to fix this problem.

After this change the mxs-saif driver can be correctly probed and audio is functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 18:38:44 +00:00
Mark Brown 09452f23eb ASoC: Push WM5100 interrupt request into I2C probe
This is more what the device model wants us to do and will allow use by
non-audio functions before the audio part of the device has come up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Mark Brown 46c1a877c6 ASoC: Make WM5100 interrupt path use regmap directly
This will allow us to move the interrupt allocation out of the ASoC part
of the driver and simplifies the locking by removing any reliance in the
bulk of the interrupt path on the big CODEC lock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Mark Brown 218240e27f ASoC: Remove redundant set_bias_level() from WM5100 remove()
The framework should bring the device down before it calls the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:32 +00:00
Peter Ujfalusi b4badd4960 ASoC: omap-mcpdm: Set 24msbits constraint
McPDM internal FIFO is 24 bit wide. From the 32 bit sample
8 bit is discarded. Let application know about this
via msbits constraint.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 7df6f2551f ASoC: omap-dmic: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 8819f65cec ASoC: twl4030: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Peter Ujfalusi 8d725b2bcb ASoC: tlv320dac33: Use core to set the msbits constraint
Core can set the msbits constraint in behalf of the dai.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Fabio Estevam f2c6e757f6 ASoC: sgtl5000: Print revision number in hex
Throughout the sgtl5000 driver source code and also in the sgtl5000 datasheet
the revision code is shown in hexadecimal.

Print it hex format, for consistency.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:31 +00:00
Mark Brown 0132615da5 ASoC: Say we can't read WM5100 ID register
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 2688738eba ASoC: When releasing WM5100 put /RESET into reset
Reset is active low, make sure we leave it asserted when release the
device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 99b0292d94 ASoC: 24 bits are significant on wm_hubs DAIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 85f883933c ASoC: Make WM8993 I2C usage unconditional
The WM8993 only supports I2C so don't ifdef the I2C support in the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 164548d3b3 ASoC: Implement basic WM8993 interrupt support
If an interrupt is supplied then use it for thermal warning and FLL lock
notifications. When using the interrupt raise the timeout for the FLL lock
substantially to reduce the chances of spurious warnings.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown a4b5233792 ASoC: 24 bits are significant on the WM8996 audio interfaces
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:30 +00:00
Mark Brown 58ba9b2545 ASoC: Allow drivers to specify how many bits are significant on a DAI
Most devices accept data in formats that don't correspond directly to
their internal format. ALSA allows us to set a msbits constraint which
tells userspace about this in case it finds it useful (for example, in
order to avoid wasting effort dithering bits that will be ignored when
raising the sample size of data) so provide a mechanism for drivers to
specify the number of bits that are actually significant on a DAI and
add the appropriate constraints along with all the others.

This is done slightly awkwardly as the constraint is specified per sample
size - we loop over every possible sample size, including ones that the
device doesn't support and including ones that have fewer bits than are
actually used, but this is harmless as the upper layers do the right thing
in these cases.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-01-20 13:58:29 +00:00
Mark Brown 5f52ee4875 ASoC: Add WM8962 DAC and ADC L/R swap support
Simple switches since there's no per-channel control.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Dimitris Papastamos d19fd5db3e ASoC: wm8983: Remove useless snd_kcontrol
This must be a leftover from a previous driver.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Axel Lin b33005f3ef ASoC: jz4740: Convert qi_lb60 to use snd_soc_register_card()
Use snd_soc_register_card() instead of creating a "soc-audio" platform device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:29 +00:00
Mark Brown cef6d1d450 ASoC: Convert WM8962 register access map to modern style
Much more compact, both in terms of source and especially in terms of
RAM used at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:28 +00:00
Javier Martin a6b44f1636 ASoC: Route Mic Bias in Visstrim_M10 board.
Visstrim_M10 board uses an external microphone
that can be enabled/disabled by the user

Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:28 +00:00
Ryan Mallon 44fb864b8f ep93xx: Don't use system controller defines in audio drivers
Both the Snapper CL15 and EDB93xx audio drivers set the same audio
configuration in ep93xx_i2s_acquire. Remove the arguments to
ep93xx_i2s_acquire so that the audio drivers no longer need the
EP93XX_SYSCON defines exported.

Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Mark Brown 291d64be31 ASoC: Make WM8962 I2C usage unconditional
We only support I2C so no need to ifdef.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Manjunath Hadli 2e932f2940 ASoC: CQ93VC: remove machine specific header file inclusion from codec driver
remove unnecessary inclusion of machine specific header
file mach/dm365.h from cq93vc.c voice codec driver
which comes in the way of platform code consolidation.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Liam Girdwood 7aca69f9fe ASoC: utils - Add support for a dummy codec driver.
This is useful to create dummy codec devices where we need to have some
DAI links without a real Codec. e.g. could be used to represent dumb FM,
MODEM, etc

This is also used by dynamic PCM for DAI links that have no codec.

Signed-off-by: Liam Girdwood <lrg@ti.com>
[Fixed the indentation -- broonie]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:27 +00:00
Liam Girdwood 08656910bb ASoC: twl6040 - add method to query HS DC offset step size in mV
Provide a method for mach drivers to query the HS DC offset step size in mV.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Mark Brown 9b85fc9063 ASoC: Optimise performance of WM8904 ADC 128fs OSR mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Liam Girdwood 3b09bb820d ASoC: core - Improve card registration error messaging for large DAI links.
Print out the offending DAI link entry when a naming error occurs. Makes
thing easier to debug for machines with a large number of DAI links.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Joachim Eastwood 350e16d529 ASoC: replace 0xffffffff with DMA_BIT_MASK macro
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Joachim Eastwood 6296914cce ASoC: use proper defines for stream directions in pcm engines
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 3294c4c603 ASoC: Convert WM8955 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 95860fdf0f ASoC: Convert WM8955 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 9887cb9e65 ASoC: Use standard register cache sync for WM8955
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown ba5c88d02d ASoC: Convert WM8955 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Mark Brown 1e9c898df0 ASoC: Make I2C usage unconditional in WM8955
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 42dad0d84a ASoC: Convert WM8940 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown b5531205f5 ASoC: Make I2C usage unconditional in WM8940
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 84d0d83180 ASoC: Convert WM8904 to direct regmap API usage
The device has a very sparse register map so should benefit from using a
rbtree cache.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 274eb8f9d8 ASoC: Use standard cache sync for WM8904
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:24 +00:00
Mark Brown 93e26d4e44 ASoC: Convert wm8904 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown 429440c947 ASoC: Make WM8904 I2C usage unconditional
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown 891271c28f ASoC: Convert wm8804 to direct regmap API usage
The register map for this device is actually fairly sparse so the rbtree
should be beneficial.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:23 +00:00
Mark Brown f649f1a8aa ASoC: Convert wm8804 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown e055cd67fd ASoC: Use standard cache sync for wm8804
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown c2562a8e3b ASoC: Remove wm8974 private data
It's only ever referenced when being allocated and freed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:22 +00:00
Mark Brown a2bd691c64 ASoC: Convert wm8974 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 7a389651bd ASoC: Make wm8974 I2C usage unconditional
The driver only supports I2C at present.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 028b0a0a92 ASoC: Convert wm8971 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown c4850644ce ASoC: Convert wm8971 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown 542cc361de ASoC: Make WM8971 I2C usage unconditional
The driver only supports I2C so no need to worry about SPI only systems.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:21 +00:00
Mark Brown d3398ff059 ASoC: Convert WM8753 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown bfea3abb80 ASoC: Move WM8993 resource acquisition and device reset to bus probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown d0ad0af043 ASoC: Convert wm8993 to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 391d9e4e5c ASoC: Move WM9090 device identification and reset to I2C probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown ec2c0fec11 ASoC: Convert WM9090 to use regmap directly
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:20 +00:00
Mark Brown 008f8d4f99 ASoC: Push wm8978 reset down into the I2C probe
Ensures that we get control of the CODEC earlier and don't try to probe
the card at all if register I/O isn't working.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ee60d0155d ASoC: Convert wm8978 to direct regmap API usage
Helps push the register cache code down out of ASoC and improves resume
times by using the more efficient regmap cache sync code.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown f98692ea6d ASoC: Use standard cache sync for WM8978
Saves a bit of code and supports further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 623105dc97 ASoC: Convert wm8978 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown 803b37885d ASoC: Convert wm8978 to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:19 +00:00
Mark Brown ad6cdec507 ASoC: Remove unused control type from wm8978 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown 0d6df67583 ASoC: Make WM8978 I2C usage unconditional
The driver only supports I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:18 +00:00
Mark Brown fed2200711 ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK
With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:34 +00:00
Mark Brown 495174a8ff ASoC: Don't go through cache when applying WM5100 rev A updates
These are all to either uncached registers or fixes to register defaults,
in the former case the cache won't do anything and in the latter case
we're fixing things so the cache sync will do the right thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Mark Brown e53e417331 ASoC: Mark WM5100 register map cache only when going into BIAS_OFF
Writing to the registers won't work if we do actually manage to hit a fully
powered off state.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-01-20 13:54:33 +00:00
Wolfram Sang 0c93a167a6 ASoC: tlv320aic32x4: always enable analouge block
Register LDOCTLEN must always be initialized to clear the analog power
control bit, otherwise the analog block will stay deactivated.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Wolfram Sang 01b37e94c0 ASoC: tlv320aic32x4: always enable dividers
Dividers (such as MDAC) are always needed, independent of the codec
being I2S master or slave. Needed on a custom board where the codec has
to be slave.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:33 +00:00
Zeng Zhaoming bb362e2e4f ASoC: sgtl5000: Fix wrong register name in restore
Correct SGTL5000_CHIP_CLK_CTRL to SGTL5000_CHIP_REF_CTRL in
sgtl5000_restore_regs(), and add comment to explain the
restore order.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:54:32 +00:00
Tony Lindgren 967809bd7f Merge branch 'omap1-part2' into omap1
Conflicts:
	drivers/leds/leds-ams-delta.c
2012-01-20 05:31:52 -08:00
Linus Torvalds 9278e634b4 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: Wait for WM8993 FLL to stabilise
  ASoC: core - Free platform DAPM context at platform removal.
  ASoC: dapm - Fix check for codec context in dapm_power_widgets().
  ASoC: sgtl5000: update author email address
  ASoC: Fix DMA channel leak in imx-pcm-dma-mx2 driver.
2012-01-18 12:53:36 -08:00
Linus Torvalds 57f2685c16 Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (53 commits)
  ARM: mach-shmobile: specify CHCLR registers on SH7372
  dma: shdma: fix runtime PM: clear channel buffers on reset
  dma/imx-sdma: save irq flags when use spin_lock in sdma_tx_submit
  dmaengine/ste_dma40: clear LNK on channel startup
  dmaengine: intel_mid_dma: remove legacy pm interface
  ASoC: mxs: correct 'direction' of device_prep_dma_cyclic
  dmaengine: intel_mid_dma: error path fix
  dmaengine: intel_mid_dma: locking and freeing fixes
  mtd: gpmi-nand: move to dma_transfer_direction
  mtd: fix compile error for gpmi-nand
  mmc: mxs-mmc: fix the dma_transfer_direction migration
  dmaengine: add DMA_TRANS_NONE to dma_transfer_direction
  dma: mxs-dma: Don't use CLKGATE bits in CTRL0 to disable DMA channels
  dma: mxs-dma: make mxs_dma_prep_slave_sg() multi user safe
  dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
  dma: mxs-dma: fix a typo in comment
  DMA: PL330: Remove pm_runtime_xxx calls from pl330 probe/remove
  video i.MX IPU: Fix display connections
  i.MX IPU DMA: Fix wrong burstsize settings
  dmaengine/ste_dma40: allow fixed physical channel
  ...

Fix up conflicts in drivers/dma/{Kconfig,mxs-dma.c,pl330.c}

The conflicts looked pretty trivial, but I'll ask people to verify them.
2012-01-17 18:40:24 -08:00
Mark Brown 986b2f2c21 ASoC: Wait for WM8993 FLL to stabilise
Ensure the FLL is locked before we return from set_fll().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-17 16:48:27 +00:00
Linus Torvalds 5b3fcfed35 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm
* 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm:
  ARM: sa11x0: assabet: fix build warning
  ARM: Add arm_memblock_steal() to allocate memory away from the kernel
  ARM: 7275/1: LPAE: Check the CPU support for the long descriptor format
  ARM: 7274/1: NUC900: Rename nuc900-audio platform device to nuc900-ac97
  ARM: 7272/1: S3C24XX: Fix build error for missing <mach/system-reset.h>
  ARM: 7271/1: Fix typo in conversion of ARCH_NR_GPIOS to Kconfig
2012-01-16 15:34:44 -08:00
Liam Girdwood 675c496ba4 ASoC: core - Free platform DAPM context at platform removal.
Fix platform removal by freeing the platform DAPM resources and remove
it from the DAPM list.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:49:09 +00:00
Liam Girdwood e7c80e2a8b ASoC: dapm - Fix check for codec context in dapm_power_widgets().
Fixes a NULL pointer dereference in dapm_power_widgets() if the dapm context
has no codec.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:49:09 +00:00
Zeng Zhaoming f7cb8a4be1 ASoC: sgtl5000: update author email address
Update MODULE_AUTHOR email address.

Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-16 15:06:06 +00:00
Linus Torvalds 4964e0664c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (119 commits)
  MIPS: Delete unused function add_temporary_entry.
  MIPS: Set default pci cache line size.
  MIPS: Flush huge TLB
  MIPS: Octeon: Remove SYS_SUPPORTS_HIGHMEM.
  MIPS: Octeon: Add support for OCTEON II PCIe
  MIPS: Octeon: Update PCI Latency timer and enable more error reporting.
  MIPS: Alchemy: Update cpu-feature-overrides
  MIPS: Alchemy: db1200: Improve PB1200 detection.
  MIPS: Alchemy: merge Au1000 and Au1300-style IRQ controller code.
  MIPS: Alchemy: chain IRQ controllers to MIPS IRQ controller
  MIPS: Alchemy: irq: register pm at irq init time
  MIPS: Alchemy: Touchscreen support on DB1100
  MIPS: Alchemy: Hook up IrDA on DB1000/DB1100
  net/irda: convert au1k_ir to platform driver.
  MIPS: Alchemy: remove unused board headers
  MTD: nand: make au1550nd.c a platform_driver
  MIPS: Netlogic: Mark Netlogic chips as SMT capable
  MIPS: Netlogic: Add support for XLP 3XX cores
  MIPS: Netlogic: Merge some of XLR/XLP wakup code
  MIPS: Netlogic: Add default XLP config.
  ...

Fix up trivial conflicts in arch/mips/kernel/{perf_event_mipsxx.c,
traps.c} and drivers/tty/serial/Makefile
2012-01-14 13:05:21 -08:00