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>
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
...
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
Some more fixes and enhancements, and also a bunch of refectoring for
AC'97 support which enables more than one AC'97 controller driver to be
built in.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJRzXInAAoJELSic+t+oim9jBoQAJjGBiMyEyPv51CV5h2Cfo7c
SGvoYwC+Q90fBsCLt4J/ei0rP+LUEbNUdnvs+xFeRiCqWHYs/d3/PeIZnuPMUQvZ
VQOen7L1S+zd6mvDAr45LFmQOpAi74QkqRL1cwtuxWYeLJvFJwvYFTME6pYgjLi4
HYAmZPZjMhOu3oNZmQIb+4Cmrf0/YbaIserI5kzHWd4b+pC8QCneBqvfwIaMowe0
qBHw/bSB/haLTpjjbxZGw8NtnJyBvTT90ixgmv1akcZY/8NEh2bMIlzu52olNCci
ZsCaS0HnjnICV7X5j6bBSjoqt7BQfXdQGFM7mbLn7BqW16MW/R0ONoSk1vE0RQQ0
RGNYRA/X5yG4XReFE+93sHbJ2esGYnynwbykJd19DNFq0JRpdEpBUuudk8GsTEGh
jsdh7YbRRGz1EUCxjiyMKiN7jHUhYGB9RRXjbR8Fo4GmTI1HHkOuv07gUfWr7v8F
o2EcgvNdsEYtOrHP/Y7NCqkd7GkZOzDm3Xfp8Z5Wb81uKhJ3vbldvvUyjWBHrXLO
Lzb2EACJYE8rqNN3FPsmNDBiuVlRrHeQQmtLL21lz5ZBK7b93+/NK44jN5OnNgU1
D1PyErveZwogvtAUhZamx7FoZfnHxXQ4nNUWlLacBl3gRLrjzVqB8LQ9IdTyV1/V
rqTrG1nTPJRCJLN0DLqq
=UZaY
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: More updates for v3.11
Some more fixes and enhancements, and also a bunch of refectoring for
AC'97 support which enables more than one AC'97 controller driver to be
built in.
Currently we can only have a single platform built in with AC'97 support
due to the use of a global variable to provide the bus operations. Fix
this by making that variable a pointer and having the bus drivers set the
operations prior to registering.
This is not a particularly good or nice approach but it avoids blocking
multiplatform and a real fix involves fixing the fairly deep problems
with AC'97 support - we should be converting it to a real bus.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This is the initial imx-wm8962 device-tree-only machine driver working with
fsl_ssi driver. More features can be added on top of it later.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>