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>
Showing
- drivers/media/pci/saa7134/saa7134-alsa.c 1 addition, 3 deletionsdrivers/media/pci/saa7134/saa7134-alsa.c
- include/sound/pcm.h 1 addition, 0 deletionsinclude/sound/pcm.h
- sound/arm/pxa2xx-pcm-lib.c 1 addition, 3 deletionssound/arm/pxa2xx-pcm-lib.c
- sound/core/pcm_native.c 23 additions, 0 deletionssound/core/pcm_native.c
- sound/firewire/amdtp.c 2 additions, 6 deletionssound/firewire/amdtp.c
- sound/firewire/isight.c 2 additions, 8 deletionssound/firewire/isight.c
- sound/pci/asihpi/asihpi.c 1 addition, 4 deletionssound/pci/asihpi/asihpi.c
- sound/pci/atiixp.c 1 addition, 3 deletionssound/pci/atiixp.c
- sound/pci/atiixp_modem.c 1 addition, 3 deletionssound/pci/atiixp_modem.c
- sound/soc/atmel/atmel-pcm-dma.c 1 addition, 3 deletionssound/soc/atmel/atmel-pcm-dma.c
- sound/soc/fsl/fsl_dma.c 1 addition, 8 deletionssound/soc/fsl/fsl_dma.c
- sound/usb/6fire/pcm.c 4 additions, 13 deletionssound/usb/6fire/pcm.c
- sound/usb/endpoint.c 1 addition, 3 deletionssound/usb/endpoint.c
- sound/usb/misc/ua101.c 4 additions, 14 deletionssound/usb/misc/ua101.c
- sound/usb/usx2y/usbusx2yaudio.c 2 additions, 7 deletionssound/usb/usx2y/usbusx2yaudio.c
Loading
Please register or sign in to comment