summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-11-07 17:08:28 +0100
committerTakashi Iwai <tiwai@suse.de>2014-11-09 18:20:40 +0100
commit1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e (patch)
treeb44569425ea7683d02893cfd145081a11d7677f1 /include/sound
parent31584ed18c073176a7ad96ddbfd09765e21e813d (diff)
downloadop-kernel-dev-1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e.zip
op-kernel-dev-1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e.tar.gz
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>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 0b8daee..40289ec 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -506,6 +506,7 @@ int snd_pcm_status(struct snd_pcm_substream *substream,
int snd_pcm_start(struct snd_pcm_substream *substream);
int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status);
int snd_pcm_drain_done(struct snd_pcm_substream *substream);
+int snd_pcm_stop_xrun(struct snd_pcm_substream *substream);
#ifdef CONFIG_PM
int snd_pcm_suspend(struct snd_pcm_substream *substream);
int snd_pcm_suspend_all(struct snd_pcm *pcm);
OpenPOWER on IntegriCloud