changeset 25371:657c63d001ae

implemented frame selection for savage driver synchronized with vidix.sf.net r325
author ben
date Fri, 14 Dec 2007 18:38:08 +0000
parents 6ca7e3c62a5a
children 9850c8b67ccc
files vidix/savage_vid.c
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/savage_vid.c	Fri Dec 14 18:36:08 2007 +0000
+++ b/vidix/savage_vid.c	Fri Dec 14 18:38:08 2007 +0000
@@ -1248,6 +1248,25 @@
   return 0;
 }
 
+/**
+ * @brief Driver should prepare and activate corresponded frame.
+ *
+ * @param frame the frame index.
+ *
+ * @return 0.
+ *
+ * @note This function is used only for double and triple buffering
+ *       and never used for single buffering playback.
+ */
+int
+savage_frame_select (unsigned int frame)
+{
+  OUTREG(SSTREAM_FBADDR0_REG, info->picture_offset
+         + (info->frame_size * frame));
+ 
+  return 0;
+}
+
 static void debugout(unsigned int addr, unsigned int val){
 	return ;
     switch ( addr ){
@@ -1345,6 +1364,7 @@
   .config_playback = savage_config_playback,
   .playback_on = savage_playback_on,
   .playback_off = savage_playback_off,
+  .frame_sel = savage_frame_select,
   .get_eq = savage_get_eq,
   .set_eq = savage_set_eq,
   .set_gkey = savage_set_gkeys,