Commit graph

305 commits

Author SHA1 Message Date
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
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
Philipp Zabel 50d4a790e6 ASoC: imx-sgtl5000: Fix uninitialized pointer use in error path
This patch avoids to dereference the uninitialized data pointer if the
error path is entered before devm_kzalloc is called (or if the allocation
fails). It fixes the following warning:

    sound/soc/fsl/imx-sgtl5000.c: In function 'imx_sgtl5000_probe':
    sound/soc/fsl/imx-sgtl5000.c:175:18: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 12:01:32 +01:00
Philipp Zabel a8b22c1ccc ASoC: imx-sgtl5000: do not use devres on a foreign device
Calling devm_clk_get with any device pointer other than our own confuses
devres. Use clk_get instead. This avoids hitting the following warning in
the imx-sgtl5000 error path:

imx-sgtl5000 sound.12: snd_soc_register_card failed (-517)
platform sound.12: Driver imx-sgtl5000 requests probe deferral
------------[ cut here ]------------
WARNING: CPU: 0 PID: 75 at drivers/base/dd.c:272 driver_probe_device+0x194/0x218()
Modules linked in: snd_soc_sgtl5000(+) snd_soc_imx_sgtl5000 coda snd_soc_imx_audmux imx_sdma snd_soc_fsl_spdif snd_soc_fsl_ssi
CPU: 0 PID: 75 Comm: udevd Not tainted 3.11.0-rc6+ #4682
Backtrace:
[<80010bc4>] (dump_backtrace+0x0/0x10c) from [<80010d60>] (show_stack+0x18/0x1c)
 r6:00000110 r5:00000009 r4:00000000 r3:00000000
[<80010d48>] (show_stack+0x0/0x1c) from [<804f0764>] (dump_stack+0x20/0x28)
[<804f0744>] (dump_stack+0x0/0x28) from [<8001a4a4>] (warn_slowpath_common+0x6c/0x8c)
[<8001a438>] (warn_slowpath_common+0x0/0x8c) from [<8001a4e8>] (warn_slowpath_null+0x24/0x2c)
 r8:7f032000 r7:7f02f93c r6:cf8eaa54 r5:cf8eaa20 r4:80728a0c
[<8001a4c4>] (warn_slowpath_null+0x0/0x2c) from [<80286bdc>] (driver_probe_device+0x194/0x218)
[<80286a48>] (driver_probe_device+0x0/0x218) from [<80286cf4>] (__driver_attach+0x94/0x98)
 r7:00000000 r6:cf8eaa54 r5:7f02f93c r4:cf8eaa20
[<80286c60>] (__driver_attach+0x0/0x98) from [<802851c8>] (bus_for_each_dev+0x5c/0x90)
 r6:80286c60 r5:7f02f93c r4:00000000 r3:cf8ef03c
[<8028516c>] (bus_for_each_dev+0x0/0x90) from [<80286654>] (driver_attach+0x24/0x28)
 r6:806d0424 r5:cf16a580 r4:7f02f93c
[<80286630>] (driver_attach+0x0/0x28) from [<802861e4>] (bus_add_driver+0xdc/0x234)
[<80286108>] (bus_add_driver+0x0/0x234) from [<802871d4>] (driver_register+0x80/0x154)
 r8:7f032000 r7:00000001 r6:7f02fa68 r5:7f02fa74 r4:7f02f93c
[<80287154>] (driver_register+0x0/0x154) from [<8033c278>] (i2c_register_driver+0x34/0xbc)
[<8033c244>] (i2c_register_driver+0x0/0xbc) from [<7f032018>] (sgtl5000_i2c_driver_init+0x18/0x24 [snd_soc_sgtl5000])
 r5:7f02fa74 r4:cfb7ff48
[<7f032000>] (sgtl5000_i2c_driver_init+0x0/0x24 [snd_soc_sgtl5000]) from [<80008738>] (do_one_initcall+0xf4/0x150)
[<80008644>] (do_one_initcall+0x0/0x150) from [<80053f64>] (load_module+0x174c/0x1db4)
[<80052818>] (load_module+0x0/0x1db4) from [<800546ac>] (SyS_init_module+0xe0/0xf4)
[<800545cc>] (SyS_init_module+0x0/0xf4) from [<8000e540>] (ret_fast_syscall+0x0/0x30)
 r6:00005b22 r5:00afed68 r4:00000000
---[ end trace b24c5c3bb145dbdd ]---

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 12:01:17 +01:00
Linus Torvalds decf7abcc9 sound fixes for 3.12-rc1
A few last-minute fixes for 3.12-rc1.  All patches are driver specific.
 
 - HD-audio fixes: MacBook 6,1/6,2 speaker fix, ASUS TX300 dock speaker
   fix, Toshiba Satellite irq fix, Haswell HDMI audio cleanups)
 
 - ASoC fixes: atmel irq fix, fsl DT fix, mc13783 spi fix, kirkwood
   compatible string change, etc
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJSMWJeAAoJEGwxgFQ9KSmkkLsP/RMeleT18hbZEhdSZsJaqErg
 p6Dk59fb28HrQrY/ECcZnBChGFgCagS316lBjuEkDtQmZdhYtIDHV9r/udV4MbFc
 rX4IVNv1JerpCyZu4pC0yngHiEX3NMBmu204RJBC8vzJt3fupTFIioliNQlmMuiR
 k6Kb9kGmNHLtA7LwshHwNs8JwXEJHUcnsBGdPB0BUy8BpZ8FVTIOvuBixpxv9kXm
 +n80KRhY/YBjpU+bTvGTgJhH7U3BXylU20q5cO2ukv8vW79LGNZ0XA5Rnerrlr/F
 fvDzg+liOEV8ijchfS9rhs28J+4ICHmFkY/rj7QFpVpP9xYfpqhvw93KmIACirDX
 DlJt63fOJuHbGEv5cGjAmdZXcKONoD9fG11CKDj46Fm4borNy7DdfmMLxNM3xo5q
 rxbgUWplCDHFRALXATJ3t8Occz71l2W+GjklmI7td8K5SD6JCzSI1GdR4YVVf76B
 Wd6AM3wpIGKdjCwZvT5jDBb/4O8ZMtOqEhxvBKI1eO4l+A3UbqWlBKyncfvpKBqY
 yHTBIOgF5QdtUMVSI0/hb64nzmOGHLAWxQoCZssvSFEV6P+jodrqGGayxvbM+6rU
 YR2w2omh+6UkacQvjyVWGehBHiYCECfl0kk9XmPVkIGgHmOdgvkv1/MMbPeEcoXv
 z2YGcgbOIBpNrLcgTev4
 =fKdg
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "A few last-minute fixes for 3.12-rc1.  All patches are driver
  specific.

   - HD-audio fixes: MacBook 6,1/6,2 speaker fix, ASUS TX300 dock
     speaker fix, Toshiba Satellite irq fix, Haswell HDMI audio
     cleanups)

   - ASoC fixes: atmel irq fix, fsl DT fix, mc13783 spi fix, kirkwood
     compatible string change, etc"

* tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: mc13783: add spi errata fix
  ASoC: rsnd: fixup flag name of rsnd_scu_platform_info
  ALSA: hda - Add CS4208 codec support for MacBook 6,1 and 6,2
  ALSA: hda - Add Toshiba Satellite C870 to MSI blacklist
  ASoC: fsl_spdif: Select regmap-mmio
  ALSA: hda - unmute pin amplifier in infoframe setup for Haswell
  ALSA: hda - define is_haswell() to check if a display audio codec is Haswell
  ALSA: hda - Add dock speaker support for ASUS TX300
  ASoC: kirkwood: change the compatible string of the kirkwood-i2s driver
  ASoC: atmel: disable error interrupt
  ASoC: fsl: imx-audmux: Do not call imx_audmux_parse_dt_defaults() on non-dt kernel
2013-09-12 08:52:41 -07:00
Mark Brown 4345adf92d ASoC: fsl_spdif: Select regmap-mmio
The S/PDIF driver needs regmap so select it to make sure it gets
included in the build.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-08 18:21:18 +01:00
Linus Torvalds 00341b5301 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang:
 "Highlights:

   - OF and ACPI helpers are now included in the core, and not in
     external files anymore.  This removes dependency problems for
     modules and is cleaner, in general.
   - mv64xxx-driver gains fifo usage to support mv78230
   - imx-driver overhaul to support VF610
   - various cleanups, most notably related to devm_* and CONFIG_PM
     usage
   - driver bugfixes and smaller feature additions"

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (51 commits)
  i2c: rcar: add rcar-H2 support
  i2c: sirf: retry 3 times as sometimes we get random noack and timeout
  i2c: sirf: support reverse direction of address
  i2c: sirf: fix the typo for setting bitrate to less than 100k
  i2c: sirf: we need to wait I2C_RESET status in resume
  i2c: sirf: reset i2c controller early after we get a noack
  i2c: designware: get SDA hold time, HCNT and LCNT configuration from ACPI
  i2c: designware: make HCNT/LCNT values configurable
  i2c: mpc: cleanup clock API use
  i2c: pnx: fix error return code in i2c_pnx_probe()
  i2c: ismt: add error return code in probe()
  i2c: mv64xxx: fix typo in binding documentation
  i2c: imx: use exact SoC revision to document binding
  i2c: move ACPI helpers into the core
  i2c: move OF helpers into the core
  i2c: mv64xxx: Fix timing issue on Armada XP (errata FE-8471889)
  i2c: mv64xxx: Add I2C Transaction Generator support
  i2c: powermac: fix return path on error
  Documentation: i2c: Fix example in instantiating-devices
  i2c: tiny-usb: do not use stack as URB transfer_buffer
  ...
2013-09-05 09:31:03 -07:00
Fabio Estevam bae35992af ASoC: fsl: imx-audmux: Do not call imx_audmux_parse_dt_defaults() on non-dt kernel
Booting a mx51babbage board with a non-dt kernel leads to the following crash:

Unable to handle kernel NULL pointer dereference at virtual address 0000001c
pgd = 80004000
[0000001c] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.11.0-next-20130903 #287
task: 9f860000 ti: 9f862000 task.ti: 9f862000
PC is at of_get_next_available_child+0x5c/0x68
LR is at of_get_next_available_child+0x1c/0x68
pc : [<8043ea58>]    lr : [<8043ea18>]    psr: 60000193
sp : 9f863d58  ip : 00000000  fp : 9f863d74
r10: 9f89a010  r9 : 9f862000  r8 : 807bb26c
r7 : 80615d5c  r6 : 00000000  r5 : 60000113  r4 : 00000000
r3 : 00000000  r2 : 808770a4  r1 : 00000011  r0 : 60000113
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387d  Table: 90004019  DAC: 00000017
Process swapper/0 (pid: 1, stack limit = 0x9f862240)
Stack: (0x9f863d58 to 0x9f864000)

This is caused by commit 8548a464b9 (ASoC: imx-audmux: Read default
configuration from devicetree).

In order to fix this, add a check for 'of_id' so that
imx_audmux_parse_dt_defaults() only gets called when a dt kernel is running.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-04 00:20:00 +01:00
Mark Brown 6b4c80f947 ASoC: fsl_spdif: Staticse non-exported symbols
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Nicolin Chen <B42378@freescale.com>
2013-09-01 12:52:25 +01:00
Nicolin Chen 8626bdf05e ASoC: fsl: Add one blank space after ':=' in Makefile
There is a blank space missing between ':=' and 'imx-spdif.o', thus add it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-30 23:01:18 +01:00
Nicolin Chen 8a309d71ed ASoC: fsl: Add wrapping for dev_dbg() in fsl_spdif.c
Add wrapping '\n' for dev_dbg() in fsl_spdif.c

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-30 23:01:18 +01:00
Fabio Estevam 2f82cdbafd ASoC: fsl: Drop SND_SOC_FSL_UTILS from SND_SOC_IMX_SPDIF
SND_SOC_FSL_UTILS is only used by PowerPC machines, so let's drop it in the
i.mx case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-30 11:00:55 +01:00
Wei Yongjun bfd7d1aa3b ASoC: fsl_spdif: remove redundant dev_err call in fsl_spdif_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 13:17:52 +01:00
Nicolin Chen 2a956ec04b ASoC: fsl: Add S/PDIF machine driver
This patch implements a device-tree-only machine driver for Freescale
i.MX series Soc. It works with spdif_transmitter/spdif_receiver and
fsl_spdif.c drivers.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 13:15:26 +01:00
Fabio Estevam f61df38428 ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()
Driver core clears the driver data to NULL after device_release or on probe
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 20:41:59 +01:00
Fabio Estevam 6d22db43cf ASoC: fsl_spdif: Reduce the noise on comments
Remove the "====" pattern to let the comments cleaner and more uniform.

Also, do not use multi-line style for a single line comment.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 12:53:13 +01:00
Fabio Estevam 5af407cd36 ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
Driver core clears the driver data to NULL after device_release or on probe
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 12:50:42 +01:00
Wolfram Sang 687b81d083 i2c: move OF helpers into the core
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-08-23 10:22:20 +02:00
Michael Grzeschik f037708654 ASoC: fsl: disable ssi irq for imx
We have to disable the ssi irq, as it is not safe for all platforms to
write back into the status register. It also runs into non-linefetch
aborts.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:11:20 +01:00
Michael Grzeschik 9b443e3d89 ASoC: fsl-ssi: imx-pcm-fiq bugfix
imx-pcm-fiq is checking for TE RE bits, so enable them only if
necessary.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:10:25 +01:00
Steffen Trumtrar f8fdf5375e ASoC: fsl-ssi: add SSIEN errata work around
The chip errata for the i.MX35, Rev.2 has the following errata:

ENGcm06222: SSI:Transmission does not take place in bit length early frame sync
	    configuration

The workaround states, that TX_EN and SSI_EN bits should be set in the same
register write. As the next errata in the document (ENGcm06532) says to always
write RX_EN and TX_EN in the same register write in network mode.

Therefore include the whole write to
	CCSR_SSI_SCR_TE and CCSR_SSI_SCR_RE
into the write to
	CCSR_SSI_SCR_SSIEN

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:09:52 +01:00
Markus Pargmann cd7f0295aa ASoC: fsl-ssi: ac97-slave support
This patch adds ac97-slave support.

For ac97, the registers have to be setup earlier than for other ssi
modes because there is some communication with the external device
before streaming. So this patch introduces a fsl_ssi_setup function to
setup the registers for different ssi operation modes seperately.

This patch was tested with imx27-pca100.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:09:10 +01:00
Nicolin Chen a2388a498a ASoC: fsl: Add S/PDIF CPU DAI driver
This patch implements a device-tree-only CPU DAI driver for Freescale
S/PDIF controller that supports stereo playback and record feature.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 10:45:22 +01:00
Fabio Estevam 0783e64898 ASoC: fsl: fsl_ssi: Fix the order of resources removal
In fsl_ssi_remove() we need to remove the resources in the opposite order that
they were acquired in probe.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20 11:47:04 +01:00
Mark Brown 3c1c32d376 ASoC: imx: Add MODULE_LICENSE to DMA drivers
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-19 14:31:02 +01:00
Fabio Estevam 70a39b930f ASoC: fsl: Drop SND_SOC_FSL_UTILS from i.mx machine code
SND_SOC_FSL_UTILS is only used by PowerPC machines, so let's drop it in the
i.mx case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-18 16:28:47 +01:00
Markus Pargmann 74b77b1510 ASoC: imx-audmux: Move definitions to dt-bindings
Move imx-audmux macro definitions to include/dt-bindings, so they can be
used for devicetree.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-16 11:05:17 +01:00
Markus Pargmann 9c0aeaa384 ASoC: imx-audmux: default configuration parser fixups
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-11 11:59:27 +01:00
Fabio Estevam 9f19de649f ASoC: imx-mc13783: Make SND_SOC_IMX_MC13783 visible again
Commit 02502da45 (ASoC: imx-mc13783: Depend on ARCH_ARM) introduced 'ARCH_ARM'
as a dependency for SND_SOC_IMX_MC13783, but this is a non-existent symbol.

This makes the selection of SND_SOC_IMX_MC13783 to be impossible.

Use the correct 'ARM' symbol instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 23:57:06 +01:00
Markus Pargmann 3a5e517bb2 ASoC: fsl-ssi: Use generic DMA bindings if possible
There may be some platforms using fsl-ssi that do not have a DMA driver
with generic DMA bindings. So this patch adds support for the generic
DMA bindings, while still accepting the old "fsl,dma-events" property if
"dmas" is not found.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:59:29 +01:00
Markus Pargmann de623ece5b ASoC: fsl-ssi: Add support for imx-pcm-fiq
Add support for non-dma pcm for imx platforms with imx-pcm-fiq support.
Instead of imx-pcm-audio, in this case imx-pcm-fiq-audio device is added
and the SIER flags are set differently.

We need imx-pcm-fiq for some boards that use an incompatible codec.
imx-pcm-fiq handles those codecs differently and allows to operate with
them. DMA is not possible because some data sent by the codecs, e.g.
wm9712, is not in the datastream. Also some data is mixed up in the
fifos, so that we need to sort them out manually.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:57:24 +01:00
Markus Pargmann 8548a464b9 ASoC: imx-audmux: Read default configuration from devicetree
Adds a function to parse a default port configuration from devicetree.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:57:24 +01:00
Fabio Estevam 3f1a91aa25 ASoC: fsl: Fix module build
Building imx_v6_v7_defconfig with all audio drivers as modules results in
the folowing build error:

ERROR: "imx_pcm_fiq_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_fiq_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-imx-ssi.ko] undefined!
ERROR: "imx_pcm_dma_init" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!
ERROR: "imx_pcm_dma_exit" [sound/soc/fsl/snd-soc-fsl-ssi.ko] undefined!

Fix this by allowing SND_SOC_IMX_PCM_FIQ and SND_SOC_IMX_PCM_DMA to be also
built as modules and by using 'IS_ENABLED' to cover the module case.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-31 14:59:11 +01:00
Nicolin Chen 32bd8cd257 ASoC: fsl: Set sdma peripheral type directly
Let CPU DAI drivers set SDMA periperal type directly to support more
dma types(SPDIF, ESAI) other than only two for SSI.
This will easily allow some non-SSI drivers to use the imx-pcm-dma
as well.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-25 20:11:27 +01:00
Fabio Estevam 72192366f4 ASoC: fsl: imx-audmux: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 00:58:36 +01:00
Fabio Estevam f3142807fd ASoC: fsl: fsl_ssi: Add MODULE_ALIAS
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tavi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 00:54:46 +01:00
Mark Brown 0a9eaa39db ASoC: fsl_ssi: Provide register I/O functions by default
Use the ARM version by default as that's the more generally portable
one, it doesn't matter if they work well on random platforms when the
goal is only build coverage.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Timur Tabi <timur@tabi.org>
2013-07-19 13:05:06 +01:00
Fabio Estevam d8a14e302f ASoC: fsl: imx-wm8962: Fix error path
If the 'failed to find codec platform device' error path is executed, it should
jump to 'fail' label instead of returning an error immediately.

'fail' label will then free the ssi_np and codec_np previously acquired nodes.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18 21:51:14 +01:00
Mark Brown 02502da457 ASoC: imx-mc13783: Depend on ARCH_ARM
The driver uses the machine type macros so depends on ARM.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-18 10:46:29 +01:00
Fabio Estevam ede32d3a23 ASoC: fsl: fsl_ssi: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17 11:03:54 +01:00
Fabio Estevam b0a4747a5d ASoC: fsl: fsl_ssi: Use devm_ functions
Using devm_ functions can make the code cleaner and smaller.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17 11:03:54 +01:00
Wei Yongjun f1269ae41f ASoC: imx-sgtl5000: fix error return code in imx_sgtl5000_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16 14:29:28 +01:00
Mark Brown a1df5c2b31 ASoC: imx: Enable COMPILE_TEST builds
Since DT based boards don't have any dependency on arch/arm enable them
if COMPILE_TEST is enabled.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
2013-07-16 13:51:04 +01:00
Nicolin Chen b2c119b0bb ASoC: fsl: Disable SSI in trigger() if RE/TE are both cleared
The code enabled SSIEN when triggered by SNDRV_PCM_TRIGGER_START,
so move the disable code to SNDRV_PCM_TRIGGER_STOP for symmetric.

This also allows us to use the SSI driver more flexible so that
it can support some use cases like "aplay S16_LE.wav S24_LE.wav"
which would call the driver in sequence like:
 startup()->hw_params(S16_LE)->trigger(START)->tirgger(STOP)->
 hw_params(S24_LE)->trigger(START)->tirgger(STOP)->shutdown()

If we disable SSIEN in shutdown(), the second hw_params() would
bypass the sample bits setting while using symmetric_rate.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15 11:10:37 +01:00
Markus Pargmann 9051cba110 ASoC: imx-pcm-fiq: Introduce pcm-fiq-params
Cleaner parameter passing for imx-pcm-fiq. Create a seperated fiq-params
struct to pass all arguments.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15 11:10:36 +01:00
Markus Pargmann c364796a47 ASoC: imx-pcm-dma: DT support
This patch removes the NO_DT flag. The pdev pointer may have a proper
of_node with the dmas property, so we can use it to request DMA
channels.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15 11:10:36 +01:00
Wei Yongjun 7464dcd061 ASoC: imx_mc13783: add .owner to struct snd_soc_card
Add missing .owner of struct snd_soc_card. This prevents the
module from being removed from underneath its users.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15 11:10:36 +01:00
Takashi Iwai 38f0ad7c90 ASoC: Updates for v3.11
A few small fixes, all driver specific.  The removal of the GPIO based
 pinmuxing is a bug fix, since the obsolete nodes had been removed from
 the DT it stopped the driver loading.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIbBAABAgAGBQJR1pSAAAoJELSic+t+oim9UCkP9it8xj9B7aXZZPPSuAAMkB6o
 SPc3dluSqmrhGpMo4C8DAEgkRg8bmNTjK8asL47z/3XXT64HO32fPXsnBZcH+eRl
 7PNGVGmKpKdyS63DinonzSadvb/zudYa0UOSC8sdPtNtdQvOiKSOYLYijWBBATGd
 mvQ8ZlOIc7TzDDuCU8MdwvJwWaT6WgNV6dkcqwsCbAKP4e6fGwI/pP9NVRBQwxTd
 mgu/FAV+Rn7+qgWY1wqxM5AgTjjGXBfGwVhUEpKAwJmhz0nEK3euzXnlzPzb9a+E
 WvnzIkzcjEeY6e71PkeaTkHg5G9Vlb/GnL91Jgx5MC5CFL7W8c5jIu774Qa7V2jU
 ICxhr+dRP3mO72VLFbtZti0O2rsWOr4VsC7wV/c2cbSibiUtnf0fqQ0MoVbKzN1V
 GW0wl7PmVJvhad+2JVubsJpR8VCwy25qLiQ8IoJXqwLxsQJ1pzA9jfNKURPKc7t7
 iDkvtEZhp783yyYG1EUdfAe46NZw1jgq3KBwMu0sgNSXRBMpcFujfDKHzMGmeWaL
 cCOrAriDvc+ucsQSfHbLcjqJVQN+0zqbmjHETrTaWyDF/ymggGn4PIUOUv9tAlYR
 ThzBWxDLOPzeHzC23vsinfypbkFkVAUIBUuHcpQDFR9xgcblQCVPHaE0GELSbtRh
 GK8epbwcKDGu0G1KxtY=
 =+rVP
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.11

A few small fixes, all driver specific.  The removal of the GPIO based
pinmuxing is a bug fix, since the obsolete nodes had been removed from
the DT it stopped the driver loading.
2013-07-05 11:54:27 +02:00
Arnaud Patard (Rtp) 28e5ca73ef ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
If the ssi or codec drivers are not loaded (for instance, because spi or i2c
bus drivers are not loaded), returning -EINVAL will for people to unload and
then reload the module to get sound working. Returning E_PROBE_DEFER will
mitigate this.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-04 15:58:47 +01:00