Commit graph

4942 commits

Author SHA1 Message Date
Lars-Peter Clausen d02486fd42 ASoC: wm8978: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:36:11 +00:00
Lars-Peter Clausen 387fe80fb1 ASoC: wm8983: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:35:53 +00:00
Lars-Peter Clausen 7bea32c5b2 ASoC: wm8961: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:29:48 +00:00
Lars-Peter Clausen 0a87a6e1c0 ASoC: wm8960: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:29:05 +00:00
Lars-Peter Clausen bf68a04708 ASoC: wm8955: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. Also remove the regcache_mark_dirty()
from the suspend handler since this is already done by the ASoC core.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:28:20 +00:00
Lars-Peter Clausen 5fdf082b43 ASoC: wm8940: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:27:37 +00:00
Lars-Peter Clausen b0d55b1a63 ASoC: wm8903: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed. Also remove the unused codec field from the wm8903_priv
struct so we can remove the whole probe callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:27:02 +00:00
Lars-Peter Clausen d2a9bc6851 ASoC: wm8900: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:26:14 +00:00
Lars-Peter Clausen a4235a14be ASoC: wm8804: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:25:26 +00:00
Lars-Peter Clausen 6c286afb01 ASoC: wm8776: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:24:56 +00:00
Lars-Peter Clausen d12cbf956f ASoC: wm8750: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:23:20 +00:00
Lars-Peter Clausen 67cac3a351 ASoC: wm8737: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:22:31 +00:00
Lars-Peter Clausen 2081b2cf05 ASoC: wm8731: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:21:59 +00:00
Lars-Peter Clausen d4d41436ff ASoC: wm8728: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:20:49 +00:00
Lars-Peter Clausen 0bd324b1ad ASoC: wm8711: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. Also remove the extra write that sets
the WM8711_ACTIVE register to 0x00 in the suspend handler since this write
is already done when transitioning to SND_SOC_BIAS_OFF.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:19:45 +00:00
Lars-Peter Clausen 4d0a4c3c6d ASoC: wm8580: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:19:13 +00:00
Lars-Peter Clausen ca5e7c6aff ASoC: wm8523: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:18:42 +00:00
Lars-Peter Clausen 99b108c73f ASoC: wm8510: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:18:08 +00:00
Lars-Peter Clausen 098f6f17c3 ASoC: wm8400: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual asynchronous transition to SND_SOC_BIAS_STANDBY at the end of
CODEC probe() can also be removed as the core will automatically do this
after the CODEC has been probed. Also running this asynchronously has the
problem of potential race conditions with the core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:17:33 +00:00
Lars-Peter Clausen 21a942fdd8 ASoC: wm8350: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:16:59 +00:00
Lars-Peter Clausen e2dce944cc ASoC: rt5631: Cleanup bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:07:05 +00:00
Lars-Peter Clausen 5c9dc0898f ASoC: alc5632: Cleanup bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:06:44 +00:00
Lars-Peter Clausen 2849bde56a ASoC: alc5623: Cleanup bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. Also remove the manual sequencing back
to SND_SOC_BIAS_ON in resume as this is already handled by the ASoC core.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:06:02 +00:00
Lars-Peter Clausen e8125f0442 ASoC: uda1380: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:05:08 +00:00
Lars-Peter Clausen e03b975506 ASoC: uda134x: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:04:50 +00:00
Lars-Peter Clausen a6e4599f8d ASoC: uda134x: Remove is_powered_on_standby from platform data
According to its documentation the is_powered_on_standby field of the
uda134x platform data is supposed to prevent the the driver from shutting
down the ADC and DAC in standby mode. This behavior was broken in commit
commit f0fba2ad1b ("ASoC: multi-component - ASoC Multi-Component Support")
almost 5 years ago and all the flag does now is cause the driver to go to
SND_SOC_BIAS_ON in probe, just for the ASoC core to put it back into
SND_SOC_BIAS_STANDBY right after probe.

Apparently the intended behavior has not been missed, so just remove
is_powered_on_standby from the platform data struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 18:04:49 +00:00
Jarkko Nikula 418382f29d ASoC: max98090: Fix right sidetone connection
It is right not left sidetone which goes to "DACR".

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 17:14:32 +00:00
Jarkko Nikula 48826ee590 ASoC: max98090: Fix ill-defined sidetone route
Commit 5fe5b767dc ("ASoC: dapm: Do not pretend to support controls for non
mixer/mux widgets") revealed ill-defined control in a route between
"STENL Mux" and DACs in max98090.c:

max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACL
max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACL
max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACL
max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACR
max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACR
max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACR

Since there is no control between "STENL Mux" and DACs the control name must
be NULL not "NULL".

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-24 17:13:59 +00:00
Jarkko Nikula 4cf703a7bc ASoC: max98090: Fix digital microphone
Commit e409dfbfcc ("ASoC: dapm: Add a few supply widget sanity checks")
broke digital microphone support in max98090.c:

max98090 i2c-193C9890:00: Conditional paths are not supported for supply widgets (DMICL_ENA -> [DMIC] -> DMIC Mux)
max98090 i2c-193C9890:00: ASoC: no dapm match for DMICL_ENA --> DMIC --> DMIC Mux
max98090 i2c-193C9890:00: ASoC: Failed to add route DMICL_ENA -> DMIC -> DMIC Mux
max98090 i2c-193C9890:00: Conditional paths are not supported for supply widgets (DMICR_ENA -> [DMIC] -> DMIC Mux)
max98090 i2c-193C9890:00: ASoC: no dapm match for DMICR_ENA --> DMIC --> DMIC Mux
max98090 i2c-193C9890:00: ASoC: Failed to add route DMICR_ENA -> DMIC -> DMIC Mux

Problem is partially caused by commit f69e3caa9e ("ASoC: max98090: Enable
both DMIC channels also when using mono configuration") which connects
"DMICL_ENA" and "DMICR_ENA" supply widgets to "DMIC Mux".

Fix the breakage by reverting f69e3caa9e and then by adding additional
"DMICR_ENA" to "DMICL" and "DMICL_ENA" to "DMICR" cross-connections. This
disconnects these supply widgets from the mux and makes sure that both DMIC
data channels are still enabled together.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-24 17:13:42 +00:00
Lars-Peter Clausen 6e2793b98e ASoC: cs42l73: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:21:17 +00:00
Lars-Peter Clausen ceb3c0683c ASoC: cs42l51: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:20:28 +00:00
Zidan Wang e2280c9040 ASoC: wm8960: Add device tree support
Document the device tree binding for the WM8960 codec, and modify the
driver to extract the platform data from device tree, if present.

Signed-off-by: Zidan Wang <b50113@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:19:35 +00:00
Lars-Peter Clausen 1fc10044d7 ASoC: sigmadsp: Fix endianness conversion
Make sure to always convert the firmware data to local endianness before
using it.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: a35daac77a ("ASoC: sigmadsp: Add support for fw v2")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:17:50 +00:00
Lars-Peter Clausen dee9cec42f ASoC: adau17x1: Mark DSP parameter memory as readable and precious
To be able to read back data from the DSP parameter memory the register
range needs to be marked as readable. At the same time we do not want them
to e.g. appear in debugfs output so mark them as precious as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:17:50 +00:00
Lars-Peter Clausen 0db5dc943e ASoC: max98095: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:17:22 +00:00
Lars-Peter Clausen 24445f8c5e ASoC: max98090: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:16:50 +00:00
Lars-Peter Clausen 0b5155bbca ASoC: max98088: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:16:17 +00:00
Lars-Peter Clausen 335ca471ee ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

While we are at it also replace dev_get_drvdata() with snd_soc_codec_get_drvdata().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-21 18:15:43 +00:00
Lars-Peter Clausen a3a1ec66d6 ASoC: adau1701: Implement sigmadsp safeload
The safeload feature allows to load up to 5 parameter memory registers
atomically. This is helpful for switching between e.g. filter settings
without causing any glitches.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-20 09:55:35 +00:00
Lars-Peter Clausen a35daac77a ASoC: sigmadsp: Add support for fw v2
This patch adds support for the v2 version of the SigmaDSP firmware file
format. The new format has support for having different program and
parameter settings for different samplerates. In addition it stores metadata
describing the firmware. This metadata includes the set of supported
samplerates which will be used to restrict the samplerates that can be
selected by userspace. Also included is information about the modifiable
parameters. Those will be exposed as ALSA controls so they can be changed at
runtime.

The new format is based on a binary type-length-value structure that makes
it both forward and backwards compatible.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-20 09:55:34 +00:00
Lars-Peter Clausen d48b088e3e ASoC: sigmadsp: Restructure in preparation for fw v2 support
The v2 file format of the SigmaDSP takes a more declarative style compared
to the imperative style of the v1 format. In addition some features that are
supported with v2 require the driver to keep state around for the firmware.
This requires a bit of restructuring of both the firmware loader itself and
the drivers making use of the firmware loader.

Instead of loading and executing the firmware in place when the DSP is
configured the firmware is now loaded at driver probe time. This is required
since the new firmware format will in addition to the firmware data itself
contain meta information describing the firmware and its requirements and
capabilities. Those will for example be used to restrict the supported
samplerates advertised by the driver to userspace to the list of samplerates
supported for the firmware.

This only does the restructuring required by the v2 format, but does not
yet add support for the new format itself.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-20 09:55:34 +00:00
Lars-Peter Clausen 6b25730f68 ASoC: sigmadsp: Drop support support SIGMA_ACTION_DELAY
The official firmware generation tool never emitted any SIGMA_ACTION_DELAY
instructions. Keeping support for it with the new restructured loader that
also supports v2 will be difficult, so drop support for it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-20 09:55:33 +00:00
Lars-Peter Clausen 50c0f21b42 ASoC: sigmadsp: Refuse to load firmware files with a non-supported version
Make sure to check the version field of the firmware header to make sure to
not accidentally try to parse a firmware file with a different layout.
Trying to do so can result in loading invalid firmware code to the device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-20 09:55:29 +00:00
Lars-Peter Clausen 17bb577328 ASoC: ad1980: Remove ac97_read/ac97_write wrappers
Since the regmap conversion ac97_read/ac97_write are just simple wrappers
around snd_soc_read/snd_soc_write. Use those instead directly and remove the
wrappers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:49:18 +00:00
Lars-Peter Clausen 82d1463641 ASoC: ad1980: Convert to regmap
This patch converts the ad1980 driver to use regmap for its IO.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:49:18 +00:00
Oder Chiou 683996cb22 ASoC: rt5677: Set the slow charge of the vref in the end of the power sequences
Set the slow charge of the vref in the end of the power sequences

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:18:05 +00:00
Oder Chiou 35d40d10e9 ASoC: rt5677: Follow the gpio naming rule to rename the irq function
Follow the gpio naming rule to rename the irq function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:18:05 +00:00
Oder Chiou 2dfe2b08d2 ASoC: rt5677: Align the reg_default table with tab character
Align the reg_default table with tab character

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-19 10:18:05 +00:00
Charles Keepax 00e4c3b6e2 ASoC: wm_adsp: Move core_ena to be co-located with start bit
Many firmwares do not wait for the start bit before they begin
processing audio, whilst this is a bug on the firmware side there are
too many such firmwares in the wild to ignore the situation. This patch
moves the core enable to happen at same time as the start, the firmware
looses the ability to overlap its own startup with the audio path bring
up but we ensure that all firmwares behave.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 17:27:02 +00:00
JS Park d6d521799f ASoC: wm_adsp: Fix memory leak in wm_adsp_setup_algs
Signed-off-by: JS Park <aitdark.park@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 16:21:15 +00:00
Sudip Mukherjee a5a267cf9c ASoC: rt286: build warning of section mismatch
while building we were getting the following build warning:

Section mismatch in reference from the function rt286_i2c_probe()
to the variable .init.data:force_combo_jack_table
The function rt286_i2c_probe() references
the variable __initdata force_combo_jack_table.
This is often because rt286_i2c_probe lacks a __initdata
annotation or the annotation of force_combo_jack_table is wrong.

we were getting the warning as force_combo_jack_table was marked
with __initdata

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 15:40:18 +00:00
Lars-Peter Clausen 358a8bb562 ASoC: ac97: Push snd_ac97 pointer to the driver level
Now that the ASoC core no longer needs a handle to the AC'97 device that is
associated with a CODEC we can remove it from the snd_soc_codec struct and
push it into the individual driver state structs like we do for other
communication buses. Doing so creates a clean separation between the AC'97
bus support and the ASoC core.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 15:38:03 +00:00
Lars-Peter Clausen 4bafcf074a ASoC: Drop ac97_control initialization from CODEC driver DAIs
This is no longer necessary as there is no code anymore that uses this for
CODEC DAIs.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 15:37:59 +00:00
Lars-Peter Clausen eda1a701fd ASoC: ac97: Use static ac97_bus
We always pass soc_ac97_ops to snd_soc_new_ac97_codec(). So instead of
allocating a snd_ac97_bus in snd_soc_new_ac97_codec() just use a static one
that gets initialized when snd_soc_set_ac97_ops() is called.

Also drop the device number parameter from snd_soc_new_ac97_codec(). We
currently only support one device per bus and all drivers pass 0 for the
device number. And if we should ever support multiple devices per bus it
wouldn't be up to individual AC'97 device drivers to pick their number, but
rather either the AC'97 adapter driver or the core code will assign them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 15:37:46 +00:00
Mark Brown 92eb0d5465 Merge branches 'topic/ad1980', 'topic/wm9705' and 'topic/wm971x' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-ac97 2014-11-18 15:25:56 +00:00
Oder Chiou 86ae04b174 ASoC: rt5677: Modify the default value of the MX-8E[4] for ASRC function
Modify the default value of the MX-8E[4] to 1 for ASRC function. It could
prevent the pop noise with ASRC function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 23:29:31 +00:00
Mark Brown cf9a7f7823 Merge remote-tracking branches 'asoc/fix/rt5670', 'asoc/fix/samsung' and 'asoc/fix/sgtl5000' into asoc-linus 2014-11-17 16:41:11 +00:00
Mark Brown 643aa2c595 Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/cs41l51', 'asoc/fix/dpcm', 'asoc/fix/es8328', 'asoc/fix/fsl-asrc', 'asoc/fix/max98090', 'asoc/fix/rcar', 'asoc/fix/rockchip' and 'asoc/fix/rt5645' into asoc-linus 2014-11-17 16:41:06 +00:00
Krishna Mohan Dani 187024b36c ASoC: rt5631: Fixing compilation warning when DT is disabled
Fixes the following compilation warning:
Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.

Signed-off-by: Claude Youn <claude.youn@gmail.com>
Signed-off-by: Krishna Mohan Dani <krishna.md@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 14:51:40 +00:00
Charles Keepax 9da7a5a9fd ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
We should not free any buffers associated with writing out coefficients
to the DSP until all the async writes have completed. This patch updates
the out of memory path when allocating a new buffer to include a call to
regmap_async_complete.

Reported-by: JS Park <aitdark.park@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-17 14:22:04 +00:00
Lars-Peter Clausen d69db7f7cd ASoC: adau17x1: Replace w->codec with snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 10:27:55 +00:00
Lars-Peter Clausen de172051af ASoC: adau1373: Replace w->codec with snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 10:27:11 +00:00
Lars-Peter Clausen 6fdaac1c1a ASoC: adav80x: Replace w->codec with snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-17 10:24:29 +00:00
Charles Keepax cdcd7f7287 ASoC: wm_adsp: Use vmalloc to allocate firmware download buffer
Use vmalloc to allocate the buffer for firmware/coefficient download and
rely on the SPI core to split this up into DMA-able chunks. This should
give better performance and means we no longer need to manually split
the download into page size chunks to avoid allocating overly large
continuous memory regions.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 17:32:25 +00:00
Bard Liao 044b724ada ASoC: rt5670: make bias level more reasonable
This patah separate bias level off to standby and off. The standby
level will provide the necessary power for JD and push button
functions.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 11:11:34 +00:00
Dylan Reid 2880fc8779 ASoC: add TI ts3a227e headset chip driver
The TS3A227E is an autonomous audio accessory detection and
configuration switch that detects 3-pole or 4-pole audio accessories
and configures internal switches to route the signals accordingly.

This chip also has built-in support for the new button standard
described in the Android "Wired audio headset specification" v1.0.
These buttons will be reported on the jack as buttons 0-3 mapped to
KEY_MEDIA, KEY_VOLUMEUP, KEY_VOLUMEDOWN, and KEY_VOICE_COMMAND.

This will be added as an aux_dev and have the jack passed in from the
machine driver.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 10:46:41 +00:00
Bard Liao 471f208af9 ASoC: rt5645: two jacks for hp and mic
Some OS need headphone and microphone to be separated.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 10:44:03 +00:00
Fabio Estevam c251ea7bd7 ASoC: sgtl5000: Fix SMALL_POP bit definition
On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound  to happen
5 seconds after the end of a playback.

The SMALL_POP bit should fix this, but its definition is incorrect:
according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
bit 1.

Fix the definition accordingly and enable the bit as intended per the code
comment.

After applying this change, no loud 'click' sound is heard after playback

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-14 10:35:45 +00:00
Mengdong Lin 0605815e7e ASoC: rt5670 : Add ACPI match ID for Intel CHT/BSW platforms
This patch adds the ACPI match ID for rt5670/5672 codec.
So on Intel CherryTrail/Braswell platforms, the codec can be enumerated from
ACPI and depends on ACPI to get platform-specific info and power saving.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-14 10:34:12 +00:00
Krishna Mohan Dani 189c88ced1 ASoC: rt5631: Adding Device Tree compatibility to Realtek's ALC5631/RT5631 codec driver
Signed-off-by: Krishna Mohan Dani <krishna.md@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-13 18:08:01 +00:00
Krishna Mohan Dani 86707f7fec ASoC: rt5631: Adding the description of the codec
Signed-off-by: Krishna Mohan Dani <krishna.md@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-13 18:08:00 +00:00
Bard Liao 850577db99 ASoC: rt5645: add register setting for TDM
We need to set extra register to avoid a recording issue in TDM
mode.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-13 11:34:41 +00:00
Richard Fitzgerald e9c7f34a7e ASoC: arizona: Add DSP_B and LEFT_J mode support
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-12 17:32:50 +00:00
Thomas Petazzoni 2cb1e0259f ASoC: cs42l51: re-hook of_match_table pointer
In commit a1253ef6d3 ("ASoC: cs42l51: split i2c from codec driver"),
the I2C part of the CS42L51 was moved to a separate file, but the
definition of the of_device_id array was left in the driver file
itself, no longer connected to the platform_driver structure using the
.of_match_table pointer.

This commit exports the of_device_id array in cs42l51, and uses it as
.of_match_able in cs42l51-i2c.c. This solution was suggested by Brian
Austin.

Fixes: a1253ef6d3 ("ASoC: cs42l51: split i2c from codec driver")
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org>
2014-11-12 15:56:09 +00:00
Charles Keepax ef326f4bb2 ASoC: arizona: Add support for 768kHz DMIC operation
The new IPs supports a new lower frequency 768kHz DMIC operation
add support for this into the OSR control.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-12 15:06:11 +00:00
Oder Chiou 91159ecaf4 ASoC: rt5677: Add TDM channel mux in DAC side of IF1 and IF2
It is the slot selection in DAC side of IF1 and IF2.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-12 11:48:40 +00:00
Misael Lopez Cruz 68d6626925 ASoC: tlv320aic3x: Add output driver pop reduction controls
Output driver has two parameters that can be configured to reduce
pop noise: power-on delay and ramp-up step time. Two new kcontrols
have been added to set these parameters.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-11 13:31:13 +00:00
Peter Ujfalusi a60e654be7 ASoC: tlv320aic3x: Convert SOC_ENUM_SINGLE/DOUBLE arrays to individual
It is easier to find the relevant enums in the code. Use the
SOC_ENUM_*_DECL macro for the individual items.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-11 13:31:13 +00:00
Bard Liao 5563502cb6 ASoC: rt5645: remove unused rt5645_clk_sel_put
Remove rt5645_clk_sel_put function since it is never used.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-11 12:09:08 +00:00
Bard Liao 0cf1863219 ASoC: rt5670: add rt5672 codec support
rt5672 is very similar to rt5670. Therefore we use one codec driver
to support both codecs. The difference between rt5670 and rt5672 is
there is some difference in their dapm routing table.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-11 12:07:13 +00:00
Lars-Peter Clausen 3e4199ef01 ASoC: wm8962: Move DSP enable lock to the driver level
The wm8962 uses the snd_soc_codec mutex to protect the wm8962_dsp2_ena_put()
function from concurrent execution. This patch moves that lock to the driver
level. This will allow us to eventually remove the snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:08:27 +00:00
Lars-Peter Clausen fabfad2f8b ASoC: wm8958: Move DSP firmware lock to driver level
The wm8958 driver uses the snd_soc_codec mutex to protect the various
firmware pointers from concurrent assignment. This patch moves this lock to
the driver level. This will allow us to eventually remove the snd_soc_codec
mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:08:22 +00:00
Lars-Peter Clausen 78660af7ba ASoC: wm8903: Move the deemph lock to the driver level
The wm8903 uses the snd_soc_codec mutex to protect its deemph settings from
concurrent access. This patch moves this lock to the driver level. This will
allow us to eventually remove the snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:08:18 +00:00
Lars-Peter Clausen a51ff30f45 ASoC: wm8731: Move the deemph lock to the driver level
The wm8731 uses the snd_soc_codec mutex to protect its deemph settings from
concurrent access. This patch moves this lock to the driver level. This will
allow us to eventually remove the snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:08:09 +00:00
Lars-Peter Clausen d74bcaaeb6 ASoC: wm5102: Move ultrasonic response settings lock to the driver level
The wm5102 driver currently uses the snd_soc_codec mutex to protect its
ultrasonic response settings from concurrent access. This patch moves this
lock to the driver level. This will allow us to eventually remove the
snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:07:57 +00:00
Lars-Peter Clausen 210a5fae55 ASoC: max98095: Move mutex to the driver level
The max98095 uses the snd_soc_codec mutex to protect against concurrent
access in some of its control put handlers. Move this mutex to the driver
level so we can eventually remove the snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:07:42 +00:00
Lars-Peter Clausen 52ef6284a8 ASoC: ab8500-codec: Move control lock to the driver level
The ab8500 driver uses a driver specific lock to protect concurrent access
to some of the control put/get handlers and uses the snd_soc_codec mutex for
some others. This patch updates the driver to consistently use the driver
specific lock for all controls. This will allow us to eventually remove the
snd_soc_codec mutex.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 19:07:42 +00:00
Peter Ujfalusi 3684940933 ASoC: tlv320aic3x: Add TDM support
TDM support is achieved using DSP transfer mode and setting a
programmable offset which specifies where data begins with
respect to the frame sync.

It requires 256-clock mode if CODEC is master (not currently
supported in the driver). No additional dependency if CODEC
is slave.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-10 12:04:02 +00:00
Peter Rosin fbace43e88 ASoC: tfa9879: New driver for NXP Semiconductors TFA9879 amplifier.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-09 09:46:43 +00:00
Lars-Peter Clausen cf1f2ebe8d ASoC: wm9712/wm9713: Replace virtual registers with custom put/get callbacks
The wm9712/wm9713 has separate mixers for the left and the right channel,
but the inputs to the mixers are enabled/disabled by the same control.
Currently this is implemented by the driver by registering two virtual
controls for each physical control, one for the left mixer and one for the
right mixer.

Using virtual registers will no longer work when the driver has
been converted to regmap. This patch converts the driver to use controls
with custom put/get callbacks instead which implement the logic making sure
that the physical control is unmuted when either the left or the right
control is unmuted.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-08 09:44:36 +00:00
Mark Brown 65ba65f200 Merge branches 'topic/wm9712' and 'topic/wm9713' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-wm971x 2014-11-08 09:44:31 +00:00
Bard Liao 9e2683530d ASoC: rt5645: Add ASRC support
This patch add ASRC support for rt5645 codec.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-07 11:46:57 +00:00
Oder Chiou 19ba484d7b ASoC: rt5677: Use specific r/w function for DSP mode
In DSP mode, the register r/w should use the specific function to access
that is invoked by address mapping of the DSP.

The MX-65[1] is for switching DSP or codec mode.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-07 11:19:06 +00:00
Lars-Peter Clausen 5ad72152b6 ASoC: ssm4567: Add support for disabling the boost stage
This patch adds a switch to enable/disable boost stage of the output
amplifier. Applications that know that they do not need the output
amplifier boost stage can disable it to conserve a bit of power.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 16:05:10 +00:00
Lars-Peter Clausen ead99f89b7 ASoC: ssm4567: Add support for setting the DAI format and TDM configuration
The SSM4567 has support for a couple of different DAI formats. In TDM mode
it is also possible to select the TDM slot. This patch adds support for this
by implementing the set_fmt and set_tdm_slot callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 16:05:10 +00:00
Lars-Peter Clausen feec843d6c ASoC: ssm4567: Add DAC high-pass-filter control
Add a switch which can be used to enable/disable the DAC high-pass-filter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 16:05:10 +00:00
Bard Liao bb656add19 ASoC: rt5645: Add JD function support
rt5645 codec support jack detection function. The patch will set
related registers if JD function is used.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 12:33:49 +00:00
Bard Liao 96927ac96d ASoC: rt5670: change dapm routes of PLL connection
PLL should be powered up once filter power is on. So, "PLL1"
should be connected to filters instead of DACs.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 06:01:13 +00:00
Bard Liao ac87f22147 ASoC: rt5670: correct the incorrect default values
The patch corrects the incorrect default register values.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-11-06 05:55:54 +00:00
Bard Liao f8c101bc35 ASoC: rt286: fix comment style
Adds spaces around the /* */.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 05:51:00 +00:00
Bard Liao 6c67cde2aa ASoC: rt286: set combo jack by dmi
This patch enables combo jack configuration according to dmi.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-06 05:50:55 +00:00
Lars-Peter Clausen 1b86a3fa4e ASoC: ad193x: Keep DAC output stage active in idle
Setting the DAC power-down bit for the ad193x will also disable the DAC
output amplifier. This will cause audible clicks and pops when starting or
stopping playback. To prevent this a new widget is introduced that controls
the DAC power-down bit. This widget is connected to both the DAC and a newly
introduced VMID widget. This makes sure that the DAC power-down bit is not
set as long as a audio sink is connected to the DAC output. At the same time
the PLL and SYSCLK will still be disabled when no playback or capture stream
is active.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 16:33:08 +00:00
Oder Chiou d65fd3a42e ASoC: rt5677: Minor coding style and typo fix
Minor coding style and typo fix

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:56:43 +00:00
Lars-Peter Clausen b131c02e99 ASoC: wm8995: Use table based DAPM and control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:49:51 +00:00
Lars-Peter Clausen c4f50dbc56 ASoC: wm8961: Use table based DAPM and control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:49:29 +00:00
Lars-Peter Clausen a6bf306988 ASoC: wm8737: Use table based DAPM and control setup
Makes the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:49:06 +00:00
Lars-Peter Clausen c8b5d089d6 ASoC: wl1273: Use table based control setup
Makes the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:48:40 +00:00
Lars-Peter Clausen e3f1ff318e ASoC: tas2552: Use table based DAPM setup
Makes the code a bit cleaner and shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:48:05 +00:00
Lars-Peter Clausen 0c239fa6eb ASoC: sn95031: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-05 14:47:40 +00:00
Dylan Reid defcd98b16 ASoC: max98090: Different comp tables for different pclks
In addtion expand the table to handle other values of sysclk.  Instead
of making the table 3D, expand it to a more descriptive struct.  The
divisors are specified in Table 19 of the 98090 data sheet version
0p94.

The dmic frequency was previously assumed.  Instead make it explicit
and configurable through device tree.  This now handles independently
set pclk and dmic frequency.

Based on downstream work by Ralph Birt.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04 19:59:21 +00:00
Mark Brown 33ebcd9b45 Merge branch 'fix/max98090' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-max98090 2014-11-04 19:58:58 +00:00
Dylan Reid ece509c109 ASoC: max98090: Correct pclk divisor settings
The Baytrail-based chromebooks have a 20MHz mclk, the code was setting
the divisor incorrectly in this case.  According to the 98090
datasheet, the divisor should be set to DIV1 for 10 <= mclk <= 20.
Correct this and the surrounding clock ranges as well to match the
datasheet.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04 19:58:02 +00:00
Bard Liao 0b2e4959ce ASoC: rt5645: make bias level more reasonale
This patah separate bias level off to standby and off. The standby
level will provide the necessary power for JD and push button
functions.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-04 11:37:35 +00:00
Greg Kroah-Hartman a8a93c6f99 Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next
Remove all .owner fields from platform drivers
2014-11-03 19:53:56 -08:00
Mark Brown ebc01f593b Linux 3.18-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUVrf1AAoJEHm+PkMAQRiGtUkH/RX941uLQo0V+K0dy6LKD+Dv
 YmdmS7wQQ/Y5ji+qaaMgpqS1Fcjh7q1qXLSCstxiU42xVsulFKF1iA4fbesdmUvN
 zrtRYFCDPH2s0dycRfui9EW0ss/Bb3/l2aiRdpyzMBgwHa3Em2z74CdY9EPYkePW
 zozrNSwSt+iTSw9sg9SdaBiayV+jlFwJ+pgpjUccpRz3Ob7z5LlYtuLk4pITtFuw
 hc00bdCeduD0UJ3NC7WLS4USH5ZXZLkNB+OoteUw6srPUiDeaG0LefdV4D4J1eKe
 dcUXgoCMAqqc3a4PybC0sYBGumJmdaQwNVkh7RBLwUkQ0zjiuvbNcjSYfTG2yFs=
 =vR5Z
 -----END PGP SIGNATURE-----

Merge tag 'v3.18-rc3' into asoc-sgtl5000

Linux 3.18-rc3
2014-11-03 15:13:33 +00:00
Max Filippov bf9706fe95 ASoC: tlv320aic23: add dependencies on I2C/SPI_MASTER
This fixes build errors in configurations with I2C/SPI master disabled.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-03 11:31:34 +00:00
Randy Dunlap e894beb818 ASoC: cs42l51: depends on I2C
Fix build errors when CONFIG_I2C is not enabled by making the
driver depend on I2C.

../sound/soc/codecs/cs42l51-i2c.c:55:1: warning: data definition has no type or storage class [enabled by default]
 module_i2c_driver(cs42l51_i2c_driver);
 ^
../sound/soc/codecs/cs42l51-i2c.c:55:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
../sound/soc/codecs/cs42l51-i2c.c:55:1: warning: parameter names (without types) in function declaration [enabled by default]
../sound/soc/codecs/cs42l51-i2c.c:45:26: warning: 'cs42l51_i2c_driver' defined but not used [-Wunused-variable]
 static struct i2c_driver cs42l51_i2c_driver = {
                          ^

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 19:25:38 +00:00
Lars-Peter Clausen 5bc39b50fd ASoC: wm9713: Use virtual control instead of virtual register
The wm9713 currently implements the virtual control for the Mic B Source MUX
using a virtual register. Replace this by using SOC_ENUM_SINGLE_VIRT().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:34:04 +00:00
Lars-Peter Clausen 5efe89d952 ASoC: wm9713: Move driver state struct allocation to driver probe
Resources for the device should be allocated in the device driver probe
callback, rather than in the ASoC CODEC probe callback.

E.g. one advantage is that we can use device managed allocations.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:34:00 +00:00
Lars-Peter Clausen c1359ca303 ASoC: wm9713: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:33:58 +00:00
Lars-Peter Clausen a6c2b07f11 ASoC: wm9713: Cleanup printk usage
Use dev_err()/dev_warn() instead of printk(KERN_ERR/KERN_WARNING. This is
common practice and makes it easy to find out which device generated the
message. While we are at it also align the error messages with the other
AC'97 drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:33:54 +00:00
Lars-Peter Clausen 9a812c6b7a ASoC: wm9712: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:32:07 +00:00
Lars-Peter Clausen 12ced338ab ASoC: wm9712: Cleanup printk usage
Use dev_err() instead of printk(KERN_ERR. This is common practice and makes
it easy to find out which device generated the message. While we are at it
also align the error messages with the other AC'97 drivers.

Also avoid printing two error messages when the reset fails.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:32:03 +00:00
Lars-Peter Clausen d7cabb08ba ASoC: wm9705: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:31:39 +00:00
Lars-Peter Clausen 9cf766f666 ASoC: wm9705: Cleanup printk usage
Use dev_err() instead of printk(KERN_ERR. This is common practice and makes
it easy to find out which device generated the message. While we are at it
also align the error messages with the other AC'97 drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:31:16 +00:00
Lars-Peter Clausen 8865051d99 ASoC: stac9766: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:20:19 +00:00
Lars-Peter Clausen 93932abaa3 ASoC: stac9766: Cleanup printk usage
Use dev_err() instead of printk(KERN_ERR. This is common practice and makes
it easy to find out which device generated the message. While we are at it
also align the error messages with the other AC'97 drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:20:19 +00:00
Lars-Peter Clausen 6ce13d61dc ASoC: ad1980: Use table based control setup
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:18:50 +00:00
Lars-Peter Clausen e5adb6cddb ASoC: ad1980: Cleanup printk usage
Use dev_err()/dev_warn() instead of printk(KERN_ERR/KERN_WARNING. This is
common practice and makes it easy to find out which device generated the
message. While we are at it also align the error messages with the other
AC'97 drivers.

Also remove the info message that is printed when the driver is probed, this
is just noise in bootlog.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:18:35 +00:00
Lars-Peter Clausen 16af0ee16c ASoC: ad1980: Remove unused header
The constants defined in the ad1980 header are not used. So remove the file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 17:18:35 +00:00
Max Filippov d004ebbef7 ASoC: tlv320aic23: make codecs selectable in Kconfig
Now that manual selection of drivers for audio subsystem components is
preferred AIC23 codec must be selectable in Kconfig to make it possible.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 12:25:39 +00:00
Bard Liao 6879db7648 ASoC: rt286: reduce power consumption
This patch will optimize the power consumption of rt286.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-31 11:03:11 +00:00
Fang, Yang A df078d291d ASoC: rt5645: Mark RT5645_TDM_CTRL_3 as readable
amixer query fails due to it is not readable reigster

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Acked-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-29 10:58:13 +00:00
Oder Chiou e6f6ebc1f8 ASoC: rt5677: Add TDM channel mapping function
It is for channel to slot mapping, and it is not only for 8 channels mapping,
but also in 2, 4 and 6 channels mapping. If we want to use the 2 channels in
the stereo2 adc path, we need to set the item "2/1/3/4" or "2/3/1/4".

It also adds for stereo channel swap. It can map the sterero channels "L/R"
to "R/L", "L/L" or R/R.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 22:52:21 +00:00
Thomas Petazzoni 4e44923847 ASoC: cs42l51: make driver user-selectable
Since we are removing the Armada 370 DB audio machine driver to use
the 'simple-card' Device Tree binding, we can no longer select the
CS42L51 codec driver using a Kconfig 'select', and we instead need it
to be user-selectable. Therefore, this commit adds a prompt to make
the CS42L51 I2C codec driver user-selectable.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 22:34:13 +00:00
Axel Lin b2a9a3b818 ASoC: es8328-i2c: Fix i2c_device_id name field in es8328_id
The convention for i2c_device_id name does not need to have company prefix.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 10:48:03 +00:00
Fabio Estevam cea82d8af3 ASoC: wm8731: Use the preferred form for passing a size of a struct
According to Documentation/CodingStyle - Chapter 14:

"The preferred form for passing a size of a struct is the following:

	p = kmalloc(sizeof(*p), ...);

The alternative form where struct name is spelled out hurts readability and
introduces an opportunity for a bug when the pointer variable type is changed
but the corresponding sizeof that is passed to a memory allocator is not."

So do it as recommeded.

Cc: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 00:44:30 +00:00
Fabio Estevam 54ec2d5f3f ASoC: wm8962: Use the preferred form for passing a size of a struct
According to Documentation/CodingStyle - Chapter 14:

"The preferred form for passing a size of a struct is the following:

	p = kmalloc(sizeof(*p), ...);

The alternative form where struct name is spelled out hurts readability and
introduces an opportunity for a bug when the pointer variable type is changed
but the corresponding sizeof that is passed to a memory allocator is not."

So do it as recommeded.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 00:44:16 +00:00
Fabio Estevam 3f7256fe5f ASoC: sgtl5000: Use the preferred form for passing a size of a struct
According to Documentation/CodingStyle - Chapter 14:

"The preferred form for passing a size of a struct is the following:

	p = kmalloc(sizeof(*p), ...);

The alternative form where struct name is spelled out hurts readability and
introduces an opportunity for a bug when the pointer variable type is changed
but the corresponding sizeof that is passed to a memory allocator is not."

So do it as recommeded.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-28 00:44:00 +00:00
Ben Zhang e29bee098e ASoC: rt5677: fix rt5677 spi driver build
Create a separate module for rt5677 spi driver. Without
this patch, the build fails due to multiple defs of
'init_module' and 'cleanup_module'. module_spi_driver()
defines its own module, so it can't be part of the rt5677
module.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-23 11:06:06 +01:00
kbuild test robot 2d27deb40d ASoC: rt5677: rt5677_irq_init() can be static
sound/soc/codecs/rt5677.c:4017:5: sparse: symbol 'rt5677_irq_init' was not declared. Should it be static?
sound/soc/codecs/rt5677.c:4044:6: sparse: symbol 'rt5677_irq_exit' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 16:34:50 +01:00
Oder Chiou 5e3363ad1b ASoC: rt5677: add GPIO IRQ support
This allows to enable Mic Jack detection feature

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Modified-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:43:14 +01:00
Lars-Peter Clausen 4c07a43d96 ASoC: stac9766: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:34:13 +01:00
Lars-Peter Clausen cfbb77ce36 ASoC: sta529: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:33:53 +01:00
Lars-Peter Clausen 2062c1ff35 ASoC: sta350: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:32:51 +01:00
Lars-Peter Clausen 815b776cf5 ASoC: sta32x: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:32:16 +01:00
Lars-Peter Clausen 46804120c5 ASoC: max9850: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:30:56 +01:00
Lars-Peter Clausen a8669f6032 ASoC: max98095: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:30:03 +01:00
Lars-Peter Clausen a613cc4063 ASoC: max98088: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:29:45 +01:00
Lars-Peter Clausen e48d73c697 ASoC: ak4671: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:29:19 +01:00
Lars-Peter Clausen 61ce9ee3aa ASoC: ak4642: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:28:47 +01:00
Lars-Peter Clausen 0b0171e3ad ASoC: ak4641: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:28:25 +01:00
Lars-Peter Clausen 4caab4194a ASoC: ak4535: Use table based setup for controls
Makes the code slightly shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:28:04 +01:00
Lars-Peter Clausen 9313484238 ASoC: ak4535: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 11:27:45 +01:00
Lars-Peter Clausen 3b283f0893 ASoC: adau1761: Fix input PGA volume
For the input PGA to work correctly the ALC clock needs to be active.
Otherwise volume changes are not applied.

Fixes: dab464b60b ("ASoC: Add ADAU1361/ADAU1761 audio CODEC support")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-22 10:24:14 +01:00
Wolfram Sang c756e83d1a ASoC: codecs: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:22:07 +02:00
Jean-Michel Hautbois 8735779774 ASoC: sgtl5000: Add MicBias voltage support
Some systems may require to specify a bias different than default (1.25V).
This adds a property in sgtl5000 codec.
The property is specified in milli-volts so that it is coherent with datasheet.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:33 +01:00
Jean-Michel Hautbois bd0593f5f6 ASoC: sgtl5000: Add MicBias resistor support in DT
Some systems may require a different resistor than the default one (4K).
This adds a property in sgtl5000 codec.
It keeps the default of 4K when nothing is specified so it does not break
existing code.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:33 +01:00
Fabio Estevam 7f6d75d776 ASoC: sgtl5000: Cleanup the comments
Fix grammar and typos.

Besides that, also fix the comment about the range of SYS_MCLK, which is from
8 to 27 MHz.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:33 +01:00
Anatol Pomozov ac884fc47b ASoC: rt5677: add build dependency to spi
Since 9cb715a9d4c the codec has a hardcoded dependency to spi.
Add this dependency to Kconfig. It fixes buildbot compilation failure:

   sound/built-in.o: In function `spi_write':
>> rt5677-spi.c:(.text+0x8265f): undefined reference to `spi_sync'
   sound/built-in.o: In function `rt5677_spi_driver_init':
>> rt5677-spi.c:(.init.text+0x17db): undefined reference to `spi_register_driver'

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:21 +01:00
Anatol Pomozov 45b6e1d300 ASoC: rt5677: fix build when kernel compiled without GPIOLIB support
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:21 +01:00
Anatol Pomozov 8a4bd60af4 ASoC: rt5677: Print more information if setting DAI clock failed
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:20 +01:00
Oder Chiou af48f1d08a ASoC: rt5677: Support DSP function for VAD application
The ALC5677 has a programmable DSP, and there is a SPI that is dadicated for DSP
firmware loading. Therefore, the patch includes a SPI driver for writing the DSP
firmware. The VAD(Voice Activaty Detection) has be implemented and use the DSP to
recognize the key phase.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:20 +01:00
Anatol Pomozov 40eb90a18e ASoC: rt5677: Add option to configure gpio as floating/pullup/pulldown
gpio_config is array of 6 elements that allows to set GPIO as
floating, pullup, pulldown.

Sponsored: Google ChromeOS
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:20 +01:00
Ben Zhang 80fff6bf65 ASoC: rt5677: Include gpio driver header
The header file is needed because struct gpio_chip is
placed in struct rt5677_priv.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:20 +01:00
Oder Chiou cd6e82b814 ASoC: rt5645: Add the workqueue of the jack detect function for the debouncing
Add the workqueue of the jack detect function for the debouncing.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:22:09 +01:00
Jyri Sarha 6943409791 ASoC: hdmi: HDMI codec doesn't benefit from pmdown delay
Adds .ignore_pmdown_time = true to codec driver struct.

HDMI codec is currently a dummy codec and doesn't benefit from pmdown
delay. Even if in the future the codec would controll HDMI encoder, it
would still be a digital to digital interface that should have no need
for pmdown delay.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:26 +01:00
Jyri Sarha 74d813cf37 ASoC: hdmi: Mark the maximum significant bits to HDMI codec
HDMI audio can not have more than 24 bits even if on i2s bus there
would be 32 bit samples. Mark this by adding .sig_bits = 24 to
playback stream definition.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:26 +01:00
Axel Lin c973b8a7dc ASoC: cs4271: Split SPI and I2C code into different modules
Currently the cs4271 driver depends on SND_SOC_I2C_AND_SPI.
So the driver cannot be built as built-in if CONFIG_I2C=m.
Split SPI and I2C code into different modules to avoid this issue.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:20:02 +01:00
Axel Lin fd587e3200 ASoC: cs4265: Remove unused *dev field from struct cs4265_private
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <paul.handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20 12:19:57 +01:00
Linus Torvalds fcc3a5d277 Changes to existing drivers:
- DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030
   - Export symbols for use in modules in max14577
   - Plenty of static code analysis/Coccinelle fixes throughout the SS
   - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808
   - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona
   - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr
   - IRQ fixups in arizona, stmpe, max14577
   - Regulator related changes in axp20x
   - Pass DMA coherency information from parent => child in MFD core
   - Rename DT document files for consistency
   - Add ACPI support to the MFD core
   - Add Andreas Werner to MAINTAINERS for MEN F21BMC
 
 New drivers/supported devices:
   - New driver for MEN 14F021P00 Board Management Controller
   - New driver for Ricoh RN5T618 PMIC
   - New driver for Rockchip RK808
   - New driver for HiSilicon Hi6421 PMIC
   - New driver for Qualcomm SPMI PMICs
   - Add support for Intel Braswell in lpc_ich
   - Add support for Intel 9 Series PCH in lpc_ich
   - Add support for Intel Quark ILB in lpc_sch
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUMvv5AAoJEFGvii+H/Hdhq90P/3a7ed9Gc4SatQNJ8u68e8M+
 lllGPWXVKnbCR8yc/kCALBpNYUcyPzTp5u1l/ozwEgRDgCzNAvYC2h/aflpPjWSu
 5q1rE7V8Cz/hUxXU/fcEMcnJYiqdaRowgdFtUM+ClLQReOkmwQhWID+hLvTlCUIN
 6MkXCsAl6vrzBEtbKtlR5+6VDQ3Q84gqN2SadpxS+yQwIfGrq1ZWYATaPhdSNGR9
 4bde6YwAqgttQDHyHw0dsd9VtJ53KVk13QkHIHW6S6uPOaZSIvtt4noDUtghDUA1
 tN7d5e5x1Rm8lPREQ4PxMKqHJoRxGfYyAosqXlt3XA1wbjgOgN35nev3gqrbfho5
 eHIWfFJgPDOOwTRVT1drTOVSoxecsbrQq1YB7ChdnfREQbpFiwKhBIxjQKEpQNrI
 OjxXp4ngXwiz31Hvq+44Z6MEVVRCTXgAuBf9/cd8GkF772H7nKmT+wH1QvF+6BRG
 52qEwugTiINo3O+5g1xuDFjFWZ5GWrwUQuRHss13A0cgo+EUJKM6caH+375T7jIT
 vH+2hg0XrqAlWPqcPd1Ma9TVKqI6RJdF0XOk7YP+PcPRvN+SoW/TAGFpzfDHCd+K
 dj3/10nJZUi4CKz6PRcTxKFFpgYjsEGwhYHRWLtH+MXg3UcCyoqTrvfpkGh+hq37
 H9rkW3cNzeyHSAaeKtnk
 =xxsZ
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Changes to existing drivers:
  - DT clean-ups in da9055-core, max14577, rn5t618, arizona, hi6421, stmpe, twl4030
  - Export symbols for use in modules in max14577
  - Plenty of static code analysis/Coccinelle fixes throughout the SS
  - Regmap clean-ups in arizona, wm5102, wm5110, da9052, tps65217, rk808
  - Remove unused/duplicate code in da9052, 88pm860x, ti_ssp, lpc_sch, arizona
  - Bug fixes in ti_am335x_tscadc, da9052, ti_am335x_tscadc, rtsx_pcr
  - IRQ fixups in arizona, stmpe, max14577
  - Regulator related changes in axp20x
  - Pass DMA coherency information from parent => child in MFD core
  - Rename DT document files for consistency
  - Add ACPI support to the MFD core
  - Add Andreas Werner to MAINTAINERS for MEN F21BMC

 New drivers/supported devices:
  - New driver for MEN 14F021P00 Board Management Controller
  - New driver for Ricoh RN5T618 PMIC
  - New driver for Rockchip RK808
  - New driver for HiSilicon Hi6421 PMIC
  - New driver for Qualcomm SPMI PMICs
  - Add support for Intel Braswell in lpc_ich
  - Add support for Intel 9 Series PCH in lpc_ich
  - Add support for Intel Quark ILB in lpc_sch"

[ Delayed to after the poweer/reset pull due to Kconfig problems with
  recursive Kconfig select/depends-on chains.   - Linus ]

* tag 'mfd-for-linus-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (79 commits)
  mfd: cros_ec: wait for completion of commands that return IN_PROGRESS
  i2c: i2c-cros-ec-tunnel: Set retries to 3
  mfd: cros_ec: move locking into cros_ec_cmd_xfer
  mfd: cros_ec: stop calling ->cmd_xfer() directly
  mfd: cros_ec: Delay for 50ms when we see EC_CMD_REBOOT_EC
  MAINTAINERS: Adds Andreas Werner to maintainers list for MEN F21BMC
  mfd: arizona: Correct mask to allow setting micbias external cap
  mfd: Add ACPI support
  Revert "mfd: wm5102: Manually apply register patch"
  mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS
  mfd: dt-bindings: atmel-gpbr: Rename doc file to conform to naming convention
  mfd: dt-bindings: qcom-pm8xxx: Rename doc file to conform to naming convention
  mfd: Inherit coherent_dma_mask from parent device
  mfd: Document DT bindings for Qualcomm SPMI PMICs
  mfd: Add support for Qualcomm SPMI PMICs
  mfd: dt-bindings: pm8xxx: Add new compatible string
  mfd: axp209x: Drop the parent supplies field
  mfd: twl4030-power: Use 'ti,system-power-controller' as alternative way to support system power off
  mfd: dt-bindings: twl4030-power: Use the standard property to mark power control
  mfd: syscon: Add Atmel GPBR DT bindings documention
  ...
2014-10-15 06:58:16 +02:00
Mark Brown bdf20b4291 Merge remote-tracking branches 'asoc/fix/88pm860x', 'asoc/fix/fsl', 'asoc/fix/imx', 'asoc/fix/mc13783', 'asoc/fix/rockchip' and 'asoc/fix/simple' into asoc-linus 2014-10-08 16:44:50 +01:00
Mark Brown a66ae631a3 ASoC: mc13783: Ensure we only try to dereference valid of_nodes
Reported-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-08 15:42:33 +01:00
Daniel Mack 77eca3cd46 ASoC: 88pm860x-codec: Fix possibly missing string termination
Coverity spotted an issue with strncpy() in pm860x_codec_probe()
which does not take the \0 termination byte into account. Fix this
by making the buffers one byte larger so the can really accommodate
MAX_NAME_LEN bytes long strings.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-07 13:13:22 +01:00
Mark Brown a5448c88b8 Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/wm8978' and 'asoc/topic/wm8994' into asoc-next 2014-10-06 12:49:09 +01:00
Mark Brown 978d4ddb9e Merge remote-tracking branches 'asoc/topic/suspend', 'asoc/topic/tas2552', 'asoc/topic/tegra', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic3x' into asoc-next 2014-10-06 12:49:07 +01:00
Mark Brown 248519c00e Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/spdif', 'asoc/topic/ssm2602' and 'asoc/topic/ssm4567' into asoc-next 2014-10-06 12:49:05 +01:00
Mark Brown 7370780cfd Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-next 2014-10-06 12:49:03 +01:00
Mark Brown 9568eaec6c Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip', 'asoc/topic/rsnd' and 'asoc/topic/rt286' into asoc-next 2014-10-06 12:49:02 +01:00
Mark Brown 57b027f697 Merge remote-tracking branches 'asoc/topic/fsl-easi', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-ssi' and 'asoc/topic/intel' into asoc-next 2014-10-06 12:48:59 +01:00
Mark Brown 565fefdf31 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next 2014-10-06 12:48:57 +01:00
Mark Brown 9919badff1 Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs42l52', 'asoc/topic/cs42l56' and 'asoc/topic/da732x' into asoc-next 2014-10-06 12:48:55 +01:00
Mark Brown 1e9ca6857c Merge remote-tracking branches 'asoc/topic/ab8500', 'asoc/topic/ac97' and 'asoc/topic/cs35l32' into asoc-next 2014-10-06 12:48:54 +01:00
Mark Brown 7ddb870b78 Merge remote-tracking branch 'asoc/topic/fsl-esai' into asoc-next 2014-10-06 12:48:53 +01:00
Mark Brown 5bcaca4b5b Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2014-10-06 12:48:51 +01:00
Mark Brown 832a94143c Merge remote-tracking branches 'asoc/fix/davinci' and 'asoc/fix/max98090' into asoc-linus 2014-10-06 12:48:50 +01:00
Mark Brown fd7aff54ff ASoC: Fixes for v3.17
Another round of again fairly unexciting fixes - several driver fixes,
 an e-mail address change and a fix for error handling with DPCM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUEDV+AAoJECTWi3JdVIfQ/6MH/j45SuIb63+Uaesb9tN3P/rt
 4wBW1FNW5g6AJPDiAnbD3Z+/B/nbM7WKQZS2UhCB63h5PI1wxvebnmmfxaIyx1cP
 +/G2kGQKPIWjb5NPWFzzgSci/sv1FffiRlIXtqCnopPGrcnQwPMKFJHh4C43Oa9b
 3nAmJk96u7ABxVh2b6oJvdX/i7eAvkB5lITOIAe5bQVTSgV7iXOdAb+a1qlqAX5G
 81fWbopnCa/kzFWZv9H1PNJdu5piOFfXRB6PsepRWSLkcJKGLuhc3eY5fmClsE74
 0f5NoK+KTLxcaCsZV1tH8J8IscyNz0QgxJmIiNVXFJ19kzFwFzk3vAtN3Pdn/tU=
 =GZdJ
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.17-rc4' into asoc-linus

ASoC: Fixes for v3.17

Another round of again fairly unexciting fixes - several driver fixes,
an e-mail address change and a fix for error handling with DPCM.

# gpg: Signature made Wed 10 Sep 2014 12:26:54 BST using RSA key ID 5D5487D0
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2014-10-06 12:48:44 +01:00
Masanari Iida cd9241e44a ASoC: da732x: Remove unnecessary KERN_ERR in pr_err()
This patch remove unnecessary KERN_ERR in pr_err().

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-04 13:04:46 +01:00
Dmitry Lavnikevich 31d9f8faf9 ASoC: tlv320aic3x: fix PLL D configuration
Current caching implementation during regcache_sync() call bypasses
all register writes of values that are already known as default
(regmap reg_defaults). Same time in TLV320AIC3x codecs register 5
(AIC3X_PLL_PROGC_REG) write should be immediately followed by register
6 write (AIC3X_PLL_PROGD_REG) even if it was not changed. Otherwise
both registers will not be written.

This brings to issue that appears particulary in case of 44.1kHz
playback with 19.2MHz master clock. In this case AIC3X_PLL_PROGC_REG
is 0x6e while AIC3X_PLL_PROGD_REG is 0x0 (same as register
default). Thus AIC3X_PLL_PROGC_REG also remains not written and we get
wrong playback speed.

In this patch snd_soc_read() is used to get cached pll values and
snd_soc_write() (unlike regcache_sync() this function doesn't bypasses
hardware default values) to write them to registers.

Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-10-03 16:06:11 +01:00
Fabio Estevam 6f4d2b3177 ASoC: sgtl5000: Do a sanity check on SYS_MCLK
According to the sgtl5000 datasheet the valid range for SYS_MCLK is from 8 to
27 MHz.

Add a sanity check prior to enabling SYS_MCLK.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-03 11:20:38 +01:00
Fabio Estevam fa558d0130 ASoC: sgtl5000: Improve the error message on slave mode setting
For sgtl5000 to operate in slave mode it can only work in "Synchronous
SYS_MCLK input" mode.

In this mode only the following rates can be supported: 256*Fs, 384*Fs, 512*Fs.

Improve the error message to give a better indication as to why the clocking
failed for slave mode:

[   12.515399] sgtl5000 1-000a: PLL not supported in slave mode
[   12.524124] sgtl5000 1-000a: 233 ratio is not supported. SYS_MCLK needs to be 256, 384 or 512 * fs
[   12.535938] sgtl5000 1-000a: ASoC: can't set sgtl5000 hw params: -22

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-03 11:20:38 +01:00
Bard Liao a577483b69 ASoC: rt286: Add depends on I2C
rt286 use I2C as its I/O. So the driver can only available when
I2C is selected.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-03 10:35:23 +01:00
Anatol Pomozov 7c168d5f8b ASoC: ssm4567: Remove duplicated else-if branch
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-02 12:20:51 +01:00
Thierry Reding 81f3dfe190 ASoC: rt286: Fix compilation warning for !PM
The rt286_index_sync() function is only called in the resume path. If PM
is disabled it becomes unused and shouldn't be built either.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-02 11:53:11 +01:00
Thierry Reding be1aa3ea1f ASoC: tas2552: Fix compilation warning for !PM_RUNTIME
The tas2552_sw_shutdown() function is only used by runtime suspend
support, so only build it when necessary.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-02 11:52:10 +01:00
Oder Chiou f3fa1bbd83 ASoC: rt5645: Add headset detect function
Add headset detect function

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 19:28:44 +01:00
Mark Brown 1400760c46 Merge branch 'topic/rt5640' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2014-10-01 17:04:24 +01:00
Jarkko Nikula cd69dc8868 ASoC: rt5640: Add function for enabling DMIC from ACPI probed machine
There is no code enabling DMIC clock in systems that don't provide platform
data for rt5640 after commit 71d97a7943 ("ASoC: rt5640: Use the platform
data for DMIC settings").

I think it's worth to keep this static DMIC clock and alternative data pin
setting during probe time. For making possible to use DMIC from ACPI probed
machine (prior ACPI 5.1 with _DSD) this patch moves DMIC configuration to
new exported rt5640_dmic_enable() that machine drivers can call.

Please note, this patch moves DMIC configuration from i2c probe to codec
probe in case platform data for rt5640 is set.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 17:03:24 +01:00
Takashi Iwai b7c2dc8e68 ASoC: Fix SSM2602 device identification
Another fix for v3.17, fixing device identification after the split out
 of the I2C and SPI code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUKqQ0AAoJECTWi3JdVIfQcbcH/1khKNhibCQvL0UB4o5p2Elh
 tffm/bQexEaCWr589X/6V8QCeSL1cm92yTs6FSfsDOny6TXTgMxmYrXeBfGb/L2a
 63IYWWxhdvPO/VtMPgqRnBtFnpr6jU3OJ8hmNRyZ6CR9kv0L0CJzPDIZgsZu5sjy
 wqmi6/zYEWznIjjSFQJjJ0xniHaRiTb6z6y6qtOqVY/btV0Lm5HVmsSiJ6Ktddq+
 jNMZLdAPQUnxLM/gtWbwhazAp6et9CwPWs3Y+jAFfkTc3R30xsC0N1CUq2OV+ngI
 0Wpzou/FOa5o8rWyGS5ORk1aaCDehZOXFSl6YkmbSPCCpDkaxbB4TjB7xPWXRh0=
 =yz7T
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fix SSM2602 device identification

Another fix for v3.17, fixing device identification after the split out
of the I2C and SPI code.
2014-10-01 09:29:26 +02:00
Stefan Kristiansson 3b2a0013c7 ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample rates
This adds the necessary values to the constraint list and
register values to the coefficient table in order to
configure the device for 11.025kHz and 22.5kHz sample rates.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-09-30 13:27:27 +01:00
Stefan Kristiansson 555b9ee136 ASoC: ssm2602: add device tree bindings
Allow the ssm2602/ssm2603/ssm2604 codec driver to be
instantiated from the device tree.

Also, add Kconfig prompts to allow manual selection of both the
I2C and SPI configuration versions of the driver.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-09-30 13:27:27 +01:00
Stefan Kristiansson fe2a08b3bf ASoC: ssm2602: do not hardcode type to SSM2602
The correct type (SSM2602/SSM2603/SSM2604) is passed down
from the ssm2602_spi_probe()/ssm2602_spi_probe() functions,
so use that instead of hardcoding it to SSM2602 in
ssm2602_probe().

Fixes: c924dc68f7 ("ASoC: ssm2602: Split SPI and I2C code into different modules")
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org
2014-09-30 13:27:19 +01:00
Anatol Pomozov 6f67c38005 ASoC: rt5677: Add dts properties for input/output differential configuration
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 19:46:20 +01:00
Lars-Peter Clausen 9cca023e5c ASoC: wm8{350,753,971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 18:25:25 +01:00
Mark Brown 82b925c405 Merge remote-tracking branches 'asoc/fix/atmel', 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/fsl-ssi' and 'asoc/fix/rt286' into asoc-linus 2014-09-28 12:25:12 +01:00
Jarkko Nikula f69e3caa9e ASoC: max98090: Enable both DMIC channels also when using mono configuration
According to MAX98090 specification "Digital microphone clock (DMC) is
enabled once both data channels are enabled.". Therefore both digital
microphone data channels must be enabled also when using mono microphone
configuration.

Fix this by moving "DMICL_ENA" and "DMICR_ENA" supply widgets from "DMICL"
and "DMICR" inputs to "DMIC Mux" in order to enable both data channels
whenever there is active mono or stereo digital microphone input path.

Use of "DMICL" and "DMICR" inputs are retained for informative source and in
case the driver would find use for exact digital microphone configuration in
the future.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28 12:03:50 +01:00
Anatol Pomozov 1ee44ce030 ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifier
Analog Devices SSM4567 is a boost class-D audio amplifier.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-27 11:12:42 +01:00
Bard Liao 66d627d554 ASoC: rt286: Fix sync function
We try to write index registers into cache when we write an index
register, but we change the reg value before updating the cache.
As a result, the cache is never be updated. This patch will fix
this issue.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-26 09:14:27 +01:00
Bard Liao b7a2976775 ASoC: rt286: Correct default value
This patch corrects some incorrect default value in the cache.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-26 09:14:18 +01:00
Charles Keepax c24084db22 mfd: arizona: Add ASYNC_SAMPLE_RATE_2 registers
Some arizona devices have a second asynchronous sample rate, add the
registers necessary to support this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-09-26 08:15:52 +01:00
Lars-Peter Clausen 83a7fc98dc ASoC: wm8741: Remove unused wm8741_suspend define
This driver has no suspend callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-25 16:17:39 +01:00
Anatol Pomozov f9f6a592cf ASoC: rt5677: Add a configuration option for LDO2_POW pin
Some boards have this pin statically tied and do not require any configuration,
some other boards allow to enable chip using GPIO.

Add an option that tells which GPIO is used to power the audio codec.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:59:03 +01:00
Jarkko Nikula 99632d1077 ASoC: max98090: Remove unused byte access macros
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:18 +01:00
Jarkko Nikula 0e2cadf39a ASoC: max98090: Remove unused version define
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:17 +01:00
Jarkko Nikula 3256ff6e51 ASoC: max98090: Remove structure member extmic_mux from private data
There is no other use for extmic_mux than setting it to zero so remove it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:17 +01:00
Jarkko Nikula ced1933db6 ASoC: max98090: Remove structure member irq from private data
struct max98090_priv member irq is now used only locally in
max98090_i2c_probe() and can be removed.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:17 +01:00
Jarkko Nikula 7a7f0ba03d ASoC: max98090: Move interrupt request from codec probe to i2c probe
Keep MAX98090 interrupt requested after i2c device probing as long as the
driver is loaded. This fixes the issue where subsequent codec probe
max98090_probe() call fails in interrupt request since interrupt wasn't
freed over codec remove-reprobe cycle.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:17 +01:00
Oder Chiou 90bdbb46f4 ASoC: rt5677: Add sidetone function
Add sidetone function

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22 17:52:45 -07:00
Oder Chiou 48561afef4 ASoC: rt5677: Add the TDM function
The patch adds the TDM function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17 10:05:12 -07:00
Axel Lin 5d5e63af99 ASoC: Remove return value checking for gpiochip_remove()
gpiochip_remove() will return void eventually.
Thus this patch removes return value checking for gpiochip_remove().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17 09:49:53 -07:00
Fabian Frederick e306b6ee4d ASoC: cs35l32: remove second linux/slab.h inclusion
linux/slab.h was included twice.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16 16:11:02 -07:00
Oder Chiou 44caf76480 ASoC: rt5677: Add the GPIO function
The patch adds the GPIO function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16 09:16:12 -07:00
Mark Brown f7667af217 Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/davinci', 'asoc/fix/rockchip', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-09-15 15:05:34 -07:00
Mark Brown 8dbc895067 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-15 15:05:33 -07:00
Oder Chiou e5b2791d2a ASoC: rt5677: Revise the wrong name in the header file
The patch revises the wrong name in the header file.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-15 14:48:58 -07:00
Paul Handrigan 774418253e ASoC: cs4265: Fix register address to set the proper data type.
The SPDIF control register must be written to set the data type in hw_params
not the ADC control register.

Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-11 17:17:31 +01:00
Mark Brown 5e3905f62b Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/max98090', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-09-10 12:21:03 +01:00
Mark Brown e87a925fb9 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-10 12:21:01 +01:00
Lars-Peter Clausen f0b99ca041 ASoC: da732x: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:47 +01:00
Lars-Peter Clausen ee6b42ee21 ASoC: da732x: Remove unused codec field form da732x_priv struct
The field is initialized in the probe callback, but never used again. So it
can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:46 +01:00
Lars-Peter Clausen f66a91ff8e ASoC: da732x: Remove unnecessary idle_bias_off initialization
idle_bias_off is false by default, no need to set it explicitly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:45 +01:00
Lars-Peter Clausen 02bf34f4b8 ASoC: cs42l73: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:41 +01:00
Lars-Peter Clausen 2a4bc751fc ASoC: cs42l56: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:38 +01:00
Lars-Peter Clausen 417c60e8f2 ASoC: cs42l52: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:22 +01:00
Mark Brown de3ac81068 Merge branch 'topic/cs42l56' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-suspend 2014-09-09 21:08:02 +01:00
Rajeev Kumar b794dbcd31 ASoC: Update email id of the author
I moved from ST Microelectronics and so updating email-id to personal one.

Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 10:49:41 +01:00
Lars-Peter Clausen 8d01370f59 ASoC: es8328: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:30 +01:00
Mark Brown bade5f09ca Merge branch 'topic/suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-es8328 2014-09-06 13:38:26 +01:00
Lars-Peter Clausen e649057a41 ASoC: sgtl5000: Cleanup bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 35199a7c11 ASoC: ml26124: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 2a93f70925 ASoC: jz4740: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:07 +01:00
Lars-Peter Clausen 3d2c42d191 ASoC: 88pm860x-codec: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:01 +01:00
Lars-Peter Clausen 85362efb80 ASoC: ssm2602: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. While we are at it also remove the
regcache_cache_only() calls from suspend/resume as there shouldn't be any IO
between suspend and resume.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:26 +01:00
Lars-Peter Clausen 0f0cc5a775 ASoC: ssm2518: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_OFF at the end of CODEC probe()
can also be removed as the CODEC is already in OFF state at this point.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen cd5d3a1511 ASoC: adav80x: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner. While we are at it also remove the
regcache_cache_only() calls from suspend/resume as there shouldn't be any IO
between suspend and resume.

Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen 0e0f9b960a ASoC: adau17x1: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen d7858bd647 ASoC: adau1373: Cleanup manual bias level transitions
The ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF
when removing the CODEC, no need to do it manually anymore.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Peter Ujfalusi 9cfb76905d ASoC: tlv320aic31xx: Enable support for S24_LE format
S24_LE is the same on the bus as S24_3LE, which means the codec can support
it.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 12:05:31 +01:00
Lars-Peter Clausen e02c716d2e ASoC: wm8995: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen a7edeba4cb ASoC: wm8804: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen 7d1a99da08 ASoC: tlv320aic3x: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen 8e6fe35eab ASoC: lm49453: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:26 +01:00
Lars-Peter Clausen b43cfb245f ASoC: adau1373: Remove unnecessary suspend/resume bias level changes
The ASoC core will only call the suspend/resume callbacks when the device's
DAPM context is idle. Since this driver sets idle_bias_off to true this
means that the device is already in SND_SOC_BIAS_OFF when the suspend
callback is called, so there is no need to manually set this state again.
There is also no need to go to SND_SOC_BIAS_STANDBY in the resume callback
since the core will go right back to SND_SOC_BIAS_OFF.

Also drop the regcache_cache_only() calls from the suspend and resume
handlers. There shouldn't be any IO happening after suspend and before
resume.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 19:26:25 +01:00
Jarkko Nikula b8a3ee820f ASoC: max98090: Add recovery for PLL lock failure
All MAX98090 input clocks MCLK, LRCLK and BCLK must be running and stable
before powering on the codec in slave mode. Otherwise the PLL may not lock
to LRCLK causing silence in playback and capture. How often that happens is
somewhat hardware and clock configuration specific.

Now if wanting to follow strictly this clocks must be active before
powering the codec on requirement we should have a notification from DAI
driver to codec driver when clocks are activated and take codec out of
shutdown only after that. Plus take care of possible active bypass paths.

However, when PLL unlock occurs, MAX98090 asserts the PLL Unlock Flag which
can be configured as an IRQ source. This allows to workaround around the
issue by toggling the codec power shortly in case of PLL lock failure.

In order to prevent needlessly toggling codec power in case of short PLL
unlocks at the beginning of stream this patch implements delayed activation
for PLL unlock interrupt. Then workaround is run only when the PLL doesn't
lock at all.

Power toggling workaround for PLL unlock comes originally from
Liam Girdwood <liam.r.girdwood@linux.intel.com> and delayed activation from
me.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:27:07 +01:00
Jyri Sarha 7ed36e96fd ASoC: tlv320aic31xx: Choose PLL p divider automatically
This simplifies aic31xx_divs table. There is no more need for p_val or
separate lines for 12 and 24 MHz mclks.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:25:44 +01:00
Mark Brown 94fe356f4c Merge branch 'fix/tlv320aic31xx' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tlv320aic31xx 2014-09-03 15:25:17 +01:00
Jyri Sarha 03be88ee4a ASoC: tlv320aic31xx: Fix 24bit samples with I2S format and 12MHz mclk
I2S format requires bitclock to have an exact amount of cycles in a
frame for audio to work cleanly. With dsp formats that is not so
important.

Updates aic31xx_setup_pll() to look for a line in aic31xx_divs table
that produces the best match for the bitclock and adds lines to
aic31xx_divs for 12MHz mclk and 24bit samples.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 15:23:56 +01:00
Mark Brown f58f0cba15 Merge remote-tracking branches 'asoc/fix/axi', 'asoc/fix/cs4265', 'asoc/fix/da732x', 'asoc/fix/omap', 'asoc/fix/rsnd', 'asoc/fix/rt5640', 'asoc/fix/rt5677', 'asoc/fix/simple' and 'asoc/fix/tegra' into asoc-linus 2014-09-02 23:33:39 +01:00
Lars-Peter Clausen ae70b190fc ASoC: ab8500-codec: Revert back to regmap
Commit ff795d614b ("ASoC: ab8500: Convert register I/O to regmap")
initially converted the ab8500 CODEC driver to use regmap rather than
legacy ASoC IO. This was reverted though in commit 63e6d43bf8 ("ASoC:
ab8500: Revert to using custom I/O functions") since the inital conversion
was not working properly. This was presumebly because the SOC_SINGLE_XR_SX
controls, which are used by this driver, did not properly support regmap at
that point. This has since been fixed in commit 6137a5ca32 ("ASoC: Prepare
SOC_SINGLE_XR_SX controls for regmap"). So revert back to regmap again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 17:59:23 +01:00
Wei Yongjun 75c3daaad5 ASoC: es8328: fix error return code in es8328_codec_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 11:34:00 +01:00
Peter Ujfalusi 085f3ec6fd ASoC: tlv320aic31xx: Correct interface register 2 variable name
Rename iface_reg3 to iface_reg2 since this variable is actually used for
interface register 2.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 10:53:37 +01:00
Axel Lin 5f609f282b ASoC: cs35l32: Simplify implementation of cs35l32_codec_set_sysclk
Use single snd_soc_update_bits() call to update the register bits.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:14:18 +01:00
Axel Lin a4f87cea72 ASoC: cs42l56: Remove unneeded regulator_bulk_free call in cs42l56_remove
The regulator_bulk_free() call is not required because current code is using
devm_regulator_bulk_get().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:07:15 +01:00
Axel Lin 1a83269d5c ASoC: cs35l32: Remove unneeded regulator_bulk_free call in cs35l32_i2c_remove
The regulator_bulk_free() call is not required because current code is using
devm_regulator_bulk_get().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:06:44 +01:00
Brian Austin c2b49ae678 ASoC: cs42l56: use true/false returns for bool functions
Return true or false instead of 1 and 0

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:05:10 +01:00
Brian Austin 5c216cc3f3 ASoC: cs42l52: use true/false returns for bool functions
Return true or false instead of 1 and 0

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:04:53 +01:00
Brian Austin 7eef08554c ASoC: cs35l32: use true/false returns for bool functions
Return true or false instead of 1 and 0

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:04:27 +01:00
Paul Handrigan fb18cd2a62 ASoC: cs4265: Fix setting of functional mode and clock divider
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-28 19:01:12 +01:00
Paul Handrigan c98853aec1 ASoC: cs4265: Fix clock rates in clock map table
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-28 19:01:01 +01:00
Paul Handrigan 98c5d36240 ASoC: cs4265: Add CHIP_ID as a readable register
Reported-by: Zoltán Szenczi <zoltan@raspberrypi.org>
Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:00:34 +01:00
Geert Uytterhoeven 77c545398e ASoC: Allow SND_SOC_WM8978 to be selected manually
When using a DT-based multi-platform kernel, there's not always Kconfig
logic that selects the right codec driver.
Allow the user to manually select WM8978.

This is needed for Armadillo 800 EVA using a generic r8a7740 multi-platform
kernel.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 16:00:54 +01:00
Bard Liao 2d15d97461 ASoC: rt5677: Add DMIC2 clock selection
There are two pins can be used for rt5677's DMIC2 clock. This patch
add the select options for it.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 16:54:39 +01:00
Bard Liao 22e51345a9 ASoC: rt5677: correct mismatch widget name
We name MICBIAS1 in dapm widget, but micbias1 in route table.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 16:54:21 +01:00
Jarkko Nikula f4821e8e8e ASoC: rt5640: Do not allow regmap to use bulk read-write operations
Debugging showed Realtek RT5642 doesn't support autoincrementing writes so
driver should set the use_single_rw flag for regmap.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-27 13:00:26 +01:00
Lars-Peter Clausen a18a32ce22 ASoC: ac97-codec: Remove ASoC level IO support
This driver doesn't use any ASoC level IO nor does it register any controls
or DAPM elements that require it. This means it can safely be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-23 10:11:36 -05:00
Rasmus Villemoes aa47746269 ASoC: da732x: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-22 13:34:39 -05:00
Linus Torvalds e9d99a1dec sound fixes for 3.17-rc2
A bunch of ASoC fixes with a few HD-audio fixes in this pull request.
 All fairly small, boring and device-specific fixes, in addition to
 MAINTAINERS update for better reviewing.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJT9b8uAAoJEGwxgFQ9KSmkOZUP/RmB+4/vscB3z+exCFldIG3R
 gHOn4ER/JRWoObVVST3VabU5T5v88/gC2/12uYHFJQdDIwaMQytdVMDzhi6v8Uyf
 MFh24DcHQ7dRsedCCrUeoy2DZ42G+HhPH+SRGinkFUZ0RJjnCgqvyYw1p6KZD29K
 AuB07FbgmThqRVyoZoMh3K7zm8d/ZeZU59SkyGi2U8dhCfgZyrsYZ1jHd/fGuwq4
 XgJIJvHWZoniFnnxoVW/r9wutbF5JSf/FbwRI7ptZT0Rj/u+PcgDPmrhYPINFkt2
 IrIt/ZnGadKZuiK9p+aSSIUPWluVjyChCwskkWfKtg+5N4FOFed48HjZNw5TVsdc
 deJjao7dtyqxugMcA2E6VkWqTprFRhRbauT0WU7KX54HBrnng3792YGLJqqqggCE
 bAP5crrT1wMjk7qXPLouk0TvcXbSkCYQ53Ip+QITGNkLUiN0tj8cgbsfPjDU4GvH
 T9tz0I5thLkKp4xP3xSEphQdaLdmG0zGiBcoOH/6jByUxvQdiQimo7a1YEuxtFN2
 sIGbrpM8k9ypfJaOpqoh6FtHRL9Y41W1guY4TqUm+QZbLw9KQn1QRe9HQF5M6kU+
 vsIoVR8UGTudaLG/AIg+YFEbSsTcTlCNHw1iXYxmqj5pP5J+N0N/aNIFYeObWkcO
 8O9/WAwBUdH0cVdXoWze
 =x5gm
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A bunch of ASoC fixes with a few HD-audio fixes in this pull request.

  All fairly small, boring and device-specific fixes, in addition to
  MAINTAINERS update for better reviewing"

* tag 'sound-3.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codec
  ALSA: hda/hdmi - set depop_delay for haswell plus
  ALSA: hda - restore the gpio led after resume
  ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
  ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE
  ASoC: fsl-esai: Revert .xlate_tdm_slot_mask() support
  ASoC: mcasp: Fix implicit BLCK divider setting
  ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
  ASoC: pcm512x: Correct Digital Playback control names
  ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
  ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
  ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage
  ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late
  MAINTAINERS: Add i.MX maintainers and paths to Freescale ASoC entry
  ASoC: Intel: Update Baytrail ADSP firmware name
2014-08-21 14:24:40 -07:00
Lars-Peter Clausen 6391fffb7b ASoC: ab8500-codec: Drop bank prefix from AB8500_GPIO_DIR4_REG register define
The AB8500_GPIO_DIR4_REG register define has the bank for the register in the
upper 8 bits and the register itself in the lower 8 bits. When passing it to
abx500_{set,get}_register_interruptible() the upper bits get truncated which
generates the following warning from sparse:
	sound/soc/codecs/ab8500-codec.c:1972:53: warning: cast truncates bits
	 from constant value (1013 becomes 13)
	sound/soc/codecs/ab8500-codec.c:1980:53: warning: cast truncates bits
	 from constant value (1013 becomes 13)

The bank is passed separately to abx500_{set,get}_register_interruptible() so
the code works fine as it is. Given that all users of AB8500_GPIO_DIR4_REG
always truncate the upper 8 bits just remove them from the define.

Also remove the unnecessary casts to u8.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:35:58 -05:00
Lars-Peter Clausen 8a36eaa2ff ASoC: dmic: Add to SND_SOC_ALL_CODECS
Improve build coverage of the dmic driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 08:21:56 -05:00
Sean Cross 567e4f9892 ASoC: add es8328 codec driver
Add a codec driver for the Everest ES8328.  It supports two separate audio
outputs and two separate audio inputs.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:17:13 -05:00
Nikesh Oswal dfe8f1f3f2 ASoC: wm8994: Demux the microphone detection IRQ
Current code only allows direct routing of the WM8994 microphone
detection signal to a GPIO this change adds support to demux the
interrupt from the main interrupt line of the codec.

Signed-off-by: Nikesh Oswal <nikesh@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:08:13 -05:00
Dan Murphy a7a8e994dd ASoC: tas2552: Add DAPM calls for amp and PLL
Add DAPM calls to enable/disable the Class D amp.
Also add a DAPM call to turn off the PLL upon
the stream completing.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:49 -05:00
Brian Austin 38f57532ed ASoC: cs35l32: fix compile warning for i2c_probe
Forgot to add a return for err_disable goto statement.
Causes compile warning of control reaching end of non-void

Signed-off-by: Brian Austin <briann.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:22 -05:00
Brian Austin eef5bb2445 ASoC: cs35l32: Add support for CS35L32 Boosted Amplifier
This patch adds support for the Cirrus Logic CS35L32 Boosted Amplifier
I2S output provides monitor data to the SOC/CODEC/DSP for speaker protection/enhancement algorithms

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:22 -05:00
Mark Brown 7c063edee6 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl', 'asoc/fix/fsl-esai', 'asoc/fix/intel', 'asoc/fix/mcasp' and 'asoc/fix/pxa' into asoc-linus 2014-08-15 12:51:29 +01:00
Nikesh Oswal d114e5f73b ASoC: arizona: Fix TDM slot length handling in arizona_hw_params
TDM slot length was set same as word length, regardless of the value
received in set_tdm_slot. This patch sets the TDM slot length correctly
as received in set_tdm_slot DAI callback

Signed-off-by: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-12 22:44:21 +01:00
Mark Brown 1c6d36805f ASoC: pcm512x: Correct Digital Playback control names
The source type should come before the direction specifier according to
ControlNames.txt.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-12 10:31:17 +01:00
Linus Torvalds 54c72d5987 == Changes to existing drivers ==
- Checkpatch fixes throughout the subsystem
   - Use Regmap to handle IRQs in max77686, extcon-max77693 and mc13xxx-core
   - Use DMA in rtsx_pcr
   - Restrict building on unsupported architectures on timberdale, cs5535
   - SPI hardening in cros_ec_spi
   - More robust error handing in asic3, cros_ec, ab8500-debugfs,
         max77686 and pcf50633-core
   - Reorder PM runtime and regulator handing during shutdown in arizona
   - Enable wakeup in cros_ec_spi
   - Unused variable/code clean-up in pm8921-core, cros_ec, htc-i2cpld,
         tps65912-spi, wm5110-tables and ab8500-debugfs
   - Add regulator handing into suspend() in sec-core
   - Remove pointless wrapper functions in extcon-max77693 and i2c-cros-ec-tunnel
   - Use cross-architecture friendly data sizes in stmpe-i2c, arizona,
         max77686 and tps65910
   - Device Tree documentation updates throughout
   - Provide power management support in max77686
   - Few OF clean-ups in max77686
   - Use manged resources in tps6105x
 
  == New drivers/supported devices ==
   - Add support for s2mpu02 to sec-core
   - Add support for Allwinner A32 to sun6i-prcm
   - Add support for Maxim 77802 in max77686
   - Add support for DA9063 AD in da9063
   - Add new driver for Intel PMICs (generic) and specifically Crystal Cove
 
  == (Re-)moved drivers ==
   - Move out keyboard functionality cros_ec ==> input/keyboard/cros_ec_keyb
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT40p7AAoJEFGvii+H/HdhTo0P/1GuZyvCAJCeqt2oN1gcloIe
 Hgf5rEo/PVPh3T9vHA7GCbWhgtdxfJI8FxrQYvU7Dw5cEMlmvl5p/ZHNPIProv97
 uI59JO67roLpXZP+aYX8BzXcplYkaR/ah16o/ePtaOCwGrXDz+TtJiHEVVN/8bAG
 PWsdcDNBC8byP7BZ/8zFdu6pX4800eRZ0KgeBH+u4k6UDor7M6LkQrxF1hJhU1Bv
 z14Q2wKQufhbcyEtQWcYc6M8hignD1Ioyd4I8mnEJs0EUiABfGUEk/K/G4Z5Q7Sv
 eRIEPZCd1CEBKD5JQcPXyE1QGdG9GiD15PLmctPA4VY1V+9c5/Hoq0TLoxlAQNWA
 gUr7WSqJ+KT2Nch0WVr/MdP8l0jPYfboWbsd/apj4GK0/9quwJNkGUxx0mCdCXyg
 9ylitwUrmlrd4CEKjybfEuTQB52Jvcdq24fnNYHHn1TGppZH6w7LVvdwSW7UcjF0
 Y48hTImYYnVAlWl5lE5xVQTWD/3hseAcoWTsdSORSWJbkCfAhJUg/Gn5bH/Fkwhs
 /aWYPvkF+m47PoudZ9Z8qB5OTO4uz/Q9uEBBf2/k4Yy95vl2IZdy9VqS5tYG67e7
 LLdAZvG5hjEwDi3OwcwGSdZ/kRB5Hgq/YvpqjItle86CKj0ECdAqL/PfqLISgJq9
 x3zSuWMRLcNoyhc2HnBj
 =2cNI
 -----END PGP SIGNATURE-----

Merge tag 'mfd-for-linus-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD update from Lee Jones:
 "Changes to existing drivers:
   - checkpatch fixes throughout the subsystem
   - use Regmap to handle IRQs in max77686, extcon-max77693 and
     mc13xxx-core
   - use DMA in rtsx_pcr
   - restrict building on unsupported architectures on timberdale,
     cs5535
   - SPI hardening in cros_ec_spi
   - more robust error handing in asic3, cros_ec, ab8500-debugfs,
     max77686 and pcf50633-core
   - reorder PM runtime and regulator handing during shutdown in arizona
   - enable wakeup in cros_ec_spi
   - unused variable/code clean-up in pm8921-core, cros_ec, htc-i2cpld,
     tps65912-spi, wm5110-tables and ab8500-debugfs
   - add regulator handing into suspend() in sec-core
   - remove pointless wrapper functions in extcon-max77693 and
     i2c-cros-ec-tunnel
   - use cross-architecture friendly data sizes in stmpe-i2c, arizona,
     max77686 and tps65910
   - devicetree documentation updates throughout
   - provide power management support in max77686
   - few OF clean-ups in max77686
   - use manged resources in tps6105x

  New drivers/supported devices:
   - add support for s2mpu02 to sec-core
   - add support for Allwinner A32 to sun6i-prcm
   - add support for Maxim 77802 in max77686
   - add support for DA9063 AD in da9063
   - new driver for Intel PMICs (generic) and specifically Crystal Cove

  (Re-)moved drivers ==
   - move out keyboard functionality cros_ec ==> input/keyboard/cros_ec_keyb"

* tag 'mfd-for-linus-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (101 commits)
  MAINTAINERS: Update MFD repo location
  mfd: omap-usb-host: Fix improper mask use.
  mfd: arizona: Only free the CTRLIF_ERR IRQ if we requested it
  mfd: arizona: Add missing handling for ISRC3 under/overclocked
  mfd: wm5110: Add new interrupt register definitions
  mfd: arizona: Rename thermal shutdown interrupt
  mfd: wm5110: Add in the output done interrupts
  mfd: wm5110: Remove non-existant interrupts
  mfd: tps65912-spi: Remove unused variable
  mfd: htc-i2cpld: Remove unused code
  mfd: da9063: Add support for AD silicon variant
  mfd: arizona: Map MICVDD from extcon device to the Arizona core
  mfd: arizona: Add MICVDD to mapped regulators for wm8997
  mfd: max77686: Ensure device type IDs are architecture agnostic
  mfd: max77686: Add Maxim 77802 PMIC support
  mfd: tps6105x: Use managed resources when allocating memory
  mfd: wm8997-tables: Suppress 'line over 80 chars' warnings
  mfd: kempld-core: Correct a variety of checkpatch warnings
  mfd: ipaq-micro: Fix coding style errors/warnings reported by checkpatch
  mfd: si476x-cmd: Remedy checkpatch style complains
  ...
2014-08-07 17:17:39 -07:00
Mark Brown ae34a78c43 Merge remote-tracking branch 'asoc/topic/wm8985' into asoc-next 2014-08-04 16:32:25 +01:00
Mark Brown e99a866c4c Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next 2014-08-04 16:32:18 +01:00
Mark Brown c5e64c7636 Merge remote-tracking branches 'asoc/topic/tlv', 'asoc/topic/tlv320aic23', 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic32x4' into asoc-next 2014-08-04 16:32:12 +01:00
Mark Brown 3510a69495 Merge remote-tracking branches 'asoc/topic/sigmadsp', 'asoc/topic/sirf', 'asoc/topic/spdif', 'asoc/topic/tas2552' and 'asoc/topic/tas5086' into asoc-next 2014-08-04 16:32:07 +01:00
Mark Brown c1bd940afd Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/s6000', 'asoc/topic/samsung' and 'asoc/topic/sh-fsi' into asoc-next 2014-08-04 16:32:01 +01:00
Mark Brown b0ae27c477 Merge remote-tracking branches 'asoc/topic/rl6231', 'asoc/topic/rockchip', 'asoc/topic/rt286', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-next 2014-08-04 16:31:55 +01:00
Mark Brown 6aa63a25c0 Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/oom' and 'asoc/topic/pxa' into asoc-next 2014-08-04 16:31:50 +01:00
Mark Brown a6ce305207 Merge remote-tracking branches 'asoc/topic/intel', 'asoc/topic/kirkwood', 'asoc/topic/max98090' and 'asoc/topic/mc13783' into asoc-next 2014-08-04 16:31:45 +01:00
Mark Brown 01954a7b67 Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8', 'asoc/topic/cx20442' and 'asoc/topic/davinci' into asoc-next 2014-08-04 16:31:33 +01:00
Mark Brown 62e951ea65 Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/cirrus' and 'asoc/topic/cleanup' into asoc-next 2014-08-04 16:31:29 +01:00
Mark Brown a486f183da Merge remote-tracking branches 'asoc/topic/adau1977', 'asoc/topic/ak4642', 'asoc/topic/ak5386' and 'asoc/topic/arizona' into asoc-next 2014-08-04 16:31:23 +01:00
Mark Brown 0e76ee41fc Merge remote-tracking branch 'asoc/topic/pcm1792' into asoc-next 2014-08-04 16:31:19 +01:00