aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2011-09-04 16:15:44 -0400
committerClemens Ladisch <clemens@ladisch.de>2013-10-20 16:07:57 -0400
commit20b65dd040ce38e2bc0fa3cae13b954c865b61fe (patch)
tree27b8ae49b43b2b6b4e6635128936ebfcfd20d75c /sound/firewire/amdtp.h
parent9dd81e3143b57d1bf7e8377ab29b86090baa55a8 (diff)
ALSA: firewire: introduce amdtp_out_stream_running()
Introduce the helper function amdtp_out_stream_running(). This makes many checks in amdtp.c clearer and frees the device drivers from having to track this with a separate variable. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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 @@
1#ifndef SOUND_FIREWIRE_AMDTP_H_INCLUDED 1#ifndef SOUND_FIREWIRE_AMDTP_H_INCLUDED
2#define SOUND_FIREWIRE_AMDTP_H_INCLUDED 2#define SOUND_FIREWIRE_AMDTP_H_INCLUDED
3 3
4#include <linux/err.h>
4#include <linux/interrupt.h> 5#include <linux/interrupt.h>
5#include <linux/mutex.h> 6#include <linux/mutex.h>
6#include "packets-buffer.h" 7#include "packets-buffer.h"
@@ -92,6 +93,11 @@ void amdtp_out_stream_pcm_prepare(struct amdtp_out_stream *s);
92unsigned long amdtp_out_stream_pcm_pointer(struct amdtp_out_stream *s); 93unsigned long amdtp_out_stream_pcm_pointer(struct amdtp_out_stream *s);
93void amdtp_out_stream_pcm_abort(struct amdtp_out_stream *s); 94void amdtp_out_stream_pcm_abort(struct amdtp_out_stream *s);
94 95
96static inline bool amdtp_out_stream_running(struct amdtp_out_stream *s)
97{
98 return !IS_ERR(s->context);
99}
100
95/** 101/**
96 * amdtp_out_stream_set_pcm - configure format of PCM samples 102 * amdtp_out_stream_set_pcm - configure format of PCM samples
97 * @s: the AMDTP output stream to be configured 103 * @s: the AMDTP output stream to be configured