Commit graph

9701 commits

Author SHA1 Message Date
Lars-Peter Clausen 1c325f771a ASoC: Shutdown DAPM contexts when removing a card
Currently when a ASoC sound card is unregistered we leave the individual
components in their current state, just call the remove() callback and leave
it to the drivers to do the proper shutdown/cleanup.

This patch introduces a call to snd_soc_dapm_shutdown() when removing the
card.  This will make sure that all DAPM widgets are properly powered down
and all DAPM contexts are put at the SND_SOC_BIAS_OFF level. This will
ensure that all components are properly powered down when the card is
removed.

Since a lot of drivers manually go to SND_SOC_BIAS_OFF in their remove
callback this will also allow us to remove a bit of duplicated code.

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 01e0df6647 ASoC: Set card->instantiated to false when removing the card
Set card->instantiated to false when the card is removed to make sure that
operations that expect the card to be fully instantiated do not run anymore
during card removal.

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
Mark Brown 769b475323 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-suspend 2014-09-04 20:10:21 +01:00
Peter Ujfalusi fe0a29e163 ASoC: davinci-mcasp: Correct rx format unit configuration
In case of capture we should not use rotation. The reverse and mask is
enough to get the data align correctly from the bus to MCU:
Format	  data from bus    after reverse (XRBUF)
S16_LE:  |LSB|MSB|xxx|xxx|  |xxx|xxx|MSB|LSB|
S24_3LE: |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
S24_LE:  |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
S32_LE:  |LSB|DAT|DAT|MSB|  |MSB|DAT|DAT|LSB|

With this patch all supported formats will work for playback and capture.

Reported-by: Jyri Sarha <jsarha@ti.com> (broken S24_3LE capture)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-04 12:44:49 +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
Kuninori Morimoto 7c7b9cf53d ASoC: simple-card: fixup cpu_dai_name clear case
f687d900d3
(ASoC: simple-card: cpu_dai_name creates confusion when DT case)
cleared cpu_dai_name for caring fmt_single_name case,
and
179949bc04
(ASoC: simple-card: remove dai_link->cpu_dai_name when DT)
cared multi dai-link case.
but, cpu_dai_name matching is required when fmt_multiple_name was used

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03 13:53:44 +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
Mark Brown e65f6b1eb5 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-02 23:33:38 +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
Xiubo Li e3c4a28b61 ASoC: simple-card: Fix bug of wrong decrement DT node's refcount
DAI links's cpu_of_node's and codec_of_node's refcounts shouldn't
be decremented immediately at the end of the probe() fucntion.
Because we will still use them before the audio card is removed.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 17:48:07 +01:00
Xiubo Li eadb0019d2 ASoC: fsl-sai: using 'lsb-first' property instead of 'big-endian-data'.
The 'big-endian-data' property is originally used to indicate whether the
LSB firstly or MSB firstly will be transmitted to the CODEC or received
from the CODEC, and there has nothing relation to the memory data.

Generally, if the audio data in big endian format, which will be using the
bytes reversion, Here this can only be used to bits reversion.

So using the 'lsb-first' instead of 'big-endian-data' can make the code
to be readable easier and more easy to understand what this property is
used to do.

This property used for configuring whether the LSB or the MSB is transmitted
first for the fifo data.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-01 16:36:42 +01:00
Mark Brown 025b78b809 Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-sai 2014-09-01 16:36:34 +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
Mark Brown 5b87d31309 Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-esai 2014-09-01 10:49:32 +01:00
Kuninori Morimoto a44a750e52 ASoC: simple-card: use common for_each_child_of_node() for loop
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:02 +01:00
Kuninori Morimoto a5960bd598 ASoC: simple-card: dai_link->init should be cared when multi DAI
6a91a17bd7
(ASoC: simple-card: Handle many DAI links)
added multi DAI support on simple-card.
This means priv->dai_link might be pointer of multi DAI.
dai_link->init is needed for all DAI.
This patch cares it for all DAIs on DT/non-DT

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:02 +01:00
Kuninori Morimoto 179949bc04 ASoC: simple-card: remove dai_link->cpu_dai_name when DT
f687d900d3
(ASoC: simple-card: cpu_dai_name creates confusion when DT case)
removed dai_link->cpu_dai_name when DT case,
since it uses DT phand in soc_bind_dai_link().
This binding will fail if it has cpu_dai_name.

6a91a17bd7
(ASoC: simple-card: Handle many DAI links)
added multi DAI link support to simple-card driver.
Then, removing cpu_dai_name was cared only single DAI.
But, it is needed in all DT cases.
This patch moves it to asoc_simple_card_dai_link_of()
so that care about all DAIs.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:51:01 +01:00
Kuninori Morimoto 2d82eeb026 ASoC: simple-card: use asoc_simple_xxx prefix
simple-card driver is using asoc_simple_xxx() prefix.
simple_card_dai_link_of() should be
asoc_simple_card_dai_link_of().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29 12:49:34 +01:00
Peter Ujfalusi fdaf42c010 ASoC: omap-twl4030: Fix typo in 2nd dai link's platform_name
The platform_name should be omap-mcasp3 for the 2nd link which is used for
voice connection.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie+linaro@kernel.org>
Cc: stable@vger.kernel.org
2014-08-29 11:55:23 +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
Jarkko Nikula b792346fa8 ASoC: Remove unused cache_only from struct snd_soc_codec
There are no real users for cache_only in "struct snd_soc_codec" so remove
it and needless debugfs node.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:05:57 +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
Subhransu S. Prusty 06cb1eb3de ASoC: mfld-compress: Use dedicated function instead of ioctl
Also pass sst device as an argument to function pointer prototypes of
compr_ops. This will be used to derive sst driver context.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 21:48:37 +01:00
Xiubo Li 014fd22ef9 ASoC: fsl-sai: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:29 +01:00
Xiubo Li 664915074e ASoC: fsl-spdif: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:29 +01:00
Xiubo Li 92bd0334b2 ASoC: fsl-esai: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:28 +01:00
Xiubo Li bf16d88326 ASoC: fsl-asrc: Convert to use regmap framework's endianness method.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-27 19:19:20 +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 5819c2fa55 ASoC: Restore idle_bias_off initialization
This was accidentally lost in commit f1d45cc3ae ("ASoC: Consolidate
platform and CODEC probe/remove").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-26 09:15:15 +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 d50884afdf ASoC: tegra: Fix typo in include guard
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-22 13:35:44 -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 ff495d3a8e ASoC: txx9: Don't opencode DMAengine API calls
Use the proper wrapper functions instead of directly calling the DMAengine
callback functions.

Also add the missing include to linux/dmaengine.h.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:44:18 -05:00
Lars-Peter Clausen 5d0ecb0e7d ASoC: sh: Don't opencode DMAengine API calls
Use the proper wrapper functions instead of directly calling the DMAengine
callback functions.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:40:11 -05:00
Shengjiu Wang 38c6e4bb67 ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC'
Build kernel with SND_SOC_FSL_ASOC_CARD=m && SND_SOC_FSL_{SSI,SAI,ESAI}=y
leads the following error:

   sound/built-in.o: In function `fsl_sai_probe':
>> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
   sound/built-in.o: In function `fsl_esai_probe':
>> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'

The config SND_SOC_FSL_ASOC_CARD is for IMX SOC, So move it under condition
of 'if SND_IMX_SOC'.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:11:50 -05:00
Lars-Peter Clausen c5599b87a8 ASoC: Replace list_empty(&card->codec_dev_list) with !card->instantiated
With componentization we no longer necessarily need a snd_soc_codec struct for a
card. Instead of checking if the card's CODEC list is empty just use
card->instantiated to check if the card has been instantiated yet.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:48 -05:00
Lars-Peter Clausen 75af7c0819 ASoC: Remove support for legacy snd_soc_platform IO
There were never any actual users of this in upstream and by we have with
regmap a replacement in place, which should be used by new drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen 886f569225 ASoC: Automatically initialize regmap for all components
So far regmap is only automatically initialized for CODECs. Now that we have the
infrastructure in place to let components have DAPM widgets and controls that
want to use the generic regmap based IO also make sure to automatically
initialize regmap for all components.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen 14621c7e5e ASoC: Consolidate CPU and CODEC DAI lookup
The lookup of CPU and CODEC DAIs is fairly similar and can easily be
consolidated into a single helper function.

There are two main differences in the current implementation of the CPU and
CODEC DAI lookup:
 1) CPU DAIs can be looked up by the DAI name alone and do not necessarily
   require a component name/of_node.
 2) The CODEC DAI search only considers DAIs from CODEC components.

For 1) the new helper function will allow to lookup DAIs without providing a
component name or of_node, but since snd_soc_register_card() already rejects
CODEC DAI link components without neither a of_node or a name we'll never get
into the situation where we try to lookup a CODEC DAI without a name/of_node.
For 2) the new helper function just always considers all components.
Componentization is now at a point where it is possible to register a CODEC as a
snd_soc_component rather than a snd_soc_codec, by considering DAIs from all
components it is possible to use such a CODEC in a DAI link.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen e60cd14f0b ASoC: Consolidate CPU and CODEC DAI removal
CPU and CODEC DAI works exactly the same way. There is already a helper function
for CODEC DAI removal, use that one as well for CPU DAI removal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:47 -05:00
Lars-Peter Clausen ffbd7dd72b ASoC: Cleanup DAI module reference counting
Currently when a DAI has no CODEC associated to it the reference on the module
containing the DAI driver is increased when the DAI is probed and decrease when
the DAI is removed. For DAIs with CODECs the module reference count was already
incremented when the CODEC is probed. Now that all components have their module
reference count incremented when they are probed and all DAIs do have a
component it is possible to remove the module reference counting on DAI probe
and removal.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 70090bbb8b ASoC: Move component->probed check into soc_{remove,probe}_component()
Having the check in a centralized place makes the code a bit cleaner and
shorter.

Note: There is a slight semantic change in this patch. soc_probe_aux_dev() will
no longer return -EBUSY if the AUX dev has already been probed before. This is
fine though since it will simply do nothing in that case and return success.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 57bf772687 ASoC: Pass component instead of DAPM context to AUX dev init callback
Given that the component is the containing structure it makes more sense to pass
the component rather than the DAPM context to the AUX dev init callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:46 -05:00
Lars-Peter Clausen 65d9361f0c ASoC: Move AUX dev support to the component level
This patch makes it possible to register arbitrary components as a AUX dev
for a card. This was previously only possible for CODEC components. With
componentization having made it possible for components to have DAPM contexts
and controls there is no reason why AUX devs should be artificially limited to
snd_soc_codec devices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 61aca5646b ASoC: Add component level probe/remove support
Now that we have a unified probe and remove path make sure to call them for all
components. soc_{probe,remove}_component are responsible for setting up the DAPM
context for the component, initialize the component prefix, manage the debugfs
entries as well as do the registration of table based controls and DAPM
elements. They also call the component drivers probe and remove callbacks. This
patch makes these things available for generic snd_soc_component drivers rather
than only having them for snd_soc_codec and snd_soc_platform drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 93c3ce76cc ASoC: Make rtd->codec optional
There are some place in the ASoC core that expect rtd->codec to be non NULL
(mainly CODEC specific sysfs files). With componentization going forward
rtd->codec might be NULL in some cases. This patch prepares the core for this by
not registering CODEC specific sysfs files if rtd->codec is NULL. sysfs file
removal does not need to be conditionalized as it handles the removal of
non-existing files just fine.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen f1d45cc3ae ASoC: Consolidate platform and CODEC probe/remove
The platform and CODEC probe and remove code is now largely identical. This
patch consolidates it at the component level.

The resulting code is slightly larger due to all the boiler plate code setting
up the indirection for the table based control and DAPM registration.  Once all
drivers have been update to no longer use the snd_soc_codec_driver and
snd_soc_platform_driver specific fields for this the indirection can be removed
again.

This patch contains two noteworthy hacks that are only meant to be temporary to
be able to update drivers and the core in separate incremental patches.

The first hack is related to that some DPCM platforms expect that the DAPM
widgets for the DAIs of a snd_soc_component are created in the DAPM context of
the snd_soc_platform that has the same parent device. For handling this the
steal_sibling_dai_widgets attribute is introduced. It gets set for
snd_soc_platforms that register DAPM elements. When creating the DAI widgets for
a component this flag is checked and if it is found on one of the siblings the
component will not create any DAI widgets in its own DAPM context. If the
attribute is set on a platform it will look for siblings components and create
DAI widgets for them in its own context. The fix for this will be to update
the offending drivers to only register a single component rather than two.

The second hack deals with the fact that the ASoC card suspend and resume code
still needs a list of CODECs that have been registered for the card. To handle
this the generic probe and remove path have a check to see if the component is
CODEC and if yes add/remove it to the card's CODEC list. While it is possible to
clean up the suspend/resume code to not need the CODEC list anymore this is a
bit of a chicken and egg problem since it will become easier to clean up the
suspend/resume code once there is a unified component layer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Lars-Peter Clausen 81c7cfd1b2 ASoC: Move debugfs registration to the component level
The debugfs registration is mostly identical between platforms and CODECs. This
patches consolidates the two implementations at the component level.

Unfortunately there are still a couple of CODEC specific debugfs files that are
related to legacy ASoC IO that need to be registered. For this a new callback is
added to the component struct that will be initialized when a CODEC is
registered and will be used to register the CODEC specific files. Once there are
no drivers left using legacy IO this can be removed again.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:59:45 -05:00
Sean Cross cdec729765 ASoC: fsl: Fix building of imx-es8328 on PPC
The imx-es8328 driver fails to build on PPC because it explicitly depends on
SND_SOC_IMX_PCM_FIQ, which itself doesn't build on PPC.  Instead, rely on
the SND_SOC_FSL_SSI config option to pull in the necessary libraries.

While we're at it, remove SND_SOC_FSL_UTILS, which also is not needed.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:43:45 -05:00
Xiubo Li 8ea2134886 ASoC: simple-card: Fix the compile warning.
sound/soc/generic/simple-card.c: In function simple_card_dai_link_of:
sound/soc/generic/simple-card.c:198:10: warning: passing argument 3 of
asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default]
          &dai_link->cpu_dai_name);
          ^
sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node **
but argument is of type struct device_node **
 asoc_simple_card_sub_parse_of(struct device_node *np,
 ^
sound/soc/generic/simple-card.c:229:10: warning: passing argument 3 of
asoc_simple_card_sub_parse_of from incompatible pointer type [enabled by default]
          &dai_link->codec_dai_name);
          ^
sound/soc/generic/simple-card.c:112:1: note: expected const struct device_node **
but argument is of type struct device_node **
 asoc_simple_card_sub_parse_of(struct device_node *np,
 ^

Since the asoc_simple_card_sub_parse_of() is used in simple-card module only,
and the third argument is just used to get the node ponters address, so there is
no need it must to be 'const' type.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 11:42:05 -05:00
Shengjiu Wang 499898d66d ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX
Building kernel with SND_SOC_IMX_AUDMUX=n leads to the following error:

   sound/built-in.o: In function `fsl_asoc_card_probe':
>> fsl-asoc-card.c:(.text+0x1467b5): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467d0): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467ed): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x146807): undefined reference to `imx_audmux_v2_configure_port'

Update Kconfig to select SND_SOC_IMX_AUDMUX when SND_SOC_FSL_ASOC_CARD=y.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:54:04 -05:00
Shengjiu Wang 5f37671e00 ASoC: fsl-asoc-card: Fix build warning for maybe-uninitialized
When build fsl-asoc-card as module, there is following error:

sound/soc/fsl/fsl-asoc-card.c: In function 'fsl_asoc_card_probe':
>> sound/soc/fsl/fsl-asoc-card.c:547:13: warning: 'asrc_np' may be used uninitialized in this function [-Wmaybe-uninitialized]
     of_node_put(asrc_np);
                ^

vim +/asrc_np +547 sound/soc/fsl/fsl-asoc-card.c

   531                  if (width == 24)
   532                          priv->asrc_format = SNDRV_PCM_FORMAT_S24_LE;
   533                  else
   534                          priv->asrc_format = SNDRV_PCM_FORMAT_S16_LE;
   535          }
   536
   537          /* Finish card registering */
   538          platform_set_drvdata(pdev, priv);
   539          snd_soc_card_set_drvdata(&priv->card, priv);
   540
   541          ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
   542          if (ret)
   543                  dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
   544
   545  fail:
   546          of_node_put(codec_np);
 > 547          of_node_put(asrc_np);
   548          of_node_put(cpu_np);
   549
   550          return ret;
   551  }
   552
   553  static const struct of_device_id fsl_asoc_card_dt_ids[] = {
   554          { .compatible = "fsl,imx-audio-cs42888", },
   555          { .compatible = "fsl,imx-audio-sgtl5000", },

Add 'asrc_fail' branch for error jump after asrc_np initialized.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:52:51 -05: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 e8a70c25b8 ASoC: samsung idma: Add proper annotation for casting iomem pointers
It is not always possible to interchange iomem pointers with normal pointers,
which why we have annotations for iomem pointers and warn when casting them to a
normal pointer or vice versa. In this case the casting is fine and unfortunately
necessary so add the proper annotations to tell code checkers that it is
intentional. This silences the following warnings from sparse:
	sound/soc/samsung/idma.c:354:20: warning: incorrect type in argument 1
	 (different address spaces) expected void volatile [noderef]
	  <asn:2>*addr got unsigned char *area
	sound/soc/samsung/idma.c:372:22: warning: cast removes address space of
	 expression

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:34:45 -05:00
Lars-Peter Clausen 6c7d1dfca9 ASoC: sh: Fix dma direction type
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a
enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE
and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same
value the code worked fine even though it was using the wrong type.

Fixes the following warnings from sparse:
	sound/soc/sh/fsi.c:1307:42: warning: mixing different enum types
	sound/soc/sh/fsi.c:1307:42:     int enum dma_data_direction  versus
	sound/soc/sh/fsi.c:1307:42:     int enum dma_transfer_direction

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:34:05 -05:00
Lars-Peter Clausen c8e6e96073 ASoC: rcar: Use && instead of & for boolean expressions
Sparse spits out the following warning:
	sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y

It does this because sometimes mixing boolean and bit-wise logic has not the
intended result. In this case we are fine, but replacing the bit-wise '&' with
the boolean '&&' silences the sparse warning. The generated code for both cases
is the same.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:33:11 -05:00
Lars-Peter Clausen d80a12f924 ASoC: odrodix2_max98090: Make non exported symbols static
odroidx2_drvdata and odroidu3_drvdata are not used outside this module so make
them static (and also const while we are at it).

Fixes the following warnings from sparse:
    sound/soc/samsung/odroidx2_max98090.c:69:26: warning: symbol
     'odroidx2_drvdata' was not declared. Should it be static?
    sound/soc/samsung/odroidx2_max98090.c:74:26: warning: symbol
     'odroidu3_drvdata' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:31:52 -05:00
Lars-Peter Clausen 371e07ec83 ASoC: edma-pcm: Include edma-pcm.h
edma_pcm_platform_register() is declared in edma-pcm.h and defined in
edma-pcm.c. To make sure that the function signature matches for both
edma-pcm.c should include edma-pcm.h

Fixes the following sparse warning:
	sound/soc/davinci/edma-pcm.c:48:5: warning: symbol
	 'edma_pcm_platform_register' was not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 09:31:06 -05:00
Lars-Peter Clausen f294afed03 ASoC: Use dev_set_name() instead of init_name
init_name is basically a hack and should only be used for statically allocated
device structs. For dynamically allocated devices dev_set_name() should be used.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17 08:22:18 -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
Nicolin Chen 855675f6e6 ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:30:45 -05:00
Mark Brown 6be1f475e0 Merge branch 'fix/fsl-esai' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-esai 2014-08-16 17:22:36 -05:00
Sean Cross 7e7292dba2 ASoC: fsl: add imx-es8328 machine driver
This adds an initial machine driver for the ES8328 audio codec on Freescale
boards.  The driver supports headphones and an audio regulator for an onboard
speaker amp.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:18:07 -05:00
Mark Brown e1a65374a3 Merge branch 'topic/es8328' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl 2014-08-16 17:18:02 -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
Rongjun Ying 0d985b1c76 ASoC: sirf: usp: Add bitclock inversion support
Signed-off-by: Rongjun Ying <rongjun.ying@csr.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:42 -05:00
Julia Lawall a493b6a637 ASoC: rsnd: delete unneeded test before of_node_put
Of_node_put supports NULL as its argument, so the initial test is not
necessary.

Suggested by Uwe Kleine-König.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@

-if (e)
   of_node_put(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:36 -05:00
Vinod Koul d8499c9b4b ASoC: Intel: add mrfld DSP defines
We define the DSP commands,structures here which will be used to send the IPCs

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Subhransu S. Prusty b12b087c87 ASoC: Intel: mfld-pcm: Change sst_ops prototypes to take dev parameter
sst_ops need to use the sst driver context. So pass sst device as argument,
which can be used to retrieve sst context.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Subhransu S. Prusty 5981c2d6db ASoC: Intel: mfld-pcm: Use function instead of ioctl
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Vinod Koul ea5edfe2f1 ASoC: Intel: Fix to use byte control interface
Using a byte control interface instead of generic_params ioctl.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:30 -05:00
Nicolin Chen ce7344a4eb ASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive
The previous patch (ASoC: fsl_sai: Add asynchronous mode support) added
new Device Tree bindings for Asynchronous and Synchronous modes support.
However, these two shall not be present at the same time.

So this patch just simply makes them exclusive so as to avoid incorrect
Device Tree binding usage.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen 08fdf65e37 ASoC: fsl_sai: Add asynchronous mode support
SAI supports these operation modes:
1) asynchronous mode
   Both Tx and Rx are set to be asynchronous.
2) synchronous mode (Rx sync with Tx)
   Tx is set to be asynchronous, Rx is set to be synchronous.
3) synchronous mode (Tx sync with Rx)
   Rx is set to be asynchronous, Tx is set to be synchronous.
4) synchronous mode (Tx/Rx sync with another SAI's Tx)
5) synchronous mode (Tx/Rx sync with another SAI's Rx)

* 4) and 5) are beyond this patch because they are related with another SAI.

As the initial version of this SAI driver, it supported 2) as default while
the others were totally missing.

So this patch just adds supports for 1) and 3).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen af96ff5b74 ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode
There is one design rule according to SAI's reference manual:
If the transmitter bit clock and frame sync are to be used by both transmitter
and receiver, the transmitter must be configured for asynchronous operation
and the receiver for synchronous operation.

And SYNC of TCR2 is a 2-width control bit:
00 Asynchronous mode.
01 Synchronous with receiver.
10 Synchronous with another SAI transmitter.
11 Synchronous with another SAI receiver.

So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC
bit of RCR2 to 0x1 (Synchronous with transmitter).

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Nicolin Chen 376d1a92ca ASoC: fsl_sai: Initialize with software reset
This patch adds software reset code in dai_probe() so as to make a true init
by clearing SAI's internal logic, including the bit clock generation, status
flags, and FIFO pointers.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:23 -05:00
Shengjiu Wang de0d712a6d ASoC: fsl_esai: refine esai for TDM support
Original driver didn't store the number of slots, just fix the slot number
to 2, use this default number to calculate bclk and pins for TX/RX.
In this patch, add one parameter for slots, and update the calculation of
bclk and pins of TX/RX. Then driver will be compatible with slots > 2 in
TDM mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:06:15 -05:00
Nicolin Chen 708b4351f0 ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support
The Freescale Generic ASoC Sound Card is a general ASoC DAI Link driver that
can be used, ideally, for all Freescale CPU DAI drivers and external CODECs.

The idea of this generic sound card is a bit like ASoC Simple Card. However,
for Freescale SoCs (especially those released in recent years), most of them
have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
this is a specific feature that might be painstakingly controlled and merged
into the Simple Card driver.

So having this driver will allow all Freescale SoC users to benefit from the
simplification to support a new card and the capability of wide sample rates
support through ASRC.

The driver is initially designed for sound card using I2S or PCM DAI formats.
However, it's also possible to merge those non-I2S/PCM type sound cards, such
as S/PDIF audio and HDMI audio, into this card as long as the merge will not
break the original function and as long as there is something redundant that
can be abstracted along with I2S type sound cards.

As an initial version, it only supports three cards that I can test:
imx-audio-cs42888, a new card that links ESAI with CS42888 CODEC
imx-audio-sgtl5000, just like the old imx-sgtl5000.c driver
imx-audio-wm8962, just like the old imx-wm8962.c driver

The driver is also compatible with the old Device Tree bindings of WM8962 and
SGTL5000. So we may consider to remove those two drivers after this driver is
totally enabled. (It needs to be added into defconfig)

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:50 -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
Mark Brown 395d33bb16 Merge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus 2014-08-15 12:51:29 +01:00
Daniel Mack 9301503af0 ASoC: pxa-ssp: drop SNDRV_PCM_FMTBIT_S24_LE
This mode is unsupported, as the DMA controller can't do zero-padding
of samples.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-08-13 21:12:03 +01:00
Shengjiu Wang d177143c36 ASoC: fsl_esai: refine esai for TDM support
Original driver didn't store the number of slots, just fix the slot number
to 2, use this default number to calculate bclk and pins for TX/RX.
In this patch, add one parameter for slots, and update the calculation of
bclk and pins of TX/RX. Then driver will be compatible with slots > 2 in
TDM mode.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-13 19:50:21 +01:00
Shengjiu Wang 769091ee18 ASoC: fsl-esai: Revert .xlate_tdm_slot_mask() support
This reverts commit a603c8ee52.

fsl_asoc_xlate_tdm_slot_mask() is different with snd_soc_xlate_tdm_slot_mask().
fsl_asoc_xlate_tdm_slot_mask() will set the enabled bit to 0, disabled bit
to 1. snd_soc_xlate_tdm_slot_mask() will set the enabled bit to 1, disabled
bit to 0.
For esai when the bit value is 1, the slot is enabled, when the bit value is 0,
the slot is disabled. If using fsl_asoc_xlate_tdm_slot_mask(), the esai will
work abnormally. So revert this patch, make the esai use default function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-13 19:50:00 +01:00
Jyri Sarha 8813543ecb ASoC: mcasp: Fix implicit BLCK divider setting
The implicit BLCK divider setting was broken by "ASoC: mcasp: don't
override bclk divider if it was provided by the machine"-patch. After
the BCLK divider is implicitly set for the first time the
mcasp->bclk_div gets a non zero value and the implicit setting is
"turned off".

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-12 23:04:08 +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
Geert Uytterhoeven 6912831623 ASoC: dapm: Fix uninitialized variable in snd_soc_dapm_get_enum_double()
If soc_dapm_read() fails, reg_val will be uninitialized, and bogus
values will be written later:

sound/soc/soc-dapm.c: In function 'snd_soc_dapm_get_enum_double':
sound/soc/soc-dapm.c:2862:15: warning: 'reg_val' may be used uninitialized in this function [-Wmaybe-uninitialized]
  unsigned int reg_val, val;
               ^

Return early on error to fix this.

Introduced by commit ce0fc93ae5 ("ASoC:
Add DAPM support at the component level").

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-08-11 20:01:13 +01:00
Jarkko Nikula b80d19c166 ASoC: Intel: Restore Baytrail ADSP streams only when ADSP was in reset
There is no need to restore and restart PCM streams in case ADSP didn't
reach reset and power off state during system suspend/resume cycle. In that
case stream is still active but paused and firmware doesn't allow allocating
a new stream before paused stream is freed.

ADSP remains active in case suspend sequence didn't go to suspend_late
stage. This can happen when either suspend sequence is aborted by a wakeup
or by letting only devices suspend by "echo devices >/sys/power/pm_test".

Currently stream restoring fails in these suspend cases. Fix this by adding
a flag that indicates is complete stream reinitialization needed or is it
enough to resume paused stream. Flag is set when we know that ADSP reached
suspend_late.

Initial fix to this issue came from Fang Yang. I modified it a little and
forward ported it to top of two other suspend/resume patches from me.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Cc: yang fang <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:24 +01:00
Jarkko Nikula 9246539bdd ASoC: Intel: Wait Baytrail ADSP boot at resume_early stage
Remove sst_byt_pcm_dev_resume() and move waiting of firmware boot into
sst_byt_pcm_dev_resume_early(). Now suspend_late and resume_early phases are
in sync with each other so that we know that ADSP was put into reset and was
unpowered after suspend_late and is ready to resume IO after resume_early
during resume stage in sst_byt_pcm_trigger().

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:23 +01:00
Jarkko Nikula 27d3f02689 ASoC: Intel: Merge Baytrail ADSP suspend_noirq into suspend_late
Merge DSP reset and cleanup sequence in sst_byt_pcm_dev_suspend_noirq()
into sst_byt_pcm_dev_suspend_late(). First their order was wrong by first
unloading firmware modules in suspend_late and then taking DSP into reset
in suspend_noirq. Second ACPI has put device into OFF state already during
suspend_late so trying to reset the DSP is a no-op at suspend_noirq stage.

Fix these by moving DSP reset and cleanup into
sst_byt_pcm_dev_suspend_late() before firmware unloading.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Borun Fu <borun.fu@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-11 13:40:23 +01:00
Linus Torvalds 44c916d58b ARM: SoC cleanups for 3.17
This merge window brings a good size of cleanups on various
 platforms. Among the bigger ones:
 
 * Removal of Samsung s5pc100 and s5p64xx platforms. Both of these have
   lacked active support for quite a while, and after asking around nobody
   showed interest in keeping them around. If needed, they could be
   resurrected in the future but it's more likely that we would prefer
   reintroduction of them as DT and multiplatform-enabled platforms
   instead.
 * OMAP4 controller code register define diet. They defined a lot of registers
   that were never actually used, etc.
 * Move of some of the Tegra platform code (PMC, APBIO, fuse, powergate)
   to drivers/soc so it can be shared with 64-bit code. This also converts them
   over to traditional driver models where possible.
 * Removal of legacy gpio-samsung driver, since the last users have been
   removed (moved to pinctrl)
 
 Plus a bunch of smaller changes for various platforms that sort of
 dissapear in the diffstat for the above. clps711x cleanups, shmobile
 header file refactoring/moves for multiplatform friendliness, some misc
 cleanups, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJT5DYPAAoJEIwa5zzehBx37egQAIiatNiLLqZnfo3rwGADRz/a
 POfPovktj68aPcobyzoyhFtToMqGvi9PpysyFTIQD2HJFG+5BtiIAuqtg0875zDe
 EpBWgsfugrm0YktJWAtUerj60oAmNPbKfaEm1cOOWuM2lb2mV+QkRrwSTAgsqkT7
 927BzMXKKBRPOVLL0RYhoF8EXa0Eg8kCqAHP8fJrzVYkRp+UrZJDnGiUP1XmWJN+
 VXQMu5SEjcPMtqT7+tfX455RfREHJfBcJ1ZN/dPF8HMWDwClQG0lyc6hifh1MxwO
 8DjIZNkfZeKqgDqVyC17re7pc7p8md5HL8WXbrKpK0A9vQ5bRexbPHxcwJ1T/C2Y
 465H+st5XXbuzV1gbMwjK1/ycsH0tCyffckk8Yl/2e1Fs7GgPNbAELtTdl+5vV1Y
 xmDXkyo/9WlRM3LQ23IGKwW7VzN86EfWVuShssfro0fO7xDdb4OOYLdQI+4bCG+h
 ytQYun1vU32OEyNik5RVNQuZaMrv2c93a3bID4owwuPHPmYOPVUQaqnRX/0E51eA
 aHZYbk2GlUOV3Kq5aSS4iyLg1Yj+I9/NeH9U+A4nc+PQ5FlgGToaVSCuYuw4DqbP
 AAG+sqQHbkBMvDPobQz/yd1qZbAb4eLhGy11XK1t5S65rApWI55GwNXnvbyxqt8x
 wpmxJTASGxcfuZZgKXm7
 =gbcE
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanups from Olof Johansson:
 "This merge window brings a good size of cleanups on various platforms.
  Among the bigger ones:

   - Removal of Samsung s5pc100 and s5p64xx platforms.  Both of these
     have lacked active support for quite a while, and after asking
     around nobody showed interest in keeping them around.  If needed,
     they could be resurrected in the future but it's more likely that
     we would prefer reintroduction of them as DT and
     multiplatform-enabled platforms instead.

   - OMAP4 controller code register define diet.  They defined a lot of
     registers that were never actually used, etc.

   - Move of some of the Tegra platform code (PMC, APBIO, fuse,
     powergate) to drivers/soc so it can be shared with 64-bit code.
     This also converts them over to traditional driver models where
     possible.

   - Removal of legacy gpio-samsung driver, since the last users have
     been removed (moved to pinctrl)

  Plus a bunch of smaller changes for various platforms that sort of
  dissapear in the diffstat for the above.  clps711x cleanups, shmobile
  header file refactoring/moves for multiplatform friendliness, some
  misc cleanups, etc"

* tag 'cleanup-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (117 commits)
  drivers: CCI: Correct use of ! and &
  video: clcd-versatile: Depend on ARM
  video: fix up versatile CLCD helper move
  MAINTAINERS: Add sdhci-st file to ARCH/STI architecture
  ARM: EXYNOS: Fix build breakge with PM_SLEEP=n
  MAINTAINERS: Remove Kirkwood
  ARM: tegra: Convert PMC to a driver
  soc/tegra: fuse: Set up in early initcall
  ARM: tegra: Always lock the CPU reset vector
  ARM: tegra: Setup CPU hotplug in a pure initcall
  soc/tegra: Implement runtime check for Tegra SoCs
  soc/tegra: fuse: fix dummy functions
  soc/tegra: fuse: move APB DMA into Tegra20 fuse driver
  soc/tegra: Add efuse and apbmisc bindings
  soc/tegra: Add efuse driver for Tegra
  ARM: tegra: move fuse exports to soc/tegra/fuse.h
  ARM: tegra: export apb dma readl/writel
  ARM: tegra: Use a function to get the chip ID
  ARM: tegra: Sort includes alphabetically
  ARM: tegra: Move includes to include/soc/tegra
  ...
2014-08-08 11:00:26 -07: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
Fabio Falzoi cf4f7fc3e7 ASoC: fsl-ssi: Support for SND_SOC_DAIFMT_CBM_CFS
Add SND_SOC_DAIFMT_CBM_CFS support for Freescale architecture.
Successfully tested on i.MX 6Quad Wandboard and UDOO boards connected to
the pcm1792a codec.
In CBM_CFS mode, when using a sample size of 16 bits, we cannot use
CCSR_SSI_SCR_I2S_MODE_MASTER since we get a frame sync every 16 bits.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Fabio Falzoi <fabio.falzoi84@gmail.com>
Tested-by: Angelo Adamo <adamo.a60@gmail.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-07 18:45:38 +01:00
Linus Torvalds e669830526 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for 3.17.  It contains:

   - misc Cavium Octeon, BCM47xx, BCM63xx and Alchemy  updates
   - MIPS ptrace updates and cleanups
   - various fixes that will also go to -stable
   - a number of cleanups and small non-critical fixes.
   - NUMA support for the Loongson 3.
   - more support for MSA
   - support for MAAR
   - various FP enhancements and fixes"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (139 commits)
  MIPS: jz4740: remove unnecessary null test before debugfs_remove
  MIPS: Octeon: remove unnecessary null test before debugfs_remove_recursive
  MIPS: ZBOOT: implement stack protector in compressed boot phase
  MIPS: mipsreg: remove duplicate MIPS_CONF4_FTLBSETS_SHIFT
  MIPS: Bonito64: remove a duplicate define
  MIPS: Malta: initialise MAARs
  MIPS: Initialise MAARs
  MIPS: detect presence of MAARs
  MIPS: define MAAR register accessors & bits
  MIPS: mark MSA experimental
  MIPS: Don't build MSA support unless it can be used
  MIPS: consistently clear MSA flags when starting & copying threads
  MIPS: 16 byte align MSA vector context
  MIPS: disable preemption whilst initialising MSA
  MIPS: ensure MSA gets disabled during boot
  MIPS: fix read_msa_* & write_msa_* functions on non-MSA toolchains
  MIPS: fix MSA context for tasks which don't use FP first
  MIPS: init upper 64b of vector registers when MSA is first used
  MIPS: save/disable MSA in lose_fpu
  MIPS: preserve scalar FP CSR when switching vector context
  ...
2014-08-07 08:47:00 -07:00
Jarkko Nikula 9b11eb44ef ASoC: Intel: Update Baytrail ADSP firmware name
Update the initial Baytrail ADSP firmware file name with the one that is now
in linux-firmware.git. Please see linux-firmware.git commit 7551a3a78453
("fw_sst_0f28: Add firmware for Intel Baytrail SST DSP").

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-06 20:36:13 +01: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 e7177999dc Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next 2014-08-04 16:31:40 +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 2fd5373467 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2014-08-04 16:31:20 +01:00
Mark Brown 0e76ee41fc Merge remote-tracking branch 'asoc/topic/pcm1792' into asoc-next 2014-08-04 16:31:19 +01:00
Mark Brown 3a2ac12f8e Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2014-08-04 16:31:18 +01:00
Mark Brown 7196be58ca Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2014-08-04 16:31:17 +01:00
Mark Brown a1cb98ac8b Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2014-08-04 16:31:15 +01:00
Mark Brown 7c08152891 Merge remote-tracking branch 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-08-04 16:31:13 +01:00
Mark Brown 3674b710a7 Merge remote-tracking branch 'asoc/fix/fsl-sai' into asoc-linus 2014-08-04 16:31:12 +01:00
Mark Brown 0b773b202d Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus 2014-08-04 16:31:10 +01:00
Mark Brown e5f89768e9 ASoC: imx-audmux: Use uintptr_t for port numbers
Since we pass the port number through file private data for debugfs we cast
it to and from a pointer so use uintptr_t in order to ensure that the
types are compatible, avoiding warnings on 64 bit platforms where pointers
are 64 bit and unsigned integers 32 bit.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04 16:30:24 +01:00
Peter Ujfalusi 37119dd791 ASoC: davinci: Enable menuconfig entry for McASP
In order to be able to use simple-card with McASP on TI SoC based boards we
need to be able to select the McASP via menuconfig.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04 16:28:30 +01:00
Nicolin Chen 4e13eb7221 ASoC: fsl_asrc: Don't access members of config before checking it
sound/soc/fsl/fsl_asrc.c:250 fsl_asrc_config_pair()
	warn: variable dereferenced before check 'config' (see line 243)

git remote add next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update next
git checkout 3117bb3109
vim +/config +250 sound/soc/fsl/fsl_asrc.c

  237   */
  238  static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair)
  239  {
  240   struct asrc_config *config = pair->config;
  241   struct fsl_asrc *asrc_priv = pair->asrc_priv;
  242   enum asrc_pair_index index = pair->index;
 @243   u32 inrate = config->input_sample_rate, indiv;
  244   u32 outrate = config->output_sample_rate, outdiv;
  245   bool ideal = config->inclk == INCLK_NONE;
  246   u32 clk_index[2], div[2];
  247   int in, out, channels;
  248   struct clk *clk;
  249
 @250   if (!config) {
  251           pair_err("invalid pair config\n");
  252           return -EINVAL;
  253   }

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04 15:48:41 +01:00
Nicolin Chen 6ccf62c7be ASoC: fsl_sarc_dma: Check pair before using it
The patch 3117bb3109: "ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and
platform drivers" from Jul 29, 2014, leads to the following Smatch
complaint:

sound/soc/fsl/fsl_asrc_dma.c:304 fsl_asrc_dma_shutdown()
warn: variable dereferenced before check 'pair' (see line 302)

sound/soc/fsl/fsl_asrc_dma.c
301          struct fsl_asrc_pair *pair = runtime->private_data;
302          struct fsl_asrc *asrc_priv = pair->asrc_priv;
                                          ^^^^^^^^^^^^^^^
                                            Dereference.

303
304          if (pair && asrc_priv->pair[pair->index] == pair)
                 ^^^^
                Check.

305                  asrc_priv->pair[pair->index] = NULL;
306

So we just let the driver check pair before using it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04 15:48:41 +01:00
Mark Brown d8df26bb57 ASoC: adau1977: Fix truncation warning on 64 bit architectures
Negating ADAU1977_BLOCK_POWER_SAI_LDO_EN creates an unsigned long constant
with all bits set which on 64 bit architectures needs to be truncated to
an unsigned int, generating a warning. Add an explicit cast since we know
this is OK.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-08-04 14:29:45 +01:00
Mark Brown 019575726e ASoC: rt5670: Fix duplicate const warnings
Since SOC_ENUM_SINGLE_DECL() includes a const as part of the macro adding
an explicit const in the source is duplication and causes sparse to warn.
Remove the extra consts.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:17:05 +01:00
Mark Brown ff62b95894 ASoC: rt5670: Staticise non-exported symbols
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:17:04 +01:00
Paweł Piskorski d6e08617cb ASoC: Intel: update stream only on stream IPC msgs
Only update the stream when the IPC message type matches stream type.

Signed-off-by: Paweł Piskorski <pawel.piskorski@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:29 +01:00
Paweł Piskorski 94ce33456d ASoC: Intel: Don't issue ipc when processing response
Make sure we dont issue IPC when we are processing a response.

Signed-off-by: Paweł Piskorski <pawel.piskorski@intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Liam Girdwood 97cfc751e1 ASoC: Intel: Delete message when IPC timeout occurs
This fixes a bug where we dont delete the current message when an
IPC message timeout occurs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Jie Yang 4ebd599e35 ASoC: Intel: Add dependency to DW_DMAC for BDW platform
Add dependency to DW_DMAC for broadwell machine, which
have built in DW dma engines.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 19:11:28 +01:00
Kuninori Morimoto cd2b65741e ASoC: rsnd: enable Mute control on DVC
DVC can control Mute.
This patch supports it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 18:46:25 +01:00
Kuninori Morimoto 486b09c750 ASoC: rsnd: tidyup DVC control method
DVC can use Volume and Mute control,
and these control methods doesn't have much difference.
This patch cleanup current method,
and it will be used for Mute control.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 18:46:25 +01:00
Mark Brown aaed2a62c2 ASoC: cx20442: Fix strange indentation
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 18:25:22 +01:00
Mark Brown 3e3e2922c1 ASoC: tlv320aic3x: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 16:57:20 +01:00
Kuninori Morimoto 1a7889ca8a ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behavior
In current R-Car rsnd driver,
the SND_SOC_DAIFMT_xB_xF flags are used to HW default behavior,
but, it should be used to specific format.
The waveforms of LEFT_J/RIGHT_J format with
SND_SOC_DAIFMT_NB_NF flag will be
started from "falling edge" without this patch.
But, it should be started from "rising edge".

Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01 07:25:16 +01:00
Wei Yongjun c8448051a5 ASoC: sirf-audio-codec: Fix return value check in sirf_audio_codec_driver_probe()
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 21:22:17 +01:00
Nicolin Chen e365500459 ASoC: fsl_ssi: Add stream names for DPCM usage
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SSI driver so that we can implement ASRC via DPCM to it.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:55:08 +01:00
Nicolin Chen 756409320b ASoC: fsl_spdif: Add stream names for DPCM usage
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SPDIF driver so that we can implement ASRC via DPCM to it.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:55:04 +01:00
Nicolin Chen 20d5b76fb2 ASoC: fsl_sai: Add stream names for DPCM usage
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
SAI driver so that we can implement ASRC via DPCM to it.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:55:04 +01:00
Nicolin Chen 74ccb27c35 ASoC: fsl_esai: Add stream names for DPCM usage
DPCM needs extra dapm routes in the machine driver to route audio
between Front-End and Back-End. In order to differ the stream names
in the route map from CODECs, we here add specific stream names to
ESAI driver so that we can implement ASRC via DPCM to it.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:55:04 +01:00
Nicolin Chen d7821953cf ASoC: wm8962: Let CODEC driver enable and disable its own MCLK
snd_soc_open() will trigger pm_runtime resume() which will then enable
the regulator and initialization. So we should make sure the MCLK is
enabled before this resume().

Previously we let the machine driver get the clock and enable it in
its probe(). However, considering about power saving, it'll be better
to enable it when it's going to be used and disable it after using.

So this patch just simply adds clk_get() and clk_enable() to WM8962
driver. Meanwhile, it marks clock pointer to NULL if no clock assigned
to it so it will not break any current function.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:51:26 +01:00
Kuninori Morimoto 7c63f3c02f ASoC: rsnd: fixup pcm_new callback method
bff58ea4f4
(ASoC: rsnd: add DVC support) added DVC support,
and it added pcm_new callback feature for it.
Then it called all DAI's pcm_new callback, and it was wrong.
This patch fixup it and call correct callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:36:34 +01:00
Kuninori Morimoto 4f8f86aa41 ASoC: rsnd: add missing dev_dbg() in rsnd_bset()
b8c637864a
(ASoC: rsnd: use regmap_mmio instead of original regmap bus)
used regmap_mmio and modified dev_dbg() for rsnd_read/write().
But rsnd_bset() is missing it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:36:33 +01:00
Kuninori Morimoto 1cc7195929 ASoC: rsnd: care audio local bus data format consistency
R-Car sound uses Audio Local Bus which uses Lch/Rch format.
This bus is used if driver uses BUSIF.
But sound data is written as Rch/Lch format in register.
This means Rch <-> Lch will be inverted.
SSIU :: BUSIF_DALIGN is used to controlling data format.

Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:36:33 +01:00
Kuninori Morimoto 054cd7f4b9 ASoC: rsnd: care detail of SRC_BSDSR
Driver should care more detail of SRC_BSDSR settings.
The sound includes noise without this patch
if it used SRC.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:36:33 +01:00
Dan Carpenter 4548728981 ASoC: pxa: pxa-ssp: small leak in probe()
There is a small memory leak if probe() fails.

Fixes: 2023c90c3a ('ASoC: pxa: pxa-ssp: add DT bindings')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:27:03 +01:00
Dan Carpenter d387dd08e4 ASoC: fsl_asrc: fix an error code in fsl_asrc_probe()
There is a cut and paste bug so it returns success instead of the error
code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:23:24 +01:00
Nicolin Chen d526416c4f ASoC: fsl_asrc: Fix sparse warnings in FSL_ASRC_FORMATS due to typo
reproduce: make C=1 CF=-D__CHECK_ENDIAN__

sparse warnings: (new ones prefixed by >>)

>> sound/soc/fsl/fsl_asrc.c:563:28: sparse: restricted snd_pcm_format_t degrades to integer
>> sound/soc/fsl/fsl_asrc.c:570:28: sparse: restricted snd_pcm_format_t degrades to integer

vim +563 sound/soc/fsl/fsl_asrc.c

  557          .probe = fsl_asrc_dai_probe,
  558          .playback = {
  559                  .stream_name = "ASRC-Playback",
  560                  .channels_min = 1,
  561                  .channels_max = 10,
  562                  .rates = FSL_ASRC_RATES,
> 563                  .formats = FSL_ASRC_FORMATS,
  564          },
  565          .capture = {
  566                  .stream_name = "ASRC-Capture",
  567                  .channels_min = 1,
  568                  .channels_max = 10,
  569                  .rates = FSL_ASRC_RATES,
> 570                  .formats = FSL_ASRC_FORMATS,
  571          },
  572          .ops = &fsl_asrc_dai_ops,
  573  };

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:22:33 +01:00
Subhransu S. Prusty 2741d43a1e ASoC: Intel: mfld-pcm: Allocate platform data
Platform data may be null during platform_device_add. Allocate platform
data before using.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:18:09 +01:00
Subhransu S. Prusty 19a23a5d76 ASoC: Intel: mfld-pcm: Fix to use correct sst_data pointer
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 20:18:09 +01:00
Mark Brown 563fe71fe7 ASoC: wm9713: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:38 +01:00
Mark Brown 9572696ddb ASoC: wm9081: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:35 +01:00
Mark Brown f882728c97 ASoC: wm8995: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:32 +01:00
Mark Brown e29fe49699 ASoC: wm8994: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:29 +01:00
Mark Brown ae62ba67b3 ASoC: wm8993: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:26 +01:00
Mark Brown 20a77bbd27 ASoC: wm8991: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:24 +01:00
Mark Brown a351901d16 ASoC: wm8990: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:21 +01:00
Mark Brown 8cd2ba092c ASoC: wm8988: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:18 +01:00
Mark Brown c37642c728 ASoC: wm8985: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:15 +01:00
Mark Brown af8ff1469e ASoC: wm8983: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:11 +01:00
Mark Brown a4c8261d0b ASoC: wm8978: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:09 +01:00
Mark Brown 6afdc9a0e7 ASoC: wm8974: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:06 +01:00
Mark Brown d835e99a89 ASoC: wm8971: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:48:03 +01:00
Mark Brown ec4dc01eb4 ASoC: wm8962: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:59 +01:00
Mark Brown 5d3aef91a4 ASoC: wm8961: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:54 +01:00
Mark Brown 39e9cc4646 ASoC: wm8960: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:43 +01:00
Mark Brown 1df93ca375 ASoC: wm8955: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:39 +01:00
Mark Brown 74b24c3866 ASoC: wm8940: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:37 +01:00
Mark Brown 2f44b0437a ASoC: wm8904: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:33 +01:00
Mark Brown 6139ea270d ASoC: wm8903: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:29 +01:00
Mark Brown 0cd4489158 ASoC: wm8900: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:26 +01:00
Mark Brown 16cfd48540 ASoC: wm8804: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:23 +01:00
Mark Brown 18ce1da9da ASoC: wm8770: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:20 +01:00
Mark Brown f21b66043d ASoC: wm8753: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:17 +01:00
Mark Brown 7e322dff36 ASoC: wm8750: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:11 +01:00
Mark Brown 34967ad242 ASoC: wm8741: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:07 +01:00
Mark Brown a5d0de23b2 ASoC: wm8737: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:04 +01:00
Mark Brown dfb6778e64 ASoC: wm8731: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:47:00 +01:00
Mark Brown 9fbad31a9e ASoC: wm8728: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:46:57 +01:00
Mark Brown b9abb54856 ASoC: wm8711: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-07-31 18:46:51 +01:00