summaryrefslogtreecommitdiff
path: root/patches/vdr-dxr3-wss.patch
blob: a9627ca5b9fefb6bd8b917f06109c3604448ce57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Wide screen signaling (WSS) patch for vdr-dxr3 by Seppo Ingalsuo.
Apply to: vdr-dxr3 plugin sources
More info: http://thread.gmane.org/gmane.linux.vdr/17095
Note: you'll probably want to apply em8300-adv7170-wss.patch too
  in order to get support for this functionality in the driver.

Index: dxr3interface.c
===================================================================
RCS file: /cvsroot/dxr3plugin/dxr3/dxr3interface.c,v
retrieving revision 1.4.2.27
diff -u -r1.4.2.27 dxr3interface.c
--- dxr3interface.c	12 Dec 2005 17:16:15 -0000	1.4.2.27
+++ dxr3interface.c	12 Dec 2005 20:18:29 -0000
@@ -410,20 +410,39 @@
 void cDxr3Interface::SetAspectRatio(uint32_t ratio)
 {
     static int requestCounter = 0;
+    int wssmode;
+    int aspect;
 
     Lock();
 
     if (cDxr3ConfigData::Instance().GetForceLetterBox())
 	ratio = EM8300_ASPECTRATIO_16_9;
-    if (Setup.VideoFormat)
-	ratio = EM8300_ASPECTRATIO_4_3;
 
     if (!m_ExternalReleased && ratio != UNKNOWN_ASPECT_RATIO)
     {
 	if (ratio != m_aspectRatio && requestCounter > 50)
 	{
+	    if (Setup.VideoFormat)
+	    {
+		aspect = EM8300_ASPECTRATIO_4_3;
+#ifdef EM8300_IOCTL_SET_WSS
+		if (ratio == EM8300_ASPECTRATIO_16_9)
+		    wssmode = EM8300_WSS_16_9;
+		else
+		    wssmode = EM8300_WSS_OFF;
+		if (ioctl(m_fdControl, EM8300_IOCTL_SET_WSS, &wssmode) < 0)
+		{
+		    esyslog("dxr3: unable to set WSS: %m");
+		}
+#endif
+	    }
+	    else
+	    {
+		aspect = ratio;
+	    }
+
 	    requestCounter = 0;
-	    if (ioctl(m_fdControl, EM8300_IOCTL_SET_ASPECTRATIO, &ratio) < 0)
+	    if (ioctl(m_fdControl, EM8300_IOCTL_SET_ASPECTRATIO, &aspect) < 0)
 	    {
 		esyslog("dxr3: unable to set aspect ratio: %m");
 	    }