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>
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>
The WM8962 on Tobermory has one of the IN4 inputs connected for DC
measurement. Tell the driver it can optimise for this mode.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
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>
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>
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>
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>
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>
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>
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>
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>
saving code in error handling and cleanup paths by ensuring that that
the regulators will be automatically unregistered when the device is
unregistered.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPITWJAAoJEBus8iNuMP3defMP/0rHwUk/XEVZHj0OLdA6r33f
mDATRNX40BAllDUinYyrEWBhEFDWSxJQ1lA6iustO529gkd66j0n24g702GdRnvQ
Hh2tFS73lmU75JrdTKprVQVV1P0vwDPtm9BbWCbpKl1TJ77z396KrzrO+pHqEVdQ
FkPweqqGhwBcA/FHy8k8nGiMWk/6pMIbOkaaWRtxCtMxhC05qKOpL90VOEwut2Hb
0SL5QQUgYCjYzuIqdcOWBrgYcxt7COAS3Z0etgEgSIISdBa38SygRqiLnRZ1AqgX
gWb7/+v3ont+PEEbjo4wsmO9anGamIUaHY449KKTY6EJnJxbJt6Z4wB86dT9C35s
l3BjwCfROa+hs0HOS08ake9/y51dpIqiv+T5+jiY+h5dyt+lPxBRAZiVKP2jUo09
5womi/gt9loy37iQRkMVCGK5ZBnyFet+KpCPYR0Bx3mjBt/O4sqGniZBN7FUx5KS
ZDBzVFihKLxLFP5xCWi5+Z/sr+wiCGSLKelawznavYCUzo0WYfUo6UrBR2r8U2QI
2xSE5qzRBLqvdwi/2NQnj/5kbuzv2iiOPAR2PZhwgWPxc0yj1icWCu8d2voKILag
1I7qGAKaA0E/CXveaf/xlWEFMpuyE+THvXlE2q9s+giV9+DRcEXMbr3uX26xh4Vl
vwPSfBApJLg7FerS6Lmj
=Sj0B
-----END PGP SIGNATURE-----
Merge tag 'topic/devm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into HEAD
Provide managed versions of regulator_get() and regulator_bulk_get(),
saving code in error handling and cleanup paths by ensuring that that
the regulators will be automatically unregistered when the device is
unregistered.
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>
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>
An initial export of the regmap register patch implementation, mostly
for integration into ASoC so it can be used by drivers there which have
conflicting updates already.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPHwbvAAoJEBus8iNuMP3dBFcQAIcGUi8EeL3hzN5KclOSOJcZ
eZmlaASCL155ZL134Z3EcjMEcqgzAl5RwnoL9pN+Lg01uglPcnhCfgb2dQTMskMF
7vazhldguQn2GxthMky55kGxJMdXHINoAFRKjSK2Js19dEdvbMgbElyCgXY5aaj6
5W8ORPiQWurlHQHrtsEyFe+/1SboNAb2QrB63+w2hw1A6w3h9RnZ3lFiVL9/TIEz
6mQG83s7pvaco8v6z9PD9V0j2KskI56JkZL0p6xcl2CxFplL4ha3Cqu3KjJqDULz
vubab4BeaYjA0mTjVPsku0MWq+Sj9TrfoQMAbIsKiRZ4d7vd6XaRqc/8qnu7LHtd
+LfMpXc2SEsKA4WtA7Flllj7NEsklYOY085wfzDhHdzjyvTL7qJjWqnlbjz3WC+5
6pvcnJzCXOyK3Y6W8EeEiVRkCeuckAILDQaX5Kb3WmAxMeIrqCoaonIVmRHCeavs
zugbAHGVY6XPQKUb89RjXyKcorreETL8jRsWMasnqUUmNMvLnBKdIEp7ohKp4JYN
uXgDNihtRxupNjBvCrQyHR5tjOKca4Xw5C8A5p5nL3j0mJMbhGxaTyQC8NJ5ki5v
gjA/xypWkob4fzi9jfxdJIThzEOIWey9DHcnvDa9w6wIFNc+LDjKTXw+ReOvWyWP
M3KBzlVT+Lm4eB7atPB6
=HfF+
-----END PGP SIGNATURE-----
Merge tag 'regmap-patch-initial' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into for-3.4
regmap: Inital export of the patching implementation
An initial export of the regmap register patch implementation, mostly
for integration into ASoC so it can be used by drivers there which have
conflicting updates already.
Device manufacturers frequently provide register sequences, usually not
fully documented, to be run at startup in order to provide better defaults
for devices (for example, improving performance in the light of silicon
evaluation). Support such updates by allowing drivers to register update
sets with the core. These updates will be written to the device immediately
and will also be rewritten when the cache is synced.
The assumption is that the reason for resyncing the cache will always be
that the device has been powered off. If this turns out to not be the case
then a separate operation can be provided.
Currently the implementation only allows a single set of updates to be
specified for a device, this could be extended in future.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
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>
Allow consumers to free regulators allocated using devm_regulator_get()
if they need to. This will not normally be required.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
The problem was introduced due to the obscure formatting some of the
older drivers use.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
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>
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>
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>
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>
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>
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>
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>