summaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire/amdtp.h')
-rw-r--r--sound/firewire/amdtp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index fd4ce3030279..28b1bf5891e6 100644
--- a/sound/firewire/amdtp.h
+++ b/sound/firewire/amdtp.h
@@ -1,6 +1,7 @@
#ifndef SOUND_FIREWIRE_AMDTP_H_INCLUDED
#define SOUND_FIREWIRE_AMDTP_H_INCLUDED
+#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/mutex.h>
#include "packets-buffer.h"
@@ -92,6 +93,11 @@ void amdtp_out_stream_pcm_prepare(struct amdtp_out_stream *s);
unsigned long amdtp_out_stream_pcm_pointer(struct amdtp_out_stream *s);
void amdtp_out_stream_pcm_abort(struct amdtp_out_stream *s);
+static inline bool amdtp_out_stream_running(struct amdtp_out_stream *s)
+{
+ return !IS_ERR(s->context);
+}
+
/**
* amdtp_out_stream_set_pcm - configure format of PCM samples
* @s: the AMDTP output stream to be configured