Commit graph

6927 commits

Author SHA1 Message Date
Mark Brown
e7dfdc1f1f Merge remote-tracking branch 'asoc/topic/ak4554' into asoc-next 2013-08-22 14:28:26 +01:00
Mark Brown
de2e87ba76 Merge remote-tracking branch 'asoc/topic/ak4104' into asoc-next 2013-08-22 14:28:25 +01:00
Mark Brown
6234eabf84 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-08-22 14:28:25 +01:00
Mark Brown
ece59528fa Merge remote-tracking branch 'asoc/topic/ads711x' into asoc-next 2013-08-22 14:28:24 +01:00
Mark Brown
a9bd18201c Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-next 2013-08-22 14:28:24 +01:00
Mark Brown
e303c42da9 Merge remote-tracking branch 'asoc/topic/adau1701' into asoc-next 2013-08-22 14:28:23 +01:00
Mark Brown
042c325a5a Merge remote-tracking branch 'asoc/topic/ad73311' into asoc-next 2013-08-22 14:28:23 +01:00
Mark Brown
f14c6f97c2 Merge remote-tracking branch 'asoc/topic/ad1980' into asoc-next 2013-08-22 14:28:22 +01:00
Mark Brown
dfd18caaf6 Merge remote-tracking branch 'asoc/topic/ac97' into asoc-next 2013-08-22 14:28:22 +01:00
Mark Brown
10c0d7a9f9 Merge remote-tracking branch 'asoc/fix/wm8960' into asoc-linus 2013-08-22 14:28:21 +01:00
Markus Pargmann
741a509f34 ASoC: core: Generic ac97 link reset functions
This patch adds generic ac97 reset functions using pincontrol and gpio
parsed from devicetree.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20 11:02:00 +01:00
Mark Brown
d2a369cb53 ASoC: ac97: Provide stub DAPM integration
Ensure continued operation with DAPM being mandatory.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-19 12:18:40 +01:00
Mike Dyer
85fa532b6e ASoC: wm8960: Fix PLL register writes
Bit 9 of PLL2,3 and 4 is reserved as '0'. The 24bit fractional part
should be split across each register in 8bit chunks.

Signed-off-by: Mike Dyer <mike.dyer@md-soft.co.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-08-18 16:30:26 +01:00
Mark Brown
44ffb69ec6 Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linus 2013-08-15 11:37:54 +01:00
Mark Brown
f6938bb360 Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus 2013-08-15 11:37:53 +01:00
Mark Brown
14388a6934 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-08-15 11:37:53 +01:00
Stephen Warren
c90c0d7a96 ASoC: tegra: fix Tegra30 I2S capture parameter setup
The Tegra30 I2S driver was writing the AHUB interface parameters to the
playback path register rather than the capture path register. This
caused the capture parameters not to be configured at all, so if
capturing using non-HW-default parameters (e.g. 16-bit stereo rather
than 8-bit mono) the audio would be corrupted.

With this fixed, audio capture from an analog microphone works correctly
on the Cardhu board.

Cc: stable@vger.kernel.org
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-15 11:07:53 +01:00
Mark Brown
4601736a6f ASoC: ak4554: Add DAPM support
This makes it possible to hook the device into a more complex board and
ensures it will continue to work with non-DAPM support removed from the
core.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-13 13:38:36 +01:00
Mark Brown
a5db4d50fa ASoC: ak4104: Manage TXE using DAPM
Saves some code. We should also be able to manage the power up and reset
registers using DAPM but it's probably more trouble than it's worth in
mains powered systems.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-12 11:22:39 +01:00
Mark Brown
2e61926cb4 ASoC: ak4104: Add stub DAPM support
This makes it easer to integrate the device with other on-board components
and ensures correct operation following removal of support for non-DAPM
CODECs.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-12 11:22:39 +01:00
Mark Brown
9190aeb4ec ASoC: adau1701: Use gpio_set_value_cansleep()
The GPIO manipulation done by this driver is never in atomic context so
we can use gpio_set_value_cansleep() and support GPIOs that can't be set
from atomic context.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-08-12 11:07:47 +01:00
Mark Brown
827d22f136 ASoC: ad73311: Add DAPM support
This makes it possible to hook up other devices in boards and is required
by removal of support for non-DAPM CODECs in the core.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-08-08 14:24:30 +01:00
Mark Brown
45a14a8b50 ASoC: ads711x: Add DAPM support
This makes it easier to hook into boards and ensures the driver continues
to work with support for non-DAPM CODECs removed.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-07 19:18:08 +01:00
Mark Brown
9e7e474c09 ASoC: ad1980: Provide stub DAPM support
Since non-DAPM devices are not going to be supported provide DAPM input
and output widgets and hook them up to the DAIs.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-08-07 10:14:23 +01:00
Brian Austin
8806d96db7 ASoC: cs42l52: Add new TLV for Beep Volume
CS42L52 Beep control uses 2dB scale from -56dB

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 19:38:57 +01:00
Brian Austin
e2c98a8bba ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep Volume
Beep Volume Min/Max was backwards.
Change to SOC_SONGLE_SX_TLV for correct volume representation

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@kernel.org
2013-08-06 19:38:19 +01:00
Lars-Peter Clausen
fe58139114 ASoC: dapm: Fix empty list check in dapm_new_mux()
list_first_entry() will always return a valid pointer, even if the list is
empty. So the check whether path is NULL will always be false. So we end up
calling dapm_create_or_share_mixmux_kcontrol() with a path struct that points
right in the middle of the widget struct and by trying to modify the path the
widgets memory will become corrupted. Fix this by using list_emtpy() to check if
the widget doesn't have any paths.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-08-01 19:25:16 +01:00
Lothar Waßmann
65f2b22676 ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control
The SGTL5000 Capture Attenuate Switch (or "ADC Volume Range Reduction"
as it is called in the manual) is single bit only.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01 14:48:20 +01:00
Lothar Waßmann
f091f3f073 ASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture
When a sound capture/playback is terminated while a playback/capture
is running, power_vag_event() will clear SGTL5000_CHIP_ANA_POWER in
the SND_SOC_DAPM_PRE_PMD event, thus muting the respective other
channel.

Don't clear SGTL5000_CHIP_ANA_POWER when both DAC and ADC are active
to prevent this.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01 14:48:17 +01:00
Dimitris Papastamos
92bb4c3270 ASoC: wm_adsp: Sanitize parameter passing
No need to hold on to the `codec' pointer.  We can use the `dsp'
pointer and grab all the information we need from there.  This
makes the parameters for the functions a bit more sane and idiomatic.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-01 11:58:46 +01:00
Mark Brown
3fef7f795f Merge remote-tracking branch 'asoc/fix/wm0010' into asoc-linus 2013-07-31 21:07:23 +01:00
Mark Brown
08d0a9757d Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-07-31 21:07:23 +01:00
Mark Brown
0d054318d5 Merge remote-tracking branch 'asoc/fix/blackfin' into asoc-linus 2013-07-31 21:07:22 +01:00
Dimitris Papastamos
4f8b19143d ASoC: wm0010: Fix resource leak
If kzalloc() fails for `img' then we are going to leak the memory
for `out'.  We are freeing the memory of all the tx/rx transfers
but the tx/rx buf pointers will be NULL if we drop out earlier.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-31 14:50:34 +01:00
Ralf Baechle
d2ee88d0aa ASoC: au1x: Fix build
d8b51c11ff [ASoC: ac97c: Use
module_platform_driver()] broke the build:

 CC      sound/soc/au1x/ac97c.o
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected identifier or ‘(’ before ‘&’ token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: pasting "__initcall_" and "&" does not give a valid preprocessing token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected identifier or ‘(’ before ‘&’ token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: pasting "__exitcall_" and "&" does not give a valid preprocessing token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:344:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token
/home/ralf/src/linux/upstream-sfr/sound/soc/au1x/ac97c.c:334:31: warning: ‘au1xac97c_driver’ defined but not used [-Wunused-variable]
make[5]: *** [sound/soc/au1x/ac97c.o] Error 1
make[4]: *** [sound/soc/au1x] Error 2
make[3]: *** [sound/soc] Error 2

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-31 10:06:04 +01:00
Lars-Peter Clausen
610d80eaa9 ASoC: bf5xx-ac97: Fix compile error with SND_BF5XX_HAVE_COLD_RESET
If CONFIG_SND_BF5XX_HAVE_COLD_RESET is enabled building the blackfin ac97 driver
fails with the following compile error:
	sound/soc/blackfin/bf5xx-ac97.c: In function ‘asoc_bfin_ac97_probe’:
	sound/soc/blackfin/bf5xx-ac97.c:297: error: expected ‘;’ before ‘{’ token
	sound/soc/blackfin/bf5xx-ac97.c:302: error: label ‘gpio_err’ used but not defined

The issue was introduced in commit 6dab2fd7 ("ASoC: bf5xx-ac97: Convert to
devm_gpio_request_one()").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-30 12:51:02 +01:00
Mark Brown
1deb57042f ASoC: bfin-ac97: Fix prototype error following AC'97 refactoring
As part of the multiplatform refactoring for AC'97 the AC'97 bus ops were
staticised meaning that the prototype (which was never needed) conflicts
with the declaration causing build failures.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-07-29 17:57:00 +01:00
Dimitris Papastamos
81ad93ecfd ASoC: wm_adsp: Simplify kcontrol handling
Get rid off the wm_coeff struct and the wm_coeff_add_kcontrol()
function.  We are now using the snd_soc_card_kcontrol() function to
get the kcontrol pointers.  No need to call into ALSA code to
register the kcontrols.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 15:39:11 +01:00
Dimitris Papastamos
4fefd69853 ASoC: core: Add snd_soc_card_get_kcontrol()
This is useful for drivers who want to grab a pointer to
snd_kcontrol outside of the kcontrol callbacks.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 15:39:11 +01:00
Dan Carpenter
ba51cbb820 ASoC: adau1701: type bug with ADAU1707_CLKDIV_UNSET
ADAU1707_CLKDIV_UNSET is always compared against an unsigned int and
not an unsigned long.  The current tests are always false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-26 17:02:38 +01:00
Lars-Peter Clausen
56a6783442 ASoC: dapm: Fix return value of snd_soc_dapm_put_{volsw,enum_virt}()
The ALSA core expect the put callback of a control to return 1 if the value of
the control changed and 0 if it did not. Both snd_soc_dapm_put_volsw() and
snd_soc_dapm_put_enum_virt() currently always returns 0. For both functions we
already have a 'change' variable which either contains 1 or 0 depending on
whether the value has changed or not, so just return that.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-24 14:55:04 +01:00
Mark Brown
c5ae4dca11 Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linus 2013-07-23 19:17:11 +01:00
Mark Brown
eed097bd08 Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linus 2013-07-23 19:17:10 +01:00
Mark Brown
a67061e2a9 Merge remote-tracking branch 'asoc/fix/max98088' into asoc-linus 2013-07-23 19:17:09 +01:00
Mark Brown
639f817fe8 Merge remote-tracking branch 'asoc/fix/ep93xx' into asoc-linus 2013-07-23 19:17:08 +01:00
Lars-Peter Clausen
96b9bc6174 ASoC: adau1701: Add adau1702 and adau1401(a) device ids
Both the adau1702 and the adau1401(a) are register compatible to the adau1701,
so add them to adau1701 driver's device id table.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-23 18:45:40 +01:00
Lars-Peter Clausen
af2d8b5d95 ASoC: Build adau1701 when SND_SOC_ALL_CODECS is selected
The adau1701 driver was removed from SND_SOC_ALL_CODECS in commit commit ee8c7e9
("ASoC: Remove adau1701 from SND_SOC_ALL_CODECS due to Sigma dependency") due
to the dependency on the SigmaDSP firmware loader which was only available on a
limited set of platforms. This was fixed quite some time ago in commit 40216ce7
("ASoC: Move SigmaDSP firmware loader to ASoC") though, so we can add the driver
back again to SND_SOC_ALL_CODECS.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-23 18:45:40 +01:00
Richard Zhao
647ab784c5 ASoC: tegra: correct playback_dma_data setup
The errors were caused by copy/paste mistake in below commit
since v3.10:
3489d50 ASoC: tegra: Use common DAI DMA data struct

It also corrects slave_id initialization in tegra20_ac97 driver.

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org> # 3.10
2013-07-22 14:25:02 +01:00
Dan Carpenter
b5c745fb75 ASoC: core: double free in snd_soc_add_platform()
There are three callers for this function, and none of them want it to
free platform for them.  It leads to a double free.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 11:00:05 +01:00
H Hartley Sweeten
83e2e4eeb8 ASoC: ep93xx: fix build of ep93xx-ac97.c
Fix the build of this driver. It was broken by:

Commit 453807f300
ASoC: ep93xx: Use ep93xx_dma_params instead of ep93xx_pcm_dma_params

The removed struct ep93xx_pcm_dma_params use the member 'dma_port' to
select the dma channel. The struct ep93xx_dma_data uses the member
'port'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-19 19:53:45 +01:00