[mythtv] Patch for ivtv alpha setup, honors on/off bit

Chris Kennedy ckennedy at kmos.org
Wed May 19 13:30:03 EDT 2004


This properly honors the on/off bit of the alpha state structure used to
change the alpha settings for ivtv in Myth.  This bit isn't set in Myth,
and the driver currently just sets it no matter what input is given, which
is going to change and then this patch will be necessary.

It will work the same way before/after the driver honors that bit, only
difference will be that Myth then would actually fix the framebuffer and
turn it on if it was in an off state prior to Myth OSD usage.

This would actually allow for Myth to make live TV a bit nicer, the FB does
give some film over the picture slightly even at level 0, so this would really
turn it off/on when not desired (although it's not a horrible thing, and
I may be really picky on seeing a difference there with it on but at 0,
I think in localalpha mode it is really clear though, which myth does set
during live tv, so that may be ok).


Index: libs/libmythtv/videoout_ivtv.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/videoout_ivtv.cpp,v
retrieving revision 1.29
diff -u -r1.29 videoout_ivtv.cpp
--- libs/libmythtv/videoout_ivtv.cpp    27 Mar 2004 05:54:21 -0000      1.29
+++ libs/libmythtv/videoout_ivtv.cpp    19 May 2004 17:22:12 -0000
@@ -63,6 +63,7 @@

         fbstate.status |= IVTVFB_STATUS_GLOBAL_ALPHA;
         fbstate.status &= ~IVTVFB_STATUS_LOCAL_ALPHA;
+       fbstate.status |= IVTVFB_STATUS_ENABLED;
         fbstate.alpha = 255;

         if (ioctl(fbfd, IVTVFB_IOCTL_SET_STATE, &fbstate) < 0)
@@ -182,6 +183,7 @@

         fbstate.status &= ~IVTVFB_STATUS_GLOBAL_ALPHA;
         fbstate.status |= IVTVFB_STATUS_LOCAL_ALPHA;
+       fbstate.status |= IVTVFB_STATUS_ENABLED;
         fbstate.alpha = 0;

         if (ioctl(fbfd, IVTVFB_IOCTL_SET_STATE, &fbstate) < 0)
@@ -265,6 +267,7 @@

     fbstate.status |= IVTVFB_STATUS_GLOBAL_ALPHA;
     fbstate.status &= ~IVTVFB_STATUS_LOCAL_ALPHA;
+    fbstate.status |= IVTVFB_STATUS_ENABLED;

     int usealpha = gContext->GetNumSetting("PVR350EPGAlphaValue", 164);
     fbstate.alpha = usealpha;
@@ -288,6 +291,7 @@

     fbstate.status &= ~IVTVFB_STATUS_GLOBAL_ALPHA;
     fbstate.status |= IVTVFB_STATUS_LOCAL_ALPHA;
+    fbstate.status |= IVTVFB_STATUS_ENABLED;
     fbstate.alpha = 0;

     if (ioctl(fbfd, IVTVFB_IOCTL_SET_STATE, &fbstate) < 0)



Thanks,
Chris
-- 
---
 Chris Kennedy / ckennedy at kmos.cmsu.edu
  Engineer KMOS-TV/KTBG-FM
  Broadcasting Services Department
  Central Missouri State University


More information about the mythtv-dev mailing list