Commit Graph

4795 Commits

Author SHA1 Message Date
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
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
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