Skip to contentSkip to conversation

[7-11] update include files for dvb and saa7146

PATCH New Michael Hunold 1 participant 1 message May 6, 2003 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [7-11] update include files for dvb and saa7146

Hello,

this patch updates the dvb include files:
- more changes from __u8 to u8 and uint32_t to u32

and the saa7146 include file saa7146.h:
- removed some LINUX_VERSION_CODE magic and introduced some new stuff, we're working on it...

Please review and apply.

Thanks
Michael Hunold.

include/linux/dvb/dmx.h +13 -13
diff -uNrwB -x '*.o' --new-file linux-2.5.69/include/linux/dvb/dmx.h linux-2.5.69.patch/include/linux/dvb/dmx.h
@@ -24,10 +24,10 @@
 #ifndef _DVBDMX_H_
 #define _DVBDMX_H_
 
+#include <asm/types.h>
 #ifdef __KERNEL__
-#include <linux/types.h>
+#include <linux/time.h>
 #else
-#include <stdint.h>
 #include <time.h>
 #endif
 
@@ -103,18 +104,18 @@
 
 typedef struct dmx_filter
 {
-	uint8_t         filter[DMX_FILTER_SIZE];
-	uint8_t         mask[DMX_FILTER_SIZE];
-	uint8_t         mode[DMX_FILTER_SIZE];
+	__u8  filter[DMX_FILTER_SIZE];
+	__u8  mask[DMX_FILTER_SIZE];
+	__u8  mode[DMX_FILTER_SIZE];
 } dmx_filter_t;
 
 
 struct dmx_sct_filter_params
 {
-	uint16_t            pid;
+	__u16            pid;
 	dmx_filter_t        filter;
-	uint32_t            timeout;
-	uint32_t            flags;
+	__u32            timeout;
+	__u32            flags;
 #define DMX_CHECK_CRC       1
 #define DMX_ONESHOT         2
 #define DMX_IMMEDIATE_START 4
@@ -124,11 +125,11 @@
 
 struct dmx_pes_filter_params
 {
-	uint16_t            pid;
+	__u16            pid;
 	dmx_input_t         input;
 	dmx_output_t        output;
 	dmx_pes_type_t      pes_type;
-	uint32_t            flags;
+	__u32            flags;
 };
 
 
@@ -143,7 +144,7 @@
 };
 
 typedef struct dmx_caps {
-	uint32_t caps;
+	__u32 caps;
 	int num_decoders; 
 } dmx_caps_t;
 
@@ -161,7 +162,7 @@
 struct dmx_stc {
 	unsigned int num;	/* input : which STC? 0..N */
 	unsigned int base;	/* output: divisor for stc to get 90 kHz clock */
-	uint64_t stc;		/* output: stc in 'base'*90 kHz units */
+	__u64 stc;		/* output: stc in 'base'*90 kHz units */
 };
 
 
@@ -171,7 +172,7 @@
 #define DMX_SET_PES_FILTER       _IOW('o',44,struct dmx_pes_filter_params)
 #define DMX_SET_BUFFER_SIZE      _IO('o',45)
 #define DMX_GET_EVENT            _IOR('o',46,struct dmx_event)
-#define DMX_GET_PES_PIDS         _IOR('o',47,uint16_t[5])
+#define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
 #define DMX_GET_CAPS             _IOR('o',48,dmx_caps_t)
 #define DMX_SET_SOURCE           _IOW('o',49,dmx_source_t)
 #define DMX_GET_STC              _IOWR('o',50,struct dmx_stc)
include/linux/dvb/frontend.h +20 -24

89 lines not on this page · raw message

include/linux/dvb/net.h +3 -7
diff -uNrwB -x '*.o' --new-file linux-2.5.69/include/linux/dvb/net.h linux-2.5.69.patch/include/linux/dvb/net.h
@@ -24,16 +24,12 @@
 #ifndef _DVBNET_H_
 #define _DVBNET_H_
 
-#ifdef __KERNEL__
-#include <linux/types.h>
-#else
-#include <stdint.h>
-#endif
+#include <asm/types.h>
 
 
 struct dvb_net_if {
-	uint16_t pid;
-	uint16_t if_num;
+	__u16 pid;
+	__u16 if_num;
 };
 
 
include/linux/dvb/version.h +29 -0
diff -uNrwB -x '*.o' --new-file linux-2.5.69/include/linux/dvb/version.h linux-2.5.69.patch/include/linux/dvb/version.h
@@ -0,0 +1,29 @@
+/*
+ * version.h
+ *
+ * Copyright (C) 2000 Holger Waechtler <[email protected]>
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#ifndef _DVBVERSION_H_
+#define _DVBVERSION_H_
+
+#define DVB_API_VERSION 3
+
+#endif /*_DVBVERSION_H_*/
+
include/linux/dvb/video.h +10 -2
diff -uNrwB -x '*.o' --new-file linux-2.5.69/include/linux/dvb/video.h linux-2.5.69.patch/include/linux/dvb/video.h
@@ -34,7 +34,8 @@
 
 typedef enum {
 	VIDEO_FORMAT_4_3,     /* Select 4:3 format */ 
-        VIDEO_FORMAT_16_9     /* Select 16:9 format. */ 
+        VIDEO_FORMAT_16_9,    /* Select 16:9 format. */
+	VIDEO_FORMAT_221_1    /* 2.21:1 */
 } video_format_t;
 
 
@@ -56,6 +57,11 @@
 	VIDEO_CENTER_CUT_OUT  /* use center cut out format */
 } video_displayformat_t;
 
+typedef struct {
+	int w;
+	int h;
+	video_format_t aspect_ratio;
+} video_size_t;
 
 typedef enum {
         VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ 
@@ -74,9 +80,10 @@
 
 struct video_event { 
         int32_t type; 
+#define VIDEO_EVENT_SIZE_CHANGED 1
         time_t timestamp;
 	union { 
-	        video_format_t video_format;
+	        video_size_t size;
 	} u; 
 };
 
@@ -186,6 +193,7 @@
 #define VIDEO_SET_SPU_PALETTE      _IOW('o', 51, video_spu_palette_t)
 #define VIDEO_GET_NAVI             _IOR('o', 52, video_navi_pack_t)
 #define VIDEO_SET_ATTRIBUTES       _IO('o', 53)
+#define VIDEO_GET_SIZE             _IOR('o', 55, video_size_t)
 
 #endif /*_DVBVIDEO_H_*/
 
include/media/saa7146.h +9 -7
diff -uNrwB -x '*.o' --new-file linux-2.5.69/include/media/saa7146.h linux-2.5.69.patch/include/media/saa7146.h
@@ -13,10 +13,6 @@
 #include <asm/io.h>		/* for accessing devices */
 #include <linux/stringify.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
-	#include "compat.h"
-#endif
-
 #define SAA7146_VERSION_CODE KERNEL_VERSION(0,5,0)
 
 #define saa7146_write(sxy,adr,dat)    writel((dat),(sxy->mem+(adr)))
@@ -30,7 +26,16 @@
 	#define DEBUG_VARIABLE saa7146_debug
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
+#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_BASENAME),__FUNCTION__)
+#define INFO(x) { printk("%s: ",__stringify(KBUILD_BASENAME)); printk x; }
+#else
 #define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
+#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; }
+#endif
+
+#define ERR(x) { DEBUG_PROLOG; printk x; }
+
 #define DEB_S(x)    if (0!=(DEBUG_VARIABLE&0x01)) { DEBUG_PROLOG; printk x; } /* simple debug messages */
 #define DEB_D(x)    if (0!=(DEBUG_VARIABLE&0x02)) { DEBUG_PROLOG; printk x; } /* more detailed debug messages */
 #define DEB_EE(x)   if (0!=(DEBUG_VARIABLE&0x04)) { DEBUG_PROLOG; printk x; } /* print enter and exit of functions */
@@ -39,9 +44,6 @@
 #define DEB_INT(x)  if (0!=(DEBUG_VARIABLE&0x20)) { DEBUG_PROLOG; printk x; } /* interrupt debug messages */
 #define DEB_CAP(x)  if (0!=(DEBUG_VARIABLE&0x40)) { DEBUG_PROLOG; printk x; } /* capture debug messages */
 
-#define ERR(x) { DEBUG_PROLOG; printk x; }
-#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; }
-
 #define IER_DISABLE(x,y) \
 	saa7146_write(x, IER, saa7146_read(x, IER) & ~(y));
 #define IER_ENABLE(x,y) \