aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire/amdtp.h')
-rw-r--r--sound/firewire/amdtp.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index 537a9cb83581..4987f826f9f3 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/interrupt.h>
4#include <linux/mutex.h> 5#include <linux/mutex.h>
5#include <linux/spinlock.h> 6#include <linux/spinlock.h>
6#include "packets-buffer.h" 7#include "packets-buffer.h"
@@ -55,6 +56,7 @@ struct amdtp_out_stream {
55 struct iso_packets_buffer buffer; 56 struct iso_packets_buffer buffer;
56 57
57 struct snd_pcm_substream *pcm; 58 struct snd_pcm_substream *pcm;
59 struct tasklet_struct period_tasklet;
58 60
59 int packet_index; 61 int packet_index;
60 unsigned int data_block_counter; 62 unsigned int data_block_counter;
@@ -81,6 +83,7 @@ void amdtp_out_stream_stop(struct amdtp_out_stream *s);
81 83
82void amdtp_out_stream_set_pcm_format(struct amdtp_out_stream *s, 84void amdtp_out_stream_set_pcm_format(struct amdtp_out_stream *s,
83 snd_pcm_format_t format); 85 snd_pcm_format_t format);
86void amdtp_out_stream_pcm_prepare(struct amdtp_out_stream *s);
84void amdtp_out_stream_pcm_abort(struct amdtp_out_stream *s); 87void amdtp_out_stream_pcm_abort(struct amdtp_out_stream *s);
85 88
86/** 89/**
@@ -123,18 +126,6 @@ static inline bool amdtp_out_streaming_error(struct amdtp_out_stream *s)
123} 126}
124 127
125/** 128/**
126 * amdtp_out_stream_pcm_prepare - prepare PCM device for running
127 * @s: the AMDTP output stream
128 *
129 * This function should be called from the PCM device's .prepare callback.
130 */
131static inline void amdtp_out_stream_pcm_prepare(struct amdtp_out_stream *s)
132{
133 s->pcm_buffer_pointer = 0;
134 s->pcm_period_pointer = 0;
135}
136
137/**
138 * amdtp_out_stream_pcm_trigger - start/stop playback from a PCM device 129 * amdtp_out_stream_pcm_trigger - start/stop playback from a PCM device
139 * @s: the AMDTP output stream 130 * @s: the AMDTP output stream
140 * @pcm: the PCM device to be started, or %NULL to stop the current device 131 * @pcm: the PCM device to be started, or %NULL to stop the current device