From 33e9942ccbf8ecbb35f4eb576a1f650b15ba18a9 Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Sun, 22 Jun 2003 22:47:58 -0700 Subject: [PATCH] update dvb subsystem core - update dvb subsystem core - switched from user-land types like __u8 to u8 and uint16_t to u16 this makes the patch rather large. - updated the dvr (digital videorecording) facility - renamed some structures, like "struct dmxdev_s" to "struct dmxdev" - introduced dvb_functions.[ch], where some linux-kernel specific functions are encapsulated. by this, the dvb subsystem stays quite independent from deeper linux kernel functions. - moved dvb_usercopy() to dvb_functions.c -- this is essentially video_usercopy() which should be generic_usercopy() instead... - Made the dvb-core in dvbdev.c work with devfs again. - remove all typedefs from structs - remove all typedefs from enums --- include/linux/dvb/dmx.h | 26 ++++++++++++------------ include/linux/dvb/frontend.h | 47 +++++++++++++++++++++----------------------- include/linux/dvb/net.h | 10 +++------- include/linux/dvb/version.h | 29 +++++++++++++++++++++++++++ include/linux/dvb/video.h | 12 +++++++++-- 5 files changed, 77 insertions(+), 47 deletions(-) create mode 100644 include/linux/dvb/version.h (limited to 'include') diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 089b21734780..147294414fcb 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h @@ -24,10 +24,10 @@ #ifndef _DVBDMX_H_ #define _DVBDMX_H_ +#include #ifdef __KERNEL__ -#include +#include #else -#include #include #endif @@ -103,18 +103,18 @@ typedef enum 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 +124,11 @@ struct dmx_sct_filter_params 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 +143,7 @@ struct dmx_event }; typedef struct dmx_caps { - uint32_t caps; + __u32 caps; int num_decoders; } dmx_caps_t; @@ -161,7 +161,7 @@ typedef enum { 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 +171,7 @@ struct dmx_stc { #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) diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 8b17d6c2ea05..9ffb970cf7d8 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h @@ -26,11 +26,7 @@ #ifndef _DVBFRONTEND_H_ #define _DVBFRONTEND_H_ -#ifdef __KERNEL__ -#include -#else -#include -#endif +#include typedef enum fe_type { @@ -72,14 +68,14 @@ typedef enum fe_caps { struct dvb_frontend_info { char name[128]; fe_type_t type; - uint32_t frequency_min; - uint32_t frequency_max; - uint32_t frequency_stepsize; - uint32_t frequency_tolerance; - uint32_t symbol_rate_min; - uint32_t symbol_rate_max; - uint32_t symbol_rate_tolerance; /* ppm */ - uint32_t notifier_delay; /* ms */ + __u32 frequency_min; + __u32 frequency_max; + __u32 frequency_stepsize; + __u32 frequency_tolerance; + __u32 symbol_rate_min; + __u32 symbol_rate_max; + __u32 symbol_rate_tolerance; /* ppm */ + __u32 notifier_delay; /* ms */ fe_caps_t caps; }; @@ -89,21 +85,22 @@ struct dvb_frontend_info { * the meaning of this struct... */ struct dvb_diseqc_master_cmd { - uint8_t msg [6]; /* { framing, address, command, data [3] } */ - uint8_t msg_len; /* valid values are 3...6 */ + __u8 msg [6]; /* { framing, address, command, data [3] } */ + __u8 msg_len; /* valid values are 3...6 */ }; struct dvb_diseqc_slave_reply { - uint8_t msg [4]; /* { framing, data [3] } */ - uint8_t msg_len; /* valid values are 0...4, 0 means no msg */ + __u8 msg [4]; /* { framing, data [3] } */ + __u8 msg_len; /* valid values are 0...4, 0 means no msg */ int timeout; /* return from ioctl after timeout ms with */ }; /* errorcode when no message was received */ typedef enum fe_sec_voltage { SEC_VOLTAGE_13, - SEC_VOLTAGE_18 + SEC_VOLTAGE_18, + SEC_VOLTAGE_OFF } fe_sec_voltage_t; @@ -195,13 +192,13 @@ typedef enum fe_hierarchy { struct dvb_qpsk_parameters { - uint32_t symbol_rate; /* symbol rate in Symbols per second */ + __u32 symbol_rate; /* symbol rate in Symbols per second */ fe_code_rate_t fec_inner; /* forward error correction (see above) */ }; struct dvb_qam_parameters { - uint32_t symbol_rate; /* symbol rate in Symbols per second */ + __u32 symbol_rate; /* symbol rate in Symbols per second */ fe_code_rate_t fec_inner; /* forward error correction (see above) */ fe_modulation_t modulation; /* modulation type (see above) */ }; @@ -219,7 +216,7 @@ struct dvb_ofdm_parameters { struct dvb_frontend_parameters { - uint32_t frequency; /* (absolute) frequency in Hz for QAM/OFDM */ + __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM */ /* intermediate frequency in kHz for QPSK */ fe_spectral_inversion_t inversion; union { @@ -249,10 +246,10 @@ struct dvb_frontend_event { #define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */ #define FE_READ_STATUS _IOR('o', 69, fe_status_t) -#define FE_READ_BER _IOR('o', 70, uint32_t) -#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, uint16_t) -#define FE_READ_SNR _IOR('o', 72, uint16_t) -#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, uint32_t) +#define FE_READ_BER _IOR('o', 70, __u32) +#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16) +#define FE_READ_SNR _IOR('o', 72, __u16) +#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32) #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) diff --git a/include/linux/dvb/net.h b/include/linux/dvb/net.h index 5bf03b81e668..4b8fa5177d43 100644 --- a/include/linux/dvb/net.h +++ b/include/linux/dvb/net.h @@ -24,16 +24,12 @@ #ifndef _DVBNET_H_ #define _DVBNET_H_ -#ifdef __KERNEL__ -#include -#else -#include -#endif +#include struct dvb_net_if { - uint16_t pid; - uint16_t if_num; + __u16 pid; + __u16 if_num; }; diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h new file mode 100644 index 000000000000..54e256e324ec --- /dev/null +++ b/include/linux/dvb/version.h @@ -0,0 +1,29 @@ +/* + * version.h + * + * Copyright (C) 2000 Holger Waechtler + * 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_*/ + diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 24353a7220b8..6727f422da61 100644 --- a/include/linux/dvb/video.h +++ b/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 @@ typedef enum { 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 @@ typedef enum { 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 @@ typedef uint16_t video_attributes_t; #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_*/ -- cgit v1.2.3