diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-11-07 17:08:28 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-11-09 18:20:40 +0100 |
commit | 1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e (patch) | |
tree | b44569425ea7683d02893cfd145081a11d7677f1 /include/sound | |
parent | 31584ed18c073176a7ad96ddbfd09765e21e813d (diff) | |
download | blackbird-obmc-linux-1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e.tar.gz blackbird-obmc-linux-1fb8510cdb5b7befe8a59f533c7fc12ef0dac73e.zip |
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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 0b8daeed0a33..40289ec2451c 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); |