]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/firewire/amdtp.h
fb: Reduce priority of resource conflict message
[karo-tx-linux.git] / sound / firewire / amdtp.h
index 02dc1a664b55de77c5abb67eeb10d8c8f7bd7ce6..537a9cb83581b1b469b83914f39d3158413beb4f 100644 (file)
@@ -56,7 +56,7 @@ struct amdtp_out_stream {
 
        struct snd_pcm_substream *pcm;
 
-       unsigned int packet_counter;
+       int packet_index;
        unsigned int data_block_counter;
 
        unsigned int data_block_state;
@@ -110,6 +110,18 @@ static inline void amdtp_out_stream_set_midi(struct amdtp_out_stream *s,
        s->midi_ports = midi_ports;
 }
 
+/**
+ * amdtp_out_streaming_error - check for streaming error
+ * @s: the AMDTP output stream
+ *
+ * If this function returns true, the stream's packet queue has stopped due to
+ * an asynchronous error.
+ */
+static inline bool amdtp_out_streaming_error(struct amdtp_out_stream *s)
+{
+       return s->packet_index < 0;
+}
+
 /**
  * amdtp_out_stream_pcm_prepare - prepare PCM device for running
  * @s: the AMDTP output stream