Make it easier for generic code to work with set_sysclk() by distinguishing
between the operation not being supported and an error as is done for
other operations like set_dai_fmt()
Signed-off-by: Mark Brown <broonie@linaro.org>
When the platform driver has no ops, the platform function
bespoke_trigger() is no more called.
The problem was introduced by the commit c5914b0aae
"ASoC: pcm: Check for ops before deferencing them"
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
Allow PCMs that do not impose any restrictions on the supported formats to set
the formats field to 0, Instead of assuming that this means that the PCM does
not support any formats (which doesn't make much sense), assume that it supports
all formats. This brings the behavior of DPCM closer to that of non-DPCM.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
We have the same code for initializing the runtime pcm on both the playback and
the capture path. Factor this out into a common helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
From "ASoC: make snd_soc_dai_link more symmetrical", can we see that
the name of CPU DAI maybe omitted. If the DAI name is omitted, try to
use the component name instead.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch removed the redundant snd_soc_dai_digital_mute() in close() since
it's better to mute in hw_free() which's slightly earlier and symmetrical for
the case of reconfiguration: 'aplay 44k1.wav 48k.wav', for example, will be
open()->hw_params()->prepare(unmute)->playi1ng->hw_free(mute)->hw_params()->
parepare(unmute)->playing->hw_free(mute)->close()
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
If there are symmetry constraints between the playback and the capture channel
set the SNDRV_PCM_INFO_JOINT_DUPLEX flag to let userspace know about this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Using the IS_ENABLED() macro can make the code shorter and simpler.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
We're now applying soc_hw_params_symmetry() to reject unmatched parameters
while we clear parameters in soc_pcm_close(). So here's a use case might be
broken by this mechanism: aplay -Dhw:0 44100.wav 48000.wav 32000.wav
In this case, we call soc_pcm_open()->soc_pcm_hw_params()->soc_pcm_hw_free()
->soc_pcm_hw_params()->soc_pcm_hw_free()->soc_pcm_close() in order. As we
only clear parameters in soc_pcm_close(). The parameters would be remained
in the system even if the playback of 44100.wav is finished.
Thus, this patch is trying to move parameters cleaning into hw_free() so that
the system can continue to serve this kind of use case.
Also, since we set them in hw_params(), it should be better to clear them in
hw_free() for symmetry.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Some SoCs can only work in mono or stereo mode at one time. So if
we let them capture a mono stream while playing a stereo stream,
there might be a problem occur to one of these two streams: double
paced or slowed down.
In soc-pcm.c, we have soc_pcm_apply_symmetry() to apply the rate
symmetry. But we don't have one for channels.
Likewise, we can treat symmetric_rate as a solution for those SoCs
or CODECs which can not handle asymmetrical LRCLK. But it's also
impossible for them to handle asymmetrical BCLK. And accodring to
BCLK = LRCLK * channel number * slot size(fixed or sample bits),
sample bits might also be a problem if they are not using a fixed
slot size.
Thus, this patch applys symmetry for channels and sample bits.
Meanwhile, there might be a race between two substreams if starting
simultaneously. Previously, we only added warning to compalin but
still using conservative way to let it carry on. However, this patch
rejects the second stream with any unmatched parameter to make sure
the first existing stream won't be broken.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
A collection of small fixes in HD-audio quirks and runtime PM, ASoC
rcar, abs8500 and other codecs. Most of commits are for stable
kernels, too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJSj0b6AAoJEGwxgFQ9KSmkPikP/RxVJr4XnKFXFVmRx/5W+GeL
185TPqE6d0aS/+99+cVmUSG3m1X2AMsFWN4aStmttwNl8TqVW9KSpeOOAeP0nOHW
vraV37A8Bfe5gjx2CGRTWzqmC+IjCPJ9foXc6zfFBFeJj0CYWJ7+RE2P6eHSCAFf
2YDVYNKtvjaqg6sL7ngD3i3ubX0+WRAjqd27XS3sPSpQz4Ah2Uw2TPpExREcGy1x
DgyX9XjTO5ChDnLvRe9FiLlFaiziUp97a7ueuMQMs9z/1ERCOLWOsY+dO/fk7Dg1
RHkIz5yRuoVliPbJPqysuwG5c12b+eb2LJQyTqWiP4raG+83ZwejAs0+oMGBa015
EHqxOJ7aJ2LFHUTUgioHjqGIS6aqIoFW5OaG3lKjjTPd3HlriojjQ/Vnm2kuFHQ2
nZ8s1tNhnQwei5BNY7oZJPMMOB92Z11EuJfDtSscDGGUqiPNb2rubt0icULp1rOd
RXjvpPR4Iw88Zsf8yXKBtE8VvH+GcqL18RfHS6TyM/apMY/5EftDGPA+OGl6YG7q
UYdcyspg9RDexlww6/kL5b40I5JUQIZATjsReSrW/p6f4ze+4A9ZDAR0bucge1hr
yHwPvrQ3x1DrpAyTCOzXvBujbidjUbN0hCxtHeSAyC6qmRtzUA+G1rGPaXgcCuMz
oIfsn4cSGggRGYqlzxuf
=zoMb
-----END PGP SIGNATURE-----
Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull second set of sound fixes from Takashi Iwai:
"A collection of small fixes in HD-audio quirks and runtime PM, ASoC
rcar, abs8500 and other codecs. Most of commits are for stable
kernels, too"
* tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
ALSA: hda - Provide missing pin configs for VAIO with ALC260
ALSA: hda - Add headset quirk for Dell Inspiron 3135
ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
ALSA: hda - Fix missing bass speaker on ASUS N550
ALSA: hda - Fix unbalanced runtime PM notification at resume
ASoC: arizona: Set FLL to free-run before disabling
ALSA: hda - A casual Dell Headset quirk
ASoC: rcar: fixup dma_async_issue_pending() timing
ASoC: rcar: off by one in rsnd_scu_set_route()
ASoC: wm5110: Add post SYSCLK register patch for rev D chip
ASoC: ab8500: Revert to using custom I/O functions
ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
ASoC: rcar: fixup mod access before checking
A bunch of device specific fixes, nothing with a general impact here.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJSjg2iAAoJELSic+t+oim93rEP/jlEjrXx8bT3acN7u/Yl/4yM
OiTG2NVHieXgzc5aux4/egjyI1mowOmQ/T2FR35oHg14jZVP8lnHYx5s6BqyDgKl
U4WdLDsUBdQYUDYkNnv93JzoI81fBuRjpRfyfLfJ39L+7gjlJgZ8uhAf0nSAir6o
7MjjPP8Ue6fJ8/uDOojLeTnZIy2blvVnENqDn8Czs9XIr/G9UnCJqYZNFzhU15Fx
m66HnfsBO3vZofe8W3N6WcZeoBW0VR1iHTKMh6Emz01U3D4Q0bmTGOFOhcP0a/Wp
Jo7SScdZoGJeGAak5x+HQjs0vLT/R867KCQap6+iK7BdrIcNwoo5HArYFC8YQ3Kt
Mqif5HNzwRBMvYKzZnDpmQMY08KSCzLrht3rI05JUEPzIgJgaAsJCLXMLxWZFfE3
kpc4EsukQujvPMKcuPbKtfNXDFvH0HyEwl0RVaEL3AuyrQM7KEvmCdNejjkQkc6s
BvmkxPNH6Ch6n0tmDcvMdB7ARBYZFi+dkjyYpvmbHqFieoEBESUKGQ+ZetvWgWC9
jkHM+xWvdAuRTCO4Iw9lo6+H19bkCLWw3S8mVPNwRO8CyW6k/x6cog7luALPnH1d
KdUHXc18d8SGgXwLwYncUSBkDspzuPJd4McXfhUNPK2cG0YVq5JMJQKFOSdqTDuu
xWWS/zqm83K4aE7IBVjc
=oSm9
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.13
A bunch of device specific fixes, nothing with a general impact here.
Pull slave-dmaengine changes from Vinod Koul:
"This brings for slave dmaengine:
- Change dma notification flag to DMA_COMPLETE from DMA_SUCCESS as
dmaengine can only transfer and not verify validaty of dma
transfers
- Bunch of fixes across drivers:
- cppi41 driver fixes from Daniel
- 8 channel freescale dma engine support and updated bindings from
Hongbo
- msx-dma fixes and cleanup by Markus
- DMAengine updates from Dan:
- Bartlomiej and Dan finalized a rework of the dma address unmap
implementation.
- In the course of testing 1/ a collection of enhancements to
dmatest fell out. Notably basic performance statistics, and
fixed / enhanced test control through new module parameters
'run', 'wait', 'noverify', and 'verbose'. Thanks to Andriy and
Linus [Walleij] for their review.
- Testing the raid related corner cases of 1/ triggered bugs in
the recently added 16-source operation support in the ioatdma
driver.
- Some minor fixes / cleanups to mv_xor and ioatdma"
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (99 commits)
dma: mv_xor: Fix mis-usage of mmio 'base' and 'high_base' registers
dma: mv_xor: Remove unneeded NULL address check
ioat: fix ioat3_irq_reinit
ioat: kill msix_single_vector support
raid6test: add new corner case for ioatdma driver
ioatdma: clean up sed pool kmem_cache
ioatdma: fix selection of 16 vs 8 source path
ioatdma: fix sed pool selection
ioatdma: Fix bug in selftest after removal of DMA_MEMSET.
dmatest: verbose mode
dmatest: convert to dmaengine_unmap_data
dmatest: add a 'wait' parameter
dmatest: add basic performance metrics
dmatest: add support for skipping verification and random data setup
dmatest: use pseudo random numbers
dmatest: support xor-only, or pq-only channels in tests
dmatest: restore ability to start test at module load and init
dmatest: cleanup redundant "dmatest: " prefixes
dmatest: replace stored results mechanism, with uniform messages
Revert "dmatest: append verify result to results"
...
The FLL must be placed into free-run mode before disabling
to allow it to entirely shut down.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
DMAEngine will stall without this patch
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
If "id == ARRAY_SIZE(routes)" then we read one space beyond the end of
the routes[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Certain registers require patching after the SYSCLK has been brought up
add support for this into the CODEC driver.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
It's been reported that these break audio on Snowball so revert them
until a Snowball user has time to investigate.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Pull i2c changes from Wolfram Sang:
- new drivers for exynos5, bcm kona, and st micro
- bigger overhauls for drivers mxs and rcar
- typical driver bugfixes, cleanups, improvements
- got rid of the superfluous 'driver' member in i2c_client struct This
touches a few drivers in other subsystems. All acked.
* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
i2c: bcm-kona: fix error return code in bcm_kona_i2c_probe()
i2c: i2c-eg20t: do not print error message in syslog if no ACK received
i2c: bcm-kona: Introduce Broadcom I2C Driver
i2c: cbus-gpio: Fix device tree binding
i2c: wmt: add missing clk_disable_unprepare() on error
i2c: designware: add new ACPI IDs
i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH
i2c: exynos5: Remove incorrect clk_disable_unprepare
i2c: i2c-st: Add ST I2C controller
i2c: exynos5: add High Speed I2C controller driver
i2c: rcar: fixup rcar type naming
i2c: scmi: remove some bogus NULL checks
i2c: sh_mobile & rcar: Enable the driver on all ARM platforms
i2c: sh_mobile: Convert to clk_prepare/unprepare
i2c: mux: gpio: use reg value for i2c_add_mux_adapter
i2c: mux: gpio: use gpio_set_value_cansleep()
i2c: Include linux/of.h header
i2c: mxs: Fix PIO mode on i.MX23
i2c: mxs: Rework the PIO mode operation
i2c: mxs: distinguish i.MX23 and i.MX28 based I2C controller
...
rsnd_dai_connect() is using mod before NULL checking.
This patch fixes it up
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Two peaks in diffstat are for the audio EQ init of IDT codecs and the
EMU2004 usb mixer addition, both of which are pretty device-specific,
so safe to apply. The rest are a bunch of small fixes, most of them
are regression fixes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJSh0+UAAoJEGwxgFQ9KSmkFpcQAK8+FlQyzjkUD8SAd9xINjm1
gC7b8cIldx9+LLDvKCshcqM8+RID3EhtUz5DgDmpG7LnJy30aYjhc1McGMiBXLE1
Lwxi5oM8Rka5OSeW1J98gApeS1QxKRRCjE/6X3Vnnzymy4YziBEf1E6u3o2ZqPiM
jCLe3nuElrGKrfzoYIf4uI+oA2+iDzc29f/gFV0wl0TXBbuNwNgapfZjeDpyTM49
D9nhZ5bKddwxo8wgqySqfSrHU37tquNTTayTvD31Q9AQQzXWgTnv4uDpXACTY5h8
ynYEvkaOD3jMmjTLHU2ygVRKu1ydl+FV6I9JQGvaJbLl/KCGIW3IRQYowH/NltUu
U/PmYuEOYL5tXNkkO1lN49Ohj2dmgmfO8I1cSUjPyKdNuFEE/AuTIFuSogKittgV
vuQwyKhZ3sp8g1cQ5YbxSVJI7O+NyFd/XzeL6mIxnBIa6tf2NIIWVkvCFuEmrnKp
nsVf+JV8wr2tCRHWXRpW9wdLCt5XvKfwXfMZxUKLkxdZMKWy4qwh5ROEs+Tap4D+
dMThpWDOpC5H92Ygei5dpFav2dL+Iq8+QzLwzgN+JFvtNVUfqKTo7a+jbRdQhoec
w3DDxhS3MUwpenwiCX9M61RZZhQFNSn1t6J+wA5MCAnOfco71nkN1gf45iry3Vww
j9zeFh22uHWN0ttyF5zl
=lXBM
-----END PGP SIGNATURE-----
Merge tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Two peaks in diffstat are for the audio EQ init of IDT codecs and the
EMU2004 usb mixer addition, both of which are pretty device-specific,
so safe to apply. The rest are a bunch of small fixes, most of them
are regression fixes"
* tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
ALSA: hda - load EQ params into IDT codec on HP bNB13 systems
ASoC: cs42l52: Correct MIC CTL mask
ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
ALSA: jack: Unregister input device at disconnection
ALSA: pcsp: Fix the order of input device unregistration
ASoC: fsl: imx-pcm-fiq: omit fiq counter to avoid harm in unbalanced situations
ASoC: blackfin: Fix missing break
ALSA: usb-audio: add front jack channel selector for EMU0204
ALSA: hda - Don't clear the power state at snd_hda_codec_reset()
ASoC: arizona: Fix typo in name of EQ coefficient controls
ALSA: hda - Control EAPD for Master volume on Lenovo N100
ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
ALSA: isa: not allocating enough space
ALSA: snd-aoa: two copy and paste bugs
ASoC: wm8997: Correct typo in ISRC mux routes
ALSA: hda - Check keep_eapd_on before inv_eapd
ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
ALSA: msnd: Avoid duplicated driver name
ALSA: compress_core: don't return -EBADFD from poll if paused
ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
...
A few fixes in drivers, the i.MX and wm8962 fixes are for a pretty nasty
issues for users of those drivers if they run into them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJShz3GAAoJELSic+t+oim9HgUP/1LSw7wXaGkzBxd7sQ4bAwLc
Y8sRASb7fJywELUhaE5YTCTcvx6a5xsrhV1MDx5c9NRMWfxnoreuJX6N4fmMk3Tl
1hk+IQW0iDA2Na12akxAb1t3sXiSROeqLTeZsMrua75MVW1vTIDiNmUoMqOGxczu
2uzMCYPOJYNLawFAue28prGomLSpI2zXktQyGUiCzX6zh/JKu/I+2UuOl6N1CI3q
mbNyR4JQDTiodZpg0Fur6I+2pArqaJPY9OthBI9f1xj1ifJDpQMQQChjRQNKYWeK
A/TMTYMkrIeZUHnNkluem+JuRIE9HED/fY/Uu0MclvfpqqOKWPBMwoIFwPa+8xnn
n6c8XnFzpZa4p/0h6JE9SBYvliyit44LSmCfZ/q5u2z9JJXeAPXvJfNErTIHDTa1
S+Xx11oJ0jrThPTNuwhTfc79odPzGigVFk8GoHE2atZr1+FxQ46XDD3k0Hc8g62o
f86ipMRHUSQdGMeHteKhFbfQUp2b9Y9oQLliovcA+zmWDrQ1E4jG51pfc4feYzR9
BHqV2FsPa8KIPObZaf+rFXtoBJlAjk423nFSmH+Pt3PBkDmJWTOUG3O5p4nn7oL1
/HThe+EjuCFuKZ8U75pOnQEdKPTiz4noDRMiYs51Q5OVtywpQ6uRa5r88Fsetpyp
Kg4lGPkH4zaCEvHp4/cz
=qcIh
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.13
A few fixes in drivers, the i.MX and wm8962 fixes are for a pretty nasty
issues for users of those drivers if they run into them.
Pull trivial tree updates from Jiri Kosina:
"Usual earth-shaking, news-breaking, rocket science pile from
trivial.git"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
doc: add missing files to timers/00-INDEX
timekeeping: Fix some trivial typos in comments
mm: Fix some trivial typos in comments
irq: Fix some trivial typos in comments
NUMA: fix typos in Kconfig help text
mm: update 00-INDEX
doc: Documentation/DMA-attributes.txt fix typo
DRM: comment: `halve' -> `half'
Docs: Kconfig: `devlopers' -> `developers'
doc: typo on word accounting in kprobes.c in mutliple architectures
treewide: fix "usefull" typo
treewide: fix "distingush" typo
mm/Kconfig: Grammar s/an/a/
kexec: Typo s/the/then/
Documentation/kvm: Update cpuid documentation for steal time and pv eoi
treewide: Fix common typo in "identify"
__page_to_pfn: Fix typo in comment
Correct some typos for word frequency
clk: fixed-factor: Fix a trivial typo
...
The mask for CS42L52_MIC_CTL_TYPE_MASK was wrong keeping the mic config
from being set correctly.
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Use this new function to make code more comprehensible, since we are
reinitialzing the completion, not initializing.
[akpm@linux-foundation.org: linux-next resyncs]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It's safer to turn on regcache_cache_only before disabling regulator since
the driver will turn off the regcache_cache_only after enabling regulator.
If we remain cache_only false, some command like 'amixer cset' would get
failure if being run before wm8962_resume().
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Unbalanced calls to snd_imx_pcm_trigger() may result in endless
FIQ activity and thus provoke eternal sound. While on the first glance,
the switch statement looks pretty symmetric, the SUSPEND/RESUME
pair is not: the suspend case comes along snd_pcm_suspend_all(),
which for fsl/imx-pcm-fiq is called only at snd_soc_suspend(),
but the resume case originates straight from the SNDRV_PCM_IOCTL_RESUME.
This way userland may provoke an unbalanced resume, which might cause
the fiq_enable counter to increase and never return to zero again,
so eventually imx_pcm_fiq is never disabled.
Simply removing the fiq_enable will solve the problem, as long as
one never goes play and capture game simultaneously, but beware
trying both at once, the early TRIGGER_STOP will cut off the other
activity prematurely. So now playing and capturing is scrutinized
separately, instead of by counting.
Signed-off-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Pull DMA mask updates from Russell King:
"This series cleans up the handling of DMA masks in a lot of drivers,
fixing some bugs as we go.
Some of the more serious errors include:
- drivers which only set their coherent DMA mask if the attempt to
set the streaming mask fails.
- drivers which test for a NULL dma mask pointer, and then set the
dma mask pointer to a location in their module .data section -
which will cause problems if the module is reloaded.
To counter these, I have introduced two helper functions:
- dma_set_mask_and_coherent() takes care of setting both the
streaming and coherent masks at the same time, with the correct
error handling as specified by the API.
- dma_coerce_mask_and_coherent() which resolves the problem of
drivers forcefully setting DMA masks. This is more a marker for
future work to further clean these locations up - the code which
creates the devices really should be initialising these, but to fix
that in one go along with this change could potentially be very
disruptive.
The last thing this series does is prise away some of Linux's addition
to "DMA addresses are physical addresses and RAM always starts at
zero". We have ARM LPAE systems where all system memory is above 4GB
physical, hence having DMA masks interpreted by (eg) the block layers
as describing physical addresses in the range 0..DMAMASK fails on
these platforms. Santosh Shilimkar addresses this in this series; the
patches were copied to the appropriate people multiple times but were
ignored.
Fixing this also gets rid of some ARM weirdness in the setup of the
max*pfn variables, and brings ARM into line with every other Linux
architecture as far as those go"
* 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm: (52 commits)
ARM: 7805/1: mm: change max*pfn to include the physical offset of memory
ARM: 7797/1: mmc: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7796/1: scsi: Use dma_max_pfn(dev) helper for bounce_limit calculations
ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
ARM: 7794/1: block: Rename parameter dma_mask to max_addr for blk_queue_bounce_limit()
ARM: DMA-API: better handing of DMA masks for coherent allocations
ARM: 7857/1: dma: imx-sdma: setup dma mask
DMA-API: firmware/google/gsmi.c: avoid direct access to DMA masks
DMA-API: dcdbas: update DMA mask handing
DMA-API: dma: edma.c: no need to explicitly initialize DMA masks
DMA-API: usb: musb: use platform_device_register_full() to avoid directly messing with dma masks
DMA-API: crypto: remove last references to 'static struct device *dev'
DMA-API: crypto: fix ixp4xx crypto platform device support
DMA-API: others: use dma_set_coherent_mask()
DMA-API: staging: use dma_set_coherent_mask()
DMA-API: usb: use new dma_coerce_mask_and_coherent()
DMA-API: usb: use dma_set_coherent_mask()
DMA-API: parport: parport_pc.c: use dma_coerce_mask_and_coherent()
DMA-API: net: octeon: use dma_coerce_mask_and_coherent()
DMA-API: net: nxp/lpc_eth: use dma_coerce_mask_and_coherent()
...
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
usual for this cycle with lots of clean-up.
- Cross arch clean-up and consolidation of early DT scanning code.
- Clean-up and removal of arch prom.h headers. Makes arch specific
prom.h optional on all but Sparc.
- Addition of interrupts-extended property for devices connected to
multiple interrupt controllers.
- Refactoring of DT interrupt parsing code in preparation for deferred
probe of interrupts.
- ARM cpu and cpu topology bindings documentation.
- Various DT vendor binding documentation updates.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAABAgAGBQJSgPQ4AAoJEMhvYp4jgsXif28H/1WkrXq5+lCFQZF8nbYdE2h0
R8PsfiJJmAl6/wFgQTsRel+ScMk2hiP08uTyqf2RLnB1v87gCF7MKVaLOdONfUDi
huXbcQGWCmZv0tbBIklxJe3+X3FIJch4gnyUvPudD1m8a0R0LxWXH/NhdTSFyB20
PNjhN/IzoN40X1PSAhfB5ndWnoxXBoehV/IVHVDU42vkPVbVTyGAw5qJzHW8CLyN
2oGTOalOO4ffQ7dIkBEQfj0mrgGcODToPdDvUQyyGZjYK2FY2sGrjyquir6SDcNa
Q4gwatHTu0ygXpyphjtQf5tc3ZCejJ/F0s3olOAS1ahKGfe01fehtwPRROQnCK8=
=GCbY
-----END PGP SIGNATURE-----
Merge tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux
Pull devicetree updates from Rob Herring:
"DeviceTree updates for 3.13. This is a bit larger pull request than
usual for this cycle with lots of clean-up.
- Cross arch clean-up and consolidation of early DT scanning code.
- Clean-up and removal of arch prom.h headers. Makes arch specific
prom.h optional on all but Sparc.
- Addition of interrupts-extended property for devices connected to
multiple interrupt controllers.
- Refactoring of DT interrupt parsing code in preparation for
deferred probe of interrupts.
- ARM cpu and cpu topology bindings documentation.
- Various DT vendor binding documentation updates"
* tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
powerpc: add missing explicit OF includes for ppc
dt/irq: add empty of_irq_count for !OF_IRQ
dt: disable self-tests for !OF_IRQ
of: irq: Fix interrupt-map entry matching
MIPS: Netlogic: replace early_init_devtree() call
of: Add Panasonic Corporation vendor prefix
of: Add Chunghwa Picture Tubes Ltd. vendor prefix
of: Add AU Optronics Corporation vendor prefix
of/irq: Fix potential buffer overflow
of/irq: Fix bug in interrupt parsing refactor.
of: set dma_mask to point to coherent_dma_mask
of: add vendor prefix for PHYTEC Messtechnik GmbH
DT: sort vendor-prefixes.txt
of: Add vendor prefix for Cadence
of: Add empty for_each_available_child_of_node() macro definition
arm/versatile: Fix versatile irq specifications.
of/irq: create interrupts-extended property
microblaze/pci: Drop PowerPC-ism from irq parsing
of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
of/irq: Use irq_of_parse_and_map()
...