ALSA: firewire-lib: flush completed packets when reading PCM position
By flushing all completed but not yet reported packets before reading the PCM hardware position, the granularity of the pointer is improved from the interrupt interval to the packet size. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
此提交包含在:
@@ -531,6 +531,20 @@ err_unlock:
|
||||
}
|
||||
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
|
||||
|
新增問題並參考
封鎖使用者