xref: /openbmc/linux/sound/firewire/amdtp-stream.h (revision da3623ab)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2d67c46b9STakashi Sakamoto #ifndef SOUND_FIREWIRE_AMDTP_H_INCLUDED
3d67c46b9STakashi Sakamoto #define SOUND_FIREWIRE_AMDTP_H_INCLUDED
4d67c46b9STakashi Sakamoto 
5d67c46b9STakashi Sakamoto #include <linux/err.h>
6d67c46b9STakashi Sakamoto #include <linux/interrupt.h>
7d67c46b9STakashi Sakamoto #include <linux/mutex.h>
85955815eSTakashi Sakamoto #include <linux/sched.h>
9d67c46b9STakashi Sakamoto #include <sound/asound.h>
10d67c46b9STakashi Sakamoto #include "packets-buffer.h"
11d67c46b9STakashi Sakamoto 
12d67c46b9STakashi Sakamoto /**
13d67c46b9STakashi Sakamoto  * enum cip_flags - describes details of the streaming protocol
14d67c46b9STakashi Sakamoto  * @CIP_NONBLOCKING: In non-blocking mode, each packet contains
15d67c46b9STakashi Sakamoto  *	sample_rate/8000 samples, with rounding up or down to adjust
16d67c46b9STakashi Sakamoto  *	for clock skew and left-over fractional samples.  This should
17d67c46b9STakashi Sakamoto  *	be used if supported by the device.
18d67c46b9STakashi Sakamoto  * @CIP_BLOCKING: In blocking mode, each packet contains either zero or
19d67c46b9STakashi Sakamoto  *	SYT_INTERVAL samples, with these two types alternating so that
20d67c46b9STakashi Sakamoto  *	the overall sample rate comes out right.
21d67c46b9STakashi Sakamoto  * @CIP_EMPTY_WITH_TAG0: Only for in-stream. Empty in-packets have TAG0.
229dae017bSTakashi Sakamoto  * @CIP_DBC_IS_END_EVENT: The value of dbc in an packet corresponds to the end
239dae017bSTakashi Sakamoto  * of event in the packet. Out of IEC 61883.
24d67c46b9STakashi Sakamoto  * @CIP_WRONG_DBS: Only for in-stream. The value of dbs is wrong in in-packets.
25d67c46b9STakashi Sakamoto  *	The value of data_block_quadlets is used instead of reported value.
26d67c46b9STakashi Sakamoto  * @CIP_SKIP_DBC_ZERO_CHECK: Only for in-stream.  Packets with zero in dbc is
27d67c46b9STakashi Sakamoto  *	skipped for detecting discontinuity.
28d67c46b9STakashi Sakamoto  * @CIP_EMPTY_HAS_WRONG_DBC: Only for in-stream. The value of dbc in empty
29d67c46b9STakashi Sakamoto  *	packet is wrong but the others are correct.
30d67c46b9STakashi Sakamoto  * @CIP_JUMBO_PAYLOAD: Only for in-stream. The number of data blocks in an
31d67c46b9STakashi Sakamoto  *	packet is larger than IEC 61883-6 defines. Current implementation
32d67c46b9STakashi Sakamoto  *	allows 5 times as large as IEC 61883-6 defines.
332128f78fSTakashi Sakamoto  * @CIP_HEADER_WITHOUT_EOH: Only for in-stream. CIP Header doesn't include
342128f78fSTakashi Sakamoto  *	valid EOH.
353b196c39STakashi Sakamoto  * @CIP_NO_HEADERS: a lack of headers in packets
36588f2e2cSTakashi Sakamoto  * @CIP_UNALIGHED_DBC: Only for in-stream. The value of dbc is not alighed to
37588f2e2cSTakashi Sakamoto  *	the value of current SYT_INTERVAL; e.g. initial value is not zero.
38d67c46b9STakashi Sakamoto  */
39d67c46b9STakashi Sakamoto enum cip_flags {
40d67c46b9STakashi Sakamoto 	CIP_NONBLOCKING		= 0x00,
41d67c46b9STakashi Sakamoto 	CIP_BLOCKING		= 0x01,
42dec63cc8STakashi Sakamoto 	CIP_EMPTY_WITH_TAG0	= 0x02,
43dec63cc8STakashi Sakamoto 	CIP_DBC_IS_END_EVENT	= 0x04,
44dec63cc8STakashi Sakamoto 	CIP_WRONG_DBS		= 0x08,
45dec63cc8STakashi Sakamoto 	CIP_SKIP_DBC_ZERO_CHECK	= 0x10,
4662f00e40STakashi Sakamoto 	CIP_EMPTY_HAS_WRONG_DBC	= 0x20,
4762f00e40STakashi Sakamoto 	CIP_JUMBO_PAYLOAD	= 0x40,
482128f78fSTakashi Sakamoto 	CIP_HEADER_WITHOUT_EOH	= 0x80,
493b196c39STakashi Sakamoto 	CIP_NO_HEADER		= 0x100,
50588f2e2cSTakashi Sakamoto 	CIP_UNALIGHED_DBC	= 0x200,
51d67c46b9STakashi Sakamoto };
52d67c46b9STakashi Sakamoto 
53d67c46b9STakashi Sakamoto /**
54d67c46b9STakashi Sakamoto  * enum cip_sfc - supported Sampling Frequency Codes (SFCs)
55d67c46b9STakashi Sakamoto  * @CIP_SFC_32000:   32,000 data blocks
56d67c46b9STakashi Sakamoto  * @CIP_SFC_44100:   44,100 data blocks
57d67c46b9STakashi Sakamoto  * @CIP_SFC_48000:   48,000 data blocks
58d67c46b9STakashi Sakamoto  * @CIP_SFC_88200:   88,200 data blocks
59d67c46b9STakashi Sakamoto  * @CIP_SFC_96000:   96,000 data blocks
60d67c46b9STakashi Sakamoto  * @CIP_SFC_176400: 176,400 data blocks
61d67c46b9STakashi Sakamoto  * @CIP_SFC_192000: 192,000 data blocks
62d67c46b9STakashi Sakamoto  * @CIP_SFC_COUNT: the number of supported SFCs
63d67c46b9STakashi Sakamoto  *
64d67c46b9STakashi Sakamoto  * These values are used to show nominal Sampling Frequency Code in
65d67c46b9STakashi Sakamoto  * Format Dependent Field (FDF) of AMDTP packet header. In IEC 61883-6:2002,
66d67c46b9STakashi Sakamoto  * this code means the number of events per second. Actually the code
67d67c46b9STakashi Sakamoto  * represents the number of data blocks transferred per second in an AMDTP
68d67c46b9STakashi Sakamoto  * stream.
69d67c46b9STakashi Sakamoto  *
70d67c46b9STakashi Sakamoto  * In IEC 61883-6:2005, some extensions were added to support more types of
71d67c46b9STakashi Sakamoto  * data such as 'One Bit LInear Audio', therefore the meaning of SFC became
72d67c46b9STakashi Sakamoto  * different depending on the types.
73d67c46b9STakashi Sakamoto  *
74d67c46b9STakashi Sakamoto  * Currently our implementation is compatible with IEC 61883-6:2002.
75d67c46b9STakashi Sakamoto  */
76d67c46b9STakashi Sakamoto enum cip_sfc {
77d67c46b9STakashi Sakamoto 	CIP_SFC_32000  = 0,
78d67c46b9STakashi Sakamoto 	CIP_SFC_44100  = 1,
79d67c46b9STakashi Sakamoto 	CIP_SFC_48000  = 2,
80d67c46b9STakashi Sakamoto 	CIP_SFC_88200  = 3,
81d67c46b9STakashi Sakamoto 	CIP_SFC_96000  = 4,
82d67c46b9STakashi Sakamoto 	CIP_SFC_176400 = 5,
83d67c46b9STakashi Sakamoto 	CIP_SFC_192000 = 6,
84d67c46b9STakashi Sakamoto 	CIP_SFC_COUNT
85d67c46b9STakashi Sakamoto };
86d67c46b9STakashi Sakamoto 
87d67c46b9STakashi Sakamoto struct fw_unit;
88d67c46b9STakashi Sakamoto struct fw_iso_context;
89d67c46b9STakashi Sakamoto struct snd_pcm_substream;
90d67c46b9STakashi Sakamoto struct snd_pcm_runtime;
91d67c46b9STakashi Sakamoto 
92d67c46b9STakashi Sakamoto enum amdtp_stream_direction {
93d67c46b9STakashi Sakamoto 	AMDTP_OUT_STREAM = 0,
94d67c46b9STakashi Sakamoto 	AMDTP_IN_STREAM
95d67c46b9STakashi Sakamoto };
96d67c46b9STakashi Sakamoto 
9704130cf8STakashi Sakamoto struct pkt_desc {
9804130cf8STakashi Sakamoto 	u32 cycle;
9904130cf8STakashi Sakamoto 	u32 syt;
10004130cf8STakashi Sakamoto 	unsigned int data_blocks;
10104130cf8STakashi Sakamoto 	unsigned int data_block_counter;
10204130cf8STakashi Sakamoto 	__be32 *ctx_payload;
10304130cf8STakashi Sakamoto };
10404130cf8STakashi Sakamoto 
105df075feeSTakashi Sakamoto struct amdtp_stream;
1069a738ad1STakashi Sakamoto typedef unsigned int (*amdtp_stream_process_ctx_payloads_t)(
107df075feeSTakashi Sakamoto 						struct amdtp_stream *s,
108d2c104a3STakashi Sakamoto 						const struct pkt_desc *desc,
1099a738ad1STakashi Sakamoto 						unsigned int packets,
110d2c104a3STakashi Sakamoto 						struct snd_pcm_substream *pcm);
1112472cfb3STakashi Sakamoto 
1122472cfb3STakashi Sakamoto struct amdtp_domain;
113d67c46b9STakashi Sakamoto struct amdtp_stream {
114d67c46b9STakashi Sakamoto 	struct fw_unit *unit;
115ffe66bbeSTakashi Sakamoto 	// The combination of cip_flags enumeration-constants.
116ffe66bbeSTakashi Sakamoto 	unsigned int flags;
117d67c46b9STakashi Sakamoto 	enum amdtp_stream_direction direction;
118d67c46b9STakashi Sakamoto 	struct mutex mutex;
119d67c46b9STakashi Sakamoto 
120d67c46b9STakashi Sakamoto 	/* For packet processing. */
121d67c46b9STakashi Sakamoto 	struct fw_iso_context *context;
122d67c46b9STakashi Sakamoto 	struct iso_packets_buffer buffer;
123a0e02331STakashi Sakamoto 	unsigned int queue_size;
124d67c46b9STakashi Sakamoto 	int packet_index;
12504130cf8STakashi Sakamoto 	struct pkt_desc *pkt_descs;
1263b196c39STakashi Sakamoto 	int tag;
127d3d10a4aSTakashi Sakamoto 	union {
128d3d10a4aSTakashi Sakamoto 		struct {
129d3d10a4aSTakashi Sakamoto 			unsigned int ctx_header_size;
130d3d10a4aSTakashi Sakamoto 
131d3d10a4aSTakashi Sakamoto 			// limit for payload of iso packet.
132f11453c7STakashi Sakamoto 			unsigned int max_ctx_payload_length;
133d67c46b9STakashi Sakamoto 
134d3d10a4aSTakashi Sakamoto 			// For quirks of CIP headers.
135d3d10a4aSTakashi Sakamoto 			// Fixed interval of dbc between previos/current
136d3d10a4aSTakashi Sakamoto 			// packets.
137d3d10a4aSTakashi Sakamoto 			unsigned int dbc_interval;
138d3d10a4aSTakashi Sakamoto 		} tx;
139d3d10a4aSTakashi Sakamoto 		struct {
140d3d10a4aSTakashi Sakamoto 			// To calculate CIP data blocks and tstamp.
141d3d10a4aSTakashi Sakamoto 			unsigned int transfer_delay;
1421a4be183STakashi Sakamoto 			unsigned int seq_index;
1431a4be183STakashi Sakamoto 
144d3d10a4aSTakashi Sakamoto 			// To generate CIP header.
145d3d10a4aSTakashi Sakamoto 			unsigned int fdf;
1463baf3053STakashi Sakamoto 			int syt_override;
14760dd4929STakashi Sakamoto 
14860dd4929STakashi Sakamoto 			// To generate constant hardware IRQ.
149e229853dSTakashi Sakamoto 			unsigned int event_count;
15060dd4929STakashi Sakamoto 		} rx;
15160dd4929STakashi Sakamoto 	} ctx_data;
152d3d10a4aSTakashi Sakamoto 
153d67c46b9STakashi Sakamoto 	/* For CIP headers. */
154d67c46b9STakashi Sakamoto 	unsigned int source_node_id_field;
155d67c46b9STakashi Sakamoto 	unsigned int data_block_quadlets;
156d67c46b9STakashi Sakamoto 	unsigned int data_block_counter;
1579863874fSTakashi Sakamoto 	unsigned int sph;
158d67c46b9STakashi Sakamoto 	unsigned int fmt;
159d67c46b9STakashi Sakamoto 
160d67c46b9STakashi Sakamoto 	/* Internal flags. */
161d67c46b9STakashi Sakamoto 	enum cip_sfc sfc;
162d67c46b9STakashi Sakamoto 	unsigned int syt_interval;
163d67c46b9STakashi Sakamoto 
164d67c46b9STakashi Sakamoto 	/* For a PCM substream processing. */
165d67c46b9STakashi Sakamoto 	struct snd_pcm_substream *pcm;
1662b3d2987STakashi Iwai 	struct work_struct period_work;
1674a9bfafcSTakashi Sakamoto 	snd_pcm_uframes_t pcm_buffer_pointer;
168d67c46b9STakashi Sakamoto 	unsigned int pcm_period_pointer;
169d67c46b9STakashi Sakamoto 
170d67c46b9STakashi Sakamoto 	/* To wait for first packet. */
171d67c46b9STakashi Sakamoto 	bool callbacked;
172d67c46b9STakashi Sakamoto 	wait_queue_head_t callback_wait;
173a04513f8STakashi Sakamoto 	u32 start_cycle;
174705794c5STakashi Sakamoto 	unsigned int next_cycle;
175d67c46b9STakashi Sakamoto 
176df075feeSTakashi Sakamoto 	/* For backends to process data blocks. */
177df075feeSTakashi Sakamoto 	void *protocol;
1789a738ad1STakashi Sakamoto 	amdtp_stream_process_ctx_payloads_t process_ctx_payloads;
1796261f90bSTakashi Sakamoto 
1806261f90bSTakashi Sakamoto 	// For domain.
181157a53eeSTakashi Sakamoto 	int channel;
182157a53eeSTakashi Sakamoto 	int speed;
1836261f90bSTakashi Sakamoto 	struct list_head list;
1842472cfb3STakashi Sakamoto 	struct amdtp_domain *domain;
185d67c46b9STakashi Sakamoto };
186d67c46b9STakashi Sakamoto 
187d67c46b9STakashi Sakamoto int amdtp_stream_init(struct amdtp_stream *s, struct fw_unit *unit,
188ffe66bbeSTakashi Sakamoto 		      enum amdtp_stream_direction dir, unsigned int flags,
189df075feeSTakashi Sakamoto 		      unsigned int fmt,
1909a738ad1STakashi Sakamoto 		      amdtp_stream_process_ctx_payloads_t process_ctx_payloads,
191df075feeSTakashi Sakamoto 		      unsigned int protocol_size);
192d67c46b9STakashi Sakamoto void amdtp_stream_destroy(struct amdtp_stream *s);
193d67c46b9STakashi Sakamoto 
194df075feeSTakashi Sakamoto int amdtp_stream_set_parameters(struct amdtp_stream *s, unsigned int rate,
195df075feeSTakashi Sakamoto 				unsigned int data_block_quadlets);
196d67c46b9STakashi Sakamoto unsigned int amdtp_stream_get_max_payload(struct amdtp_stream *s);
197d67c46b9STakashi Sakamoto 
198d67c46b9STakashi Sakamoto void amdtp_stream_update(struct amdtp_stream *s);
199d67c46b9STakashi Sakamoto 
200d67c46b9STakashi Sakamoto int amdtp_stream_add_pcm_hw_constraints(struct amdtp_stream *s,
201d67c46b9STakashi Sakamoto 					struct snd_pcm_runtime *runtime);
202df075feeSTakashi Sakamoto 
203d67c46b9STakashi Sakamoto void amdtp_stream_pcm_prepare(struct amdtp_stream *s);
204d67c46b9STakashi Sakamoto void amdtp_stream_pcm_abort(struct amdtp_stream *s);
205d67c46b9STakashi Sakamoto 
206d67c46b9STakashi Sakamoto extern const unsigned int amdtp_syt_intervals[CIP_SFC_COUNT];
207d67c46b9STakashi Sakamoto extern const unsigned int amdtp_rate_table[CIP_SFC_COUNT];
208d67c46b9STakashi Sakamoto 
209d67c46b9STakashi Sakamoto /**
210d67c46b9STakashi Sakamoto  * amdtp_stream_running - check stream is running or not
211d67c46b9STakashi Sakamoto  * @s: the AMDTP stream
212d67c46b9STakashi Sakamoto  *
213d67c46b9STakashi Sakamoto  * If this function returns true, the stream is running.
214d67c46b9STakashi Sakamoto  */
215d67c46b9STakashi Sakamoto static inline bool amdtp_stream_running(struct amdtp_stream *s)
216d67c46b9STakashi Sakamoto {
217d67c46b9STakashi Sakamoto 	return !IS_ERR(s->context);
218d67c46b9STakashi Sakamoto }
219d67c46b9STakashi Sakamoto 
220d67c46b9STakashi Sakamoto /**
221d67c46b9STakashi Sakamoto  * amdtp_streaming_error - check for streaming error
222d67c46b9STakashi Sakamoto  * @s: the AMDTP stream
223d67c46b9STakashi Sakamoto  *
224d67c46b9STakashi Sakamoto  * If this function returns true, the stream's packet queue has stopped due to
225d67c46b9STakashi Sakamoto  * an asynchronous error.
226d67c46b9STakashi Sakamoto  */
227d67c46b9STakashi Sakamoto static inline bool amdtp_streaming_error(struct amdtp_stream *s)
228d67c46b9STakashi Sakamoto {
229d67c46b9STakashi Sakamoto 	return s->packet_index < 0;
230d67c46b9STakashi Sakamoto }
231d67c46b9STakashi Sakamoto 
232d67c46b9STakashi Sakamoto /**
233d67c46b9STakashi Sakamoto  * amdtp_stream_pcm_running - check PCM substream is running or not
234d67c46b9STakashi Sakamoto  * @s: the AMDTP stream
235d67c46b9STakashi Sakamoto  *
236d67c46b9STakashi Sakamoto  * If this function returns true, PCM substream in the AMDTP stream is running.
237d67c46b9STakashi Sakamoto  */
238d67c46b9STakashi Sakamoto static inline bool amdtp_stream_pcm_running(struct amdtp_stream *s)
239d67c46b9STakashi Sakamoto {
240d67c46b9STakashi Sakamoto 	return !!s->pcm;
241d67c46b9STakashi Sakamoto }
242d67c46b9STakashi Sakamoto 
243d67c46b9STakashi Sakamoto /**
244d67c46b9STakashi Sakamoto  * amdtp_stream_pcm_trigger - start/stop playback from a PCM device
245d67c46b9STakashi Sakamoto  * @s: the AMDTP stream
246d67c46b9STakashi Sakamoto  * @pcm: the PCM device to be started, or %NULL to stop the current device
247d67c46b9STakashi Sakamoto  *
248d67c46b9STakashi Sakamoto  * Call this function on a running isochronous stream to enable the actual
249d67c46b9STakashi Sakamoto  * transmission of PCM data.  This function should be called from the PCM
250d67c46b9STakashi Sakamoto  * device's .trigger callback.
251d67c46b9STakashi Sakamoto  */
252d67c46b9STakashi Sakamoto static inline void amdtp_stream_pcm_trigger(struct amdtp_stream *s,
253d67c46b9STakashi Sakamoto 					    struct snd_pcm_substream *pcm)
254d67c46b9STakashi Sakamoto {
2556aa7de05SMark Rutland 	WRITE_ONCE(s->pcm, pcm);
256d67c46b9STakashi Sakamoto }
257d67c46b9STakashi Sakamoto 
258d67c46b9STakashi Sakamoto static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc)
259d67c46b9STakashi Sakamoto {
260d67c46b9STakashi Sakamoto 	return sfc & 1;
261d67c46b9STakashi Sakamoto }
262d67c46b9STakashi Sakamoto 
263d67c46b9STakashi Sakamoto /**
264d67c46b9STakashi Sakamoto  * amdtp_stream_wait_callback - sleep till callbacked or timeout
265d67c46b9STakashi Sakamoto  * @s: the AMDTP stream
266d67c46b9STakashi Sakamoto  * @timeout: msec till timeout
267d67c46b9STakashi Sakamoto  *
268d67c46b9STakashi Sakamoto  * If this function return false, the AMDTP stream should be stopped.
269d67c46b9STakashi Sakamoto  */
270d67c46b9STakashi Sakamoto static inline bool amdtp_stream_wait_callback(struct amdtp_stream *s,
271d67c46b9STakashi Sakamoto 					      unsigned int timeout)
272d67c46b9STakashi Sakamoto {
273d67c46b9STakashi Sakamoto 	return wait_event_timeout(s->callback_wait,
2748461352dSKaixu Xia 				  s->callbacked,
275d67c46b9STakashi Sakamoto 				  msecs_to_jiffies(timeout)) > 0;
276d67c46b9STakashi Sakamoto }
277d67c46b9STakashi Sakamoto 
27825babf29STakashi Sakamoto struct seq_desc {
27925babf29STakashi Sakamoto 	unsigned int syt_offset;
28025babf29STakashi Sakamoto 	unsigned int data_blocks;
28125babf29STakashi Sakamoto };
28225babf29STakashi Sakamoto 
2833ec3d7a3STakashi Sakamoto struct amdtp_domain {
2843ec3d7a3STakashi Sakamoto 	struct list_head streams;
285d68c3123STakashi Sakamoto 
286d68c3123STakashi Sakamoto 	unsigned int events_per_period;
287a0e02331STakashi Sakamoto 	unsigned int events_per_buffer;
28803b4816dSTakashi Sakamoto 
28903b4816dSTakashi Sakamoto 	struct amdtp_stream *irq_target;
29025babf29STakashi Sakamoto 
291d32872f3STakashi Sakamoto 	struct {
292*da3623abSTakashi Sakamoto 		unsigned int tx_start;
293*da3623abSTakashi Sakamoto 	} processing_cycle;
294*da3623abSTakashi Sakamoto 
295*da3623abSTakashi Sakamoto 	struct {
296d32872f3STakashi Sakamoto 		struct seq_desc *descs;
297d32872f3STakashi Sakamoto 		unsigned int size;
298d32872f3STakashi Sakamoto 		unsigned int tail;
299d32872f3STakashi Sakamoto 	} seq;
3001a4be183STakashi Sakamoto 
3011a4be183STakashi Sakamoto 	unsigned int data_block_state;
3021a4be183STakashi Sakamoto 	unsigned int syt_offset_state;
3031a4be183STakashi Sakamoto 	unsigned int last_syt_offset;
3043ec3d7a3STakashi Sakamoto };
3053ec3d7a3STakashi Sakamoto 
3063ec3d7a3STakashi Sakamoto int amdtp_domain_init(struct amdtp_domain *d);
3073ec3d7a3STakashi Sakamoto void amdtp_domain_destroy(struct amdtp_domain *d);
3083ec3d7a3STakashi Sakamoto 
309157a53eeSTakashi Sakamoto int amdtp_domain_add_stream(struct amdtp_domain *d, struct amdtp_stream *s,
310157a53eeSTakashi Sakamoto 			    int channel, int speed);
311157a53eeSTakashi Sakamoto 
312acfedcbeSTakashi Sakamoto int amdtp_domain_start(struct amdtp_domain *d, unsigned int ir_delay_cycle);
3136261f90bSTakashi Sakamoto void amdtp_domain_stop(struct amdtp_domain *d);
3146261f90bSTakashi Sakamoto 
315d68c3123STakashi Sakamoto static inline int amdtp_domain_set_events_per_period(struct amdtp_domain *d,
316a0e02331STakashi Sakamoto 						unsigned int events_per_period,
317a0e02331STakashi Sakamoto 						unsigned int events_per_buffer)
318d68c3123STakashi Sakamoto {
319d68c3123STakashi Sakamoto 	d->events_per_period = events_per_period;
320a0e02331STakashi Sakamoto 	d->events_per_buffer = events_per_buffer;
321d68c3123STakashi Sakamoto 
322d68c3123STakashi Sakamoto 	return 0;
323d68c3123STakashi Sakamoto }
324d68c3123STakashi Sakamoto 
325f890f9a0STakashi Sakamoto unsigned long amdtp_domain_stream_pcm_pointer(struct amdtp_domain *d,
326f890f9a0STakashi Sakamoto 					      struct amdtp_stream *s);
327e6dcc92fSTakashi Sakamoto int amdtp_domain_stream_pcm_ack(struct amdtp_domain *d, struct amdtp_stream *s);
328e6dcc92fSTakashi Sakamoto 
329d67c46b9STakashi Sakamoto #endif
330