diff options
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 8 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 125 |
3 files changed, 80 insertions, 58 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index b7b3f3ca4..3329e8cbe 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -1,5 +1,5 @@ /* - $Id: cx88-tvaudio.c,v 1.19 2004/09/15 16:15:24 kraxel Exp $ + $Id: cx88-tvaudio.c,v 1.20 2004/09/17 11:49:52 kraxel Exp $ cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver @@ -327,8 +327,9 @@ static void set_audio_standard_NICAM(struct cx88_core *core) case WW_NICAM_I: dprintk("%s PAL-I NICAM (status: unknown)\n",__FUNCTION__); set_audio_registers(core, nicam_pal_i); + break; case WW_NICAM_BGDKL: - dprintk("%s PAL NICAM (status: unknown)\n",__FUNCTION__); + dprintk("%s PAL-BGDK NICAM (status: unknown)\n",__FUNCTION__); set_audio_registers(core, nicam_default); break; }; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 207e0deb8..8df208c55 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.32 2004/09/07 14:30:54 kraxel Exp $ + * $Id: cx88.h,v 1.33 2004/09/17 11:49:52 kraxel Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -60,6 +60,12 @@ #define CX88_MAXBOARDS 8 +/* temporary here until new dvb-kernel code is merged ... */ +#ifndef FE_REGISTER +# define FE_REGISTER _IO ('v', 84) +# define FE_UNREGISTER _IO ('v', 85) +#endif + /* ----------------------------------------------------------- */ /* defines and enums */ diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 076dd41d5..20d234669 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -265,64 +265,79 @@ struct v4l2_timecode /* The above is based on SMPTE timecodes */ +#if 1 /* - * C O M P R E S S I O N P A R A M E T E R S + * M P E G C O M P R E S S I O N P A R A M E T E R S + * + * ### WARNING: this is still work-in-progress right now, most likely + * ### there will be some incompatible changes. + * */ + + +enum v4l2_bitrate_mode { + V4L2_BITRATE_CBR, /* constant bitrate */ + V4L2_BITRATE_VBR, /* variable bitrate */ +}; +struct v4l2_bitrate { + enum v4l2_bitrate_mode mode; + u32 min; + u32 target; + u32 max; +}; + +enum v4l2_mpeg_streamtype { + V4L2_MPEG_PS_1, /* MPEG-1 program stream */ + V4L2_MPEG_PS_2, /* MPEG-2 program stream */ + V4L2_MPEG_TS_2, /* MPEG-2 transport stream */ +}; +enum v4l2_mpeg_audiotype { + V4L2_MPEG_AU_2_I, /* MPEG-2 layer 1 */ + V4L2_MPEG_AU_2_II, /* MPEG-2 layer 2 */ + V4L2_MPEG_AU_2_III, /* MPEG-2 layer 3 */ +}; +enum v4l2_mpeg_videotype { + V4L2_MPEG_VI_1, /* MPEG-1 */ + V4L2_MPEG_VI_2, /* MPEG-2 */ +}; + +struct v4l2_mpeg_compression { + /* FIXME: how to handle profiles? */ + + /* general */ + enum v4l2_mpeg_streamtype st_type; + + /* transport streams */ + u16 ts_pid_pmt; + u16 ts_pid_audio; + u16 ts_pid_video; + u16 ts_pid_pcr; + + /* program stream */ + u16 ps_size; + u16 reserved0; /* placed here for alignment */ + + /* audio */ + enum v4l2_mpeg_audiotype au_type; + struct v4l2_bitrate au_bitrate; + u32 au_sample_rate; + + /* video */ + enum v4l2_mpeg_videotype vi_type; + struct v4l2_bitrate vi_bitrate; + u32 vi_frame_rate; + u16 vi_frames_per_gop; + u16 vi_bframes_count; + #if 0 -/* ### generic compression settings don't work, there is too much - * ### codec-specific stuff. Maybe reuse that for MPEG codec settings - * ### later ... */ -struct v4l2_compression -{ - __u32 quality; - __u32 keyframerate; - __u32 pframerate; - __u32 reserved[5]; - -/* what we'll need for MPEG, extracted from some postings on - the v4l list (Gert Vervoort, PlasmaJohn). - -system stream: - - type: elementary stream(ES), packatised elementary stream(s) (PES) - program stream(PS), transport stream(TS) - - system bitrate - - PS packet size (DVD: 2048 bytes, VCD: 2324 bytes) - - TS video PID - - TS audio PID - - TS PCR PID - - TS system information tables (PAT, PMT, CAT, NIT and SIT) - - (MPEG-1 systems stream vs. MPEG-2 program stream (TS not supported - by MPEG-1 systems) - -audio: - - type: MPEG (+Layer I,II,III), AC-3, LPCM - - bitrate - - sampling frequency (DVD: 48 Khz, VCD: 44.1 KHz, 32 kHz) - - Trick Modes? (ff, rew) - - Copyright - - Inverse Telecine - -video: - - picturesize (SIF, 1/2 D1, 2/3 D1, D1) and PAL/NTSC norm can be set - through excisting V4L2 controls - - noise reduction, parameters encoder specific? - - MPEG video version: MPEG-1, MPEG-2 - - GOP (Group Of Pictures) definition: - - N: number of frames per GOP - - M: distance between reference (I,P) frames - - open/closed GOP - - quantiser matrix: inter Q matrix (64 bytes) and intra Q matrix (64 bytes) - - quantiser scale: linear or logarithmic - - scanning: alternate or zigzag - - bitrate mode: CBR (constant bitrate) or VBR (variable bitrate). - - target video bitrate for CBR - - target video bitrate for VBR - - maximum video bitrate for VBR - min. quantiser value for VBR - - max. quantiser value for VBR - - adaptive quantisation value - - return the number of bytes per GOP or bitrate for bitrate monitoring - -*/ + /* FIXME: found in iviv driver */ + dnr_* // filtering? is this mpeg related at all? + gop_closure // whats this? sounds at least mpeg related? + pulldown // we probably want that one ... +#endif + + /* I don't expect the above being perfect yet ;) */ + u32 reserved1[8]; }; #endif |