[ANNOUNCE] vdr-dxr3 0.2.9

Message ID 200901030035.02510.ville.skytta@iki.fi
State New
Headers

Commit Message

Ville Skyttä Jan. 2, 2009, 10:35 p.m. UTC
  On Friday 02 January 2009, Jan Willies wrote:

> Is there a way to apply the brightness/contrast settings on VDR-start?
> Currently I have to go to Menu->System->Plugins->Dxr3 and press OK after
> every start of VDR.

Hm, the configured values do get saved but I have no idea why there's no code 
to apply them at startup.  The attached patch should fix that.

> And, can I apply these settings without starting 
> VDR, maybe via an entry in /sys/class/em8300 (like the zoom stuff)?

I don't think so.  But I suppose it would be fairly easy to implement in the 
driver - post a request for enhancement to the dxr3-devel mailing list?
  

Comments

Jan Willies Jan. 3, 2009, 10:39 p.m. UTC | #1
Ville Skyttä schrieb:
> On Friday 02 January 2009, Jan Willies wrote:
> 
>> Is there a way to apply the brightness/contrast settings on VDR-start?
>> Currently I have to go to Menu->System->Plugins->Dxr3 and press OK after
>> every start of VDR.
> 
> Hm, the configured values do get saved but I have no idea why there's no code 
> to apply them at startup.  The attached patch should fix that.

Yup works great, thanks.


cheers

- jan
  

Patch

Index: dxr3interface.c
===================================================================
RCS file: /cvsroot/dxr3plugin/dxr3/dxr3interface.c,v
retrieving revision 1.4.2.39
diff -u -r1.4.2.39 dxr3interface.c
--- dxr3interface.c	29 Dec 2008 21:21:31 -0000	1.4.2.39
+++ dxr3interface.c	2 Jan 2009 22:28:01 -0000
@@ -1046,6 +1046,17 @@ 
 	exit(1);
     }
 
+    // set brightness/contrast/saturation
+    m_bcs.brightness = cDxr3ConfigData::Instance().GetBrightness();
+    m_bcs.contrast = cDxr3ConfigData::Instance().GetContrast();
+    m_bcs.saturation = cDxr3ConfigData::Instance().GetSaturation();
+    dsyslog("dxr3: configure: brightness=%d,contrast=%d,saturation=%d",
+	    m_bcs.brightness, m_bcs.contrast, m_bcs.saturation);
+    if (ioctl(m_fdControl, EM8300_IOCTL_SETBCS, &m_bcs) < 0)
+    {
+	esyslog("dxr3: unable to set brightness/contrast/saturation: %m");
+    }
+
     ConfigureDeviceAudio();
 }