Ensure robust startup of the part by going through the reset procedure
prior to resyncing the full register cache, avoiding potential intermittent
faults in some designs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
In order to support CODEC<->CODEC links remove the assumption that there
is only a single CODEC on a DAI link by removing the use of the CODEC
pointer in the rtd from the CODEC drivers. They are already being passed
their DAI whenever they are passed an rtd and can get the CODEC from
there.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We can simply use the register cache code to synchronise the current
configuration down to the device when bringing up the DSP.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This allows userspace control of final power off, allowing policy decisions
for register configuration retention.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
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>
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>
.. 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
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>
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>
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>
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>
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>
We can't just pass back the return value of snd_soc_update_bits() as it
will be 1 if a bit changed rather than zero.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.
The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Give the correct number of entries to TLV_DB_RANGE_HEAD to prevent
reading more data than actually is in the arrays.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This initial conversion just moves the register init, regulator acquisition
and device verification out to the I2C probe(). Movement of other parts of
the driver like the GPIO and beep generation code will follow.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Disable the thermal shutdown circuits for headphone and speaker when the
relevant outputs are not enabled in order to save current in idle modes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>