1 diff -urNad xawtv-3.95.dfsg.1~/console/fbtools.c xawtv-3.95.dfsg.1/console/fbtools.c
2 --- xawtv-3.95.dfsg.1~/console/fbtools.c 2007-07-29 00:54:44.000000000 +0200
3 +++ xawtv-3.95.dfsg.1/console/fbtools.c 2007-07-29 00:55:39.000000000 +0200
5 fb_activate_current(tty);
8 - fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
9 + fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length);
17 + struct fb_var_screeninfo var;
20 + if (0 == ioctl(fb,FBIOGET_VSCREENINFO,&var)) {
21 + if (!memcmp(&var, &fb_ovar, sizeof(var))) {
25 if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar))
26 perror("ioctl FBIOPUT_VSCREENINFO");
28 if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix))
29 perror("ioctl FBIOGET_FSCREENINFO");
30 if (fb_ovar.bits_per_pixel == 8 ||
31 fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
32 - if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap))
33 - perror("ioctl FBIOPUTCMAP");
34 + if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap)) {
36 + * radeonfb in 15/16bpp returns EINVAL when color
37 + * map retrieved by FBIOGETCMAP is programmed back
38 + * by FBIOPUTCMAP. It still programs palette
39 + * correctly, just instead of ignoring items 64-255
40 + * it returns an error.
42 + if (errno != EINVAL) {
43 + perror("ioctl FBIOPUTCMAP");
49 diff -urNad xawtv-3.95.dfsg.1~/console/fbtv.c xawtv-3.95.dfsg.1/console/fbtv.c
50 --- xawtv-3.95.dfsg.1~/console/fbtv.c 2005-09-30 12:09:22.000000000 +0200
51 +++ xawtv-3.95.dfsg.1/console/fbtv.c 2007-07-29 00:55:39.000000000 +0200
56 +fb_loadpalette(int fd)
58 + if (fb_var.bits_per_pixel == 8 ||
59 + fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
60 + if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap)) {
62 + * radeonfb in 15/16bpp returns EINVAL when color
63 + * map retrieved by FBIOGETCMAP is programmed back
64 + * by FBIOPUTCMAP. It still programs palette
65 + * correctly, just instead of ignoring items 64-255
66 + * it returns an error.
68 + if (errno != EINVAL) {
69 + perror("ioctl FBIOPUTCMAP");
76 fb_initcolors(int fd, int gray)
83 - if (fb_var.bits_per_pixel == 8 ||
84 - fb_fix.visual == FB_VISUAL_DIRECTCOLOR) {
85 - if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap))
86 - perror("ioctl FBIOPUTCMAP");
98 + fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length);
104 do_va_cmd(2,"capture","off");
106 - fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
108 do_va_cmd(2,"capture","on");
113 switch_last = fb_switch_state;
115 - fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
117 ioctl(fb,FBIOPAN_DISPLAY,&fb_var);
118 + fb_loadpalette(fb);
119 do_va_cmd(2,"capture","on");
126 - fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
129 if ((fb_switch_state == FB_ACTIVE || keep_dma_on) && !quiet) {
130 /* clear first lines */
134 if (fb_switch_state == FB_ACTIVE)
135 - fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
140 diff -urNad xawtv-3.95.dfsg.1~/console/v4l-conf.c xawtv-3.95.dfsg.1/console/v4l-conf.c
141 --- xawtv-3.95.dfsg.1~/console/v4l-conf.c 2005-02-09 13:27:36.000000000 +0100
142 +++ xawtv-3.95.dfsg.1/console/v4l-conf.c 2007-07-29 00:55:39.000000000 +0200
145 fb.fmt.width = d->width;
146 fb.fmt.height = d->height;
148 + switch (d->bpp != 16 ? d->bpp : d->depth) {
149 case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; break;
150 #if BYTE_ORDER == BIG_ENDIAN
151 case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555X; break;