From 6a04f98d2f9cdfff61baea74da0ebadc9b151de5 Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 13 May 2012 18:49:14 +0200 Subject: [PATCH] --- yaml --- r: 305799 b: refs/heads/master c: e9148dddc3c7b6121300319c3e31f9380d459be8 h: refs/heads/master i: 305797: 4cf55919a98b1a612ea2ca0078606cbcdaf188d2 305795: 9cfc506a14ec49063f62c671735a6e4d9c07049a 305791: 3a313283351a79c29b0ebfc080a219327e937d4f v: v3 --- [refs] | 2 +- trunk/sound/firewire/amdtp.c | 14 ++++++++++++++ trunk/sound/firewire/amdtp.h | 13 +------------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index e8bb5f2f786d..7985cc5fce86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 76fb87894828756e069a43ce55f775a6c893a53d +refs/heads/master: e9148dddc3c7b6121300319c3e31f9380d459be8 diff --git a/trunk/sound/firewire/amdtp.c b/trunk/sound/firewire/amdtp.c index 3284ee9c1eca..c2685fbd7366 100644 --- a/trunk/sound/firewire/amdtp.c +++ b/trunk/sound/firewire/amdtp.c @@ -531,6 +531,20 @@ int amdtp_out_stream_start(struct amdtp_out_stream *s, int channel, int speed) } EXPORT_SYMBOL(amdtp_out_stream_start); +/** + * amdtp_out_stream_pcm_pointer - get the PCM buffer position + * @s: the AMDTP output stream that transports the PCM data + * + * Returns the current buffer position, in frames. + */ +unsigned long amdtp_out_stream_pcm_pointer(struct amdtp_out_stream *s) +{ + fw_iso_context_flush_completions(s->context); + + return ACCESS_ONCE(s->pcm_buffer_pointer); +} +EXPORT_SYMBOL(amdtp_out_stream_pcm_pointer); + /** * amdtp_out_stream_update - update the stream after a bus reset * @s: the AMDTP output stream diff --git a/trunk/sound/firewire/amdtp.h b/trunk/sound/firewire/amdtp.h index 4987f826f9f3..3f13ff63c5d2 100644 --- a/trunk/sound/firewire/amdtp.h +++ b/trunk/sound/firewire/amdtp.h @@ -84,6 +84,7 @@ void amdtp_out_stream_stop(struct amdtp_out_stream *s); void amdtp_out_stream_set_pcm_format(struct amdtp_out_stream *s, snd_pcm_format_t format); 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); /** @@ -140,18 +141,6 @@ static inline void amdtp_out_stream_pcm_trigger(struct amdtp_out_stream *s, ACCESS_ONCE(s->pcm) = pcm; } -/** - * amdtp_out_stream_pcm_pointer - get the PCM buffer position - * @s: the AMDTP output stream that transports the PCM data - * - * Returns the current buffer position, in frames. - */ -static inline unsigned long -amdtp_out_stream_pcm_pointer(struct amdtp_out_stream *s) -{ - return ACCESS_ONCE(s->pcm_buffer_pointer); -} - static inline bool cip_sfc_is_base_44100(enum cip_sfc sfc) { return sfc & 1;