dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

212 Commits

Author SHA1 Message Date
Linus Torvalds 37b22400f8 Sound fixes for 3.5-rc1
Just a few trivial driver-specific fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPyGJVAAoJEGwxgFQ9KSmktdIQAJ+P5L4imwwNgU2jPyT+Qq4B
 bolQsPCmKFCskV8QkZxhVCzQoKuOyfQZDqhtFgEO4ALN9EHpHFYCFugnuwpZ805C
 D7ToKhsNgAkS7S8s/fyDof9JwBbD0e/c9k+GqeR5CmhMUqhmPwQD/hxAawE022UC
 jOqX5ZSEOMkMZDKLMo1Ss8C1pwuU0J+F2U0C4471dopM8gTnwrvwHXGYbfxkQtmH
 z+eCk13YOO5ZjP4wOVftk07VrF1aFtjbbet53/rN9SBURCxLavA3rvLU9aLY2m0K
 Jrx3NWq2qgdcsExqcUCU+T8Znyn5xo6UclXiCm36VxEG6TYgjxKuhewNQY/lCWhu
 4I+hNzu7oI6kPniok3IYarRFG7lfHyeY942ZfdOXx0CBOV/iy5o7nITXk7k22t9P
 MPXa8Nv+mlp7vyLtWEQKZd5jBobCYnC6ERJB86lQ+/TI1I1+/L6REkENfKEfHmGU
 sO4qcDhBb9UEJRg3s1OQWuTJ7MKXdL6rF6UY3xuuoVgwA+bYNXQhfN/cIn0c+QFS
 IvnjTtEikG7h5h/e1WtcdeA+jEDVQOXRAqYKFnCqXwkVfjbDy/gBp1oqW5d/Sb90
 Dt3okYpNiPtIOv/1cKCXbURS0r+pdA7bwW2bebte72OwCGDgerJisdxxLhd6gbsF
 virl4c4jGnjUy8kS9Ftb
 =Oc6V
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "Just a few trivial driver-specific fixes."

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hdspm - Work around broken DDS value on PCI RME MADI
  ALSA: usb-audio: fix rate_list memory leak
  ASoC: fsi: bugfix: ensure dma is terminated
  ASoC: fsi: bugfix: correct dma area
  ASoC: fsi: bugfix: enable master clock control on DMA stream
  ASoC: imx-ssi: Use clk_prepare_enable/clk_disable_unprepare
2012-06-01 15:39:26 -07:00
Fabio Estevam 41c73b6e89 ASoC: imx-ssi: Use clk_prepare_enable/clk_disable_unprepare
Fix the following kernel crash:

------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:508 __clk_enable+0x9c/0xa8()
Modules linked in:
Backtrace:
[<80011ef4>] (dump_backtrace+0x0/0x10c) from [<803fd48c>] (dump_stack+0x18/0x1c)
 r7:00000009 r6:000001fc r5:803002ac r4:00000000
[<803fd474>] (dump_stack+0x0/0x1c) from [<8002003c>] (warn_slowpath_common+0x54/0x6c)
[<8001ffe8>] (warn_slowpath_common+0x0/0x6c) from [<80020078>] (warn_slowpath_null+0x24/0x2c)
 r9:00000090 r8:8600e2c0 r7:8605c808 r6:8605c800 r5:8605d780
r4:8600e2c0
[<80020054>] (warn_slowpath_null+0x0/0x2c) from [<803002ac>] (__clk_enable+0x9c/0xa8)
[<80300210>] (__clk_enable+0x0/0xa8) from [<803002d0>] (clk_enable+0x18/0x30)
 r5:8605d780 r4:80000013
[<803002b8>] (clk_enable+0x0/0x30) from [<803247c4>] (imx_ssi_probe+0xa0/0x4f4)
 r5:8605d780 r4:86174180
[<80324724>] (imx_ssi_probe+0x0/0x4f4) from [<8022b0fc>] (platform_drv_probe+0x20/0x24)
[<8022b0dc>] (platform_drv_probe+0x0/0x24) from [<80229c40>] (driver_probe_device+0x80/0x1f0)
[<80229bc0>] (driver_probe_device+0x0/0x1f0) from [<80229e44>] (__driver_attach+0x94/0x98)
 r9:00000090 r8:805b7800 r7:00000000 r6:8605c83c r5:805b1b44
r4:8605c808
[<80229db0>] (__driver_attach+0x0/0x98) from [<8022856c>] (bus_for_each_dev+0x68/0x94)
 r7:00000000 r6:80229db0 r5:86033eb0 r4:805b1b44
[<80228504>] (bus_for_each_dev+0x0/0x94) from [<80229aa0>] (driver_attach+0x20/0x28)
 r7:00000000 r6:86174100 r5:8059f6d0 r4:805b1b44
[<80229a80>] (driver_attach+0x0/0x28) from [<80228d50>] (bus_add_driver+0x18c/0x268)
[<80228bc4>] (bus_add_driver+0x0/0x268) from [<8022a474>] (driver_register+0x80/0x134)
[<8022a3f4>] (driver_register+0x0/0x134) from [<8022b4a4>] (platform_driver_register+0x4c/0x60)
 r7:00000000 r6:805b7800 r5:00000018 r4:86032000
[<8022b458>] (platform_driver_register+0x0/0x60) from [<80556890>] (imx_ssi_driver_init+0x14/0x1c)
[<8055687c>] (imx_ssi_driver_init+0x0/0x1c) from [<8000868c>] (do_one_initcall+0x40/0x194)
[<8000864c>] (do_one_initcall+0x0/0x194) from [<8052f3b0>] (kernel_init+0x114/0x1f0)
[<8052f29c>] (kernel_init+0x0/0x1f0) from [<8002445c>] (do_exit+0x0/0x788)
---[ end trace d4aa739205917dbb ]---
asoc: mc13783-hifi <-> imx-ssi.0 mapping ok

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-28 15:50:20 +01:00
Linus Torvalds 2e341ca686 Sound updates for 3.5-rc1
This is the first big chunk for 3.5 merges of sound stuff.
 There are a few big changes in different areas.  First off, the
 streaming logic of USB-audio endpoints has been largely rewritten
 for the better support of "implicit feedback".  If anything about USB
 got broken, this change has to be checked.
 
 For HD-audio, the resume procedure was changed; instead of delaying
 the resume of the hardware until the first use, now waking up immediately
 at resume.  This is for buggy BIOS.
 
 For ASoC, dynamic PCM support and the improved support for digital links
 between off-SoC devices are major framework changes.
 
 Some highlights are below:
 
 * HD-audio
 - Avoid the accesses of invalid pin-control bits that may stall the codec
 - V-ref setup cleanups
 - Fix the races in power-saving code
 - Fix the races in codec cache hashes and connection lists
 - Split some common codes for BIOS auto-parser to hda_auto_parser.c
 - Changed the PM resume code to wake up immediately for buggy BIOS
 - Creative SoundCore3D support
 - Add Conexant CX20751/2/3/4 codec support
 
 * ASoC
 - Dynamic PCM support, allowing support for SoCs with internal routing
   through components with tight sequencing and formatting constraints
   within their internal paths or where there are multiple components
   connected with CPU managed DMA controllers inside the SoC.
 - Greatly improved support for direct digital links between off-SoC
   devices, providing a much simpler way of connecting things like digital
   basebands to CODECs.
 - Much more fine grained and robust locking, cleaning up some of the
   confusion that crept in with multi-component.
 - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
   ST-Ericsson MSP I2S controolers
 - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124, Texas
   Instruments LM49453.
 - Some regmap changes needed by the Tegra I2S driver.
 - mc13783 audio support.
 
 * Misc
 - Rewrite with module_pci_driver()
 - Xonar DGX support for snd-oxygen
 - Improvement of packet handling in snd-firewire driver
 - New USB-endpoint streaming logic
 - Enhanced M-audio FTU quirks and relevant cleanups
 - Increment the support of OSS devices to 256
 - snd-aloop accuracy improvement
 
 There are a few more pending changes for 3.5, but they will be
 sent slightly later as partly depending on the changes of DRM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvD/9AAoJEGwxgFQ9KSmkPsIP/AuBGpAZy7b7FiEEIy1Hhdws
 US8WVuPzyDslMVdzZ8OFqyPXanIcL9gscoOGMZOEy7UFtMBiR4GuYiPRPubEMxuP
 /gopUqK4SqIsIwT238qqYszSJSxE7gNEZ/2jhSGtkX4EkaSZ4bAskn0iOKX5uw2f
 kTUQknA1rNLIGba2z6rJbgIW7hdxGfpFy05ruv3ct81nO+5JlgyLuP/v5R6jL+do
 cum0N4dJFRd9YSEi2BG612gdz8LJyzOgPqBKmxMEva6BfqLkR8EdP80FtE3eEOiP
 Et1q2LhZwOlBt0BEjsjjOVxMsgxVax6ps9cuNRTk5ECEOldU5dbDatC45L/e9mSD
 OQVUjYAX1mQAtYva4U4PPn6WU6ma2L5yjy4peCObtyCMkEchXk1bfs4CEfVqCXUP
 yFYN8C+y6osZOyWE3+Enn9ifZdWyLeSVq6CT33Yt+fyKlswp6gRkhKYiEPqTA5aU
 p71X59Pp7q1y3tQwiMJNpf2QdkxuxfKURHswdc4BS9ct0mdZhQX0GyDS7OffkTd4
 Lq5UkVMHA1rLlF9oRPd2C9P4BuMEuvLjf662YCKiw+mWFYdBC036DHLLjm1Hcwuj
 UkpQ2PSrrdHG1u0c3ooZ9dQj1BNX4LoABLqvaMtce6sESD/hJ5gcprYJWvtituwM
 ZzZiJavIWsoJ+SWQWBHe
 =+JSm
 -----END PGP SIGNATURE-----

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

Pull sound updates from Takashi Iwai:
 "This is the first big chunk for 3.5 merges of sound stuff.

  There are a few big changes in different areas.  First off, the
  streaming logic of USB-audio endpoints has been largely rewritten for
  the better support of "implicit feedback".  If anything about USB got
  broken, this change has to be checked.

  For HD-audio, the resume procedure was changed; instead of delaying
  the resume of the hardware until the first use, now waking up
  immediately at resume.  This is for buggy BIOS.

  For ASoC, dynamic PCM support and the improved support for digital
  links between off-SoC devices are major framework changes.

  Some highlights are below:

  * HD-audio
   - Avoid accesses of invalid pin-control bits that may stall the codec
   - V-ref setup cleanups
   - Fix the races in power-saving code
   - Fix the races in codec cache hashes and connection lists
   - Split some common codes for BIOS auto-parser to hda_auto_parser.c
   - Changed the PM resume code to wake up immediately for buggy BIOS
   - Creative SoundCore3D support
   - Add Conexant CX20751/2/3/4 codec support

  * ASoC
   - Dynamic PCM support, allowing support for SoCs with internal
     routing through components with tight sequencing and formatting
     constraints within their internal paths or where there are multiple
     components connected with CPU managed DMA controllers inside the
     SoC.
   - Greatly improved support for direct digital links between off-SoC
     devices, providing a much simpler way of connecting things like
     digital basebands to CODECs.
   - Much more fine grained and robust locking, cleaning up some of the
     confusion that crept in with multi-component.
   - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
     ST-Ericsson MSP I2S controolers
   - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124,
     Texas Instruments LM49453.
   - Some regmap changes needed by the Tegra I2S driver.
   - mc13783 audio support.

  * Misc
   - Rewrite with module_pci_driver()
   - Xonar DGX support for snd-oxygen
   - Improvement of packet handling in snd-firewire driver
   - New USB-endpoint streaming logic
   - Enhanced M-audio FTU quirks and relevant cleanups
   - Increment the support of OSS devices to 256
   - snd-aloop accuracy improvement

  There are a few more pending changes for 3.5, but they will be sent
  slightly later as partly depending on the changes of DRM."

Fix up conflicts in regmap (due to duplicate patches, with some further
updates then having already come in from the regmap tree).  Also some
fairly trivial context conflicts in the imx and mcx soc drivers.

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits)
  ALSA: snd-usb: fix stream info output in /proc
  ALSA: pcm - Add proper state checks to snd_pcm_drain()
  ALSA: sh: Fix up namespace collision in sh_dac_audio.
  ALSA: hda/realtek - Fix unused variable compile warning
  ASoC: sh: fsi: enable chip specific data transfer mode
  ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
  ASoC: sh: fsi: use same format for IN/OUT
  ASoC: sh: fsi: add fsi_version() and removed meaningless version check
  ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC
  ASoC: tegra: Add machine driver for WM8753 codec
  ALSA: hda - Fix possible races of accesses to connection list array
  ASoC: OMAP: HDMI: Introduce codec
  ARM: mx31_3ds: Add sound support
  ASoC: imx-mc13783 cleanup
  mx31moboard: Add sound support
  ASoC: mc13783 codec cleanups
  ASoC: add imx-mc13783 sound support
  ASoC: Add mc13783 codec
  mfd: mc13xxx: add codec platform data
  ASoC: don't flip master of DT-instantiated DAI links
  ...
2012-05-23 13:05:43 -07:00
Philippe Rétornaz cd7dc7a42c ASoC: imx-mc13783 cleanup
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18 16:42:23 +01:00
Philippe Rétornaz 6b0a795a17 ASoC: add imx-mc13783 sound support
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18 16:42:21 +01:00
Richard Zhao 81e8e49261 ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000
It tries to clk_get the clock. And if it failed, it assumes the clock
by default enabled.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-27 18:44:08 +01:00
Richard Zhao 717071dc27 ASoC: imx-sgtl5000: add of_node_put when probe fail.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-27 18:44:06 +01:00
Mark Brown d5efccd5b6 Linux 3.4-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEbBAABAgAGBQJPi3XOAAoJEHm+PkMAQRiGnsUH9RjHwH4YFVyuP/DKtKa6zs74
 wqkpT15yITQ5WWMog4JaJFFg5rJCUd8QZr7AS/HSn0ijDyZX5VU7Rcs9cMudDzNR
 H/5K/AscS4fjb0HwWVqoltTWHRb9QGSwVN3+E3VCDLt9P89YJ0o3QztkkuEX5dkZ
 jc7reVXTfRnCcILEa9jleOzrn+OLM3j/jAjQ2hGunl8EDLzD4b17HHPoli4jEZ/5
 5ibpSVsPD+AqzN+glbXvYjVItl12D0IQos/JdOwfuZriCVWLxysSSwHZTbPCyvBZ
 LHH4HR5T+XLSXbjJeNkUFHLzqU+d5gVRadIoWtJCxqxFjKbOs2YtzJ5Ai0nDiw==
 =kTkC
 -----END PGP SIGNATURE-----

ASoC: Merge tag 'v3.4-rc3' into for-3.5

Linux 3.4-rc3 contains a bunch of Tegra changes which are conflicting
annoyingly with the new development that's going on for Tegra so merge
it up to resolve those conflicts.

Conflicts:
	sound/soc/soc-core.c
	sound/soc/tegra/tegra_i2s.c
	sound/soc/tegra/tegra_spdif.c
2012-04-16 19:40:27 +01:00
Mark Brown 1eecb8280b Linux 3.4-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPgOpXAAoJEHm+PkMAQRiG8eUIAJ3Hjo0o5hqzxol8LWHDGF8s
 3h59qwRtts82u2psStZULPLbBzw6yjn8U5Mcrh7pffwCG2BzBL5rXcmXfvoPaET3
 TjylIj986Jv+jwZyuyZcLzYyoUtgjtq7hnt4tgVVEPlexYs7LxUl8vO8QjxT+bVO
 7eKgzLsXlBC9kw4P5M7kOBQ9NE5vmEcKf+fB3Hu3DqfVJtw9Lb7EeDQj/cbQsGqI
 vavSxe7lMTPsgMP2+hRz4txGTDJNRazkO2BdwfYrcNwTSa8tfBFlamww3y4+eJtq
 MFQfdNxQpumh2++T4IC2i/nLaawH7kWj2EdaRCRLMy9hVlb/v8/wcgd+1nfLkU8=
 =0on9
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc2' into for-3.5

Linux 3.4-rc2 contains some bug fixes we need, including the addition of
an export for regcache_sync_region().
2012-04-09 11:53:45 +01:00
Shawn Guo 5c7b4a08b7 ASoC: fsl: remove redundant Kconfig dependency on SND_SOC_POWERPC_DMA
Kconfig option SND_SOC_POWERPC_DMA is under menuconfig SND_POWERPC_SOC.
Since SND_POWERPC_SOC already depends on FSL_SOC, there is no need for
SND_SOC_POWERPC_DMA to do the same.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04 12:35:21 +01:00
Shawn Guo 20731c759a ASoC: fsl: remove redundant Kconfig option SND_SOC_FSL_SSI
While commit 606d620 (ASoC: imx: merge sound/soc/imx into sound/soc/fsl)
adds SND_SOC_FSL_SSI outside "menuconfig SND_POWERPC_SOC" to make it
visible for both PowerPC and ARM/IMX, it forgot removing the one inside
"menuconfig SND_POWERPC_SOC".

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-04 12:35:21 +01:00
Shawn Guo 172b4c5c8a ASoC: fsl: add audio routing for imx-sgtl5000
Add DAPM widgets and audio routing support for imx-sgtl5000 machine
driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:31 +01:00
Shawn Guo 95cd98f9a6 ASoC: fsl: enable ssi clock in probe function
For power saving, most IMX platform initilization code turns off
modules' clock, and expects driver turn on clock as needed.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:29 +01:00
Shawn Guo b46b373f40 ASoC: fsl: assign dma peripheral type according to bus topology
The dma peripheral_type for SSI should be IMX_DMATYPE_SSI_SP if the SSI
is on SPBA bus.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:29 +01:00
Shawn Guo c448303e86 ASoC: fsl: add imx-sgtl5000 machine driver
This is the initial imx-sgtl5000 machine driver support with only
playback dai link implemented.  More features can be added on top
of it later.

It's a device tree only machine driver working with fsl_ssi driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:27 +01:00
Shawn Guo 09ce1111f3 ASoC: fsl: let fsl_ssi work with imx pcm and machine drivers
Makes necessary changes on fsl_ssi to let it work with imx pcm and
machine drivers.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:27 +01:00
Shawn Guo dfa1a10785 ASoC: fsl: make fsl_ssi driver compilable on ARM/IMX
Provide different pair of accessors for accessing SSI registers on
PowerPC and ARM/IMX, so that fsl_ssi driver can be built on both
architectures.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:27 +01:00
Shawn Guo 8f549d7e77 ASoC: fsl: remove helper fsl_asoc_get_codec_dev_name
The ASoC core now can support matching codec with device node besides
name, so we can save helper function fsl_asoc_get_codec_dev_name.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:27 +01:00
Shawn Guo 60aae8da29 ASoC: fsl: create fsl_utils to accommodate the common functions
There is some amount of code duplication between mpc8610_hpcd and
p1022_ds machine drivers, and the same code will be duplicated again
when another new machine driver is added.  The patch creates fsl_utils
to accommodate the common functions to stop the code duplication.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:27 +01:00
Shawn Guo f19493a3d2 ASoC: fsl: rename imx-pcm Kconfig options and filename
Rename a couple of imx-pcm Kconfig options and filename to get them
well named and less confusing.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:26 +01:00
Shawn Guo a23dc69482 ASoC: imx: merge sound/soc/imx into sound/soc/fsl
Freescale PowerPC and ARM/IMX families share the same SSI IP block.
The patch merges sound/soc/imx into sound/soc/fsl, so that the possible
code sharing and consolidation can happen.

This is a plain merge, except that menuconfig SND_POWERPC_SOC is added
in Kconfig for PowerPC platform as a correspondence to SND_IMX_SOC for
IMX platform.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:26 +01:00
Shawn Guo d61e112600 ASoC: fsl: separate SSI and DMA Kconfig options
The fsl_ssi driver will possibly be shared between Freescale PowerPC
and ARM/IMX families, so give it a separate Kconfig option.  Then
fsl_ssi driver can possibly be selected independently from selecting
PowerPC DMA based PCM driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:25 +01:00
Timur Tabi 9cb6abcb26 powerpc/8xxx: remove 85xx/86xx restrictions from fsl_guts.h
Remove the check for CONFIG_PPC_85xx and CONFIG_PPC_86xx from fsl_guts.h.
The check was originally intended to allow the same header file to
be used on 85xx and 86xx systems, even though the Global Utilities
register could be different.  It turns out that they're not actually
different, and so the check is not necessary.  In addition, neither
macro is defined for 64-bit e5500 kernels, so that causes a build
break.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2012-03-29 08:14:07 -05:00
Timur Tabi 70ac07bb63 ASoC: fsl: p1022ds: tell the WM8776 codec driver that it's the master
The WM8776 codec driver requires the machine driver to set one of the
SND_SOC_DAIFMT_CBx_xxx values.  The P1022DS machine driver should be setting
SND_SOC_DAIFMT_CBM_CFM, but since that value was zero, no one noticed.

Commit 75d9ac46 ("ASoC: Allow DAI formats to be specified in the
dai_link"), however, changed the value of SND_SOC_DAIFMT_CBM_CFM from zero
to a non-zero value, which means that it now needs to be specifically set
by the machine driver.

We also set SND_SOC_DAIFMT_NB_NF, for the same reason.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-03-17 21:11:16 +00:00
Shawn Guo 2b81ec6914 ASoC: fsl: check property 'compatible' for the machine name
Check /compatible rather than /model to determine the machine name.
The p1022ds older device trees get a different /model from the new
ones, while /compatible is consistent there, so checking /compatible
will save the bother of detecting older p1022ds device trees.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-09 11:38:12 +00:00
Shawn Guo 64902b29cb ASoC: Remove unnecessary -codec from cs4270 driver name
Similar to what commit 1e3ad57 (ASoC: Remove redundant -codec from
WM8776 driver name) does for wm8776 driver, this patch does the same
thing for cs4270 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:20 +00:00
Shawn Guo 7c59bc55e4 ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
Align mpc8610_hpcd with p1022_ds on getting codec node by just calling
of_parse_phandle.  The bonus point of doing that is we can save
exporting get_node_by_phandle_name() when we consolidate the common
bits between mpc8610_hpcd and p1022_ds into a module, which can be
shared by more machine drivers added later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:08 +00:00
Shawn Guo fb1a6453bc ASoC: fsl: correct get_dma_channel parameter name
The second parameter of function get_dma_channel is actually a property
name rather than a compatible string, so rename it for less confusing.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:04 +00:00
Paul Gortmaker 07a38b1b4e ASoC: fix trivial build error in mpc5200_dma.c
Add the obvious header to fix this:

sound/soc/fsl/mpc5200_dma.c:301: error: implicit declaration of function 'DMA_BIT_MASK'
sound/soc/fsl/mpc5200_dma.c:301: error: initializer element is not constant

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 14:56:30 +00:00
Joachim Eastwood 350e16d529 ASoC: replace 0xffffffff with DMA_BIT_MASK macro
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:26 +00:00
Joachim Eastwood 6296914cce ASoC: use proper defines for stream directions in pcm engines
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20 13:58:25 +00:00
Axel Lin 4c3c5df05e ASoC: fsl: Add .owner to struct snd_soc_card
Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22 17:34:32 +00:00
Timur Tabi 6132725eac ASoC: fsl/powerpc: don't rely on the cell-index property
Instead of using the 'cell-index' property in the I2C adapter node to
determine the adapter number, just query the i2c_adapter object directly.

Previously, the I2C nodes always appeared in cell-index order, so the
dynamic numbering coincided with the cell-index property.  With commit
ab827d97 ("powerpc/85xx: Rework P1022DS device tree"), the I2C nodes are
unintentionally reversed in the device tree, and so the machine driver
guesses the wrong I2C adapter number.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 10:37:18 +00:00
Timur Tabi a806aa9207 ASoC: p1022ds: add support for fsl,P1022 and fsl,P1022DS model names
Commit ab827d97 ("powerpc/85xx: Rework P1022DS device tree") renamed the
the /model property of the P1022DS device tree from "fsl,P1022" to
"fsl,P1022DS".  To support both old and new device trees, the ASoC
machine driver for the P1022DS needs to query the /model property and
update the platform driver object dynamically.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-02 10:37:17 +00:00
Axel Lin ba0a7e024d ASoC: Convert fsl directory to module_platform_driver
Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-28 17:23:21 +00:00
Lars-Peter Clausen 85e7652d89 ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:40:46 +00:00
Timur Tabi 380c883038 ASoC: mpc8610: tell the CS4270 codec that it's the master
Commit ac601555 ("ASoC: Return early with -EINVAL if invalid dai format is
detected") requires the machine driver to tell the CS4270 codec driver
whether the CS4270 should be configured for master or slave operation.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-22 23:06:25 +00:00
Timur Tabi 0f768a7235 ASoC: fsl_ssi: properly initialize the sysfs attribute object
Commit 6992f533 ("sysfs: Use one lockdep class per sysfs attribute")
requires 'struct attribute' objects to be initialized with sysfs_attr_init().

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-11-15 11:59:09 +00:00
Axel Lin d890a1a42d ASoC: fsl: Fix error handling if platform_device_add fails
Call platform_device_put() instead of platform_device_unregister() if
platform_device_add() fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-20 12:58:59 +01:00
Timur Tabi 5e538ecade ASoC: improve asynchronous mode support in the fsl_ssi driver
The Freescale SSI audio controller supports "synchronous" and "asynchronous"
modes.  In synchronous mode, playback and capture use the same input clock,
so sample rates must be the same during simultaneous playback and capture.
Unfortunately, the code which supports asynchronous mode is just broken in
various ways.  In particular, it was constraining sample sizes as well as
the sample rate.

The fix also allows us to simplify the code by eliminating the 'asynchronous',
'playback', and 'capture' variables that were used to keep track of playback
and capture streams.

Unfortunately, it turns out that simulataneous playback and record does not
actually work on the only platform that supports asynchronous mode: the
Freescale P1022DS reference board.  If a second stream is started, the SSI
grinds to halt for both streams.  This is true even if the P1022 is configured
for synchronous mode, so it's likely a hardware problem that needs to be
worked around.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16 00:05:29 +01:00
Mark Brown 1e3ad571d5 ASoC: Remove redundant -codec from WM8776 driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
2011-08-31 09:52:24 +01:00
Mark Brown b42af319f2 Merge branch 'for-3.1' into for-3.2 2011-08-24 20:22:43 +01:00
Timur Tabi 3bdf28feaf ASoC: MPC5200: replace of_device with platform_device
'struct of_device' no longer exists, and its functionality has been merged
into platform_device.  Update the MPC5200 audio DMA driver (mpc5200_dma)
accordingly.  This fixes a build break.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-08-24 20:22:05 +01:00
Mark Brown 09d930ae51 Merge branch 'for-3.1' into for-3.2 2011-08-22 23:33:01 +01:00
Julia Lawall c09f5ca7bd sound/soc/fsl/mpc8610_hpcd.c: add missing of_node_put
The first change is to add an of_node_put, since codec_np has previously
been allocated.  The rest of the patch reorganizes the error handling code
so the only code executed is that which is needed.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != of_node_put(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 of_node_put(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:29:17 +01:00
Julia Lawall 178b279b64 sound/soc/fsl/p1022_ds.c: add missing of_node_put
dma_channel_np has been accessed at this point, so decrease its reference
count before leaving the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@

(
if (...) { ... when != of_node_put(x)
               when != x = E3
               when != E3 = x
*  return ...;
 }
... when != x = E2
    when != I(...,x,...) S
if (...) { ... when != x = E4
 of_node_put(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:29:16 +01:00
Timur Tabi 81a081fff7 sound/soc/fsl/fsl_dma.c: add missing of_node_put
of_parse_phandle increments the reference count of np, so this should be
decremented before trying the next possibility.

Since we don't actually use np, we can decrement the reference count
immediately.

Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-22 23:26:33 +01:00
Timur Tabi 96af5c6a82 ASoC: fsl: fix build warning in fsl_dma
The previous patch to fsl_dma.c ("fix initialization of DMA buffers")
left behind an unused local variable that causes a build warning.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17 15:50:57 +09:00
Timur Tabi 1fab6cafc7 ASoC: claim the IRQ when the fsl_ssi device is probed, not opened
The PowerPC Freescale SSI driver is claiming the IRQ when the IRQ when
the device is opened, which means that the /proc/interrupts entry for
the SSI exists only during playback or capture.  This also meant that
the user won't know that the IRQ number is wrong until he tries to use
the device.  Instead, we should claim the IRQ when the device is probed.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-17 10:04:11 +09:00
Linus Torvalds d3ec4844d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)
2011-07-25 13:56:39 -07:00
Jiri Kosina b7e9c223be Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply pending patches that
are based on newer code already present upstream.
2011-07-11 14:15:55 +02:00
Jiri Kosina 323c9dd26b trivial: don't touch fsi_ssl.c with ioremap fixes
This is a partial revert of 28f65c11f2 ("treewide: Convert uses of
struct resource to resource_size(ptr)") as the code is rewritten
in the sound tree and thus the change is obsolete.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-14 10:40:40 +02:00
Joe Perches 28f65c11f2 treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.

Done via coccinelle scripts like:

@@
struct resource *ptr;
@@

- ptr->end - ptr->start + 1
+ resource_size(ptr)

and some grep and typing.

Mostly uncompiled, no cross-compilers.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-10 14:55:36 +02:00
Mark Brown bf564ea997 Merge branch 'for-3.0' into for-3.1 2011-06-09 12:02:26 +01:00
Timur Tabi 147dfe90f7 ASoC: p1022ds: fix incorrect referencing of device tree properties
Device tree integer properties are encoded in big-endian format, but some of
the Freescale ASoC drivers were assuming that the host is in big-endian format
as well.  Although this is true, it's better to use endian-safe accessors.

Also add a check for a failed ioremap() call in the SSI driver.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 12:02:08 +01:00
Timur Tabi 0cd114fff9 ASoC: fsl: fix initialization of DMA buffers
The DMA (PCM) driver used by some Freescale PowerPC supports separate DAIs
for playback and capture, so DMA buffers should be allocated only for the
initialized streams.  Instead of checking for the number of active channels,
which apparently is not reliable, check to see if the actual stream object
exists.

Also provide a better name for the DMA interrupt.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-09 11:53:11 +01:00
Liam Girdwood 552d1ef6b5 ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.

Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Linus Torvalds d3e458d781 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (308 commits)
  ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
  ALSA: aloop - Fix possible IRQ lock inversion
  ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
  ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
  ALSA: firewire - msleep needs delay.h
  ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
  ALSA: firewire-lib: allocate DMA buffer separately
  ALSA: firewire-lib: use no-info SYT for packets without SYT sample
  ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
  ALSA: hda - Remove an unused variable in patch_realtek.c
  ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
  ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
  ALSA: hda - Move default input-src selection to init part
  ALSA: hda - Initialize special cases for input src in init phase
  ALSA: ctxfi - Clear input settings before initialization
  ALSA: ctxfi - Fix SPDIF status retrieval
  ALSA: ctxfi - Fix incorrect SPDIF status bit mask
  ALSA: ctxfi - Fix microphone boost codes/comments
  ALSA: atiixp - Fix wrong time-out checks during ac-link reset
  ALSA: intel8x0m: append 'm' to "r_intel8x0"
  ...
2011-03-18 10:46:37 -07:00
Grant Likely f07eb223a0 dt/sound: Eliminate users of of_platform_{,un}register_driver
Get rid of users of of_platform_driver in drivers/sound.  The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-02-28 13:22:44 -07:00
Mark Brown e7361ec499 ASoC: Replace pdev with card in machine driver probe and remove
In order to support cards instantiated without using soc-audio remove
the use of the platform device in the card probe() and remove() ops.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 11:56:13 +00:00
Axel Lin 39a545559f ASoC: Add missing dev_set_drvdata in p1022_ds_probe
Otherwise, calling dev_get_drvdata in p1022_ds_remove returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin 67bd489aa3 ASoC: Add missing dev_set_drvdata in mpc8610_hpcd_probe
Otherwise, calling dev_get_drvdata in mpc8610_hpcd_remove returns NULL.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-29 18:28:53 +00:00
Axel Lin 917dac0ff1 ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:08:25 +00:00
Axel Lin 4e1f865097 ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 11:08:13 +00:00
Jesper Juhl 92a5288501 ASoC: MPC5200: Eliminate duplicate include of of_device.h
Eliminate duplicate  #include <linux/of_device.h>  from
sound/soc/fsl/mpc5200_dma.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-23 14:28:39 +00:00
Axel Lin 1ebd0061ed ASoC: Return proper error if snd_soc_register_dais fails in psc_i2s_of_probe
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-08 16:28:33 +00:00
Liam Girdwood e94be5f362 ASoC: fsl - fix build error in pcm030-audio-fabric.c
Fix build error:-

sound/soc/fsl/pcm030-audio-fabric.c:27:33: fatal error:
sound/soc-of-simple.h: No such file or directory

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-26 21:28:56 +02:00
Julia Lawall 880b8ffd45 ASoC: pl022_ds.c: Add of_node_put to avoid memory leak
Add a call to of_node_put in the error handling code following a call to
of_parse_phandle.

This patch also moves the existing call to of_node_put tothe end of the
error handling code, to make it possible to jump to of_node_put without
doing the other cleanup operations.  These appear to be disjoint
operations, so the ordering doesn't matter.

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

// <smpl>
@r exists@
local idexpression x;
expression E,E1,E2;
statement S;
@@

*x =
(of_find_node_by_path
|of_find_node_by_name
|of_find_node_by_phandle
|of_get_parent
|of_get_next_parent
|of_get_next_child
|of_find_compatible_node
|of_match_node
|of_find_node_by_type
|of_find_node_with_property
|of_find_matching_node
|of_parse_phandle
)(...);
...
if (x == NULL) S
<... when != x = E
*if (...) {
  ... when != of_node_put(x)
      when != if (...) { ... of_node_put(x); ... }
(
  return <+...x...+>;
|
*  return ...;
)
}
...>
(
E2 = x;
|
of_node_put(x);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.uo.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-09-02 16:28:49 +01:00
Timur Tabi 38fec7272b ASoC: mpc8610: replace of_device with platform_device
'struct of_device' no longer exists, and its functionality has been merged
into platform_device.  Update the MPC8610 HPCD audio drivers (fsl_ssi, fsl_dma,
and mpc8610_hpcd) accordingly.

Also add a #include for slab.h, which is now needed for kmalloc and kfree.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-20 17:19:44 +01:00
Mark Brown bf557a50f5 Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into for-2.6.37 2010-08-20 17:19:27 +01:00
Timur Tabi 27ef3744f8 ASoC: add support for the Freescale P1022 DS reference board
The Freescale P1022 is a dual-core e500-based SOC with multimedia capabilities,
specifically the same SSI audio controller on the MPC8610.  The P1022 DS
reference board includes a P1022 and a Wolfson Microelectronics WM8776
codec.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-20 12:14:48 +01:00
Timur Tabi c04019d450 ASoC: add support for separate codec DAIs to the fsl_dma driver
Some codecs have separate DAIs for playback and capture, so the DMA driver
should allocate a DMA buffer only for the streams that are valid when the
driver is opened.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-20 12:14:45 +01:00
Timur Tabi 8e9d869028 asoc/multi-component: fsl: add support for variable SSI FIFO depth
Add code that programs the DMA and SSI controllers differently based on the
FIFO depth of the SSI.

The SSI devices on the MPC8610 and the P1022 are identical in every way except
one: the transmit and receive FIFO depth.  On the MPC8610, the depth is eight.
On the P1022, it's fifteen.  The device tree nodes for the SSI include a
"fsl,fifo-depth" property that specifies the FIFO depth.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-18 20:28:02 +01:00
Mark Brown e4862f2f6f Merge branch 'for-2.6.36' into for-2.6.37
Fairly simple conflicts, the most serious ones are the i.MX ones which I
suspect now need another rename.

Conflicts:
	arch/arm/mach-mx2/clock_imx27.c
	arch/arm/mach-mx2/devices.c
	arch/arm/mach-omap2/board-rx51-peripherals.c
	arch/arm/mach-omap2/board-zoom2.c
	sound/soc/fsl/mpc5200_dma.c
	sound/soc/fsl/mpc5200_dma.h
	sound/soc/fsl/mpc8610_hpcd.c
	sound/soc/pxa/spitz.c
2010-08-16 18:42:58 +01:00
Linus Torvalds 58d4ea65b9 Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
  mmc_spi: Fix unterminated of_match_table
  of/sparc: fix build regression from of_device changes
  of/device: Replace struct of_device with struct platform_device
2010-08-12 09:11:31 -07:00
Timur Tabi ff71334a46 asoc/multi-component: fsl: add support for disabled SSI nodes
Add support for adding "status = disabled" to an SSI node to incidate that it
is not wired on the board.  This replaces the not-so-intuitive previous method
of omitting a codec-handle property.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:17 +01:00
Timur Tabi 87a0632b29 asoc/multi-component: fsl: fix exit and error paths in DMA and SSI drivers
The error handling code in the OF probe function of the SSI driver is not
freeing all resources correctly.

Since the machine driver no longer calls the DMA driver to provide information
about the SSI, we don't need to keep a list of DMA objects any more.  In
addition, the fsl_soc_dma_remove() function is incorrectly removing *all*
DMA objects when it should only remove one.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:17 +01:00
Timur Tabi 1a3c5a491a asoc/multi-component: fsl: add support for 36-bit physical addresses
Update the DMA driver used by the Freescale MPC8610 HPCD audio driver to
support 36-bit physical addresses, for both DMA buffers and the SSI registers.

The DMA driver calls snd_dma_alloc_pages() to allocate the DMA buffers for
playback and capture.  This function is just a front-end for
dma_alloc_coherent().  Currently, dma_alloc_coherent() only allocates buffers
in low memory (it ignores GFP_HIGHMEM), so we never actually get a DMA buffer
with a real 36-bit physical address.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:16 +01:00
Timur Tabi 6e6f66226f powerpc: rename immap_86xx.h to fsl_guts.h, and add 85xx support
The immap_86xx.h header file only defines one data structure: the "global
utilities" register set found on Freescale PowerPC SOCs.  Rename this file
to fsl_guts.h to reflect its true purpose, and extend it to cover the "GUTS"
register set on 85xx chips.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:15 +01:00
Liam Girdwood f0fba2ad1b ASoC: multi-component - ASoC Multi-Component Support
This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

 struct snd_soc_codec    --->  struct snd_soc_codec (device data)
                          +->  struct snd_soc_codec_driver (driver data)

 struct snd_soc_platform --->  struct snd_soc_platform (device data)
                          +->  struct snd_soc_platform_driver (driver data)

 struct snd_soc_dai      --->  struct snd_soc_dai (device data)
                          +->  struct snd_soc_dai_driver (driver data)

 struct snd_soc_device   --->  deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

 * Stream operations now de-reference less structures.
 * close_delayed work() now runs on a DAI basis rather than looping all DAIs
   in a card.
 * PM suspend()/resume() operations can now handle N CODECs and Platforms
   per sound card.
 * Added soc_bind_dai_link() to bind the component devices to the sound card.
 * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
   DAI link components.
 * sysfs entries can now be registered per component per card.
 * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
 * snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

 o Make CODEC driver a platform driver
 o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
 o Removed all static codec pointers (drivers now support > 1 codec dev)
 o snd_soc_register_pcms() now done by core.
 o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:00 +01:00
Benjamin Herrenschmidt 8b449d1f13 Merge remote branch 'gcl/next' into next 2010-08-09 11:23:58 +10:00
Linus Torvalds faa38b5e0e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits)
  ALSA: hda - Add pin-fix for HP dc5750
  ALSA: als4000: Fix potentially invalid DMA mode setup
  ALSA: als4000: enable burst mode
  ALSA: hda - Fix initial capsrc selection in patch_alc269()
  ASoC: TWL4030: Capture route runtime DAPM ordering fix
  ALSA: hda - Add PC-beep whitelist for an Intel board
  ALSA: hda - More relax for pending period handling
  ALSA: hda - Define AC_FMT_* constants
  ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
  ALSA: hda - Add support for HDMI HBR passthrough
  ALSA: hda - Set Stream Type in Stream Format according to AES0
  ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
  ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
  ASoC: wm9081: fix resource reclaim in wm9081_register error path
  ASoC: wm8978: fix a memory leak if a wm8978_register fail
  ASoC: wm8974: fix a memory leak if another WM8974 is registered
  ASoC: wm8961: fix resource reclaim in wm8961_register error path
  ASoC: wm8955: fix resource reclaim in wm8955_register error path
  ASoC: wm8940: fix a memory leak if wm8940_register return error
  ASoC: wm8904: fix resource reclaim in wm8904_register error path
  ...
2010-08-07 17:07:31 -07:00
Eric Millbrandt 949ad0a783 sound/soc: mpc5200_psc_ac97: Use gpio pins for cold reset
Call the gpio reset platform function instead of using the flawed
ac97 functionality of the MPC5200(b)

From MPC5200B User's Manual:
"Some AC97 devices goes to a test mode, if the Sync line is high
during the Res line is low (reset phase). To avoid this behavior the
Sync line must be also forced to zero during the reset phase. To do
that, the pin muxing should switch to GPIO mode and the GPIO control
register should be used to control the output lines."

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-08-06 20:49:19 -06:00
Grant Likely 2dc1158137 of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely.  Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
2010-08-06 09:25:50 -06:00
Takashi Iwai e71981343a Merge branch 'topic/asoc' into for-linus 2010-08-05 11:17:01 +02:00
Jiri Kosina d790d4d583 Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
Jiri Kosina f1bbbb6912 Merge branch 'master' into for-next 2010-06-16 18:08:13 +02:00
Uwe Kleine-König 421f91d21a fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-06-16 18:05:05 +02:00
Grant Likely f487537c2b powerpc/5200: Fix build error in sound code.
Compiling in the MPC5200 sound drivers results in the following build error:

sound/soc/fsl/mpc5200_psc_ac97.o: In function `to_psc_dma_stream':
mpc5200_psc_ac97.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
sound/soc/fsl/efika-audio-fabric.o: In function `to_psc_dma_stream':
efika-audio-fabric.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
make[3]: *** [sound/soc/fsl/built-in.o] Error 1
make[2]: *** [sound/soc/fsl] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

This patch fixes it by declaring the inline function in the header file to
also be a static.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Jon Smirl <jonsmirl@gmail.com>
Tested-by: John Hilmar Linkhorst <John.Linkhorst@rwth-aachen.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-15 14:47:04 -06:00
Grant Likely 4e8680f56b ASoC: Remove unused header from MPC5200 PSC driver
The header contains an extern that isn't used by anything.  Remove.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-06-12 18:06:14 +01:00
Grant Likely 4018294b53 of: Remove duplicate fields from of_platform_driver
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver.  This patch is a removes the extra copies from struct
of_platform_driver and converts all users to the device_driver members.

This patch is a pretty mechanical change.  The usage model doesn't change
and if any drivers have been missed, or if anything has been fixed up
incorrectly, then it will fail with a compile time error, and the fixup
will be trivial.  This patch looks big and scary because it touches so
many files, but it should be pretty safe.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
2010-05-22 00:10:40 -06:00
Grant Likely 61c7a080a5 of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated.  This patch
makes all readers of these elements use device.of_node instead.

(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-05-18 16:10:44 -06:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Grant Likely 71a157e8ed of: add 'of_' prefix to machine_is_compatible()
machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Michal Simek <monstr@monstr.eu>
2010-02-09 08:33:00 -07:00
Grant Likely a68cc8daeb ASoC: mpc5200: remove duplicate identical IRQ handler
The TX and RX irq handlers are identical.  Merge them

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-10 13:02:01 +00:00
Grant Likely c939e5c821 ASoC/mpc5200: fix enable/disable of AC97 slots
The MPC5200 AC97 driver is disabling the slots when a stop
trigger is received, but not reenabling them if the stream
is started again without processing the hw_params again.

This patch fixes the problem by caching the slot enable bit
settings calculated at hw_params time so that they can be
reapplied every time the start trigger is received.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:09 +00:00
Grant Likely 1d8222e8df ASoC/mpc5200: add to_psc_dma_stream() helper
Move the resolving of the psc_dma_stream pointer to a helper function
to reduce duplicate code

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:09 +00:00
Grant Likely c487827475 ASoC/mpc5200: Improve printk debug output for trigger
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00
Grant Likely d56b6eb6df ASoC/mpc5200: get rid of the appl_ptr tracking nonsense
Sound drivers PCM DMA is supposed to free-run until told to stop
by the trigger callback.  The current code tries to track appl_ptr,
to avoid stale buffer data getting played out at the end of the
data stream.  Unfortunately it also results in race conditions
which can cause the audio to stall.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00
Grant Likely 8f159d720b ASoC/mpc5200: Track DMA position by period number instead of bytes
All DMA blocks are lined up to period boundaries, but the DMA
handling code tracks bytes instead.  This patch reworks the code
to track the period index into the DMA buffer instead of the
physical address pointer.  Doing so makes the code simpler and
easier to understand.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-07 12:40:08 +00:00