summaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-io.h
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-03-28 05:34:45 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:47 -0300
commitad0992e97c5416e431e19dcfd4f6c84448dc1bc2 (patch)
treeea90956680289c0797b715422e9d1c889f38f3d5 /drivers/media/video/pvrusb2/pvrusb2-io.h
parentbe9cbb7c559eddea19604abafb89faf9c8666715 (diff)
V4L/DVB (7699): pvrusb2: Implement statistics for USB I/O performance / tracking
Implement a mechanism in the pvrusb2 driver for gathering statistics on the stream buffering, including bytes transferred, buffers handled, buffers in flight, etc. This is useful for debugging certain classes of streaming issues and for determining if the buffer pool size is generally correct for the driver. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-io.h')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-io.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.h b/drivers/media/video/pvrusb2/pvrusb2-io.h
index 93279cc2a35e..42fcf8281a87 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-io.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-io.h
@@ -36,6 +36,15 @@ enum pvr2_buffer_state {
struct pvr2_stream;
struct pvr2_buffer;
+struct pvr2_stream_stats {
+ unsigned int buffers_in_queue;
+ unsigned int buffers_in_idle;
+ unsigned int buffers_in_ready;
+ unsigned int buffers_processed;
+ unsigned int buffers_failed;
+ unsigned int bytes_processed;
+};
+
/* Initialize / tear down stream structure */
struct pvr2_stream *pvr2_stream_create(void);
void pvr2_stream_destroy(struct pvr2_stream *);
@@ -45,6 +54,9 @@ void pvr2_stream_setup(struct pvr2_stream *,
void pvr2_stream_set_callback(struct pvr2_stream *,
pvr2_stream_callback func,
void *data);
+void pvr2_stream_get_stats(struct pvr2_stream *,
+ struct pvr2_stream_stats *,
+ int zero_counts);
/* Query / set the nominal buffer count */
int pvr2_stream_get_buffer_count(struct pvr2_stream *);