1
0
Fork 0
alistair23-linux/sound
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
..
aoa ALSA: Use dma_zalloc_coherent 2014-06-16 11:39:45 +02:00
arm ASoC: pxa2xx-ac97: prepare and unprepare the clocks 2014-06-09 21:11:18 +01:00
atmel ALSA: sound/atmel/ac97c.c: Convert to module_platform_driver 2014-04-16 10:22:03 +02:00
core ALSA: pcm: Allow nonatomic trigger operations 2014-09-03 14:04:08 +02:00
drivers ALSA: drivers: Convert to snd_card_new() with a device pointer 2014-02-12 10:58:20 +01:00
firewire ALSA: fireworks: fix specifiers in format strings for propper output 2014-08-05 09:15:20 +02:00
i2c ALSA: cs8427: separate HW initialization 2014-04-03 14:59:48 +02:00
isa ALSA: gus: remove checks for CONFIG_SND_DEBUG_ROM 2014-05-30 10:12:10 +02:00
mips ALSA: au1x00: Use resource_size instead of computation 2014-05-28 17:50:57 +02:00
oss sound fixes for 3.17-rc1 2014-08-15 18:06:56 -06:00
parisc ALSA: parisc: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:05 +01:00
pci sound fixes for 3.17-rc2 2014-08-21 14:24:40 -07:00
pcmcia ALSA: pcmcia: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:06 +01:00
ppc of: Migrate of_find_node_by_name() users to for_each_node_by_name() 2014-06-26 17:12:24 +01:00
sh ALSA: sh: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:07 +01:00
soc sound fixes for 3.17-rc2 2014-08-21 14:24:40 -07:00
sparc ALSA: Use dma_zalloc_coherent 2014-06-16 11:39:45 +02:00
spi ALSA: spi: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:08 +01:00
synth ALSA: synth: emux: soundfont.c: Cleaning up memory leak 2014-06-01 14:33:09 +02:00
usb ALSA: usb-audio: fix BOSS ME-25 MIDI regression 2014-08-10 13:28:04 +02:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c consolidate the reassignments of ->f_op in ->open() instances 2013-10-24 23:34:53 -04:00
sound_firmware.c sound_firmware: don't bother with filp_close() 2013-04-09 15:16:32 -04:00