blob: d5794ef97aff2d4b59310c0532d69a0b0e04f5cd [file] [log] [blame]
#include_next <sound/pcm.h>
#include <linux/version.h>
* snd_pcm_stop_xrun - stop the running streams as XRUN
* @substream: the PCM substream instance
* This stops the given running substream (and all linked substreams) as XRUN.
* Unlike snd_pcm_stop(), this function takes the substream lock by itself.
* Return: Zero if successful, or a negative error code.
static inline int snd_pcm_stop_xrun(struct snd_pcm_substream *substream)
unsigned long flags;
int ret = 0;
snd_pcm_stream_lock_irqsave(substream, flags);
if (snd_pcm_running(substream))
ret = snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
snd_pcm_stream_unlock_irqrestore(substream, flags);
return ret;
#endif /* LINUX_VERSION_IS_LESS(3,19,0) */
#endif /* __BACKPORT_SOUND_PCM_H */