Commit graph

9696 commits

Author SHA1 Message Date
Mark Brown
1400760c46 Merge branch 'topic/rt5640' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2014-10-01 17:04:24 +01:00
Jarkko Nikula
cd69dc8868 ASoC: rt5640: Add function for enabling DMIC from ACPI probed machine
There is no code enabling DMIC clock in systems that don't provide platform
data for rt5640 after commit 71d97a7943 ("ASoC: rt5640: Use the platform
data for DMIC settings").

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

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

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 17:03:24 +01:00
Peter Ujfalusi
f114ce605d ASoC: davinvi-mcasp: Proper suspend/resume support while audio is active
If the board is sent to suspend (deep sleep) the McASP context will be lost.
In case when suspend happens during active audio we need to save and restore
more registers, which was configured during hw_param times as well.
We need to add more config registers, AFIFO control registers and we also
need to save and restore the serializer configuration as well.
Since the number of serializers depends on the SoC we need to allocate the
memory for it based on the num_serializer for the given McASP instance.

With this patch the ongoing stream will resume after resuming from deep
sleep.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 17:02:09 +01:00
Peter Ujfalusi
1cc0c054f3 ASoC: davinci-mcasp: Convert the context save/restore to use array
Instead of individual values use an array to store the registers need to be
saved on suspend and restored on resume.
It is going to be easier to add more registers to save and restore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 17:02:07 +01:00
Takashi Iwai
b7c2dc8e68 ASoC: Fix SSM2602 device identification
Another fix for v3.17, fixing device identification after the split out
 of the I2C and SPI code.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUKqQ0AAoJECTWi3JdVIfQcbcH/1khKNhibCQvL0UB4o5p2Elh
 tffm/bQexEaCWr589X/6V8QCeSL1cm92yTs6FSfsDOny6TXTgMxmYrXeBfGb/L2a
 63IYWWxhdvPO/VtMPgqRnBtFnpr6jU3OJ8hmNRyZ6CR9kv0L0CJzPDIZgsZu5sjy
 wqmi6/zYEWznIjjSFQJjJ0xniHaRiTb6z6y6qtOqVY/btV0Lm5HVmsSiJ6Ktddq+
 jNMZLdAPQUnxLM/gtWbwhazAp6et9CwPWs3Y+jAFfkTc3R30xsC0N1CUq2OV+ngI
 0Wpzou/FOa5o8rWyGS5ORk1aaCDehZOXFSl6YkmbSPCCpDkaxbB4TjB7xPWXRh0=
 =yz7T
 -----END PGP SIGNATURE-----

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

ASoC: Fix SSM2602 device identification

Another fix for v3.17, fixing device identification after the split out
of the I2C and SPI code.
2014-10-01 09:29:26 +02:00
Fabio Estevam
ece1e49996 ASoC: fsl_ssi: Remove unneeded 'i2s-slave' property
There is no need to use 'i2s-slave' property, since master/slave configuration
are passed via machine layer.

This change does not break existing users because they do check for slave
mode inside sound/soc/fsl/mpc8610_hpcd.c/p1022_ds.c/p1022_rdk.c

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-30 13:43:03 +01:00
Stefan Kristiansson
3b2a0013c7 ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample rates
This adds the necessary values to the constraint list and
register values to the coefficient table in order to
configure the device for 11.025kHz and 22.5kHz sample rates.

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

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

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

Fixes: c924dc68f7 ("ASoC: ssm2602: Split SPI and I2C code into different modules")
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@vger.kernel.org
2014-09-30 13:27:19 +01:00
Anatol Pomozov
6f67c38005 ASoC: rt5677: Add dts properties for input/output differential configuration
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 19:46:20 +01:00
Jarkko Nikula
f8a770c2c6 ASoC: Intel: byt-rt5640: Add quirk for Asus T100
Asus T100 internal microphone is not digital but analogue connected to IN1P
pin of the RT564x codec with shared bias between internal and headset
microphones. Because of this there is need to have machine specific DAPM
routes in byt-rt5640.

Add handling for them with the help of DMI quirk that is used to add custom
routes in addition to common. Because "Internal Mic" connected to DMIC1 is
not common to all move it as a default custom route when there is no match
in quirk table.

Custom "Internal Mic" -> "IN1P" with MICBIAS1 route is added for Asus T100.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 19:44:31 +01:00
Jarkko Nikula
ac06dd8df6 ASoC: Intel: byt-rt5640: Remove IN2N pin from DAPM route table
I tested couple byt-rt5640 based platforms and they have single-ended
headset microphone connection to IN2P only. I guess IN2N was either defined
by accident or some early platform had floating ground for headset. It's
better to remove IN2N and add a custom route for such a platform if needed.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 19:44:31 +01:00
Lars-Peter Clausen
0bd2ac3dae ASoC: Remove CODEC pointer from snd_soc_dapm_context
The only remaining user of the CODEC pointer in the DAPM struct is to
initialize the CODEC pointer in the widget struct. The later is scheduled
for removal, but has still a few users left. For now use
dapm->component->codec to initialize it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 18:25:52 +01:00
Lars-Peter Clausen
a761f87f36 ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 18:25:43 +01:00
Lars-Peter Clausen
9cca023e5c ASoC: wm8{350,753,971}: Use snd_soc_dapm_to_codec() instead of dapm->codec
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 18:25:25 +01:00
Arnd Bergmann
19926c6de0 ASoC: davinci: vcif must be a module if SND_DAVINCI_SOC is
It is possible to configure a kernel with SND_DAVINCI_SOC=m and
SND_DM365_VOICE_CODEC=y, which results in a link error:

sound/built-in.o: In function `davinci_vcif_probe':
sound/soc/davinci/davinci-vcif.c:223: undefined reference to `davinci_soc_platform_register'

The best way to avoid this is to make SND_DM365_VOICE_CODEC
a tristate option that depends on SND_DAVINCI_SOC, so it
can only be a module or disabled when the base driver is
a loadable module

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-29 17:12:05 +01:00
Mark Brown
82b925c405 Merge remote-tracking branches 'asoc/fix/atmel', 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/fsl-ssi' and 'asoc/fix/rt286' into asoc-linus 2014-09-28 12:25:12 +01:00
Jarkko Nikula
969168e2e9 ASoC: Intel: byt-max98090: Set card as fully routed
All byt-max98090 audio connections are known and described in DAPM routing
table. Set the fully_routed flag in order to disable unused codec pins.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28 12:22:37 +01:00
Mark Brown
e172b9e6a1 Merge branch 'fix/max98090' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2014-09-28 12:22:30 +01:00
Jarkko Nikula
f69e3caa9e ASoC: max98090: Enable both DMIC channels also when using mono configuration
According to MAX98090 specification "Digital microphone clock (DMC) is
enabled once both data channels are enabled.". Therefore both digital
microphone data channels must be enabled also when using mono microphone
configuration.

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

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

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-28 12:03:50 +01:00
Xiubo Li
6596aa047b ASoC: core: fix possible ZERO_SIZE_PTR pointer dereferencing error.
Since we cannot make sure the 'params->num_regs' will always be none
zero here, and then if it equals to zero, the kmemdup() will return
ZERO_SIZE_PTR, which equals to ((void *)16).

So this patch fix this with just doing the zero check before calling
kmemdup().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-28 11:49:42 +01:00
Anatol Pomozov
1ee44ce030 ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifier
Analog Devices SSM4567 is a boost class-D audio amplifier.

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

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

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

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-25 16:17:39 +01:00
Vinod Koul
0121327c1a ASoC: Intel: mfld-pcm: add control for powering up/down dsp
When we have PCM (FE/BE) opened or DAPM widgets triggered we need power
up/down DSP accordingly. The DSP will do ref count of these requests
i.e. link these runtime_get/put calls of DSP

Also fix some preexisting spacing error.

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@kernel.org>
2014-09-25 15:22:23 +01:00
Qiao Zhou
2e4ec1c0b8 ASoC: soc-compress: fix double unlock of fe card mutex
Fix double unlock of fe card mutex introduced by patch 8f70e515a8
"ASoC: soc-pcm: fix dpcm_path_get error handling"

The first unlock is at line 106, and the unlock is at line 149. we
should remove the first unlock.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 11:38:55 +01:00
Anatol Pomozov
f9f6a592cf ASoC: rt5677: Add a configuration option for LDO2_POW pin
Some boards have this pin statically tied and do not require any configuration,
some other boards allow to enable chip using GPIO.

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

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

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

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

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:17 +01:00
Howard Mitchell
5c7c343a11 ASoC: core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works.
This fixes a bug when using the SOC_DOUBLE_R_RANGE_TLV macro in
the invert mode. In the non-invert case, e.g.

SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>,
					0, 40, 255, 0, <tlv>)

the range sent to the hardware is 40..255, but in the invert case:

SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>,
					0, 40, 255, 1, <tlv>)

the range 215..0 was being sent to the hardware. This commit
corrects this to 255..40 so it is consistent with the non-invert
case.

Signed-off-by: Howard Mitchell <hm@hmbedded.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-24 09:37:03 +01:00
Lars-Peter Clausen
8c8f2f6fc1 ASoC: Fix snd_soc_{new,free}_ac97_codec() locking removal
Commit e3f205a72c ("ASoC: Remove locking in
snd_soc_{new,free}_ac97_codec()") overlooked a unlock on one of the error
paths.

Fixes: e3f205a72c ("ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-23 14:45:06 +01:00
Michael Trimarchi
85151461f1 ASoC: fsl_ssi: fix kernel panic in probe function
code can raise a panic when the ssi_private->pdev is null

[...]
	/*
	 * If codec-handle property is missing from SSI node, we assume
	 * that the machine driver uses new binding which does not require
	 * SSI driver to trigger machine driver's probe.
	 */
	if (!of_get_property(np, "codec-handle", NULL))
		goto done;
[...]
	ssi_private->pdev =
		platform_device_register_data(&pdev->dev, name, 0, NULL, 0);
[...]
done:
	if (ssi_private->dai_fmt)
		_fsl_ssi_set_dai_fmt(ssi_private, ssi_private->dai_fmt);

Proposal was to not use ssi_private->pdev->dev here but adding a new parameter
of *dev pointer to this _set_dai_fmt() -- passing pdev->dev in probe() and
cpu_dai->dev in fsl_ssi_set_dai_fmt().

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reported-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22 18:58:48 -07:00
Lars-Peter Clausen
e3f205a72c ASoC: Remove locking in snd_soc_{new,free}_ac97_codec()
snd_soc_new_ac97_codec() and snd_soc_free_ac97_codec() are called from
within a CODEC's probe() and remove() callbacks. Those will not run
concurrently against each other for the same CODEC instance, hence it is not
necessary to protect the two functions with a mutex.

This removes the last user in the ASoC core of the snd_soc_codec mutex field
and will allow us to eventually remove it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22 18:19:56 -07:00
Oder Chiou
90bdbb46f4 ASoC: rt5677: Add sidetone function
Add sidetone function

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-22 17:52:45 -07:00
Shengjiu Wang
f4a43caba7 ASoC: fsl_ssi: refine ipg clock usage in this module
Check if ipg clock is in clock-names property, then we can move the
ipg clock enable and disable operation to startup and shutdown, that
is only enable ipg clock when ssi is working and keep clock is disabled
when ssi is in idle.
But when the checking is failed, remain the clock control as before.

Tested-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17 11:30:15 -07:00
Oder Chiou
48561afef4 ASoC: rt5677: Add the TDM function
The patch adds the TDM function.

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

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-17 09:49:53 -07:00
Subhransu S. Prusty
6df5d76805 ASoC: Intel: mrfld: Use snd_soc_dai_get_drvdata to derive drv data
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@kernel.org>
2014-09-16 16:39:42 -07:00
Fabian Frederick
e306b6ee4d ASoC: cs35l32: remove second linux/slab.h inclusion
linux/slab.h was included twice.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-16 16:11:02 -07:00
Vinod Koul
10615a5c49 ASoC: Intel: mrfld: add bytes control for modules
This patch add support for various modules like eq etc for mrfld DSP.
All these modules will be exposed to usermode as bytes controls.

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@kernel.org>
2014-09-16 11:53:53 -07:00
Vinod Koul
d2b16b8fa1 ASoC: Intel: mfld-pcm: don't call trigger ops to DSP for internal streams
For internal stream i.e. BE we have don't need trigger ops as that
would be handled by DAPM for us in subsequent patches

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@kernel.org>
2014-09-16 11:53:53 -07:00
Oder Chiou
44caf76480 ASoC: rt5677: Add the GPIO function
The patch adds the GPIO function.

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

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-15 14:48:58 -07:00
Jianqun
3b40a80216 ASoC: rockchip-i2s: add dma data to snd_soc_dai
Add playback/capture dma data to snd_soc_dai.
Test on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:38:16 -07:00
Jianqun
38306afc10 ASoC: rockchip-i2s: fix rockchip i2s defination more reasonable
Fix SND_ROCKCHIP_I2S to be more reasonable - SND_SOC_ROCKCHIP_I2S,
SND_SOC_ROCKCHIP_I2S should select by audio driver, instead of
SND_SOC_ROCKCHIP.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:38:16 -07:00
Jianqun
01605ad128 ASoC: rockchip-i2s: enable "hclk" for rockchip I2S controller
As "hclk" is used for rockchip I2S controller, driver must to enable
it in probe.

Tested on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:36:54 -07:00
Jianqun
2f1e93f81c ASoC: rockchip-i2s: fix registers' property of rockchip i2s controller
Reference rockchip I2S controller TRM, modify some registers' property
I2S_FIFOLR: read / write, but not volatile, not precious
I2S_INTSR: read / write
I2S_CLR: volatile, register value will be cleared by read

Test on RK3288 with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:35:43 -07:00
Jianqun
07833d8831 ASoC: rockchip-i2s: fix master mode set bit error
Fix error format set to I2S master or slave mode.
Test on RK3288 board with max98090.

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-13 09:34:16 -07:00
Kuninori Morimoto
9810f5370b ASoC: simple-card: tidyup get dai_link/dai_props from priv
It can get dai_link/dai_props pointer from priv + index

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 15:00:58 +01:00
Kuninori Morimoto
f531913f01 ASoC: simple-card: tidyup use priv in parameter
priv has many information about simple-card driver.
Using it becomes easy to extend feature.
This patch gets dev from priv as 1st step

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-12 14:59:48 +01:00
Paul Handrigan
774418253e ASoC: cs4265: Fix register address to set the proper data type.
The SPDIF control register must be written to set the data type in hw_params
not the ADC control register.

Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2014-09-11 17:17:31 +01:00
Qiao Zhou
a22e292260 ASoC: mmp-pcm: add NO_PERIOD_WAKEUP for PCM INFO
add NO_PERIOD_WAKEUP to PCM INFO, which supports audio no IRQ mode

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-09-11 10:47:44 +05:30
Mark Brown
5e3905f62b Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/max98090', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-09-10 12:21:03 +01:00
Mark Brown
2eb1dc3179 Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus 2014-09-10 12:21:02 +01:00
Mark Brown
e87a925fb9 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2014-09-10 12:21:01 +01:00
Arnd Bergmann
88a60e552f ASoC: simple-card: fix regression in clock rate lookup
Commit 7c7b9cf53d ("ASoC: simple-card: fixup cpu_dai_name
clear case") changed the way that "sound-dai" properties are handled,
which leads to the clock frequency not being picked up from the
node that the phandle points to, as correctly identified by gcc
with this warning:

sound/soc/generic/simple-card.c: In function 'asoc_simple_card_sub_parse_of':
sound/soc/generic/simple-card.c:165:7: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized]

This restores the previous behavior by using the node from
of_parse_phandle_with_args() that was previously being
returned from of_parse_phandle().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:56:42 +01:00
Xiubo Li
0dd4fc3c2f ASoC: simple-card: Adjust the comments of simple card.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:52:37 +01:00
Qiao Zhou
8f70e515a8 ASoC: soc-pcm: fix dpcm_path_get error handling
dpcm_path_get may return -ENOMEM when allocating memory for list
fails. We should not keep processing path or start up dpcm dai in
this case.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-10 11:40:21 +01:00
Lars-Peter Clausen
f0b99ca041 ASoC: da732x: Cleanup manual bias level transitions
Since the ASoC core now takes care of setting the bias level to
SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually
anymore either.

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:22 +01:00
Mark Brown
de3ac81068 Merge branch 'topic/cs42l56' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-suspend 2014-09-09 21:08:02 +01:00
Charles Keepax
133c2681c4 ASoC: samsung-i2s: Check secondary DAI exists before referencing
In a couple of places the driver is missing a check to ensure there is a
secondary DAI before it de-references the pointer to it, causing a null
pointer de-reference. This patch adds a check to avoid this.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-09-09 20:59:06 +01:00
Xiubo Li
2080437d37 ASoC: simple-card: Merge single and muti DAI link(s) code.
This patch will split the DT node into old style and new style:
The new style will merge the single DAI link and muti DAI links code
together, the new style will be easier to add muti DAI links from old
single DAI link DTs.

This patch will maintian compatibility with the old DTs.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 12:59:49 +01:00
Rajeev Kumar
b794dbcd31 ASoC: Update email id of the author
I moved from ST Microelectronics and so updating email-id to personal one.

Signed-off-by: Rajeev Kumar <rajeevkumar.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 10:49:41 +01:00
Subhransu S. Prusty
02024756e6 ASoC: mfld: pcm: Replace pr_ with dev_
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-09-06 15:21:25 +01:00
Lars-Peter Clausen
0634814fe0 ASoC: Remove table based DAPM/control setup support from snd_soc_platform_driver
There are no users left and new users should rather use the component_driver
struct embedded in the snd_soc_platform_driver struct to do this. E.g.:

static const struct snd_soc_platform_driver foobar_driver = {
	.component_driver = {
		.dapm_widgets = ...,
		.num_dapm_widgets = ...,
		...,
	},
	...
};

instead of

static const struct snd_soc_platform_driver foobar_driver = {
	.dapm_widgets = ...,
	.num_dapm_widgets = ...,
	...
};

This also allows us to remove the steal_sibling_dai_widgets hack.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:46:30 +01:00
Lars-Peter Clausen
923976a30b ASoC: sst-haswell-pcm: Move controls and DAPM elements to component
The sst-haswell-pcm driver registers both a snd_soc_component and a
snd_soc_platform and expects that the DAPM widgets for the DAIs registered by
component are added to the DAPM context of the platform. This requires us to
have a hack in the ASoC core which does so. Moving the DAPM elements over to
the component allows us to remove this hack.

While we are at it also move the controls over to the component. The controls
don't need the platform for anything other than snd_soc_platform_get_drvdata(),
this can easily be replaced by snd_soc_component_get_drvdata(). As the long
term goal is to register only a single component this is a step in the right
direction.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:44:33 +01:00
Lars-Peter Clausen
bd033808e2 ASoC: sst-haswell-pcm: Alloc state struct in driver probe()
Resource allocations should happen in driver probe callback rather than in
snd_soc_platform probe functions. Especially if the resource is device
managed. The snd_soc_* probe/remove functions are mainly intended to be used
for things that require the component to be already bound to a card.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-06 14:44:33 +01:00
Mark Brown
1ee0beb985 Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2014-09-06 14:44:11 +01:00
Lars-Peter Clausen
8d01370f59 ASoC: es8328: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-06 13:38:01 +01:00
Rajeev Kumar
9a302c32f3 ASoC: dwc: Update email id of the author
I moved from ST Microelectronics and the email-id no longer
exists. Update email-id to personal one,

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-04 20:10:25 +01:00
Lars-Peter Clausen
a80932979a ASoC: Always run default suspend/resume code
We do a bit more than just running the callbacks during suspend and resume
these days (e.g. call regcache_mark_dirty() during suspend). But this is
only when suspend and resume callbacks are specified for the driver,
otherwise nothing is done. This means that drivers which don't want to do
anything special during suspend and resume, but still want the standard
operations to run, need to provide empty suspend and resume callback
functions (rather than no callbacks). This patch updates the suspend and
resume code to always run standard sequence regardless of whether suspend
and resume handlers are provided.

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
86dbf2ac6f ASoC: Add support for automatically going to BIAS_OFF on suspend
There is a substantial amount of drivers that in go to SND_SOC_BIAS_OFF on
suspend and go back to SND_SOC_BIAS_SUSPEND on resume (Often this is even
the only thing done in the suspend and resume handlers). This patch
introduces a new suspend_bias_off flag, which when set by a driver will let
the ASoC core automatically put the device's DAPM context at the
SND_SOC_BIAS_OFF level during suspend. Once the device is resumed the DAPM
context will go back to SND_SOC_BIAS_STANDBY (if the context is idle,
otherwise to SND_SOC_BIAS_ON).

This will allow us to remove a fair bit of duplicated code from the drivers.

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
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