Commit Graph

7704 Commits

Author SHA1 Message Date
Mark Brown 97fa413305 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-11-03 22:04:19 -08:00
Mark Brown 07ad822c21 Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next 2013-11-03 22:04:18 -08:00
Mark Brown fc10c6db77 Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown 6caa9892c3 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown 911885542a Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown 05e48b5064 Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown e814e3936e Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-11-03 22:04:15 -08:00
Mark Brown 6367771fb6 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-11-03 22:04:14 -08:00
Mark Brown 425c5a8582 Merge remote-tracking branch 'asoc/topic/adsp' into asoc-next 2013-11-03 22:04:14 -08:00
Mark Brown 14d907742c Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next 2013-11-03 22:04:13 -08:00
Mark Brown b199b0fcde Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-11-03 22:04:13 -08:00
Mark Brown 41caa41634 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2013-11-03 22:04:12 -08:00
Mark Brown ca89bc248e Merge remote-tracking branch 'asoc/fix/ak4642' into asoc-linus 2013-11-03 22:04:05 -08:00
Richard Fitzgerald ae2ff9f6c5 ASoC: wm8962: Add EQ coefficient support
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:52:17 -07:00
Richard Fitzgerald dea0c74ff9 ASoC: wm8962: Add ALC coefficient support
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:52:16 -07:00
Dimitris Papastamos 3626992a21 ASoC: wm_adsp: Print out the firmware version
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:39 -07:00
Dimitris Papastamos b0101b4f14 ASoC: wm_adsp: Remove and free algorithm regions for ADSP1
Do it in a similar fashion as we do for ADSP2.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:37 -07:00
Dimitris Papastamos 562c5e6f52 ASoC: wm_adsp: Add debug info on get()/put() transfers
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:36 -07:00
Dimitris Papastamos 7328823d00 ASoC: wm_adsp: Release firmware on memory allocation failure
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:35 -07:00
Dimitris Papastamos 43bc3bf64b ASoC: wm_adsp: Print error when regmap reads/writes fail
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-01 10:48:34 -07:00
Phil Edworthy 7b5bfb8288 ASoC: ak4642: prevent un-necessary changes to SG_SL1
If you record the sound during playback,
the playback sound becomes silent.
Modify so that the codec driver does not clear
SG_SL1::DACL bit which is controlled under widget

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-31 23:45:33 -07:00
Russell King - ARM Linux 2062b4c5d2 ASoC: dpcm: improve robustness
Avoid oopsing if there is no backend stream associated with a front end
stream.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Mark Brown c5914b0aae ASoC: pcm: Check for ops before deferencing them
Ensure that we always check that an ops structure is present before we
try to use it, improving the robustness of the system.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Takashi Iwai a19685cb72 ASoC: Use strlcpy() for copying in snd_soc_info_enum_double()
The provided texts aren't guaranteed to be in the fixed size.
Spotted by coverity CID 139318.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 10:57:47 -07:00
Kuninori Morimoto 9ade09d6c6 ASoC: rcar: remove original filter from rsnd_dma_init()
Remove original filter from rsnd_dma_init(),
and use SH-DMA suitable filter.
This new style can be used from Device Tree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-31 08:26:30 -07:00
Russell King c9bd5e690a DMA-API: sound: fix dma mask handling in a lot of drivers
This code sequence is unsafe in modules:

static u64 mask = DMA_BIT_MASK(something);
...
	if (!dev->dma_mask)
		dev->dma_mask = &mask;

as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses.  Moreover, they
all follow this with:

	if (!dev->coherent_dma_mask)
		dev->coherent_dma_mask = mask;

where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.

Fix these issues by using the new dma_coerce_coherent_and_mask()
function.

Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:47 +00:00
Takashi Iwai 8b4b30365c ASoC: ml26124: Fix negative array index read
get_coeff() may return an error.

Spotted by coverity CID 703394.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 14:33:08 -07:00
Mark Brown 8723b795aa Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-10-30 10:11:55 -07:00
Takashi Iwai 5a7615cf1f ASoC: rt5640: Fix ignored error checks
The negative error value returned from get_sdp_info() is ignored
because it's assigned to unsigned variables.

Spotted by coverity CIDs 1042657, 1042658.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 10:11:25 -07:00
Takashi Iwai fe329a1a92 ASoC: wm8996: Fix negative array index read
Spotted by coverity CID 146355.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:50:21 -07:00
Takashi Iwai c36c89096c ASoC: wm0010: Fix possible out-of-bounds array read
Spotted by coverity CID 744701.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:38:21 -07:00
Takashi Iwai 268ff14525 ASoC: wm_hubs: Add missing break in hp_supply_event()
Spotted by coverity CID 115170.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-30 09:35:22 -07:00
Takashi Iwai 166a34d27f ASoC: ab8500: Fix invalid cast to long pointer
Don't cast to long pointers blindly just for using find_first_bit()
and co.  This is certainly not portable at all.

Reimplement the code with ffs() and fls() instead.  This is a slight
optimization, too.

Spotted by coverity CID 1056484 and 1056485.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:33:30 -07:00
Takashi Iwai 00ecdd93a8 ASoC: ab8500: Add missing of NULL check of devm_kzalloc()
Spotted by coverity CID 712316.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-30 09:33:30 -07:00
Nicolin Chen b5ef3f2a80 ASoC: wm8962: Fix null pointer pdata access in I2C probe()
When using DT binding to pass private data, there would be Kernel panic
occuring due to NULL pointer access in wm8962_i2c_probe(). Thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-29 09:33:51 -07:00
Olof Johansson 43d93947a5 Via Paul Walmsley <paul@pwsan.com>:
Move some of the OMAP2+ CM and System Control Module direct
 register accesses into CM- and System Control
 Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
 is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
 drivers/.
 
 Basic test logs are available here:
 
 http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSZAZXAAoJEBvUPslcq6VzCWQQAKH4Rj0izwbbLkgBAeeaQz5K
 oJgPJ6UPLOJ2uLIUauCKUSR6+nktrCTfV8P+J4DhCc6OiGrKBXJhSETPgaTbWsNw
 Bd577pmuvXSfNFXUaLwCgkSmafJ1pi6d7kEx/7ZW3TziVE/aUxyeHkrMtWJHrjTP
 28tJVieOxLlO5iK06DfmGcCpLUBKJKtgGRo0h/oqMhLAaN5S8//lyVYgdsto7oCN
 /bes6OpuVVdKiSr78V4rCVtR5Lij5+lVrT8HDiw2BA0V3bYcI7+CVlWBPZ3mYkuy
 oAJDcn9whNyfWS+SsaTIjy6nHsgQkhEJnhrQW3k2skVZobRtWDv7U5LiTjsUhb3o
 pjyWD8zZ7jqrkgyLsai6dm1zsljMQXsIQwH5h++HdCRhtNOXd6bVQZy0KqkpLu0y
 Bhpt8/edh4Bdc305oB05/Y9Uxr7Gr8M377chVZx+JD3rxIDjRRyOJcRIhd27WZEf
 HSMLpO/ayUXWdDuTlKW0IEnImx3PrxT913cnjIY589FhfdahfGQoft4sWDeiQLAX
 +zVYZljeY+GxbUWO6aY4m2PfVN9p/Hwal58NZZgj59wq9iHUuJErK11X7rj+2vwN
 +20IS8sikz6Iym84iC0T+omUeFVY0Zo004DVvpPB+D1C2LpwdI1c6kTz4DYT1EBP
 pvs8Wihkk7xQxQn0rBGP
 =L37r
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup

From Paul Walmsley <paul@pwsan.com> via Tony Lindgren:

Move some of the OMAP2+ CM and System Control Module direct
register accesses into CM- and System Control
Module-specific "drivers" underneath arch/arm/mach-omap2/.  This
is a prerequisite for moving this code out of arch/arm/mach-omap2/ into
drivers/.

Basic test logs are available here:

http://www.pwsan.com/omap/testlogs/cm_scm_cleanup_a_v3.13/20131019101809/

* tag 'omap-for-v3.13/cm-scm-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP3: control: add API for setting IVA bootmode
  ARM: OMAP3: CM/control: move CM scratchpad save to CM driver
  ARM: OMAP3: McBSP: do not access CM register directly
  ARM: OMAP3: clock: add API to enable/disable autoidle for a single clock
  ARM: OMAP2: CM/PM: remove direct register accesses outside CM code
  + Linux 3.12-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-10-28 14:39:03 -07:00
Takashi Iwai 298402a385 ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
... instead of NULL dereferences.

Spotted by coverity CID 402004.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-28 09:33:10 -07:00
Takashi Iwai ff18620c21 ASoC: dapm: Fix source list debugfs outputs
... due to a copy & paste error.

Spotted by coverity CID 710923.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-10-28 09:32:57 -07:00
Wei Yongjun 3d8f7318f9 ASoC: fsl_spdif: fix return value check in fsl_spdif_probe()
In case of error, the function platform_get_resource() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-26 21:32:29 +01:00
Charles Keepax a9c9cafdde ASoC: wm5110: Add missing routes for AEC Loopback
Reported-by: Nariman Poushin <nariman.poushin@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-26 21:31:27 +01:00
Brian Austin aab554ede9 ASoC: cs42l52: increase MAX_REGISTER for regmap_register_patch
regmap_register_patch fails without the MAX_REGISTER set to highest
register written to. Increase to register 0x47

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 21:23:16 +01:00
Takashi Iwai f82bf8e2c8 ASoC: dmaengine: Use SNDRV_PCM_STREAM_LAST for array size
... to make the meaning more obvious.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 21:14:26 +01:00
Brian Austin e5f03af644 ASoC: cs42l52: Add chip rev id message
This patch adds a print message at bootup for the CODEC Rev ID

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Brian Austin 153723f6f1 ASoC: cs42l52: convert pdata config to regmap_update_bits
Moving platform data to bus probe and convert to regmap_update_bits.
This will work nicer when converted to device tree instead of having it
split into multiple probes

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Brian Austin 6dd1775792 ASoC: cs42l52: Add platform data for reset gpio
This patch adds platform data support for a reset GPIO.
Also uses reset_gpio to toggle reset of the CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Takashi Iwai 6913a9dbf1 ASoC: Updates for v3.13
- Further work on the dmaengine helpers, including support for
    configuring the parameters for DMA by reading the capabilities of the
    DMA controller which removes some guesswork and magic numbers fromm
    drivers.
  - A refresh of the documentation.
  - Conversions of many drivers to direct regmap API usage in order to
    allow the ASoC level register I/O code to be removed, this will
    hopefully be completed by v3.14.
  - Support for using async register I/O in DAPM, reducing the time taken
    to implement power transitions on systems that support it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSajLdAAoJELSic+t+oim9MVEQAJ3t7df5K9R/OynjhKiEFxpP
 cBWo306CegZ5oO17UqG+SReJkOWgUI8zIUkNC818suTjtgyhv4WUBx1QgXG8akO5
 arHZEQGyReLxgWbnO5ScP7BJt5ZYldfQWN+NPnNlzwvVA8R4xChvAwuHL+kUSSYW
 DrOb0ag/Gtn2jQo3o9GbZb5c3UhZqoMg/pQSoVtnvG/O8N/xR0yoeXGsdJv1su6g
 OKhCJTRWU8v3FONatR2wWXnSrCBOeJ2Ec7YUJil1FQQdENYZfV3AOsFHxmqsyG2O
 Xj2P7CioY0JY7dtFcKjrXgsnjvgZmVdVsdegTJPWS9RjunjyupvSyhMhZYkoA60j
 V7RxyIbHAx7hILQqCYYhlOczYHom4MSwAGGt7y7T3oKt0432RvIjE2fP7sTGaqD8
 wzuVYuVl4km03xX9g9abF6xjyDE6e+4wun+d8kSvOosvd/nF47gkXUXEvPZh0Ley
 013e5fHNDaNF4uaSVXE169JyVxVnHP6nXJDRWZakXsryGXGUpn0quIzobf6fb6XE
 fY5Q3QoyP5rHdSMIvGN5Gi76KsHF5CWILWqcWLEVPLnaf9gJmrp3IypmF1c8i7VE
 CrcTim5mhNePEX56skRaHhpYHmsxYApSAzxNAA/t3cJ2rtwb87jMM4jOcjHi/war
 emSVe5lXkcwv/lU/Pa0N
 =rVsK
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.13

 - Further work on the dmaengine helpers, including support for
   configuring the parameters for DMA by reading the capabilities of the
   DMA controller which removes some guesswork and magic numbers fromm
   drivers.
 - A refresh of the documentation.
 - Conversions of many drivers to direct regmap API usage in order to
   allow the ASoC level register I/O code to be removed, this will
   hopefully be completed by v3.14.
 - Support for using async register I/O in DAPM, reducing the time taken
   to implement power transitions on systems that support it.
2013-10-25 11:43:47 +02:00
Wei Yongjun 29ca9c73e5 ASoC: samsung: fix return value check in i2s_alloc_dai()
In case of error, the function platform_device_alloc() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 10:25:51 +01:00
Jean-Francois Moine 99d8d3ba51 ASoC: kirkwood: Fix compile error due to patch 'add S/PDIF support'
This patch fixes the compilation error of kirkwood-i2s.c introduced
by the commit 75b9b65ee5 'ASoC: kirkwood: add S/PDIF support'.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 09:12:39 +01:00
Denis Carikli 154bab12e1 ASoC: eukrea-tlv320: Use dev_err instead of pr_err.
It also contains a minor style cleanup.

Signed-off-by: Denis Carikli <denis@eukrea.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24 13:22:30 +01:00
Mark Brown 9645083ca5 Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next 2013-10-24 11:24:18 +01:00
Mark Brown cd77607f57 Merge remote-tracking branch 'asoc/topic/wm8400' into asoc-next 2013-10-24 11:24:18 +01:00
Mark Brown d12649452d Merge remote-tracking branch 'asoc/topic/twl6040' into asoc-next 2013-10-24 11:24:17 +01:00
Mark Brown e3a4bd276d Merge remote-tracking branch 'asoc/topic/twl4030' into asoc-next 2013-10-24 11:24:17 +01:00
Mark Brown 856de81583 Merge remote-tracking branch 'asoc/topic/tpa6130a2' into asoc-next 2013-10-24 11:24:17 +01:00
Mark Brown 3caa28274e Merge remote-tracking branch 'asoc/topic/tlv320aic3x' into asoc-next 2013-10-24 11:24:16 +01:00
Mark Brown 24a6703abb Merge remote-tracking branch 'asoc/topic/tlv320aic32x4' into asoc-next 2013-10-24 11:24:16 +01:00
Mark Brown 3cabd442d7 Merge remote-tracking branch 'asoc/topic/tlv320aic26' into asoc-next 2013-10-24 11:24:15 +01:00
Mark Brown 2b48f86b5b Merge remote-tracking branch 'asoc/topic/tlv320aic23' into asoc-next 2013-10-24 11:24:15 +01:00
Mark Brown a5f0ac4a0b Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next 2013-10-24 11:24:14 +01:00
Mark Brown 7524be376d Merge remote-tracking branch 'asoc/topic/tas5086' into asoc-next 2013-10-24 11:24:14 +01:00
Mark Brown abdd182e93 Merge remote-tracking branch 'asoc/topic/spear' into asoc-next 2013-10-24 11:24:13 +01:00
Mark Brown c5833ddc4a Merge remote-tracking branch 'asoc/topic/sn95031' into asoc-next 2013-10-24 11:24:13 +01:00
Mark Brown ccc6d1922e Merge remote-tracking branch 'asoc/topic/simple' into asoc-next 2013-10-24 11:24:12 +01:00
Mark Brown f6b967ab1b Merge remote-tracking branch 'asoc/topic/si476x' into asoc-next 2013-10-24 11:24:12 +01:00
Mark Brown 1f7f8e0462 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-10-24 11:24:12 +01:00
Mark Brown a6f849f752 Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next 2013-10-24 11:24:11 +01:00
Mark Brown 5b2ad46d6e Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-10-24 11:24:11 +01:00
Mark Brown c0840b2728 Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next 2013-10-24 11:24:10 +01:00
Mark Brown 8018abf63d Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-next 2013-10-24 11:24:10 +01:00
Mark Brown 440f5e8996 Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-next 2013-10-24 11:24:09 +01:00
Mark Brown 10abe843d5 Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next 2013-10-24 11:24:09 +01:00
Mark Brown 07797e9bb6 Merge remote-tracking branch 'asoc/topic/mc13783' into asoc-next 2013-10-24 11:24:08 +01:00
Mark Brown ed87aabf60 Merge remote-tracking branch 'asoc/topic/max9850' into asoc-next 2013-10-24 11:24:08 +01:00
Mark Brown 4131770d54 Merge remote-tracking branch 'asoc/topic/max98095' into asoc-next 2013-10-24 11:24:07 +01:00
Mark Brown 1a4ca437e4 Merge remote-tracking branch 'asoc/topic/max98088' into asoc-next 2013-10-24 11:24:07 +01:00
Mark Brown 2e71ff5e8a Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-10-24 11:24:06 +01:00
Mark Brown 8ff9f38bda Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-10-24 11:24:06 +01:00
Mark Brown 54128df2ba Merge remote-tracking branch 'asoc/topic/ep93xx' into asoc-next 2013-10-24 11:24:06 +01:00
Mark Brown 70e0db2f74 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-10-24 11:24:05 +01:00
Mark Brown 48ce3ec16a Merge remote-tracking branch 'asoc/topic/devm' into asoc-next 2013-10-24 11:24:04 +01:00
Mark Brown cf44fba089 Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next 2013-10-24 11:24:04 +01:00
Mark Brown 0705690110 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2013-10-24 11:24:03 +01:00
Mark Brown 85eb5dce82 Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next 2013-10-24 11:24:03 +01:00
Mark Brown 05be686a40 Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next 2013-10-24 11:24:02 +01:00
Mark Brown f8736ad2ee Merge remote-tracking branch 'asoc/topic/cq93vc' into asoc-next 2013-10-24 11:24:02 +01:00
Mark Brown d6ee232c7f Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-10-24 11:24:02 +01:00
Mark Brown 6180561670 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2013-10-24 11:24:01 +01:00
Mark Brown d1c59c8712 Merge remote-tracking branch 'asoc/topic/bclk' into asoc-next 2013-10-24 11:24:01 +01:00
Mark Brown 80ca31869f Merge remote-tracking branch 'asoc/topic/atmel' into asoc-next 2013-10-24 11:24:00 +01:00
Mark Brown c4c2361aef Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-10-24 11:24:00 +01:00
Mark Brown 805c605562 Merge remote-tracking branch 'asoc/topic/ak4642' into asoc-next 2013-10-24 11:23:59 +01:00
Mark Brown bb80a5d4cd Merge remote-tracking branch 'asoc/topic/ak4104' into asoc-next 2013-10-24 11:23:59 +01:00
Mark Brown e447360474 Merge remote-tracking branch 'asoc/topic/adav80x' into asoc-next 2013-10-24 11:23:58 +01:00
Mark Brown 9c5ff908aa Merge remote-tracking branch 'asoc/topic/adau1373' into asoc-next 2013-10-24 11:23:58 +01:00
Mark Brown de3bb2ded6 Merge remote-tracking branch 'asoc/topic/ab8500' into asoc-next 2013-10-24 11:23:57 +01:00
Mark Brown cbf125e211 Merge remote-tracking branch 'asoc/topic/88pm860x' into asoc-next 2013-10-24 11:23:57 +01:00
Mark Brown b85e95781c Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus 2013-10-24 11:23:56 +01:00
Mark Brown ebc0b38625 Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus 2013-10-24 11:23:56 +01:00
Mark Brown 3bd36a147f Merge remote-tracking branch 'asoc/fix/pcm1792a' into asoc-linus 2013-10-24 11:23:55 +01:00
Mark Brown dfbbe16f14 Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus 2013-10-24 11:23:55 +01:00
Mark Brown 92359d6d65 Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2013-10-24 11:23:55 +01:00
Mark Brown 686b377152 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-10-24 11:23:54 +01:00
Nicolin Chen 1abe729f78 ASoC: fsl: Add missing pm to current machine drivers
Add missing pm to current machine drivers so that all of them would
correctly do suspend/resume.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-24 11:22:44 +01:00
Mark Brown 90130d2e8f ASoC: dmaengine: Use filter_data rather than dma_data for compat requests
When using the legacy filter function channel requests we currently pass
the audio specific struct snd_dmaengine_dai_dma_data which isn't likely to
be helpful for actual filtering. Since there's already a field in the
structure called filter_data clearly intended for use here convert the
driver to use that.

All existing users of plain filter functions have been converted to use
an explicit compat function to override this behaviour except i.MX which
is working around this issue in its filter function and is updated to
just use filter_data directly here.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-10-24 11:03:19 +01:00
Mark Brown ea73b7ddf1 ASoC: dmaengine: Support custom channel names
Some devices have more than just simple TX and RX DMA channels, for example
modern Samsung I2S IPs support a secondary transmit DMA stream which is
mixed into the primary stream during playback. Allow such devices to
specify the names of the channels to be requested in their dma_data.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-10-24 09:52:14 +01:00
Sebastian Reichel f95a48834c ASoC: tpa6130a2: Add device tree support
Add device tree support to tpa6130a2 driver and document the
bindings.

Signed-off-by: Sebastian Reichel <sre@debian.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-23 16:46:39 +01:00
Hebbar, Gururaja ee2f615d6e ASoC: davinci-evm: Add device tree binding
Device tree support for Davinci Machine driver

When the board boots with device tree, the driver will receive card,
codec, dai interface details (like the card name, DAPM routing map,
phandle for the audio components described in the dts file, codec mclk
speed). The card will be set up based on this information. Since the
routing is provided via DT we can mark the card fully routed so core
can take care of disconnecting the unused pins.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-23 16:43:07 +01:00
Hebbar, Gururaja d79e07c95d ASoC: davinci: Add support for AM33xx SoC Audio
AM33xx uses same McASP IP as the Davinci Platform. This patch updates
Kconfig and makefile to enable build for McASP, PCM & Codec drivers.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-23 16:39:33 +01:00
Mark Brown 0eef5381b7 ASoC: tegra: Remove redundant initialisation of compat_filter_fn
Setting a field in a static struct to NULL has no effect so don't bother
(and don't generate false positives for grep).

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
2013-10-23 12:57:17 +01:00
Mark Brown d7711dc593 ASoC: ep93xx: Open code dma channel request
Currently the ep93xx DMA code is one of the few users relying on the fact
that the compat code uses the dma_data as the filter data for non-DT
channel requests. Since the rest of the core expects this to be a struct
snd_dmaengine_dai_data this isn't terribly helpful this will be changed to
use the already existing filter data so avoid breaking ep93xx by open
coding the current behaviour.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-10-23 12:57:12 +01:00
Peter Ujfalusi 1427e660b4 ASoC: davinci-mcasp: Remove redundant num-serializer DT parameter
The serial-dir array gives this information so there is no need to have the
num-serializer property in DT description.
Just ignore the property in the driver the DTS files can be updated
separately without regression.
Update the documentation at the same time for davinci-mcasp

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-23 12:15:03 +01:00
Jyri Sarha 3af9e03156 ASoC: davinci-mcasp: Change compatible property model to more accurate
Change the model omap2-mcasp-audio in compatible property to
am33xx-mcasp-audio as omap2 does not have mcasp.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 12:03:21 +01:00
Jyri Sarha 4023fe6ff2 ASoC: davinci-mcasp: Extract DMA channels directly from DT
Extract DMA channels directly from DT as they can not be found from
platform resources anymore. This is a work-around until davinci audio
driver is updated to use dmaengine.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 12:03:21 +01:00
Jyri Sarha 256ba181cb ASoC: davinci-mcasp: Add location for data port registers to DT
This patch adds a separate register location for data port registers to
mcasp DT bindings. On am33xx SoCs the McASP registers are mapped
trough L4 interconnect, but data port registers are also mapped trough
L3 bus to a different memory location.

Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Darren Etheridge <detheridge@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 12:03:21 +01:00
Jean-Francois Moine 75b9b65ee5 ASoC: kirkwood: add S/PDIF support
This patch adds S/PDIF input/output for mvebu DT boards.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 11:18:30 +01:00
Vinod Koul 30a765d643 ASoC: dont call dapm_sync while reporting jack always
While reporting the jack status snd_soc_jack_report() invokes snd_soc_dapm_sync()
always. This should be required when we have pins associated with jack and
reporting enables or disables these.
So add a check for this case

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 09:29:02 +01:00
Mark Brown cfcff69af8 ASoC: si476x: Fix locking of core
The conversion of the si476x to regmap removed locking of the core during
register updates, allowing things like power state changes for the MFD to
happen during a register update. Avoid this by taking the core lock in the
DAI operations (which are the only things that do register updates) as we
used to do in the open coded register I/O functions.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Andrey Smirnov <andrew.smirnov@gmail.com>
2013-10-20 22:42:02 +01:00
Heiko Stuebner da2f5f4852 ARM: S3C24XX: Fix possible dma selection warning
Currently the s3c sound support selects CONFIG_S3C2410_DMA on s3c24xx
architectures while the generic dma config is enabled by CONFIG_S3C24XX_DMA.

With the way the Kconfig options are layed out currently it is possible
to enable Samsung sound support without enabling the necessary dma support
resulting in warnings like
  warning: (SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S &&
       SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650)
  selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX &&
       S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))

Therefore bring the s3c2410 dma support in line with the way the other
s3c24xx SoCs handle this by having the SoC dma-support selected if the generic
s3c dma support is enabled and have the sound support depend on S3C24XX_DMA
on these arches. The s3c2442 is using the same dma descriptors and therefore
also selected S3C2410_DMA.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-10-21 05:32:48 +09:00
Brian Austin 7b09eea529 ASoC: cs42l73: Add Device Tree support for CS42L73
This patch adds support for device tree for the CS42L73 CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 18:15:44 +01:00
Jean-Francois Moine 1f1b65796e ASoC: kirkwood: prefer external clock over internal clock
When there is an external clock, always use this one.
This prevents the two Dove audio devices to use the same DCO clock
at different rates.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:29:27 +01:00
Kuninori Morimoto 92eba04e4b ASoC: rcar: remove RSND_SSI_CLK_FROM_ADG
R-Car sound has clock pin for each SSI, and sometimes,
these pins are shared with paired SSI.
It may sometimes become "SSI-A clock pin is master" and
"SSI-B clock pin is slave", but "SSI-A/B clock pins are shared".
SSI-B needs SSI-A clock in this case.

Current R-Car sound driver is using RSND_SSI_xxx flag
to control this kind of shared pin behavior.

But, this information, especially clock master setting,
can be got from ASoC set_fmt settings.
This patch removes rsnd_ssi_mode_init() and extend rsnd_ssi_mode_set()
to controlling pin settings via .set_fmt.

This patch doesn't removes RSND_SSI_CLK_FROM_ADG flag at this point
to avoid conflict branch merging between ASoC <-> SH-ARM.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:28:37 +01:00
Kuninori Morimoto cdcfcac968 ASoC: rcar: add rsnd_scu_hpbif_is_enable()
Current SSI needs RSND_SSI_DEPENDENT flag to
decide dependent/independent mode.
And SCU needs RSND_SCU_USE_HPBIF flag
to decide HPBIF is enable/disable.
But these 2 means same things.

This patch adds new rsnd_scu_hpbif_is_enable()
function, and merges above methods.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:28:37 +01:00
Kuninori Morimoto e244bb9bc1 ASoC: simple-card: un-implemented set_fmt is not error
Current simple-card returns error if DAI doesn't
support .set_fmt callback.
But the error is -ENOTSUPP (= not supported),
and it is not error.
This patch avoids such case

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:28:02 +01:00
Mark Brown 511e303317 ASoC: samsung: Initialise DMA data at device probe time
This is a minor simplification and will help with converting the platform
to use the dmaengine helpers.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:26:37 +01:00
Lars-Peter Clausen fa654e0853 ASoC: dmaengine-pcm: Provide default config
This patch adds some default settings for the generic dmaengine PCM driver for
the case that no config has been supplied. The following defaults are used:
	* Use snd_dmaengine_pcm_prepare_slave_config for preparing the DMA slave
	  config.
	* 512kB for the prealloc buffer size. This value has been chosen based on
	  'feels about right' and is not backed up by any scientific facts. We
	  may need to come up with something smarter in the future but it should
	  work fine for now.

With this infrastructure in place we can finally write DAI drivers which are
independent of the DMA controller they are connected to. This is e.g. useful if
the DAI IP core is reused across different SoCs, but the SoCs uses different DMA
controllers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-19 21:26:06 +01:00
Lars-Peter Clausen c0de42bf59 ASoC: dmaengine-pcm: Add support for querying DMA capabilities
Currently each platform making use the the generic dmaengine PCM driver still
needs to provide a custom snd_pcm_hardware struct which specifies the
capabilities of the DMA controller, e.g. the maximum period size that can be
supported. This patch adds code which uses the newly introduced
dma_get_slave_caps() API to query this information from the dmaengine driver.
The new code path will only be taken if the 'pcm_hardware' field of the
snd_dmaengine_pcm_config struct is NULL.

The patch also introduces a new 'fifo_size' field to the
snd_dmaengine_dai_dma_data struct which is used to initialize the
snd_pcm_hardware 'fifo_size' field and needs to be set by the DAI driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-19 21:26:06 +01:00
Mark Brown ebce31140c ASoC: rt5640: Don't go to standby on resume
There is no need for the CODEC to go to standby on resume since the core will
power it up as needed and in any case it is an idle_bias_off CODEC so would
normally sit with bias off while idle.

Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
2013-10-19 21:24:31 +01:00
Mark Brown e58f301ec9 ASoC: rt5640: Power down LDO while suspended
If we have control over the LDO then disable it during suspend; the device
is already being put into reset so will be non-functional over suspend
anyway and this will save a small amount of power.

Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
2013-10-19 21:24:30 +01:00
Mark Brown 6197c34425 ASoC: cirrus: Enable compile test builds
The core support for ep93xx (currently only the DMA driver) does not
depend on the architecture at all and everything else has more strict
dependencies so enable compile test builds for improved build coverage.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-19 21:23:30 +01:00
Mark Brown 40f8989695 Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus 2013-10-18 14:17:14 +01:00
Mark Brown 2a5e9dab9a Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus 2013-10-18 14:17:14 +01:00
Mark Brown d55f0691c0 Merge remote-tracking branch 'asoc/fix/pcm1792a' into asoc-linus 2013-10-18 14:17:13 +01:00
Mark Brown 3b8c006b17 Merge remote-tracking branch 'asoc/fix/pcm1681' into asoc-linus 2013-10-18 14:17:13 +01:00
Mark Brown d6ed315345 Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2013-10-18 14:17:13 +01:00
Mark Brown 762f9b185c Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-10-18 14:17:12 +01:00
Mark Brown 78b78f5c01 ASoC: wm8962: Move register initialisation to I2C probe()
This is more idiomatic and is required for robust operation since we must
ensure that the clocking configuration is valid as rapidly as possible.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 11:33:55 +01:00
Mark Brown ca50410b73 ASoC: wm8962: Move interrupt initalisation to probe()
This is more idiomatic and fixes bugs in the error handling paths.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 11:33:54 +01:00
Kuninori Morimoto 6833c452c2 ASoC: add snd_soc_of_get_dai_name() default of_xlate
Current snd_soc_of_get_dai_name() needs .of_xlate_dai_name()
callback on each component drivers.
But required behavior on almost all these drivers is
just returns its indexed driver's name.

This patch adds this feature as default behavior.
.of_xlate_dai_name() can overwrite it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:43:32 +01:00
Brian Austin f9ca060680 ASoC: cs42l73: Namespace defines for cs42l73 codec
Cleanup to namespace the defines for the cs42l73 driver

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:37:29 +01:00
Brian Austin 3d8c8bc025 ASoC: cs42l73: Add platform data support for cs42l73 codec
Add support for RST GPIO and Charge Pump Freq in platform data

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:37:29 +01:00
Dmitry Eremin-Solenikov 7db1698f72 ALSA: ASoC: pxa: add asoc pm callbacks to pxa audio drivers
After convertion to snd_soc_register_card, platform driver should
reference snd_soc_pm_ops callbacks to properly suspend/resume sound
hardware. This was missed during conversion of PXA sound devices.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:35:00 +01:00
Dmitry Eremin-Solenikov f62aa9b6c9 ALSA: ASoC: pxa: fix pxa2xx-ac97 DAI initialization order
After recent changes to codec/DAI initialization order changes, codec
driver (wm9712 in my case) tries to access codec prior to
pxa2xx_ac97_hw_probe() being called (because DAIs are probed after all
codecs are probed). Move hw-related probe/remove/suspend/resume
functions to pxa2xx-ac97 driver level, instead of DAI level.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18 00:35:00 +01:00
Sachin Kamat 8aa99652cd ASoC: atmel: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:03:15 +01:00
Sachin Kamat b3b70786ec ASoC: tlv320aic3x: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:02:18 +01:00
Sachin Kamat 285d00c11b ASoC: tas5086: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:01:33 +01:00
Sachin Kamat 4b2fa5121c ASoC: pcm1792a: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:00:50 +01:00
Sachin Kamat 193a47162c ASoC: pcm1681: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 19:00:10 +01:00
Sachin Kamat a7ea1b7249 ASoC: cs4271: Include linux/of.h header
'of_match_ptr' is defined in linux/of.h. Include it explicitly.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 18:47:39 +01:00
Sachin Kamat de0022d4bf ASoC: smdk_wm8994: Add .pm to struct smdk_audio_driver
Register PM ops for this driver.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-16 12:59:12 +01:00
Markus Pargmann 863ebddec8 ASoC: mxs-saif: Handle errors in trigger function
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 18:01:50 +01:00
Markus Pargmann 88cf632a13 ASoC: mxs-saif: Store saif state
Trigger commands may be passed multiple times. To avoid errors with
clk_enable/disable, store the saif state and return if saif is already
running/stopped.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 18:01:50 +01:00
Axel Lin c92f66e280 ASoC: pcm1792a: Fix max_register setting
According to the datasheet, the max_register is register 23.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:01:12 +01:00
Axel Lin acc8da7642 ASoC: pcm1681: Fix max_register setting
According to the datasheet, the max_register is 13h.
ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:01:10 +01:00
Axel Lin 64256ac6c2 ASoC: pcm1681: Fix max_register setting
According to the datasheet, the max_register is 13h.
ARRAY_SIZE(pcm1681_reg_defaults) + 1 is 18 which is wrong.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 15:00:07 +01:00
Stephen Warren 5e049fce36 ASoC: tegra: support new register layouts in Tegra124
Tegra124 introduces some small changes to the layout of some registers.
Modify the affected drivers to program those registers appropriately
based on which SoC they're running on.

Tegra124 also introduced some new modules on the AHUB configlink register
bus. These will require new entries in configlink_clocks[] in the AHUB
driver. However, supporting that change likely relies on switching Tegra
to the common reset framework, so I'll defer that change for now.

Based-on-work-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Based-on-work-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:56:27 +01:00
Michael Opdenacker 73678804f4 treewide: fix "usefull" typo
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2013-10-14 15:44:24 +02:00
Wolfram Sang 67093b253b ASoC: fsl: remove leftover release_mem_region
When converting this driver to devm_ioremap_resource, the removal of this now
unneeded function has been forgotten.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:19:31 +01:00
Wolfram Sang 48afa79352 ASoC: atmel: don't use devm_pinctrl_get_select_default() in probe
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 14:18:30 +01:00
Felipe Pena 1b3ed70a1b ASoC: fsl: Fix memory leak in imx-audmux.c
When audmux_clk is used and clk_prepare_enable function succeed,
the memory alloc'd to buf variable is leaked

Signed-off-by: Felipe Pena <felipensp@gmail.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14 12:52:59 +01:00
Joe Perches 1d198f26c9 sound: Remove unnecessary semicolons
These aren't necessary after switch and if blocks.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-14 11:00:05 +02:00
Kuninori Morimoto c5d5a58d7f ASoC: rcar: fixup generation checker
Current rcar is using rsnd_is_gen1/gen2() to checking its
IP generation, but it needs data mask.
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:52:32 +01:00
Kuninori Morimoto 2192f81c53 ASoC: rcar: add ID check on rsnd_dai_get()
checking id in rsnd_dai_get() is good idea

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:45:49 +01:00
Kuninori Morimoto 740ad6c328 ASoC: rcar: fixup rsnd_platform_call() return value
Un-implemented platform callback is not error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 19:45:49 +01:00
Steffen Trumtrar bb7838d4f1 ASoC: mc13783: add more DAPM routes
Add more infrastructure (i.e. routes, muxes, switches) to the mc13783 DAPM.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:44:23 +01:00
Steffen Trumtrar c6452e39e8 ASoC: mc13783: add mixer controls
Add more controls to the alsa mixer infrastructure.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11 12:44:23 +01:00
Mark Brown 1dd275b60e ASoC: dapm: Run clock and regulator events separately to other supplies
In order to avoid trying to use an external clock or supply for an
on-chip supply prior to it being enabled move the clock and regulator
supply events to a separate step in DAPM sequencing from normal supply
events.

This should have minimal practical impact since these widgets are sorted
using SND_SOC_NOPM which is a negative value and hence sorted
separately to any real register writes, though it may be relevant if
supplies have event callbacks only.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-10 12:52:00 +01:00
Mark Brown eb270e98e1 ASoC: dapm: Use async I/O for DAPM sequences
Within a DAPM sequence we normally don't care about when exactly a register
write has completed so long as they happen in the order we requested. This
means that we can issue most of the writes we do asynchronously which
should maximise the ability of the underlying frameworks to keep the
hardware busy, providing a small performance improvement on some systems.

We currently ensure that all writes are completed both when changing to a
different device and when calling into the regulator and clock frameworks.
This should ensure that the previous ordering is maintained.

We also ensure that writes are completed prior to calling into widget
event functions since some event functions implement delays.  This
should be improved in future so that widgets can disable this sync in
order to add extra writes.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-10 12:51:58 +01:00
Rob Herring 5af5073004 drivers: clean-up prom.h implicit includes
Powerpc is a mess of implicit includes by prom.h. Add the necessary
explicit includes to drivers in preparation of prom.h cleanup.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
2013-10-09 20:04:04 -05:00
Peter Ujfalusi 6b2afee11a ASoC: tlv320aic3x: Connect 'Left Line1R Mux' and 'Right Line1L Mux'
The two paths were not connected in the DAPM route causing the associated
routes to be non working and the following warnings printed in the logs:
tlv320aic3x-codec 0-001b: ASoC: mux Right Line1L Mux has no paths
tlv320aic3x-codec 0-001b: ASoC: mux Left Line1R Mux has no paths

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:59:05 +01:00
Lars-Peter Clausen 052901f42f ASoC: twl4030: Use virtual DAPM mixer controls
By using the new virtual DAPM mixer controls it is possible to remove the
twl4030 specific implementation of virtual controls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:49:32 +01:00
Lars-Peter Clausen 290c348ee5 ASoC: twl6040: Use virtual DAPM mixer controls
By using the new virtual DAPM mixer controls it is possible to remove the
twl6040 specific implementation of virtual controls.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:47:20 +01:00
Mark Brown 9f9e4266a6 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-twl6040 2013-10-07 11:46:56 +01:00
Lars-Peter Clausen 249ce1387b ASoC: dapm: Add support for virtual mixer controls
This patch adds support for virtual DAPM mixer controls. They are similar to
virtual DAPM enums. There is no hardware register backing the control, so
changing the control's value wont have any direct effect on the hardware. But it
still influences the DAPM graph by causing the path it sits on to be connected
or disconnected. This in turn can cause power changes for some of the widgets on
the DAPM graph, which will then modify the hardware state.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:46:20 +01:00
Lars-Peter Clausen da83fea612 ASoC: dapm: Ignore VMID widgets for target bias
VMID widgets behave very similar to signal generator widgets. Both are always
considered to be powered up. This means that we need to ignore the VMID widgets
in the same way as signal generator widgets when calculating the DAPM context's
target bias level. Otherwise the presence of a VMID widget, regardless whether
it is on an active path or not, will cause the DAPM context to be powered up.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:33:41 +01:00
Philippe Rétornaz 5a6e19bedb ASoC: fsl: imx-ssi: fix probe on imx31
On imx31 with mc13783 codec the FIQ is not necessary and not enabled
as DMA transfer is available.
Change the probe() function to fail only if both FIQ and DMA are not
available.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07 11:17:44 +01:00
Tomasz Figa 7472a2f21b ASoC: samsung: Use CONFIG_ARCH_S3C64XX to check for S3C64XX support
Since CONFIG_PLAT_S3C64XX is going to be removed, this patch modifies
the s3c-i2s-v2 driver to use the proper way of checking for S3C64xx
support - CONFIG_ARCH_S3C64XX.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2013-10-06 09:01:56 +09:00
Lars-Peter Clausen 40df24997f ASoC: imx-wm8962: Don't use i2c_client->driver
The 'driver' field of the i2c_client struct is redundant and is going to be
removed. Check i2c_client->dev.driver instead to see if a driver is bound to the
device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-10-03 22:28:30 +02:00
Mark Brown 8e9c4aa4e7 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-fsl
Conflicts:
	sound/soc/fsl/fsl_ssi.c
2013-10-03 17:29:05 +01:00
Jarkko Nikula 2a577a7569 ASoC: omap: Fix incorrect ARM dependency
Commit b0e0a4d ("ASoC: omap: Enable COMPILE_TEST build for DT platforms")
added two incorrect CONFIG_ARCH_ARM dependencies making impossible to select
audio support for Nokia RX-51. Fix this by using correct CONFIG_ARM.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 17:01:05 +01:00
Philippe Rétornaz 1d73ad298d ASoC: fsl: Fix sound on mx31moboard
Commit 42810d (ASoC: imx-mc13783: Add audmux settings for mx27pdk) broke
the sound on mx31moboard. Restore back the audmux setting on such boards.

Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:58:56 +01:00
Guenter Roeck db8d3af33f ASoC: fsl_ssi: Fix irq_of_parse_and_map() return value check
irq_of_parse_and_map() returns 0 on error, not NO_IRQ.

Fix the following xtensa:allmodconfig build error.

sound/soc/fsl/fsl_ssi.c:705:26: error: 'NO_IRQ' undeclared (first use in this function)
make[4]: *** [sound/soc/fsl/fsl_ssi.o] Error 1

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 16:57:54 +01:00
Daniel Mack a85e419ede ASoC: davinci-mcasp: add support for suspend and resume
When the system returns from suspend, it looses its configuration. Most
of it is restored by running a normal audio stream startup, but the DAI
format is left unset as that's configured on the audio device creation.

Hence, it suffices here to care for the registers which are touched by
davinci_mcasp_set_dai_fmt() and restore them when the system is resumed.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:22:40 +01:00
Daniel Mack 25c84cc1ac ASoC: tas5086: add suspend callback
When going to suspend, shut down all channels and re-do the init
procedure at resume time.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:38 +01:00
Daniel Mack d5fd3ccc2d ASoC: tas5086: move initialization code to own functions
We'll need to call code to initialize and reset the codec again at
resume time, so factor it out first.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:37 +01:00
Daniel Mack 648c538204 ASoC: tas5086: move two variables into private struct
We need to access the charge_period and start_mid_z values from other
places later, so move them to the private struct.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:14:36 +01:00
Vladimir Murzin e2c9917bfa ASoC: kirkwood: fix compilation warning in kirkwood_dma_open
writel() supposes the first argument of type unsigned int. This fix the
warning:

sound/soc/kirkwood/kirkwood-dma.c: In function 'kirkwood_dma_open':
sound/soc/kirkwood/kirkwood-dma.c:164:3: warning: large integer implicitly
truncated to unsigned type [-Woverflow]

Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-01 11:49:35 +01:00
Fabio Estevam 4fa8dbc18e ASoC: fsl: imx-sgtl5000: Add .remove back
Commit e8f00c1b01 (Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm)
fixed a conflict, but missed to add the .remove function back,which causes the
following build warning:

sound/soc/fsl/imx-sgtl5000.c:185:12: warning: 'imx_sgtl5000_remove' defined but not used [-Wunused-function]

Fix the warning by adding the .remove function back.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-01 11:47:38 +01:00
Jarkko Nikula 7cc302d231 ASoC: pcm: Remove extra spaces from dev_ prints
dev_ prints are already prefixed by ": " before format string so there is no
need for extra spaces.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-30 18:06:33 +01:00
Mark Brown 267666ea3b Merge remote-tracking branch 'asoc/fix/max98095' into asoc-linus 2013-09-27 14:56:24 +01:00
Mark Brown 8516e6483b Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-09-27 14:56:23 +01:00
Mark Brown aab5d23ef9 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2013-09-27 14:56:22 +01:00
Mark Brown 57754df746 Merge remote-tracking branch 'asoc/fix/bfin' into asoc-linus 2013-09-27 14:56:21 +01:00
Mark Brown 92396e78d3 Merge remote-tracking branch 'asoc/fix/ab8500' into asoc-linus 2013-09-27 14:56:20 +01:00
Mark Brown 448c3f6884 Merge remote-tracking branch 'asoc/fix/88pm860x' into asoc-linus 2013-09-27 14:56:19 +01:00
Lars-Peter Clausen 2560b3d1bd ASoC: adav80x: Convert to direct regmap usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:29:45 +01:00
Lars-Peter Clausen 729485f6ad ASoC: adau1373: Issue soft reset on probe
Reset the device on probe to make sure that the register settings match the
register cache defaults.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:41 +01:00
Lars-Peter Clausen 6fb04138a3 ASoC: adau1373: Remove ADAU1373_PLL_CTRL7 register definition
There is no such register.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:40 +01:00
Lars-Peter Clausen c3df37c938 ASoC: adau1373: Convert to direct regmap usage
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-27 14:28:40 +01:00
Mark Brown d6173df35f ASoC: si476x: Remove custom register I/O implementation
The current si476x I/O implementation wraps the regmap for the core with
functions that make the register map cache only when the device is powered
down. This implementation appears to be incomplete since there is no code
to synchronise the cache so writes done while the core is powered down
will be ignored, the device will only be configured if it is powered.

A better and more idiomatic approach would be to have the MFD manage the
cache, making the device cache only when it powers things down. This also
allows ASoC to use the standard regmap helpers for the device which helps
remove the ASoC custom ones so do convert to do that.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 19:38:28 +01:00
Mark Brown e8f00c1b01 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-devm
Conflicts:
	sound/soc/fsl/imx-sgtl5000.c
2013-09-26 12:05:47 +01:00