alistair23-linux/include
Takashi Iwai 257f8cce5d ALSA: pcm: Allow nonatomic trigger operations
Currently, many PCM operations are performed in a critical section
protected by spinlock, typically the trigger and pointer callbacks are
assumed to be atomic.  This is basically because some trigger action
(e.g. PCM stop after drain or xrun) is done in the interrupt handler.
If a driver runs in a threaded irq, however, this doesn't have to be
atomic.  And many devices want to handle trigger in a non-atomic
context due to lengthy communications.

This patch tries all PCM calls operational in non-atomic context.
What it does is very simple: replaces the substream spinlock with the
corresponding substream mutex when pcm->nonatomic flag is set.  The
driver that wants to use the non-atomic PCM ops just needs to set the
flag and keep the rest as is.  (Of course, it must not handle any PCM
ops in irq context.)

Note that the code doesn't check whether it's atomic-safe or not, but
trust in 100% that the driver sets pcm->nonatomic correctly.

One possible problem is the case where linked PCM substreams have
inconsistent nonatomic states.  For avoiding this, snd_pcm_link()
returns an error if one tries to link an inconsistent PCM substream.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-03 14:04:08 +02:00
..
acpi ACPI and power management updates for 3.17-rc1 2014-08-06 20:34:19 -07:00
asm-generic This is the bulk of GPIO changes for the v3.17 development 2014-08-08 18:00:35 -07:00
clocksource ARM: pxa: Add non device-tree timer link to clocksource 2014-07-23 12:02:39 +02:00
crypto Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2014-08-06 08:06:39 -07:00
drm drm/radeon: add additional SI pci ids 2014-08-22 10:47:59 -04:00
dt-bindings Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2014-08-11 07:14:01 -07:00
keys Merge remote-tracking branch 'integrity/next-with-keys' into keys-next 2014-07-22 21:54:43 +01:00
kvm KVM: ARM: vgic: add the GICv3 backend 2014-07-11 04:57:36 -07:00
linux NFS client fixes for 3.17 2014-08-25 15:34:28 -07:00
math-emu
media [media] media: atmel-isi: add v4l2 async probe support 2014-07-30 19:35:06 -03:00
memory
misc
net tcp: don't allow syn packets without timestamps to pass tcp_tw_recycle logic 2014-08-14 14:38:54 -07:00
pcmcia
ras
rdma Merge branches 'core', 'cxgb4', 'ipoib', 'iser', 'iwcm', 'mad', 'misc', 'mlx4', 'mlx5', 'ocrdma' and 'srp' into for-next 2014-08-14 08:58:04 -07:00
rxrpc
scsi SCSI misc on 20140815 2014-08-15 18:28:58 -06:00
soc/tegra ARM: tegra: Convert PMC to a driver 2014-07-17 14:58:43 +02:00
sound ALSA: pcm: Allow nonatomic trigger operations 2014-09-03 14:04:08 +02:00
target
trace Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-08-14 10:14:07 -06:00
uapi Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2014-08-24 15:48:12 -07:00
video fbdev changes for 3.17 2014-08-08 18:09:33 -07:00
xen - Remove unused V2 grant table support. 2014-08-07 11:33:15 -07:00
Kbuild