PXA's SSP engine fails to take its current channel phase into account
when enabling a stream while the engine is already running. This
results in randomly swapped left/right channels on either the record
or the playback side, depending on which one was enabled first.
The following patch fixes this by factoring out the bit field
modifications in question to a separate function that pauses the
engine temporarily, modifies the bits and kicks it off again
afterwards. Appearantly, a transition of SSCR0_SSE syncs both
directions properly.
The patch has been rolled out to quite a number of devices over the
last weeks and seems to fix the issue reliably.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
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
The dma size will be changed by requested number of
channel(mono/stereo) from platform. For mono recording,
channels_min value should be 1.
Signed-off-by: Sangsu Park <sangsu4u.park@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We're currently not freeing card->rtd in cases where the card is
unregistered before being instantiated - convert it to devm_kzalloc() to
make sure that happens.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
The WM8996 specification has been updated to specify 44.1kHz as a supported
sample rate. Update the driver to accept this configuration.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Convert mx27vis-aic32x4 to platform driver.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Otherwise a wrong position will be reported after restarting a stream and the
first few samples might be skipped.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently we can the accdet mutex from within DAPM when updating the device
state which means we take accdet then the CODEC mutex but we also do the
locking the other way around when responding to the jackdet IRQ. Move all
the jackdet use of the CODEC mutex out of the accdet lock to avoid this.
Since all the DAPM interactions depend only on a single threaded IRQ this
is still serialised.
The locking improvements in 3.5 allow a better solution there.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The widget locking depends on some of the other locking changes which
are queued up for 3.5 not 3.4 so revert the locking changes and reapply
them in 3.5.
This reverts commit 66bf93212f and
96acc357be.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
This patch removes following registers from reg map defaults,
- Registers which are currently not used by driver
- Non existing registers
- Volatile registers
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>
Not having a DAI link set_fmt operation is perfectly normal and
should not be complaint.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current DA7210 driver has I2C support using older register cache
methods. This patch updates it for latest regmap framework.
This has been tested on DA7210 EVB with Samsung SMDK6410 board.
Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
add more sample rate for pxa-ssp, which are supported, such as 32KHz,
64KHz.
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix the following section mismatch warning:
WARNING: vmlinux.o(.data+0x35be8): Section mismatch in reference from the variable imx_audmux_driver to the function .init.text:imx_audmux_probe()
The variable imx_audmux_driver references
the function __init imx_audmux_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we do use regmap then regmap will take care of things for us. We
actually already have this check at a higher level for the current
users but this makes sure we do the right thing in the future too if
we need to.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Currently not all DAPM widget IO ops are holding their component mutex
(codec or platform). Make sure this is now held for DAPM widget IO operations.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add mutex support for platform IO operations. e.g. can be used
for platform DAPM widget IO ops.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fixes the following warning:
sound/soc/tegra/tegra_alc5632.c: In function 'tegra_alc5632_asoc_init':
sound/soc/tegra/tegra_alc5632.c:118:6: warning: unused variable 'ret' [-Wunused-variable]
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Remove printk(KERN_WARNING) and use dev_warn() instead.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
from arch/arm into sound/soc. There's also some general driver specific
tweaks and fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPVgcKAAoJEBus8iNuMP3dk6gQAJuddZ0luBse1NUf7NIGfKV6
ZQJUWEjoAS3BLLQ4OMQF9QAd5PUQQzFG0VIjKrLVzomyTmxXOjhyM33HccWsHYsF
fUOdpQTcj5FNOoalYbEMY5ELIp/+Q2KV5MnyjcOSS2Um6/WJGU1CZwO7DOEB3WHl
XfoayQ9zZnvftEvweJqOepo6WrfJIVL65u2jxLyWDIqb3jyUQT2PYB3JrNenIXYQ
ISI99NMqaQW1fq8v21aWgzO+jo4Jh7n6A2b6ZbbEM5ojQOBIScYX4Vk9+Qht4EbV
r6nxNOvytmWBru7HHw1AGcnsBb1WUY7V1c2myvpEr98YWxDWoWEp7pgWyiaLsBRP
DDzVlEmWD9248pn/sKUCxQe+cLgG6gWz46YXYFqNdBT/Q5hBcEBoB2o9dEeyFfLT
l+XpSDve8kT3QaDz5rvzYRHji97uHG0vE8s6WU0PJYtf2/u0Jzf5ZKrJMU//lojE
q3EySKAC1hy2KtSU4G4p13sh5dbzLfBt6UYSxHk0GYnRZG6k/VSXQGznBVcjHK93
+95CharGOB179k6n5S/HTSBeXPn/EeB977uysurvE1VVc14QE0fsoKCbrBWov4vB
W3+DTqWScHdVtp9gUzJFMJ6Cmupc4rG1PN1xDLguZ8h8TCRvxHRTx3zmsO/Jkna4
crf42gOFThah4nOmqr72
=0lYr
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc
A few more ASoC updates, the main one is the move of the audmux driver
from arch/arm into sound/soc. There's also some general driver specific
tweaks and fixes.
It adds device tree probe support for imx-audmux driver.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit 891271c "ASoC: Convert wm8804 to direct regmap API usage"
only converts wm8804_spi_probe to use regmap_init_spi.
This patch adds missing regmap_init_i2c in wm8804_i2c_probe.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When we are out of system sleep always use audio mode for jack detection
in order to avoid potential performance issues handing off between modes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently ASoC:imx uses menuconfig option SND_IMX_SOC selects imx-ssi
driver, and it works because all the machine driver covered by the
menuconfig need to build imx-ssi driver in. However, it will not work
any more if we have a imx based machine driver going into the menuconfig
while working with fsl_ssi driver (sound/soc/fsl/fsl_ssi.c) rather than
imx-ssi one.
The patch adds an explicit Kconfig option SND_SOC_IMX_SSI for imx-ssi
driver, so that it can be selected independently from the menuconfig
option SND_IMX_SOC.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently the imx-ssi.c[h] accommodates the imx-pcm common bits which
are shared between imx-pcm-dma-mx2 and imx-pcm-fiq drivers. It assumes
that imx-pcm-dma-mx2 and imx-pcm-fiq will always be used together with
imx-ssi driver. However this becomes untrue when we see that driver
sound/soc/fsl/fsl_ssi could possibly work with imx-pcm-dma-mx2 too.
The patch moves the imx-pcm common bits from imx-ssi.c[h] into new
files imx-pcm.c[h], and let imx-pcm-dma-mx2 and imx-pcm-fiq drivers
build it in, so that imx-pcm-dma-mx2 can work with no dependency on
imx-ssi driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It renames the legacy name mxc used in audmux function and macro
to imx.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
As audmux becomes a platform driver and its callers are all ASoC
machine drivers, there is no reason to keep it in arch folder, so
move it to sound/soc/imx.
One bonus point would be those ASoC machine drivers stop including
mach/audmux.h, since it's been moved to sound/soc/imx/imx-audmux.h.
This should be a move to the right direction in terms of single kernel
image goal.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97 to ease converting audmux into a platform
driver later.
It moves phycore audmux configuration call from board file into ASoC
machine driver phycore-ac97, so that it gets aligned with wm1133-ev1
and mx27vis-aic32x4, and more importantly it will ease the moving of
audmux into sound/soc/imx as a platform driver later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It moves eukrea audmux configuration call from board file into ASoC
machine driver eukrea-tlv320, so that it gets aligned wm1133-ev1 and
mx27vis-aic32x4, and more importantly it will ease the moving of audmux
into sound/soc/imx as a platform driver later.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
of bugfixes and driver updates there's quite a few framework enhancements.
Most are either small or are laying the groundwork for user visible
features (especially dynamic PCM), the most directly visible change is
the dmaengine library. There's also a bunch of regmap API enhancements
pulled into the tree so that either the framework or drivers can take
advantage of the new features.
Changes include:
- Support for widgets not associated with a CODEC, an important part of
the dynamic PCM framework.
- A library factoring out the common code shared by dmaengine based DMA
drivers contributed by Lars-Peter Clausen. This will save a lot of
code and make it much easier to deploy enhancements to dmaengine.
- Support for binary controls, used for providing runtime configuration
of algorithm coefficients.
- A new DAPM widget type for regulator supplies allowing drivers for
devices that can power down unused supplies while active to do without
any per-driver code.
- DAPM widgets for DAIs, initially giving a speed boost for playback
startup and shutdown and also the basis for CODEC<->CODEC DAI link
support.
- Support for specifying the number of significant bits on audio
interfaces, useful for allowing applications to know how much effort to
put into generating data for a larger sample format.
- Conversion of the FSI driver used on some SH processors to DMAEngine.
- New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics WM2200.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJPU4IOAAoJEBus8iNuMP3de34P/2aEhzOwxZE3DviqSR6qIag0
exdEqMVUzoRoAJ5NHVFd4qClqUv7k6TxiDKdcIVXXjVm4L2imF5iqkB5VPK4dJSy
YMYOIBtruHzTsUmjnJzbTc4GSk3lJ/GfYDPvrNslFBywkNy+uAoNRGQQN1wywgA0
OJhbCoGfgtT+ULKLg9ke5ckHtdgkSFQNpGjb7IuGy+9JDH72CUiSbZzffxRGFR4X
Ah2/5VuDqXj56ENfp011K7uMRTv2i57+388JAW7kGR/D5TBs3mTD5AkyJUvGYxVY
bzfUyNoOek7X22mCSZEuP3W/rtyyuAaaA67yBbC1jTKpbACEriSVBauIApHPvUB5
a9mz03V2knEcrCVgoyt0yMnvWh2UcWtH3BlaGZhlUrmrMvAEYKCW7xYRMScBvlDA
NPUPBuf6MCMaKbpu+PnuyhTr4TVjkZqHSmotOMgiP5IUzzdlHzAgUSbnU/DQiNV0
jS6u9+rkc8j9wRVkBXuzaj1uJ6iSI1T3ElS3WrpsMV33/HBqJLHY9LyWyxhBF3Su
S4dGeo+I6zljrkZeAU4aNHWXRciv37TMNGNVYVs0xZajtLllgpp3IHrOCPzJtoXF
tJwmXiZUdAo+3QQci0aH4p2Mem2RH2lLOrxKkKD65CqvNC6mCWC3Dc13B+kiZ/Qn
9GVK/O9CRuwMcBdVsUy9
=FpJH
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc
This has been a very active release for ASoC, as well as the usual raft
of bugfixes and driver updates there's quite a few framework enhancements.
Most are either small or are laying the groundwork for user visible
features (especially dynamic PCM), the most directly visible change is
the dmaengine library. There's also a bunch of regmap API enhancements
pulled into the tree so that either the framework or drivers can take
advantage of the new features.
Changes include:
- Support for widgets not associated with a CODEC, an important part of
the dynamic PCM framework.
- A library factoring out the common code shared by dmaengine based DMA
drivers contributed by Lars-Peter Clausen. This will save a lot of
code and make it much easier to deploy enhancements to dmaengine.
- Support for binary controls, used for providing runtime configuration
of algorithm coefficients.
- A new DAPM widget type for regulator supplies allowing drivers for
devices that can power down unused supplies while active to do without
any per-driver code.
- DAPM widgets for DAIs, initially giving a speed boost for playback
startup and shutdown and also the basis for CODEC<->CODEC DAI link
support.
- Support for specifying the number of significant bits on audio
interfaces, useful for allowing applications to know how much effort to
put into generating data for a larger sample format.
- Conversion of the FSI driver used on some SH processors to DMAEngine.
- New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics WM2200.
Without that fix the wm8753 SPI initialization fails, and then produces
a kernel panic during boot with the following call trace:
Unable to handle kernel paging request at virtual address 37386d9b
[<c01ccafc>] (regmap_get_val_bytes+0x0/0x14) from [<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc)
[<c0243dfc>] (snd_soc_codec_set_cache_io+0x9c/0xcc) from [<c0244a4c>] (wm8753_probe+0x5c/0x1c4)
[<c0244a4c>] (wm8753_probe+0x5c/0x1c4) from [<c023bb24>] (soc_probe_codec+0x174/0x284)
[<c023bb24>] (soc_probe_codec+0x174/0x284) from [<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28)
[<c023c2c0>] (snd_soc_instantiate_cards+0x68c/0xe28) from [<c023d278>] (snd_soc_register_card+0x240/0x2d4)
[<c023d278>] (snd_soc_register_card+0x240/0x2d4) from [<c023d330>] (soc_probe+0x24/0x40)
[<c023d330>] (soc_probe+0x24/0x40) from [<c01c3900>] (platform_drv_probe+0x14/0x18)
[...]
The commit d3398ff059
( ASoC: Convert WM8753 to direct regmap API usage ) introduced
the problem.
Thanks to Lars-Peter Clausen for helping me a bit during the debugging.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
SND_SOC_AC97_BUS is selected to enable the AC97 support in soc-core.
Rather than selecting the option under SND_IMX_SOC, it's better to
leave the selection to individual machine driver which knows if AC97
support is needed or not.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
It's not necessary for imx-pcm-dma-mx2 to access imx_ssi.dma_params
for burstsize initialization. Instead, it can just be done in imx-ssi
probe function once.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Push everything through one function for active use cases, should be
no practical effect.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Normally this will have no effect as we set detection up at system startup
before DAPM syncs take effect, this will only be useful if the system
enables and disables detection at runtime.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM1811 DC servo is able to run much faster than previous devices so
the benefit of skipping calibration is not useful.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Using snd_soc_write() means we always write to the register even if it
already contains the newly calculated value.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
snd_soc_register_card() has been available and strongly preferred since
2.6.38 but we're still seeing new drivers using it and the conversion rate
for older machines has been low. Help address both issues by logging a
warning when the soc-audio device probes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Make sure we cleanup the platform debugfs when probe fails.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>