ALSA: pcm: Add snd_pcm_stop_xrun() helper
authorTakashi Iwai <tiwai@suse.de>
Fri, 7 Nov 2014 16:08:28 +0000 (17:08 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 9 Nov 2014 17:20:40 +0000 (18:20 +0100)
commit1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e
treeb44569425ea7683d02893cfd145081a11d7677f1
parent31584ed18c073176a7ad96ddbfd09765e21e813d
ALSA: pcm: Add snd_pcm_stop_xrun() helper

Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 files changed:
drivers/media/pci/saa7134/saa7134-alsa.c
include/sound/pcm.h
sound/arm/pxa2xx-pcm-lib.c
sound/core/pcm_native.c
sound/firewire/amdtp.c
sound/firewire/isight.c
sound/pci/asihpi/asihpi.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/soc/atmel/atmel-pcm-dma.c
sound/soc/fsl/fsl_dma.c
sound/usb/6fire/pcm.c
sound/usb/endpoint.c
sound/usb/misc/ua101.c
sound/usb/usx2y/usbusx2yaudio.c