patch for bktr(4): better colorbars ioctls
Jacob Meuser
jakemsr at jakemsr.com
Sat Apr 23 16:07:30 PDT 2005
see the FIXME above the current colorbar ioctl routines.
--
<jakemsr at jakemsr.com>
Index: bktr_core.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/bktr/bktr_core.c,v
retrieving revision 1.138
diff -u -r1.138 bktr_core.c
--- bktr_core.c 9 Jan 2005 17:42:03 -0000 1.138
+++ bktr_core.c 23 Apr 2005 23:05:12 -0000
@@ -2200,6 +2200,23 @@
OUTB(bktr, BKTR_COLOR_CTL, INB(bktr, BKTR_COLOR_CTL) & ~(BT848_COLOR_CTL_COLOR_BARS));
break;
+#ifdef BT848_SETCBARS
+ case BT848_SETCBARS: /* set colorbar output */
+ temp = INB(bktr, BKTR_COLOR_CTL);
+ (*(int *)arg != 0) ?
+ (temp |= BT848_COLOR_CTL_COLOR_BARS) :
+ (temp &= ~(BT848_COLOR_CTL_COLOR_BARS));
+ OUTB(bktr, BKTR_COLOR_CTL, temp);
+ break;
+#endif
+
+#ifdef BT848_GETCBARS
+ case BT848_GETCBARS:
+ temp = (INB(bktr, BKTR_COLOR_CTL) & BT848_COLOR_CTL_COLOR_BARS);
+ *(int *)arg = (temp != 0);
+ break;
+#endif
+
case BT848_GAUDIO: /* get audio channel */
temp = bktr->audio_mux_select;
if ( bktr->audio_mute_state == TRUE )
Index: ioctl_bt848.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/bktr/ioctl_bt848.h,v
retrieving revision 1.30
diff -u -r1.30 ioctl_bt848.h
--- ioctl_bt848.h 20 Dec 2003 17:12:25 -0000 1.30
+++ ioctl_bt848.h 23 Apr 2005 23:05:12 -0000
@@ -124,6 +124,8 @@
#define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */
#define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */
+#define BT848_SETCBARS _IOW('x', 45, int) /* set colorbar */
+#define BT848_GETCBARS _IOR('x', 45, int) /* get colorbar */
#define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */
#define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */
More information about the freebsd-multimedia
mailing list