Commit graph

10928 commits

Author SHA1 Message Date
Mark Brown 3b8f4a70b8 Merge remote-tracking branch 'asoc/fix/sta32x' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown 2824ef9b81 Merge remote-tracking branch 'asoc/fix/simple' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown 95d67c7fc2 Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2015-03-04 20:42:43 +00:00
Mark Brown c6eb1fa4a7 Merge remote-tracking branch 'asoc/fix/rt5677' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown 159c6fc0bb Merge remote-tracking branch 'asoc/fix/rt5670' into asoc-linus 2015-03-04 20:42:42 +00:00
Mark Brown e0427428db Merge remote-tracking branch 'asoc/fix/rsnd' into asoc-linus 2015-03-04 20:42:41 +00:00
Mark Brown a9ca2a3cf4 Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown 465de977ee Merge remote-tracking branch 'asoc/fix/max98357a' into asoc-linus 2015-03-04 20:42:40 +00:00
Mark Brown 09269e4eef Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2015-03-04 20:42:39 +00:00
Mark Brown 9d22fd3ca7 Merge remote-tracking branch 'asoc/fix/fsl-ssi' into asoc-linus 2015-03-04 20:42:38 +00:00
Mark Brown ed87e2974e Merge remote-tracking branch 'asoc/fix/cirrus' into asoc-linus 2015-03-04 20:42:37 +00:00
Bard Liao 2bf9eba143 ASoC: rt5670: Fix the speaker mono output issue
We need to set left/right control for the speaker amp to get stereo
output on speaker.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:29:46 +00:00
Jyri Sarha 6742e15cf9 ASoC: omap-pcm: Allow only formats with 1, 2, and 4 byte physical size
sDMA support only transfer elements with 1, 2, and 4 byte physical
size. Initialize the pcm driver accordingly.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:28:51 +00:00
Peter Ujfalusi 4da4608c91 ASoC: davinci: Remove unused davinci-pcm platform driver
All DAI drivers has been converted to use edma-pcm instead of davinci-pcm
and the driver can be removed from the tree.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi 9759e7ef53 ASoC: davinci-mcasp: Deprecate the use of davinci-pcm in favor of edma-pcm
The edma-pcm performs as good as the old davinci-pcm and it's use does not
require the 'ping-pong' mode of davinci-pcm, which was introduced to
overcome under/over flow issues when using davinci-pcm.

Keep the SND_DAVINCI_SOC config option to select the SND_EDMA_SOC to avoid
regression in audio support.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi 62731d33c4 ASoC: davinci-vcif: Convert to use edma-pcm
The edma-pcm can replace the old davinci-pcm as platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi 257ade78b6 ASoC: davinci-i2s: Convert to use edma-pcm
The edma-pcm can replace the old davinci-pcm as platform driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi 4c03a5ebc7 ASoC: davinci: Select SND_EDMA_SOC when SND_DAVINCI_SOC is enabled
edma-pcm going to replace davinci-pcm as platform driver for daVinci
platform.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:26:28 +00:00
Peter Ujfalusi d51199a83a ASoC: omap-pcm: Correct dma mask
DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be
set to 32.
The 64 was introduced by commit (in 2009):
a152ff24b9 ASoC: OMAP: Make DMA 64 aligned

But the dma_mask and coherent_dma_mask can not be used to specify alignment.

Fixes: a152ff24b9 (ASoC: OMAP: Make DMA 64 aligned)
Reported-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-03-04 17:23:31 +00:00
Lars-Peter Clausen 7ba8cbb2f0 ASoC: tegra_wm8903: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:48 +00:00
Lars-Peter Clausen 783b1e7948 ASoC: tegra_rt5677: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:47 +00:00
Lars-Peter Clausen 00eafe3b1b ASoC: tegra_rt5640: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:47 +00:00
Lars-Peter Clausen d020e77c61 ASoC: tegra_max98090: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:46 +00:00
Lars-Peter Clausen 12cc6d1dca ASoC: tegra_alc5632: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:46 +00:00
Lars-Peter Clausen 3fd94f37da ASoC: tobermory: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:46 +00:00
Lars-Peter Clausen 663976ad47 ASoC: speyside: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:45 +00:00
Lars-Peter Clausen 55b2ed2d9d ASoC: smartq: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:45 +00:00
Lars-Peter Clausen e9c9a723ee ASoC: rx1950_uda1380: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:45 +00:00
Lars-Peter Clausen f97e0eacf2 ASoC: lowland: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:44 +00:00
Lars-Peter Clausen 39ec5109d6 ASoC: littlemill: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:44 +00:00
Lars-Peter Clausen dfe11f282c ASoC: h1980_uda1380: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:44 +00:00
Lars-Peter Clausen d30d141f9c ASoC: z2: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:43 +00:00
Lars-Peter Clausen 3b14125bc5 ASoC: ttc-dkb: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:43 +00:00
Lars-Peter Clausen bc1e2e06a0 ASoC: palm27x: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:43 +00:00
Lars-Peter Clausen f7a4433b49 ASoC: hx4700: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:42 +00:00
Lars-Peter Clausen 753d45e6b8 ASoC: rx51: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:42 +00:00
Lars-Peter Clausen da21cf6d65 ASoC: omap-twl4030: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:39 +00:00
Lars-Peter Clausen 25649592cf ASoC: omap-abe-twl6040: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:26 +00:00
Lars-Peter Clausen df8c66189d ASoC: ams-deltea: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:26 +00:00
Lars-Peter Clausen af13cbc1a2 ASoC: mfld_machine: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:10:16 +00:00
Lars-Peter Clausen fb1edb4b68 ASoC: cht_bsw_rt5645: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:52 +00:00
Lars-Peter Clausen e0f7dd9d88 ASoC: byt-max98090: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:52 +00:00
Lars-Peter Clausen 85c85e5d6d ASoC: broadwell: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:52 +00:00
Lars-Peter Clausen 47ec96d4ca ASoC: wm1133-ev: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:52 +00:00
Lars-Peter Clausen 27cb64b474 ASoC: imx-es8328: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:52 +00:00
Lars-Peter Clausen 386669fcec ASoC: simple-card: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:51 +00:00
Lars-Peter Clausen 970939964c ASoC: Allow to register jacks at the card level
Jacks are typically card level elements, but are currently registered with a
CODEC. When it was originally introduced snd_soc_jack_new() took a
snd_soc_card as its parameter, but at that time DAPM was only implemented at
the CODEC level and there was only one CODEC per card. This made it clear
which CODEC to use for the jack DAPM operations. But the multi-component
patchset added support for having multiple CODECs per card and with it the
API was updated to register jacks with a specific CODEC instance instead.
Subsequently DAPM support at the card level has been introduced, but the
snd_soc_jack_new() API has so remained unchanged.

This leaves us with the issue that the DAPM pins that are managed by the
jack detection logic usually are part of the card DAPM context but are
accessed through a CODEC DAPM context. Currently this works fine, but might
break in the future if we take a more hierarchical approach to DAPM
contexts.

Furthermore with componentization progressing systems that do not register
a snd_soc_codec might appear, while these system may still want to able to
register a jack.

This patch addresses these issues by adding a new function called
snd_soc_card_jack_new() that can be used to register jacks with the card
rather than a CODEC.

This new function is mostly identical to snd_soc_jack_new() except that it
additionally allows to directly specify the DAPM pins associated with the
jack. This was done since most users of snd_soc_jack_new() typically call
snd_soc_jack_add_pins() right after it, which is not necessary with the new
API and allows to reduce the amount of boiler plate code.

The old snd_soc_jack_new() is re-implemented as a wrapper around
snd_soc_card_jack_new().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:51 +00:00
Lars-Peter Clausen c472b93990 ASoC: sn95031: Pass CODEC to sn95031_jack_detection()
The sn95031 driver currently gets the CODEC implicitly from the jack that is
passed to sn95031_jack_detection(). But the codec field is going to be
removed from the snd_soc_jack struct, so refactor things to pass the CODEC
explicitly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:51 +00:00
Charles Keepax 112bdfaa52 extcon: arizona: Deobfuscate arizona_extcon_do_magic
arizona_extcon_do_magic does not lend a lot of clarity to the purpose
of the function, and as all the registers used are described in the
datasheet there is no need to obfuscate the code. This patch renames the
function to arizona_extcon_hp_clamp, as it controls clamping on the
headphone output.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2015-03-04 09:41:48 +09:00
Charles Keepax 4901033629 mfd: arizona: Move useful defines into a dt-binding include
Move parts of linux/mfd/arizona/pdata.h and gpio.h into a new file in
the dt-binding directory for use by device tree bindings. This also
makes gpio.h redundant so remove it in the process.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-03-03 16:41:24 +00:00
Vishal Thanki 0004defd4e ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of
Make sure devm_kzalloc() succeeds.

Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-03 15:38:41 +00:00
Vishal Thanki 31f3032c1a ASoC: simple-card: Add a NULL pointer check in asoc_simple_card_dai_link_of
Make sure devm_kzalloc() succeeds.

Signed-off-by: Vishal Thanki <vishalthanki@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-03 14:25:16 +00:00
Tomeu Vizoso dd30014908 ASoC: tegra: Add control for the Mic Jack pin
So userspace can enable and disable the external microphone.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 17:26:28 +00:00
Tomeu Vizoso 3a4562f756 ASoC: tegra: Add sink for the internal mic to tegra_max98090
Also adds a control for the pin of the internal mic, so userspace can
apply policy when the state of the external mic jack changes.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 17:26:28 +00:00
Tomeu Vizoso a0cf43e2f0 ASoC: tegra: Expose Headphones pin to userspace
So userspace can enable or disable it based on the current policy.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 17:26:28 +00:00
Mark Brown 05a25fd53e Merge branch 'fix/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5677 2015-03-02 17:25:12 +00:00
Oder Chiou cbca4076d1 ASoC: rt5677: Keep the LDO2 powered while used in the suspend mode
The patch keeps the ldo2 power while the DSP function of "Voice Wake Up" used
in the suspend mode.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 17:22:59 +00:00
Oder Chiou ab1f70952f ASoC: rt5677: Add the chip type to distinguish the setting of the clock source
There is only one clock source in the rt5676, so the chip type is added to
distinguish the setting of the clock source in the VAD function.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 17:22:59 +00:00
Mengdong Lin ea232b3f72 ASoC: rt5670: add API to select ASRC clock source
When codec is in slave mode, ASRC can suppress noise for asynchronous
MCLK and LRCLK or special I2S format. This patch defines an API to select
the clock source for specified filters.  And the codec driver will turn on ASRC
for these filters if ASRC is selected as their clock source.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:46 +00:00
Bard Liao 3aebec3a70 ASoC: rt5670: redefine ASRC control registers 0x84 and 0x85
The previous definition of registers 0x84 and 0x85 doesn't match the datasheet.
So this patch removes the wrong definition and writes a new one for the two
registers.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:46 +00:00
Bard Liao 77e3ea2801 ASoC: rt5670: Keep sysclk on if JD func is used
System clock is necessary for rt5670 JD function. We assume system
clock source will be set in machine driver. So there are two things
left we should do in codec driver.
1. Set sysclk to codec internal clock in probe since machine driver
   may not do that before JD function is registered.
2. Power up PLL once sysclk source is switched to PLL.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:46 +00:00
Bard Liao 64e89e5f55 ASoC: rt5670: Add runtime PM support
This patch adds runtime PM support on rt5670 codec.

Signed-off-by: Lin Mengdong <mengdong.lin@intel.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:46 +00:00
Bard Liao 223c055aa0 ASoC: rt5670: set platform data by dmi
This patch set specific data according to dmi data.

Signed-off-by: Jin, Yao <yao.jin@intel.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:46 +00:00
Alexandre Belloni d7a6fe015b ASoC: sam9g20_wm8731: drop machine_is_xxx
Atmel based boards can now only be used with device tree. Drop non DT
initialization.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-02 16:19:26 +00:00
Richard Fitzgerald 575ef7f6d5 ASoC: arizona: Add support for WM8280/WM8281
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-02-26 10:04:45 +00:00
Thomas Niederprüm 8af4baa708 ASoC: OMAP: mcbsp: Fix CLKX and CLKR pinmux when used as inputs
This patch fixes faulty behaviour in a setup where the input clock for the
SRG is fed through the CLKR/CLKX pin but the McBSP is configured to be
master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR/CLKX must
not be configured as output pin. Otherwise the input clock is messed up
horribly.

This patch makes it possible to use the CLKR/CLKX pin rather than CLKS to
inject a reference clock in setups where McBSP is master and not both
rx and tx are used. However for this to work it has to be ensured that
set_dai_sysclk() is called after set_dai_fmt().

This was tested on a beagleboard-xm using McBSP1 to drive a i2s DAC through
the tx lines (CLKX,FSX,DX). Using this patch the CLKR pin is used to inject
an external reference clock.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 11:48:49 +09:00
Kenneth Westfield 92b2ad2c9e ASoC: max98357a: Use standard DAI names
Use the standard naming convention for the codec DAI.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 11:23:46 +09:00
Oder Chiou 70068776c4 ASoC: rt5677: Correct the routing paths of that after IF1/2 DACx Mux
The patch corrects the routing paths of that after IF1/2 DACx Mux

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 11:06:51 +09:00
Vinod Koul 5bb400ce4a ASoC: Intel: wrap runtime_pm usage count under CONFIG_PM
The struct dev_pm_ops defines usage_count only when CONFIG_PM is defined. So
we should use this variable only in cases where this falg is true.
So we define a local variable and read the value under this flag. In non PM
cases, we set this to 1.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-26 10:59:37 +09:00
Jie Yang e2cef68d59 ASoC: rt286: add jack detection disable with NULL jack passed
Some platforms, e.g. WSB, don't need jack detection when
system is in Suspend, for power save reason.

Here add headphone/mic jack detection disable feature with NULL
jack passed in, when disabled, it will disable interrupt, and
disable LDO1, which is used for jack detection when headphone
is plugged in.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Reviewed-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-25 00:06:12 +09:00
Nicolin Chen 3185878a70 ASoC: fsl-asoc-card: Add snd_soc_of_parse_audio_routing()
This patch adds snd_soc_of_parse_audio_routing() to get dapm routes
configurations via Device Tree.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 23:46:13 +09:00
Nicolin Chen f23e860edb ASoC: core: Add extra dapm properties for Device Tree
The current helper functions, snd_soc_of_parse_audio_simple_widgets()
and snd_soc_of_parse_audio_routing(), set dapm_widgets and dapm_routes
without caring if they are already set by using build-in widgets and
routes in the card driver. So there could be one of them, build-in one
or Device Tree one, overrided by the other depending on which one was
assigned later.

This patch adds an extra pair of dapm_widgets and dapm_routes for DT
use only so as to prevent unexpected overriding.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 23:46:13 +09:00
Peter Rosin f29933c9ae ASoC: pcm512x: Allow independently overclocking PLL, DAC and DSP
When using non-standard rates, a relatively small amount of overclocking
can make a big difference to a number of cases.

- Not all rates are possible to achieve with the PLL, due to divider
  restrictions.

- The higher oversampling rates that can be used by the DAC, the
  simpler the analog output filters get (mirror frequencies move up,
  away from the desired spectrum).

- The more work the DSP can perform per sample, the better.

For standard rates, there is little to gain as everything is
designed just right, and the needed overclocking to make a
real difference would be significant.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 23:14:25 +09:00
Peter Rosin 5890bd5256 ASoC: pcm512x: Rearrange to not repeat dacsrc_rate / dac_div
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 23:14:24 +09:00
Thomas Niederprüm 148388f375 ASoC: sta32x: fix register range in regmap.
The STA32X_AUTO3 is a writable register that currently does not appear
in the regmap ranges(neither read nor write). By adding this register
to the register ranges there is no gap anymore and the existing
register ranges can be joined. This fixes a regression introduced in
commit a1be4cead9 where the driver was
moved to direct regmap usage and the STA32X_AUTO3 register was missed.
That made it impossible to choose the preset EQ mode set through the
STA32X_AUTO3 register.

Fixes: a1be4cead9 (ASoC: sta32x: Convert to direct regmap API usage)
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:45:31 +09:00
Uwe Kleine-König 34d7c3905a ASoC: improve usage of gpiod API
Since 39b2bbe3d7 (gpio: add flags argument to gpiod_get*() functions)
which appeared in v3.17-rc1, the gpiod_get* functions take an additional
parameter that allows to specify direction and initial value for
output. Simplify drivers accordingly.

Also there is an *_optional variant that serves well here. The sematics
is slightly changed here by using it as error checking is more strict
now: If GPIOLIB is not enabled an error is returned instead of just
ignoring the gpio. On one hand this is bad for devices that don't "have"
the respective gpio as the driver is failing now. On the other hand
there is no means to assert that this gpio is really not needed or if
only the driver to control it is not available. The latter is a real
reason to fail and so it's defensive to fail here, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 17:38:58 +09:00
Bard Liao 850529249d ASoC: rt5670: Set RT5670_IRQ_CTRL1 non volatile
RT5670_IRQ_CTRL1(0xbd) is a non volatile register. And we need to
restore its value after suspend/resume.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-24 17:22:39 +09:00
Subhransu S. Prusty 3f2dcbeaeb ASoC: Intel: Remove soc pm handling to allow platform driver handle it
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>
2015-02-24 17:00:36 +09:00
Subhransu S. Prusty 583e58a0f0 ASoC: Intel: Remove ignore suspend support
In our platform we want platform and codec driver routines to get invoked
and don't need the machine routines so remove here

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>
2015-02-24 17:00:35 +09:00
Vinod Koul 9308d1456e ASoC: Intel: Move the fw download to power_control
Thus removing the runtime_resume handler.

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>
2015-02-24 17:00:35 +09:00
Vinod Koul 4a8448d428 ASoC: Intel: add pm support in sst ipc driver
This adds support for system pm support. We need to save the dsp memory
which gets lost on suspend and restore that on resume

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>
2015-02-24 17:00:34 +09:00
Subhransu S. Prusty 5c88b4e91d ASoC: Intel: Add memcpy32_fromio as well
Export 32-bit version of memcpy for use in suspend/resume.

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>
2015-02-24 00:43:59 +09:00
Vinod Koul 54e6beccc6 ASoC: Intel: add support for platform suspend
This adds support for platform suspend and resume. We ensure all pcms are
suspended by invoking snd_soc_suspend() and then stop the DSP

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>
2015-02-24 00:43:59 +09:00
Vinod Koul fc9406ab9b ASoC: Intel: add support for pcm stream suspend/resume
The driver didn't implement support for pcm stream suspend and resume, so
add it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul e0b87d476b ASoC: Intel: add support for pause and resume in sst
This adds missing pcm pause and resume ops in the driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul 7b9ca9d7e5 ASoC: Intel: update MMX ID to 3
The updated firmware expects the MMX ID to be used as 3, so update the
driver as well

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Vinod Koul 76ca1c2cd8 ASoC: Intel: mark cht machine driver with nonatomic trigger
The DSP messages are sent with nonatomic context, which include trigger
messages, so mark the driver as nonatomic

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>
2015-02-24 00:43:59 +09:00
Vinod Koul 48c7699fb2 ASoC: core: allow pcms to be registered as nonatomic
ALSA core with commit 257f8cce5d - "ALSA: pcm: Allow nonatomic trigger
operations" allows trigger ops to implemented as nonatomic. For ASoC, we can
specify this in dailinks and is updated while snd_pcm is created

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:59 +09:00
Fang, Yang A 369a9f5f39 ASoC: Intel: fix machine driver warnings
this patch will fix below sparse warnings

warning: incorrect type in argument 2 (different base types) expected
unsigned int [unsigned] val got restricted snd_pcm_format_t [usertype]
<noident>

sound/soc/intel/haswell.c:61:37
sound/soc/intel/broadwell.c:115:37:
sound/soc/intel/bytcr_dpcm_rt5640.c:118:37:
sound/soc/intel/cht_bsw_rt5672.c:183:37:
sound/soc/intel/cht_bsw_rt5645.c:208:37:

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:43:19 +09:00
Vinod Koul de251d773b ASoC: Intel: reset the DSP while suspending
The manual recommends that we reset the DSP when we suspend so add that in
runtime suspend handler

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:39:00 +09:00
Vinod Koul a825ac7678 ASoC: Intel: save and restore the CSR register
The IPC driver saved only IMR register, we need to save the CSR as well, so
add it

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:38:38 +09:00
Vinod Koul b3ec1c3538 ASoC: Intel: update MMX ID to 3
The updated firmware expects the MMX ID to be used as 3, so update the
driver as well

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24 00:37:51 +09:00
Kuninori Morimoto 7c6cc8f201 ASoC: fsi: Configure DMA slave settings
Current FSI driver is assuming that dst_addr/src_addr of DMAEngine
will be set by platform data. But it should be set via
dmaengine_slave_config(). Special thanks to Arnd

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-02-23 16:13:23 +05:30
Kuninori Morimoto 5b7cdc8068 ASoC: fsi: remove slave_id settings for DMAEngine
Current fsi sets dma_slave_config :: slave_id field for DMAEngine,
but it is no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2015-02-23 16:13:22 +05:30
Linus Torvalds a2a6937da0 sound fixes for 3.20-rc1
Here are a few small fix patches for 3.20-rc1:
 - Quirks for Denon and Lifecam USB-audio devices and HD-audio
   on HP laptops
 - A long-time regression fix for HDSP eMADI
 - Add missing DRAIN_TRIGGER flag set for ASoC intel-sst
 - Trivial fixes for sequencer core and HD-audio Tegra, a LINE6
   cleanup
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJU5eAJAAoJEGwxgFQ9KSmkCJEP/RSEuVaDCvWOjq5Z0z2DJe9+
 x+zmuaF7NYjAbLFt/ODtlv4xihkDGdiZyi1LPPH69pC57Yzx8mVGxSsjv4DRemWd
 W+2mjHqkRV/bt0nQjJfAGiHEGH2ZPHsB74+6nvlVk7UN2VGdcE/6JSkJ67b6e/u8
 yY3DUASaSn2xXGIAso7M3gWBdCCAE6qlVyeaP6xhs/VuclqTZHvc7nzg7jh0S0KL
 Bfd/clFEaWy0cSoEQfxd7n+o0U+EnuXsIpL0Jg8pXgN7RMv3mBZQT8QSupd/GhNb
 IhkIav+xeZyvq+Bw+vV8mbOe11o71K7qNXrVpckzF2C2HaLrLqwcl/U2UcowY4/3
 ktbBvxhMwXL+BP2DE/Rz9GqE0WmuaSkQtu9O+L5+cXaMjecHze814v29P6/gq9Z5
 pdSGMCI64IJrvKok8Lt2Y262P9oLsD9s4cDTsiZ4ylSXkKYcoXhOGoRWsm+bVp5U
 dzjpwKtisk90FGJ2vYbVQHPb1G3QmKo8ibkS9RRbQohblc68HHOSXenVQ2CdrZvg
 N1b4klyG6q+Emqt+3SRoZ64Ue1zovN9qVeD45TadHNOmajBhOpHljSowhYbGO5tD
 ASxpprtPDBEsogzk/jZfMeeYJf2k0Tejlht4vJ9gtWgKekVQdcuHdnMqV8GKhNde
 pJC3zz9K9fUC0LQNoab1
 =IYJ7
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a few small fix patches for 3.20-rc1:

   - Quirks for Denon and Lifecam USB-audio devices and HD-audio on HP
     laptops
   - A long-time regression fix for HDSP eMADI
   - Add missing DRAIN_TRIGGER flag set for ASoC intel-sst
   - Trivial fixes for sequencer core and HD-audio Tegra, a LINE6
     cleanup"

* tag 'sound-fix-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
  ASoC: Intel: add SNDRV_PCM_INFO_DRAIN_TRIGGER flag
  ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
  ALSA: hda/tegra check correct return value from ioremap_resource
  ALSA: hdspm - Constrain periods to 2 on older cards
  ALSA: hda - enable mute led quirk for one more hp machine.
  ALSA: seq: potential out of bounds in do_control()
  ALSA: line6: Improve line6_read/write_data() interfaces
2015-02-21 11:53:00 -08:00
Kenneth Westfield 7ff5eabce4 ASoC: max98357a: Remove use of DRV_NAME
Remove use of DRV_NAME define.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:48:20 +09:00
Kenneth Westfield 08d0a55c33 ASoC: max98357a: Add missing header files
Add missing header files to avoid implicit
declarations and indirect inclusions.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:47:55 +09:00
Arnd Bergmann 52554fbd2f ASoC: cirrus: tlv320aic23 needs I2C
The tlv320aic23 codec is selected by the ep93xx snapper platform,
which are missing a dependency on I2C, and that can result in this
build error, as found during randconfig builds:

.../codecs/tlv320aic23-i2c.c: In function 'tlv320aic23_i2c_probe':
.../codecs/tlv320aic23-i2c.c:27:2: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration]
  if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
  ^

This adds the missing dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:36:27 +09:00
Arnd Bergmann 014c4d6376 ASoC: Samsung: add missing I2C/SPI dependencies
A few sound drivers for the samsung platforms are missing dependencies
on I2C or SPI, which can lead to build errors like

codecs/rt5631.c:1737:1: warning: data definition has no type or storage class
31_i2c_driver);

codecs/rt5631.c:1737:1: error: type defaults to 'int' in declaration of 'module_i2c_driver' [-Werror=implicit-int]
codecs/rt5631.c:1737:1: warning: parameter names (without types) in function declaration
codecs/rt5631.c:1726:26: warning: 'rt5631_i2c_driver' defined but not used [-Wunused-variable]

I have gone through all the ones that did not already have
an I2C dependency and added the ones that I found missing,
namely arndale, odroid-x2, littlemill, bells and speyside
and this patch adds all the dependencies.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:35:58 +09:00
Charles Keepax be95101745 ASoC: wm_adsp: Improve round to next 4-byte boundary
Whilst the existing code does correctly round to the next 4-byte boundary
it does so rather inefficiently. This patch changes the rounding to be
simpler and more efficient.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:35:19 +09:00
Nikesh Oswal 65d17a9ce9 ASoC: wm_adsp: Ensure DSP controls are always persistent
Currently DSP controls are persistent (across DSP On/Off) only
if they were set whilst the DSP is off. This change makes the
controls persistent irrespective of when they are set.

Signed-off-by: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:35:19 +09:00
Bard Liao e7a961c957 ASoC: rt5670: Fix the speaker mono output issue
We need to set left/right control for the speaker amp to get stereo
output on speaker.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:30:38 +09:00
Bard Liao 7371bd1f4a ASoC: rt5670: Add disabled item in dmic pin enum
Currently, we will configure dmic related pin definition if pdata.dmic_en
is true. However, there is no disable option in the enum. So, any dmic is
used, all 3 dmic related pins will be configured. It may cause unexpected
pin definition. This patch adds a disable item for each dmic enum and
take it as default. So the driver will not set the pin configuration if
we don't set dmicx_data_pin in platform data.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-21 18:30:14 +09:00
Linus Torvalds ce1d3fde87 Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul:
 "This update brings:

   - the big cleanup up by Maxime for device control and slave
     capabilities.  This makes the API much cleaner.

   - new IMG MDC driver by Andrew

   - new Renesas R-Car Gen2 DMA Controller driver by Laurent along with
     bunch of fixes on rcar drivers

   - odd fixes and updates spread over driver"

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (130 commits)
  dmaengine: pl330: add DMA_PAUSE feature
  dmaengine: pl330: improve pl330_tx_status() function
  dmaengine: rcar-dmac: Disable channel 0 when using IOMMU
  dmaengine: rcar-dmac: Work around descriptor mode IOMMU errata
  dmaengine: rcar-dmac: Allocate hardware descriptors with DMAC device
  dmaengine: rcar-dmac: Fix oops due to unintialized list in error ISR
  dmaengine: rcar-dmac: Fix spinlock issues in interrupt
  dmaenegine: edma: fix sparse warnings
  dmaengine: rcar-dmac: Fix uninitialized variable usage
  dmaengine: shdmac: extend PM methods
  dmaengine: shdmac: use SET_RUNTIME_PM_OPS()
  dmaengine: pl330: fix bug that cause start the same descs in cyclic
  dmaengine: at_xdmac: allow muliple dwidths when doing slave transfers
  dmaengine: at_xdmac: simplify channel configuration stuff
  dmaengine: at_xdmac: introduce save_cc field
  dmaengine: at_xdmac: wait for in-progress transaction to complete after pausing a channel
  ioat: fail self-test if wait_for_completion times out
  dmaengine: dw: define DW_DMA_MAX_NR_MASTERS
  dmaengine: dw: amend description of dma_dev field
  dmatest: move src_off, dst_off, len inside loop
  ...
2015-02-18 08:49:20 -08:00
Libin Yang 9fd37810da ASoC: Intel: add SNDRV_PCM_INFO_DRAIN_TRIGGER flag
Add SNDRV_PCM_INFO_DRAIN_TRIGGER in snd_pcm_hardware.info to
call sst_hsw_stream_set_silence_start() when PCM draining.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17 07:48:15 +01:00
Mengdong Lin 7bd345c9e8 ASoC: Intel: set initial runtime PM status to active for ACPI-enumerated ADSP
The ADSP on Braswell/Baytrail is an ACPI device. This patch sets its initial
runtime PM status to active. Otherwise, its initial status is suspended and
runtime_suspend ops will not be called after probe and thus cannot further
trigger ACPI _PS3 (D3) method to put the device into low power D3cold state.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-14 13:49:46 +09:00
Kiran Padwal fb5ab7296a ASoC: omap-hdmi-audio: Add missing error check for devm_kzalloc
This patch add a missing check on the return value of devm_kzalloc,
which would cause a NULL pointer dereference in a OOM situation.

Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-14 13:32:53 +09:00
Peter Ujfalusi 226e2f1b0b ASoC: davinci-mcasp: Add support for CBS_CFM mode
Support for setups where codec is bitclock slave and frame master.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-14 13:27:03 +09:00
Vincent Stehlé 5c8be987d4 ASoC: max98357a: Fix missing include
This fixes the following compilation errors:

  sound/soc/codecs/max98357a.c: In function ‘max98357a_daiops_trigger’:
  sound/soc/codecs/max98357a.c:30:3: error: implicit declaration of function ‘gpiod_set_value’ [-Werror=implicit-function-declaration]
  sound/soc/codecs/max98357a.c: In function ‘max98357a_codec_probe’:
  sound/soc/codecs/max98357a.c:55:2: error: implicit declaration of function ‘devm_gpiod_get’ [-Werror=implicit-function-declaration]
  sound/soc/codecs/max98357a.c:61:2: error: implicit declaration of function ‘gpiod_direction_output’ [-Werror=implicit-function-declaration]
  cc1: some warnings being treated as errors

Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Kenneth Westfield <kwestfie@codeaurora.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-12 10:55:36 +08:00
Guenter Roeck ffa0475771 ASoC: Fix MAX98357A codec driver dependencies
The max98357a driver depends on GPIOLIB. This may cause the following
build failure.

sound/soc/codecs/max98357a.c: In function 'max98357a_daiops_trigger':
sound/soc/codecs/max98357a.c:30:3: error: implicit declaration of function 'gpiod_set_value'
sound/soc/codecs/max98357a.c: In function 'max98357a_codec_probe':
sound/soc/codecs/max98357a.c:55:2: error: implicit declaration of function 'devm_gpiod_get'
sound/soc/codecs/max98357a.c:61:2: error: implicit declaration of function 'gpiod_direction_output'

Seen with mips:allmodconfig as well as various randconfig builds.

Fixes: af5adf1293 ("ASoC: max98357a: Add MAX98357A codec driver")
Cc: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-12 10:54:52 +08:00
Libin Yang 1b006996b6 ASoC: Intel: Clean data after SST fw fetch
The BDW audio firmware DSP manages the DMA and the DMA cannot be
stopped exactly at the end of the playback stream. This means
stale samples may be played at PCM stop unless the driver copies
silence to the subsequent periods.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-11 09:58:15 +01:00
Nicolin Chen 541b03ad6c ASoC: fsl_ssi: Fix the incorrect limitation of the bit clock rate
According to i.MX Reference Manual, the bit-clock frequency generated
by SSI must be never greater than 1/5 of the peripheral clock frequency.

This peripheral clock, however, is not baudclk but the IPG clock (i.e.
ssi_private->clk in the fsl_ssi driver).

So this patch just simply fixes the incorrect limitation applied to
the bit clock (baudclk) rate.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-11 13:46:07 +08:00
Peter Rosin b6d6c6e95f ASoC: atmel_ssc_dai: Allow more rates
When the SSC acts as BCK master, use a ratnum rule to limit
the rate instead of only doing the standard rates. When the SSC
acts as BCK slave, allow any BCK frequency up to the SSC master
clock, divided by either of 2, 3 or 6.

Put a cap at 384kHz. Who's /ever/ going to need more than that?

The divider of 2, 3 or 6 is selected based on the Serial Clock Ratio
Considerations section from the SSC documentation:

    The Transmitter and the Receiver can be programmed to operate
    with the clock signals provided on either the TK or RK pins.
    This allows the SSC to support many slave-mode data transfers.
    In this case, the maximum clock speed allowed on the RK pin is:
    - Peripheral clock divided by 2 if Receiver Frame Synchro is input
    - Peripheral clock divided by 3 if Receiver Frame Synchro is output
    In addition, the maximum clock speed allowed on the TK pin is:
    - Peripheral clock divided by 6 if Transmit Frame Synchro is input
    - Peripheral clock divided by 2 if Transmit Frame Synchro is output

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-10 15:12:41 +08:00
Peter Ujfalusi 5163c1eede ASoC: omap: Kconfig: Support for omap5-uevm analog audio
The analog audio is supported via omap-abe-twl6040 machine driver on
omap5-uevm.
Update the Kconfig file to reflect this and select the Palmas clock driver
which is providing the 32K clock for audio on omap5-uevm.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-10 15:10:39 +08:00
Kuninori Morimoto 0b1f6ec7a5 ASoC: rsnd: set device data before snd_soc_register_platform/component
Set device data before snd_soc_register_platform/component.
Otherwise, it will use NULL pointer if user calls unbind -> bind or
rmmod -> insmod

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-09 16:24:31 +08:00
Takashi Iwai d1612c80ed ASoC: Final updates for v3.20
A few more updates for v3.20 that have accumilated over the second half
 of last week.  One new (relatively simple) driver for the Maxim
 max98357a and some other driver specific fixes and enhancements.  I did
 apply a few patches that haven't been in -next just now before sending
 this, all fixes except for one simple device ID addition patch.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU2F6pAAoJECTWi3JdVIfQ7qkH/RehUr+fH9XgnFH3fX6MoxCO
 rXfAHziSa+zV8xDVvj4eIgsqwwQ1eF40qnvAdlNe+rBx8q0fA56YpJZhuvSmLoRh
 PE+VAEMKp3dP87CxlTHfJRWSry22ijWkPUBqOry+bqAm8ZijaJI6HNG2/j7CJDgx
 31gP4GDC5t0moNco2Pg5Aq2tcnAXfNKCzLs/2nr0iG2UXiXqArKHtHCBtLgVtyqb
 KOpH+c01bKy1+83gMxc8pLH8TP1WGWmoFm9BIeLkmYBU4n6odTM8Wcmv7npu3HoO
 BPZDcy+NsHQY/b85EPX/VFKdLrR+E6/EEvDW+4gVs1NTmu3G18SG81uKnoA6UYA=
 =4I1/
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Final updates for v3.20

A few more updates for v3.20 that have accumilated over the second half
of last week.  One new (relatively simple) driver for the Maxim
max98357a and some other driver specific fixes and enhancements.  I did
apply a few patches that haven't been in -next just now before sending
this, all fixes except for one simple device ID addition patch.
2015-02-09 08:54:50 +01:00
Mark Brown f4c2e9bcb0 Merge remote-tracking branches 'asoc/topic/wm8804', 'asoc/topic/wm8904', 'asoc/topic/wm8960', 'asoc/topic/wm8988' and 'asoc/topic/xtfpga' into asoc-next 2015-02-09 15:10:34 +08:00
Mark Brown 1525da06ff Merge remote-tracking branches 'asoc/topic/ts3a227e', 'asoc/topic/ts3a277e' and 'asoc/topic/txx9' into asoc-next 2015-02-09 15:10:32 +08:00
Mark Brown 1bf9f29a05 Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/sta32x', 'asoc/topic/tdm-slot', 'asoc/topic/tegra' and 'asoc/topic/tlv320aic3x' into asoc-next 2015-02-09 15:10:29 +08:00
Mark Brown ddaaeee0e5 Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/rx51', 'asoc/topic/samsung' and 'asoc/topic/sh' into asoc-next 2015-02-09 15:10:26 +08:00
Mark Brown af70797105 Merge remote-tracking branches 'asoc/topic/pxa', 'asoc/topic/rcar' and 'asoc/topic/rt286' into asoc-next 2015-02-09 15:10:24 +08:00
Mark Brown 5a7fa6b0d2 Merge remote-tracking branches 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' into asoc-next 2015-02-09 15:10:23 +08:00
Mark Brown 6e685ea6aa Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/imx', 'asoc/topic/intel', 'asoc/topic/jz4740' and 'asoc/topic/max98357a' into asoc-next 2015-02-09 15:10:19 +08:00
Mark Brown 97edc4164f Merge remote-tracking branches 'asoc/topic/doc', 'asoc/topic/dwc', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-asrc' into asoc-next 2015-02-09 15:10:17 +08:00
Mark Brown 3f1cf65757 Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-next 2015-02-09 15:10:14 +08:00
Mark Brown bd862e12bf Merge remote-tracking branches 'asoc/topic/bt-sco', 'asoc/topic/cs35l32', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next 2015-02-09 15:10:12 +08:00
Mark Brown db5cdb3416 Merge remote-tracking branches 'asoc/topic/ad193x', 'asoc/topic/alc5632', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next 2015-02-09 15:10:09 +08:00
Mark Brown e1e62305af Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-next 2015-02-09 15:10:03 +08:00
Mark Brown 1030047492 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2015-02-09 15:10:02 +08:00
Mark Brown 1d03ab06d7 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next 2015-02-09 15:10:01 +08:00
Mark Brown 03a3a2e25f Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2015-02-09 15:10:01 +08:00
Mark Brown afcfe4359e Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2015-02-09 15:10:00 +08:00
Mark Brown 0cee4db21e Merge remote-tracking branches 'asoc/fix/ac97', 'asoc/fix/atmel', 'asoc/fix/intel', 'asoc/fix/rt286', 'asoc/fix/rt5640', 'asoc/fix/samsung', 'asoc/fix/sgtl5000', 'asoc/fix/sta32x', 'asoc/fix/tlv320aic3x' and 'asoc/fix/wm8731' into asoc-linus 2015-02-09 15:09:49 +08:00
Mark Brown b34510b70d ASoC: Updates for v3.20
Nothing too exciting here yet, a small optimization for DAPM from
 Lars-Peter and a few small bits and pieces for drivers but nothing
 that really stands out.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUoX40AAoJECTWi3JdVIfQCHkH/20AXx65DLEvKjtKJTbhE25j
 XSmN3ZtXuEdzg70rG1E2YZsZofxRWShX7HHyCwmepWfe30o+V4UCR+4HyHIWVLF6
 O3TpupfcQ9ACP+/jQQxxySnTld6LJqW7rNXpxTVGeaba82uDtKIVgv/gHoUtEBDi
 NfG0RoVcfpb0k52LWzijIDx4YxVCuIkPHLFqBP63S92XNgw7bc8zjMl65ayY43M+
 obfD0ISIdEudmkyqNrQzuNtxl14wsYjzQ5VYqltW5kLaEQVtmD8Zp1bOVI3m0xhX
 KY8zQnUUwA4+Cxs8aAm/NvczAZ/GyEQSIjTdUQZDXm0k6H81eya108SfxGvaMYI=
 =DSaV
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.19-rc2' into asoc-linus

ASoC: Updates for v3.20

Nothing too exciting here yet, a small optimization for DAPM from
Lars-Peter and a few small bits and pieces for drivers but nothing
that really stands out.

# gpg: Signature made Tue 30 Dec 2014 00:15:48 HKT using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: key AF88CD16: no public key for trusted key - skipped
# gpg: key AF88CD16 marked as ultimately trusted
# gpg: key 5621E907: no public key for trusted key - skipped
# gpg: key 5621E907 marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
2015-02-09 15:09:48 +08:00
Bard Liao 92b133f251 ASoC: rt5670: Set use_single_rw flag for regmap
RT5670 doesn't support auto incrementing writes so driver should
set the use_single_rw flag for regmap.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-09 15:08:35 +08:00
Bard Liao 3ab888db09 ASoC: rt286: Add rt288 codec support
This patch adds support for rt288 codec.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-09 15:07:36 +08:00
Mark Brown 3efa130de4 ASoC: max98357a: Fix build in !CONFIG_OF case
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-09 14:36:47 +08:00
kbuild test robot 812e85bb22 ASoC: Intel: fix platform_no_drv_owner.cocci warnings
sound/soc/intel/cht_bsw_rt5645.c:315:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-09 14:26:41 +08:00
Kuninori Morimoto 8f6f9b2982 ASoC: core: indicate unregister debug message once
Current snd_soc_unregister_card() indicates unregistered debug
message when it was called. But, it should be called only when
it was really unregistered.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-08 11:11:51 +08:00
Rickard Strandqvist 5985837e34 ASoC: intel: sst-haswell-ipc: Remove unused functions
Removes some functions that are not used anywhere:
sst_hsw_stream_unmute() sst_hsw_stream_mute() msg_set_stage_type()
sst_hsw_dx_get_state() sst_hsw_stream_set_write_position()
sst_hsw_stream_get_vol_reg() sst_hsw_stream_get_peak_reg()
sst_hsw_stream_get_pointer_reg() sst_hsw_stream_get_read_reg()
sst_hsw_stream_get_mixer_id() sst_hsw_stream_get_hw_id()
sst_hsw_mixer_set_volume_curve() sst_hsw_mixer_unmute()
sst_hsw_mixer_mute() sst_hsw_stream_set_volume_curve()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-08 11:11:38 +08:00
Christian Engelmayer 279e17ae81 ASoC: Intel: sst: Fix firmware name size handling
Function sst_acpi_probe() uses plain strcpy for setting member firmware_name
of a struct intel_sst_drv from member firmware of a struct sst_machines.
Thereby the destination array has got a length of 20 byte while the source may
hold 32 byte. Since eg. commit 64b9c90b86 ("ASoC: Intel: Fix BYTCR firmware
name") increased strings from "fw_sst_0f28.bin" to "intel/fw_sst_0f28.bin"
there is an actual possibility that the 20 byte array at the end of struct
intel_sst_drv is overrun.

Thus increase the size of the destination and use the same define for both
structs. Detected by Coverity CID 1260087.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-08 11:08:27 +08:00
Paul Bolle 6cf2cf3150 ASoC: samsung: Remove goni or aquila with the WM8994
Commit 28c8331d38 ("ARM: S5PV210: Remove support for board files")
removed the Kconfig symbols MACH_GONI and MACH_AQUILA. As a result the
dependencies of SND_SOC_GONI_AQUILA_WM8994 can never be met. So remove
the unbuildable "SoC I2S Audio support for AQUILA/GONI - WM8994".

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-07 07:53:07 +08:00
Kenneth Westfield af5adf1293 ASoC: max98357a: Add MAX98357A codec driver
Add codec driver for the Maxim MAX98357A DAC.

Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Acked-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-07 06:12:13 +08:00
Takashi Iwai d2255c0163 ASoC: AC'97 fixes
These are rather too large for this late in the release cycle but
 they're clear, well understood and have been tested to fix a regression
 which was introduced for v3.19.  The details are all in Lars' changelog
 and they've been cooking in -next for a while, to a large extent out
 of conservatism about the size.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU08iuAAoJECTWi3JdVIfQ9cUH/1ZNkoS67zEj/wsvcS+co/Dp
 hInq7mAwO/usFfFWMzb68Lofc4g5yTGE+vtTAhggmzMGuqjXEMCAS/tO85EoA65d
 2f0YNw7gEhUyp0oYPe5tS3I0F8O7ES+u27PwmM8sGO0KdCc9qrb3ppZN3BkEcr2U
 akg854atOcKwBvGRLNSyj79WPkjNyMcM/kWkJCEHFLysu8rSilZ+UaekH+CUw02E
 hstLM+PlM0LE/9rKmQvRyx6cnVqKqPWxalG0mCtBwpdHLYMn4yDFc3nn71lMn3oQ
 /TIcHSfDCRgx3VVW8daBjNHqLgfg4XCcZ5W646zrpyyrlXRCCPJT8N0SY9jZUU4=
 =ScU7
 -----END PGP SIGNATURE-----

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

ASoC: AC'97 fixes

These are rather too large for this late in the release cycle but
they're clear, well understood and have been tested to fix a regression
which was introduced for v3.19.  The details are all in Lars' changelog
and they've been cooking in -next for a while, to a large extent out
of conservatism about the size.
2015-02-05 21:31:19 +01:00
Takashi Iwai deb08737e7 ASoC: Fix for Intel firmware name
Another one liner that arrived after the earlier pull request.  There's
 a trivial conflict with my -next branch, I'll send a pull request with
 that resolution and some other new stuff before Monday.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU09ESAAoJECTWi3JdVIfQZ+oH/10mjezNacUT0hFqZsNTQyFq
 bG1pnU/szkZeMaP0Y1/fHawwgafOcGOPCU6DYDiN7KnNLdCdMW9slxSyZhigD+kV
 G/eopUu0hPQOvlqq+ODGQ3eJ92kBefXzv5v4ophnqeaCdJm+uZbWqvPykVDp8Tqq
 Og7R7AXX9BncCvLCiwhl9KCfKu61DViuCMLWNSbOkoZcRReMeRny0dXLG9WXWx3U
 db72KflC4TZ5i8miKXAqTW/HHLhT8AL+v+B/3I8h/cDCRY6MvkU2qYE01Yvboull
 RJMNuANKgMCVkEnp9izVzGXT/cUTCF6YCQSaPbUkSDWhbTOwirgF7BJBRir1xdM=
 =vv5N
 -----END PGP SIGNATURE-----

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

ASoC: Fix for Intel firmware name

Another one liner that arrived after the earlier pull request.  There's
a trivial conflict with my -next branch, I'll send a pull request with
that resolution and some other new stuff before Monday.
2015-02-05 21:30:43 +01:00
Mark Brown 8a5b69017e Merge branch 'fix/intel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
Conflicts:
	sound/soc/intel/sst/sst_acpi.c
2015-02-05 20:18:39 +00:00
Kevin Strasser 5c2b06369d ASoC: Intel: fix sst firmware path for cht-bsw-rt5672
All sst firmware is provided under the intel directory of the linux-firmware
tree. By default this directory structure is kept when installing on a target
system. Change the path to expect a default linux-firmware installation.

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 20:16:21 +00:00
Mark Brown b2dde2f975 Merge remote-tracking branch 'asoc/fix/wm8731' into asoc-linus 2015-02-05 19:34:53 +00:00
Mark Brown 125e7f1f02 Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus 2015-02-05 19:34:46 +00:00
Mark Brown 4b871df52e Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus 2015-02-05 19:34:40 +00:00
Mark Brown 542af23808 Merge remote-tracking branch 'asoc/fix/rt5640' into asoc-linus 2015-02-05 19:34:34 +00:00
Mark Brown 57e6ef38a4 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2015-02-05 19:34:10 +00:00
Mark Brown 8c617791ac Merge remote-tracking branch 'asoc/fix/atmel' into asoc-linus 2015-02-05 19:33:44 +00:00
Bard Liao 2cc3f23470 ASoC: rt286: Add customize setting for Dell Dino
The patch add the customize setting for Dell Dino project.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:18:02 +00:00
Bard Liao 28d1ad09c5 ASoC: rt286: Fix potencial crash in jd function
We assign rt286->codec in rt286_probe. If rt286_jack_detect is
invoked before rt286_probe, rt286->codec will be NULL and cause
a kernel panic.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:17:12 +00:00
Kevin Strasser e948262ad0 ASoC: Intel: fix sst firmware path
All sst firmware is provided under the intel directory of the linux-firmware
tree. By default this directory structure is kept when installing on a target
system. Change the path to expect a default linux-firmware installation.

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:12:39 +00:00
Fang, Yang A e18acdc04a ASoC: Intel: Add Cherrytrail & Braswell machine driver cht_bsw_rt5645
Add machine driver for two Intel Cherryview-based platforms, Cherrytrail
and Braswell, with RT5645 codec

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:10:42 +00:00
Mark Brown b4964bb356 Merge branch 'topic/rt5645' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel 2015-02-05 18:10:32 +00:00
Fang, Yang A 79080a8b42 ASoC: rt5645: add API to select ASRC clock source
This patch defines an API to select the clock source for specified filters.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Acked-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:09:27 +00:00
Jie Yang cd311dd123 ASoC: Intel: add a status for runtime suspend/resume
For runtime suspend/resume, it is some different with suspend/resume,
e.g. codec power supply won't be switch off, codec jack detection
still working(to wake up system from Jack event), won't call call
snd_soc_suspend/resume, etc.

So here, we add a platform PM status, HSW_PM_STATE_RTD3, to make
the status more clear, when in idle, it will enter this status, to
transfer from HSW_PM_STATE_RTD3 to HSW_PM_STATE_D3, we will do those
extra jobs, and vice versa for resuming.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-05 18:05:28 +00:00
Takashi Iwai a3ae255e37 ASoC: Updates for v3.20
More updates for v3.20:
 
  - Lots of refactoring from Lars-Peter Clausen, moving drivers to more
    data driven initialization and rationalizing a lot of DAPM usage.
  - Much improved handling of CDCLK clocks on Samsung I2S controllers.
  - Lots of driver specific cleanups and feature improvements.
  - CODEC support for TI PCM514x and TLV320AIC3104 devices.
  - Board support for Tegra systems with Realtek RT5677.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU0ok8AAoJECTWi3JdVIfQ3ccH/2zb+b477H4GNhUw5AEzdHtC
 L7CI+5Q9VOGJQmZTjayRdUcPUHx4sTpYdQVTI56Q6CJk0OFljKNJcRrbzPqNgJ46
 yOrMTIpNvzFEv46f7rX2uKfvAFOVRAA2f+gl34AMLXqxL5aydbZZBtoe2jP9lL8z
 fIZ/s7qXHn3xnvxqNwOz3pnu6wFDrxbG34lXZaTaFQOueZ3fsthWLsz0xtO6a7aI
 J9tA+wejd9qf+D3i6svsi+MhB6OehYMh9Fbm+ODj6NMWZGCIA3SJ/PD+gbCg318+
 Xo0FNOyiw0fSAeBcHrEcfoaWBJrswxXjXaNbrIXc1/0gTj8AOJHCRus3w0OQU+Q=
 =Yw2l
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.20

More updates for v3.20:

 - Lots of refactoring from Lars-Peter Clausen, moving drivers to more
   data driven initialization and rationalizing a lot of DAPM usage.
 - Much improved handling of CDCLK clocks on Samsung I2S controllers.
 - Lots of driver specific cleanups and feature improvements.
 - CODEC support for TI PCM514x and TLV320AIC3104 devices.
 - Board support for Tegra systems with Realtek RT5677.

Conflicts:
	sound/soc/intel/sst-mfld-platform-pcm.c
2015-02-05 07:08:35 +01:00
Zubair Lutfullah Kakakhel f2610571fd ASoC: jz4740: Add DT support to jz4740-i2s driver
This patch adds device tree support for the jz4740 driver.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 21:12:48 +00:00
Zubair Lutfullah Kakakhel 26b0aad80a ASoC: jz4740: Add dynamic sampling rate support to jz4740-i2s
The div clock register is not modified during jz4740_i2s_hw_params.
Hence, default sampling rates are actually used regardless of
sampling rates input from userspace.

This patch adds support to calculate the value of the divider from
the parameters passed from userspace and update the relevant div
registers

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 21:12:39 +00:00
Mark Brown 16ca41c6cc Merge remote-tracking branches 'asoc/topic/wm8960', 'asoc/topic/wm8988' and 'asoc/topic/xtfpga' into asoc-next 2015-02-04 20:57:26 +00:00
Mark Brown dacff834fa Merge remote-tracking branches 'asoc/topic/txx9', 'asoc/topic/wm8750', 'asoc/topic/wm8804' and 'asoc/topic/wm8904' into asoc-next 2015-02-04 20:57:24 +00:00
Mark Brown 801a5656da Merge remote-tracking branches 'asoc/topic/tdm-slot', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/ts3a227e' and 'asoc/topic/ts3a277e' into asoc-next 2015-02-04 20:57:21 +00:00
Mark Brown cb6bfd3de4 Merge remote-tracking branches 'asoc/topic/rx51', 'asoc/topic/samsung', 'asoc/topic/sh', 'asoc/topic/simple' and 'asoc/topic/sta32x' into asoc-next 2015-02-04 20:57:18 +00:00
Mark Brown e89817d4af Merge remote-tracking branches 'asoc/topic/rockchip', 'asoc/topic/rt5645' and 'asoc/topic/rt5677' into asoc-next 2015-02-04 20:57:17 +00:00
Mark Brown d84dbf3351 Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next 2015-02-04 20:57:16 +00:00
Mark Brown 4f1eacf544 Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/imx', 'asoc/topic/intel', 'asoc/topic/mxs-saif' and 'asoc/topic/nuc900' into asoc-next 2015-02-04 20:57:13 +00:00
Mark Brown d40d19447b Merge remote-tracking branches 'asoc/topic/doc', 'asoc/topic/dwc', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/fsl-asrc' into asoc-next 2015-02-04 20:57:11 +00:00
Mark Brown 6d5c729dab Merge remote-tracking branches 'asoc/topic/cs42l73', 'asoc/topic/dai' and 'asoc/topic/davinci' into asoc-next 2015-02-04 20:57:10 +00:00
Mark Brown f238479b6b Merge remote-tracking branches 'asoc/topic/bt-sco', 'asoc/topic/cs35l32', 'asoc/topic/cs42l52' and 'asoc/topic/cs42l56' into asoc-next 2015-02-04 20:57:09 +00:00
Mark Brown 699994d07e Merge remote-tracking branches 'asoc/topic/ad193x', 'asoc/topic/alc5632', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next 2015-02-04 20:57:07 +00:00
Mark Brown 7a869e108e Merge remote-tracking branch 'asoc/topic/w-codec' into asoc-next 2015-02-04 20:57:06 +00:00
Mark Brown 7d590e4623 Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-next 2015-02-04 20:57:06 +00:00
Mark Brown 3223d9c62c Merge remote-tracking branch 'asoc/topic/pcm' into asoc-next 2015-02-04 20:57:05 +00:00
Mark Brown 3967752a57 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next 2015-02-04 20:57:05 +00:00
Mark Brown b47f8a5dfb Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2015-02-04 20:57:04 +00:00
Mark Brown d01aa9b704 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2015-02-04 20:57:04 +00:00
Mark Brown de784bed8f Merge remote-tracking branches 'asoc/fix/ac97', 'asoc/fix/atmel', 'asoc/fix/intel', 'asoc/fix/rt286', 'asoc/fix/rt5640', 'asoc/fix/sgtl5000', 'asoc/fix/sta32x', 'asoc/fix/tlv320aic3x' and 'asoc/fix/wm8731' into asoc-linus 2015-02-04 20:56:58 +00:00
Lad, Prabhakar e7a0332f71 ASoC: ts3a227e: fix sparse warning
this patch fixes following sparse warning:
ts3a227e.c:222:5: warning: symbol 'ts3a227e_enable_jack_detect' was not declared. Should it be static?

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 20:08:59 +00:00
Jie Yang c41cda1dbe ASoC: Intel: initial scalar variable ba
Reported by Coverity: CID 1267985 CID 1267986

Fix these two Defects: Uninitialized scalar variable.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 12:31:43 +00:00
Jyri Sarha b8255930e0 ASoC: tlv320aic3x: Fix bad comment before intercon_extra_3104 definition
The intercon_extra_3104 is obviously for tlv320aic3104.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-04 10:31:03 +00:00
Takashi Iwai 3fe9cf390f Merge branch 'topic/snd-device' into for-next 2015-02-03 17:57:16 +01:00
Eric Nelson 58cc9c9a17 ASoC: sgtl5000: add delay before first I2C access
To quote from section 1.3.1 of the data sheet:
	The SGTL5000 has an internal reset that is deasserted
	8 SYS_MCLK cycles after all power rails have been brought
	up. After this time, communication can start

	...
	1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-02-03 13:08:41 +00:00
Jyri Sarha 9503112d90 ASoC: tlv320aic3x: Add support for tlv320aic3104
Disables GPIO support and LINE2 input and renames Mic3 input to Mic2,
if tlv320aic3104 mode is seleced. Devicetree binding document is
updated accordingly.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-03 12:14:57 +00:00
Takashi Iwai d29697dc3b ASoC: Add sysfs entries via static attribute groups
Instead of calling device_create_file() manually, assign the static
attribute group entries at the device registration.  This simplifies
the error handling and avoids the possible races.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 20:02:42 +00:00
Fang, Yang A 842aaa0cbf ASoC: Intel: Add support rt5645 in sst driver
Added entry in sst driver to support rt5645 codec
for intel Braswell platform.

Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 19:05:48 +00:00
Kuninori Morimoto d7c42ff8c3 ASoC: rsnd: call missing snd_soc_unregiter_component/platform()
Current Renesas R-Car sound driver doesn't call
snd_soc_unregiter_component/platform() in .remove.
This patch call these functions.

Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:37:56 +00:00
Kuninori Morimoto d1f83d6ef4 ASoC: rsnd: call missing snd_ctl_remove()
Current Renesas R-Car sound driver is using snd_ctl_xxx()
functions, but it didn't call snd_ctl free_one() / snd_ctl_remove().
This patch call these functions.

Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
Reported-by: Bui Duc Phuc <bd-phuc@jinso.co.jp>
Reported-by: Cao Minh Hiep <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:37:56 +00:00
Peter Ujfalusi caa1d794cc ASoC: davinci-mcasp: Fix DIT only McASP instance support
One of the McASP instances in DM646x line of DMSoC only supports DIT mode.
This means that the given IP does not have support for rx and all the rx
related resources are missing, like irq and DMA request.
The driver should not fail if any or all  of the RX resource is missing
when the op_mode is set to DIT mode.
Since RX is not possible in DIT mode, we can just ignore the rx resources
when the McASP is used in DIT mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:32:43 +00:00
Peter Ujfalusi 8f511ffb6b ASoC: davicni-mcasp: Mark the common irq line as shared
On DA830 devices McASP0,1 and 2 shares a single combined interrupt request
line.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:32:43 +00:00
Peter Ujfalusi 67d35e5bc3 ASoC: davinci-evm: Do not include davinci-pcm.h and davinci-i2s.h
There is no need for them to be included.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:26:15 +00:00
Peter Ujfalusi 2f91ab86ec ASoC: davinci-evm: Do not include edma headers
The machine driver has no business with the underlying dma.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 18:26:15 +00:00
Takashi Iwai ef46c7af93 ALSA: pcm: Embed struct device
Like previous patches, at this time we embed the struct device into
PCM object.  However, this needs a bit more caution: struct snd_pcm
doesn't own one device but two, for both playback and capture!  Thus
not struct snd_pcm but struct snd_pcm_str object contains the device.

Along with this change, pcm->dev field is dropped for avoiding
confusion.  It was meant to point to a non-standard parent.  But,
since now we can touch each struct device directly, we can manipulate
the parent field easily there, too.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-02 14:42:42 +01:00
Bo Shen 56bbd86c2e ASoC: atmel-pcm-dma: won't check direction when configure dma
As DMA framework request DMA using direction only in prep_slave
function, (The At91 xdma driver has adapted to this request).
So won't check direction when do DMA configuration.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-02 12:18:45 +00:00
Bo Shen 3fd5b30c57 ASoC: atmel_ssc_dai: only clean PDC when using PDC
Only using PDC, it needs to clean PDC registers.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:20:24 +01:00
Bo Shen cbaadf0f90 ASoC: atmel_ssc_dai: refactor the startup and shutdown
In startup function, enable ssc clock and in shutdown function,
disable clock. And also remove disable ssc in shutdown function,
as ssc is disabled in prepare function.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:20:23 +01:00
Bo Shen 20cf2603b1 ASoC: atmel_ssc_dai: fix the setting for DSP mode
When SCC work in DSP A mode, the data outputs/inputs are shift out on
falling edge, the frame sync are sample on the rising edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:19:41 +01:00
Filip Brozovic 9ee802ec5b ASoC: sgtl5000: Use shift mask when setting codec mode
Shift the I2S mode value by the necessary amount before writing the
registers. This makes Right Justified and PCM mode work in addition to
the default Left Justified mode.

Signed-off-by: Filip Brozovic <fbrozovic@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 14:18:21 +01:00
Peter Ujfalusi 0b65ba9981 ASoC: tlv320aic3x: Fix data delay configuration
Fix the issue introduced by:
3684940933 ASoC: tlv320aic3x: Add TDM support

The CTRLC register were not receiving the correct delay configuration,
which will corrupt DSP_A audio mode.

Fixes: 3684940933 (ASoC: tlv320aic3x: Add TDM support)
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-30 14:11:45 +01:00
Peter Ujfalusi 2ca087bc9e ASoC: rx51: Correct DAPM route for capture
"Mic Bias" is DAPM_SUPPLY so it has to be connected in the route
accordingly.
Fixes audio capture on the board.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:50:31 +01:00
Arnd Bergmann 7c47cd7ffd ASoC: pxa: make TTC DKB tristate
In a rare combination of Kconfig settings, the 88pm860x-codec
module may be selected as a loadable module, while it's also being
used by the ttb-dkb code that is built-in, resulting in a link
error:

sound/built-in.o: In function `ttc_pm860x_init':
:(.text+0x3e888): undefined reference to `pm860x_hs_jack_detect'
:(.text+0x3e898): undefined reference to `pm860x_mic_jack_detect'

Changing ttb-tkb to a tristate option tells Kconfig that 88pm86x
actually needs to be built-in if ttc-dkb is also built-in.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:44:35 +01:00
Peter Rosin eb5271497f ASoC: atmel_ssc_dai: Support SND_SOC_DAIFMT_CBM_CFS on I2S
Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-30 13:29:04 +01:00
Peter Rosin 9c7da1a57b ASoC: pcm512x: Use the correct range constraints for S24_LE
This was overlooked in the late change to remove the I2S padding bits
from S24_LE mode. The patch also limits S32_LE mode to 384kHz, the
maximum according to the datasheets.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 12:02:29 +00:00
Peter Rosin 2599a9609c ASoC: pcm512x: Fixup warning splat
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 12:02:29 +00:00
Arnd Bergmann 4c121129c9 ASoC: rt5677: fix SPI dependency
The rt5677 codec has gained code that requires SPI to work correctly,
but there is no provision in Kconfig to prevent the driver from
being used when SPI is disabled or a loadable module, resulting
in this build error:

sound/built-in.o: In function `rt5677_spi_write':
:(.text+0xa7ba0): undefined reference to `spi_sync'
sound/built-in.o: In function `rt5677_spi_driver_init':
:(.init.text+0x253c): undefined reference to `spi_register_driver'

ERROR: "spi_sync" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!
ERROR: "spi_register_driver" [sound/soc/codecs/snd-soc-rt5677-spi.ko] undefined!

This makes the SPI portion of the driver depend on the SPI subsystem,
and disables the function that uses SPI for firmware download if SPI
is disabled. The latter may not be the correct solution, but I could
not come up with a better one.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: af48f1d08a ("ASoC: rt5677: Support DSP function for VAD application")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 11:52:21 +00:00
Arnd Bergmann f9a7ba3269 ASoC: davinci: fix DM365_EVM codec selection
An earlier bug fix of mine made the SND_DM365_VOICE_CODEC symbol
tristate to avoid creating an undefined reference from the
davinci-vcif.c driver to the davinci_soc_platform_register
function that may be in a module.

However, this may now lead to a different error on randconfig
kernels:

"warning: SND_DM365_VOICE_CODEC creates inconsistent choice state"

This happens because we now have a choice statement with
one bool and one tristate option, and the latter might not
support being set to 'y' because of dependencies.

This new change turns the other option into 'tristate' as well,
which avoids the problem.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 19926c6de0 ("ASoC: davinci: vcif must be a module if SND_DAVINCI_SOC is")
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-29 11:51:29 +00:00
Alexander Morozov b1a5fad5f8 ASoC: wm8904: add dt ids table
The WM8904 and WM8918 has the same data type, while the WM8912
has different data type. So, use the data in dt ids table to
distinguish them.

Signed-off-by: Alexander Morozov <linux@meltdown.ru>
[voice.shen@atmel.com: add code to distinguish device type]
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:30:12 +00:00
Peter Rosin d11c2978bf ASoC: pcm512x: Support SND_SOC_DAIFMT_CBM_CFS
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:54 +00:00
Peter Rosin 7c4e1119a9 ASoC: pcm512x: Avoid the PLL for the DAC clock, if possible
The PLL introduces jitter, which in turn introduces noice if used
to clock the DAC. Thus, avoid the PLL output, and use the PLL input
to drive the DAC clock, if possible.

This is described for the PCM5142/PCM5242 chips in the answers to the
forum post "PCM5142/PCM5242 DAC clock source" at the TI E2E community
pages (1).

(1) http://e2e.ti.com/support/data_converters/audio_converters/f/64/t/389994

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin f086ba9d53 ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL
Using the PLL in master mode requires using an external connection
between one of the GPIO pins (configured as PLL/4 output) and the
SCK pin. It also requires the external clock to be fed to some other
GPIO pin instead of the SCK pin.

This is described for the PCM5122 chip in the answers to the forum post
"PCM5122 DAC as I2S master troubles with PLL mode" at the TI E2E
community pages (1). The clocking functionality is also much better
described in the datasheet for the chip PCM5242, which seems to be
register compatible with PCM512x and PCM514x (which both have severely
lacking datasheets).

(1) http://e2e.ti.com/support/data_converters/audio_converters/f/64/t/267830

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin 8124930713 ASoC: pcm512x: Support mastering BCLK/LRCLK without using the PLL
Use register field names from the seemingly compatible PCM5242 datasheet,
as the PCM512x and PCM514x datasheets are severly lacking.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:53 +00:00
Peter Rosin 376dc4903e ASoC: pcm512x: Fix spelling of register field names.
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 19:28:52 +00:00
Andrew Jackson acae254a8e ASoC: dwc: Remove unnecessary conditional compilation
of_match_ptr is already conditionally compiled based on
CONFIG_OF so further conditional compilation is not
required.  Remove conditional compilation surrounding
of_match_ptr.

Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 17:40:08 +00:00
Dan Carpenter c33bd08d65 ASoC: Intel: remove an unused struct member
We never set the ->scratch pointer, so let's delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 11:36:41 +00:00
Masanari Iida 2f1a11e624 ASoC: Fix warning with make xmldocs caused by soc-devres.c
This patch fix warning while "make xmldocs".

Warning(.//sound/soc/soc-devres.c:70): No description
 found for parameter 'platform_drv'
Warning(.//sound/soc/soc-devres.c:70): Excess function
 parameter 'platform' description in 'devm_snd_soc_register_platform'

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28 11:36:03 +00:00
Mark Brown 60d66c9a24 Merge branch 'topic/arizona' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec 2015-01-27 23:52:44 +00:00
Bard Liao 5c4ca99df7 ASoC: rt5645: Add rt5650 codec support
This patch adds support for rt5650 codec.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:37:27 +00:00
Jie Yang 09a34aa582 ASoC: Intel: Used lock version to update shim registers
We need hold lock each time updating shirm registers, otherwise,
we may set unexpected values to them when they are set in
different thread at different time sequence.

The notification work will be scheduled in global work queue,
which won't hold this sst->spinlock itself, so here we need
change to use the lock version to update shim registers.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:36:22 +00:00
Anatol Pomozov 39552d7ad1 ASoC: ts3a227e: Add dts property that allows to specify micbias voltage
The voltage controls key press threshold.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:14 +00:00
Anatol Pomozov ddf9ea21f5 ASoC: ts3a227e: Remap keys to match Android headset specification
ts3a227e datasheet says typical key resistance is
  key1 50 Ohm
  key2 135 Ohm
  key3 240 Ohm
  key4 470 Ohm

The android headset specification expect buttons impedance:
  A (MEDIA) 0-70 Ohm
  D (VOICECOMMAND) 110-180 Ohm
  B (VOLUMEUP) 210-290 Ohm
  C (VOLUMEDOWN) 360-680 Ohm

Thus key mapping should be
  key1 - MEDIA
  key2 - VOICECOMMAND
  key3 - VOLUMEUP
  key3 - VOLUMEDOWN

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 18:32:04 +00:00
Manuel Lauss 8a6cf30bf9 ASoC: wm8731: init mutex in i2c init path
The I2C init path forgot to init the mutex, leading to an oops when
controls are accessed.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-27 18:21:26 +00:00
Mark Brown 8d23dd9c66 Merge branch 'fix/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec 2015-01-27 17:54:24 +00:00
Mark Brown a7834aa932 Merge branch 'topic/rt286' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec
Conflicts:
	sound/soc/codecs/rt286.c
2015-01-27 17:52:51 +00:00
Bo Shen 67d1aed0a5 ASoC: atmel_ssc_dai: remove clock pin comments
As the clock can be get from TK/RK pin, so remove the comments.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:35:56 +00:00
Mark Brown c90ff1fb7b Merge branch 'fix/atmel' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-atmel 2015-01-27 17:35:41 +00:00
Bo Shen a43bd7e125 ASoC: atmel_ssc_dai: fix start event for I2S mode
According to the I2S specification information as following:
  - WS = 0, channel 1 (left)
  - WS = 1, channel 2 (right)
So, the start event should be TF/RF falling edge.

Reported-by: Songjun Wu <songjun.wu@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-27 17:32:36 +00:00
Charles Keepax e1ae5fba3f ASoC: arizona: Coalesce output power up delays
Save a bit of scheduling by coalescing all the output power up delays
into a single delay.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:28:50 +00:00
Charles Keepax 054e1b4892 ASoC: arizona: Add delay for output disable
Give the output disable sequence a chance to fully complete, otherwise
there is a danger we may remove the clock before it is finished
resulting in a pop noise. The delay for each output must be cumulative
and these are coalesced into a single delay.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:28:50 +00:00
Thomas Niederprüm 3c9390ad0f ASoC: sta32x: change dai name to be in line with the sta350 driver.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:28 +00:00
Thomas Niederprüm 6fad625999 ASoC: sta32x: minor Kconfig update.
- Add description for the driver
- Add dependency on the I2C module

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:27 +00:00
Thomas Niederprüm 30374d5dd3 ASoC: sta32x: use dev_dbg() for debug output.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:25 +00:00
Thomas Niederprüm f04b1e760a ASoC: sta32x: add device tree binding.
make the sta32x driver usable with device tree configs.  Code is heavily based
on the sta350 driver.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:25 +00:00
Thomas Niederprüm 1c34c876c4 ASoC: sta32x: move code to calculate mclk divider and extrapolation ratio to sta32x_hw_params()
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:24 +00:00
Thomas Niederprüm 88483f59d9 ASoC: sta32x: use DECLARE_TLV_DB_RANGE macro.
Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:23 +00:00
Thomas Niederprüm b66a29808e ASoC: sta32x: make sta32x a gpio consumer for the reset GPIO
The reset GPIO on the STA32X Codecs is used to reset the Codec and clear
all registers. Also taking it down puts the IC in power save mode, so
we put the device in reset mode when we go to sleep.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:22 +00:00
Thomas Niederprüm a1be4cead9 ASoC: sta32x: Convert to direct regmap API usage.
use the regmap API directly rather than relying on the snd_soc_read/write
functions as this seems to be in accordance with common practice.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:13:21 +00:00
Thomas Niederprüm b0402717c9 ASoC: sta32x: correct bit shift value for IDE register
The IDE bit in the CONFF register is the third bit not the fourth.

Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-27 17:10:00 +00:00
Jarkko Nikula 3463667aa1 ASoC: rt5640: Add RT5642 ACPI ID for Intel Baytrail
Asus T100TAF uses ACPI ID "10EC5642" for its audio codec. I suppose it is
updated ACPI ID for the RT5642 codec since some earlier platforms are using
"10EC5640" with the RT5642 too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26 19:17:03 +00:00
Bard Liao 54d96a40e0 ASoC: rt286: Fix capture volume setting issue
The purpose of rt286_adc_event is to mute/numnte the ADC mixer.
However, it will also set the capture volume to default value.
As a result, "ADC0 Capture Volume" is not working if it is set
before capture start. This patch remove rt286_adc_event and add
"ADC0 Capture Switch" to mute/unmute ADC mixer.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-26 19:16:18 +00:00
Lars-Peter Clausen f8d71be555 ASoC: wm97xx: Reset AC'97 device before registering it
The wm97xx touchscreen driver binds itself to the snd_ac97 device that gets
registered by the CODEC driver and expects that the device has already been
reset. Before commit 6794f709b7 ("ASoC: ac97: Drop delayed device
registration") the device was only registered after the probe function of
the CODEC driver had finished running, but starting with the mentioned
commit the device is registered as soon as snd_soc_new_ac97_codec() is
called. This causes the touchscreen driver to no longer work. Modify the
CODEC drivers to use snd_soc_alloc_ac97_codec() instead of
snd_soc_new_ac97_codec() and make sure that the AC'97 device is reset before
the snd_ac97 device gets registered.

Fixes: 6794f709b7 ("ASoC: ac97: Drop delayed device registration")
Reported-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-26 19:15:06 +00:00
Lars-Peter Clausen 47e039413c ASoC: Add support for allocating AC'97 device before registering it
In some cases it is necessary to before additional operations after the
device has been initialized and before the device is registered. This can
for example be resetting the device.

This patch introduces a new function snd_soc_alloc_ac97_codec() which is
similar to snd_soc_new_ac97_codec() except that it does not register the
device. Any users of snd_soc_alloc_ac97_codec() are responsible for calling
device_add() manually.

Fixes: 6794f709b7 ("ASoC: ac97: Drop delayed device registration")
Reported-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-26 19:14:20 +00:00
Takashi Iwai 7533185eee Merge branch 'for-linus' into for-next
Sync with the latest 3.19-rc state for applying other ALSA sequencer
core fixes.
2015-01-26 13:53:41 +01:00
Mark Brown 88343ee38d Merge remote-tracking branches 'asoc/fix/rt5677', 'asoc/fix/simple', 'asoc/fix/ts3a227e', 'asoc/fix/wm8904' and 'asoc/fix/wm8960' into asoc-linus 2015-01-26 11:29:58 +00:00
Mark Brown 8a6dcddf4c Merge remote-tracking branches 'asoc/fix/adi', 'asoc/fix/compress', 'asoc/fix/fsl-ssi', 'asoc/fix/imx', 'asoc/fix/intel', 'asoc/fix/omap', 'asoc/fix/rockchip' and 'asoc/fix/rt286' into asoc-linus 2015-01-26 11:29:55 +00:00
Mark Brown a9bb437ab0 Merge remote-tracking branch 'asoc/fix/pcm512x' into asoc-linus 2015-01-26 11:29:55 +00:00
Mark Brown d9b35aa056 Merge remote-tracking branch 'asoc/fix/fsl-esai' into asoc-linus 2015-01-26 11:29:54 +00:00
Lars-Peter Clausen a59aa180ea ASoC: samsung: Replace depends on REGMAP_I2C with depends on I2C
regmap is a library function that gets selected by drivers that need it. No
driver modules should depend on it, since this can create dependency loops.

E.g. if machine driver depends on REGMAP_I2C and selects the CODEC driver
and the CODEC driver selects REGMAP_I2C, then the machine driver selects by
extension one of its dependencies.

The proper way to handle this is for machine drivers to depend on the same
dependencies as the CODEC driver they select. In this case it is I2C.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16 19:05:45 +00:00
Lars-Peter Clausen e236d4d796 ASoC: smdk_wm8580: Pass card DAPM context to snd_soc_dapm_disable_pin()
The "MicIn" widget is a card level DAPM element so pass the card's DAPM
context instead of the CODEC's DAPM context to snd_soc_dapm_disable_pin().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16 16:59:36 +00:00
Lars-Peter Clausen 3a41e0f723 ASoC: jive: Automatically disconnect non-connected pins
All DAPM input and output pins of the wm8750 are either used in the card's
DAPM routing table or are marked as not connected.

Set the fully_routed flag of the card instead of manually marking the unused
inputs and outputs as not connected. 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>
2015-01-16 16:59:08 +00:00
Mark Brown 5d6bdfd568 Merge branch 'topic/dai' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsung 2015-01-16 16:59:04 +00:00
Peter Ujfalusi 20602e34cd ASoC: omap-mcbsp: Correct CBM_CFS dai format configuration
We should select FSR also to be driven by McBSP, not only FSX.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-16 11:46:31 +00:00
Qais Yousef d3268a40d4 ASoC: soc-compress.c: fix NULL dereference
In soc_new_compress() when rtd->dai_link->dynamic is set, we create the pcm
substreams with this call:

   ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
                                   1, 0, &be_pcm);

which passes 0 as capture_count leading to

   be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream

being NULL, hence when trying to set rtd a few lines below we get an oops.

Fix by using rtd->dai_link->dpcm_playback and rtd->dai_link->dpcm_capture as
playback_count and capture_count to snd_pcm_new_internal().

Signed-off-by: Qais Yousef <qais.yousef@imgtec.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-01-15 15:54:04 +00:00
Lars-Peter Clausen 96da4e5b2e ASoC: Remove codec field from snd_soc_dapm_widget
There are no more users of this field left so it can finally be removed.
New users should use snd_soc_dapm_to_codec(w->dapm);

The reason why it is removed is because it doesn't fit to well anymore in
the componentized ASoC hierarchy, where DAPM works on the snd_soc_component
level. And the alternative of snd_soc_dapm_to_codec(w->dapm) typically
generates the same amount of code, so there is really no reason to keep it.

For automatic conversion the following coccinelle semantic patch can be used:
// <smpl>
@@
struct snd_soc_dapm_widget *w;
@@
-w->codec
+snd_soc_dapm_to_codec(w->dapm)
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:34 +00:00
Lars-Peter Clausen 46f20872bc ASoC: rt5677: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:34 +00:00
Mark Brown 5f7201d5d6 Merge branch 'topic/rt5677' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-w-codec 2015-01-15 11:57:23 +00:00
Lars-Peter Clausen 8eee1468ee ASoC: rt5670: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen 30c173ed3e ASoC: rt5651: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen c5f596cb4b ASoC: rt5645: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen bb1cd608b1 ASoC: rt5640: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen 4389eb2907 ASoC: rt5631: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen 76f17f185e ASoC: rt286: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen 0bb043f523 ASoC: alc5632: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen a50d761f6d ASoC: alc5623: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen b27727df32 ASoC: twl6040: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen a36ac9b32c ASoC: twl4030: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen c61ac6b7eb ASoC: tlv320dac33: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen 38d3df61e0 ASoC: tlv320aic3x: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:06 +00:00
Lars-Peter Clausen dd943d36f1 ASoC: tlv320aic31xx: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:05 +00:00
Lars-Peter Clausen 0d76091ca8 ASoC: pcm3008: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:05 +00:00
Lars-Peter Clausen 7331ea474e ASoC: mioa701_wm9713: Fix speaker event
Commit f6b2a04590 ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM
setup") converted the driver to register the board level DAPM elements with
the card's DAPM context rather than the CODEC's DAPM context. The change
overlooked that the speaker widget event callback accesses the widget's
codec field which is only valid if the widget has been registered in a CODEC
DAPM context. This patch modifies the callback to take an alternative route
to get the CODEC.

Fixes: f6b2a04590 ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM
setup")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:57:05 +00:00
Jyri Sarha f9911803e8 ASoC: simple-card: Enable and disable DAI clocks as needed
Call clk_prepare_enable() and clk_disable_unprepare() for cpu dai
clock and codec dai clock in dai statup and shutdown callbacks. This
to make sure the related clock are enabled when the audio device is
used.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:45:52 +00:00
Kuninori Morimoto 8048b91ffc ASoC: rsnd: tidyup DVC/SRC/SSI order
Current R-Car sound driver calls SRC -> SSI -> DVC functions,
but, it should be DVC -> SRC -> SSI.
Otherwise, SSI (= interface of codec) will have underrun error
when playback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:49 +00:00
Kuninori Morimoto 1ceeab2679 ASoC: rsnd: tidyup DMA start/stop timing on SSI
Current DMA starts after SSI, and stops before SSI. but we need
to reverse these order. Otherwise, under/over run error might happen.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:49 +00:00
Kuninori Morimoto 765ae7c8dd ASoC: rsnd: ignore DIRQ when DMA transfer
SSI interrupt handler of R-Car sound driver will be called
when DIRQ (= Data read/write timing for PIO) or
UIRQ / OIRQ (= under/over run error).
DIRQ "interrupt" doesn't occur when DMA transfer, but then,
DIRQ "status bit" might occur. we need to ignore this DIRQ
operation when DMA. Otherwise, driver will push/pop as PIO.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 337b0b4c5f ASoC: rsnd: error meesage indicates its port
Current SRC/SSI output its error, but it desn't indicate
port number. it is un-understandable.
Let's indicate port number for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 1b13d118ee ASoC: rsnd: save priv in struct rsnd_dai
Current rsnd driver has rsnd_mod_to_priv() macro, and struct rsnd_mod
has struct rsnd_priv pointer. But, it is waste of memory from data
structure point of view.
Today we can link mod <-> io <-> rdai each other, so saving priv in
rdai is very reasonable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 690602fcd8 ASoC: rsnd: replace rdai to priv in each function
Current rsnd driver's function requests rdai, but it is not used.
Adding priv is more reasonable. Let's replace it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto f708d944fe ASoC: rsnd: remove unsed rdai parameter from each function
Current rsnd driver's many functions requests struct rsnd_dai (= rdai),
but, 1) we can get rdai from rsnd_io_to_rsnd(), 2) almost all rdai
is not used. Let's remove these rdai.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 985a4f6e61 ASoC: rsnd: replace rsnd_dai_is_play() to rsnd_io_is_play()
Current rsnd driver can use rsnd_io_to_rdai()
we can get play/capture direction via io now.
Let's replace rsnd_dai_is_play() to rsnd_io_is_play()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 54cb556247 ASoC: rsnd: add rsnd_io_to_rdai()
Current rsnd driver request rdai in everywhere, but each mod should
reach to rdai by itself. this patch adds missing rsnd_io_to_rdai().

io   = rsnd_mod_to_io(mod);
rdai = rsnd_io_to_rdai(io);

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 7c57d76f51 ASoC: rsnd: remove rsnd_dai_get_platform_info() macro
rsnd_dai_get_platform_info() is not used. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 2842aa7192 ASoC: rsnd: remove unused rsnd_dai_id()
rsnd_dai_id() was not used. Let's remove it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 3ed6448c95 ASoC: rsnd: rename rsnd_dai_is_clk_master() to rsnd_rdai_is_clk_master()
struct rsnd_dai is called as "rdai", and struct snd_soc_dai is called
as "dai" on this driver. but macro/function have confusable naming.
This patch rename rsnd_dai_is_clk_master() to rsnd_rdai_is_clk_master()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 710d088923 ASoC: rsnd: rename rsnd_dai_get() to rsnd_rdai_get()
struct rsnd_dai is called as "rdai", and struct snd_soc_dai is called
as "dai" on this driver. but macro/function have confusable naming.
This patch rename rsnd_dai_get() to rsnd_rdai_get()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 8564295231 ASoC: rsnd: rsnd_mod controls clock
Current rsnd driver's mod (= ssi/src/dvc) have each own clk,
but, these are needed to start/stop each mod.
This patch adds struct clk in rsnd_mod, and start/stop these
via rsnd_mod_hw_start/stop() macro

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 9d0e202f13 ASoC: rsnd: tidyup rsnd_io_to_xxx() macro declaration position
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:48 +00:00
Kuninori Morimoto 798cbb400a ASoC: rsnd: remove unsed .rate
rsnd_ssi::rate is not used. Let's remove it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:37:47 +00:00
Bard Liao 45437fa585 ASoC: rt286: set the same format for dac and adc
There is only one I2S I/F, AD/DA path must operate to the same
format.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:16:15 +00:00
Masanari Iida a465122ae3 ASoC: Fix typo in bt-sco.c
This patch fix spelling typo in bt-sco.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-15 11:06:24 +00:00
Jie Yang a0a7c48fe1 ASoC: Intel: initial stream_hw_id to invalid value
The stream_hw_id for System stream is 0x0, if we use initial stream_hw_id
value 0, it may return wrong(not committed) stream when calling function
get_stream_by_id() with stream_id=0. Here initial stream_hw_id to invalid
value to fix this issue.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 20:22:35 +00:00
Lars-Peter Clausen 0201e50521 ASoC: wm_hubs: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:54:07 +00:00
Lars-Peter Clausen 72718517b4 ASoC: wm_adsp: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:54:04 +00:00
Lars-Peter Clausen ff70508a8a ASoC: wm9713: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:54:01 +00:00
Lars-Peter Clausen 0a3042d783 ASoC: wm9090: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:53:57 +00:00
Lars-Peter Clausen 8a8a84e6b9 ASoC: wm9081: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:53:54 +00:00
Lars-Peter Clausen 8643707fb8 ASoC: wm8997: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:53:51 +00:00
Lars-Peter Clausen 00748490f7 ASoC: wm8996: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14 19:53:48 +00:00