diff options
-rw-r--r-- | linux/drivers/media/video/saa6752hs.c | 103 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa6752hs.c | 103 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 33 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-empress.c | 36 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-video.c | 11 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/video-buf-dvb.c | 4 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 43 |
9 files changed, 179 insertions, 167 deletions
diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c index 6d3b8b4d1..312173d5c 100644 --- a/linux/drivers/media/video/saa6752hs.c +++ b/linux/drivers/media/video/saa6752hs.c @@ -16,13 +16,16 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include "i2c-compat.h" #include "id.h" -#include "saa6752hs.h" #else #include <media/id.h> -#include <media/saa6752hs.h> #endif #include "compat.h" +#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 +#define MPEG_VIDEO_MAX_BITRATE_MAX 27000 +#define MPEG_TOTAL_TARGET_BITRATE_MAX 27000 +#define MPEG_PID_MAX ((1 << 14) - 1) + /* Addresses to scan */ static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; @@ -245,7 +248,7 @@ static int saa6752hs_set_bitrate(struct i2c_client* client, // set the audio bitrate buf[0] = 0x94; - buf[1] = params->au_bitrate.target; + buf[1] = (256 == params->au_bitrate.target) ? 0 : 1; i2c_master_send(client, buf, 2); // set the total bitrate @@ -271,66 +274,46 @@ static int saa6752hs_init(struct i2c_client* client, // grab the previous set of parameters h = i2c_get_clientdata(client); -#if 0 /* TODO: verify parameters and update h->params */ - // check the bitrate parameters first if (params != NULL) { - unsigned int pmt_pid = 0, pcr_pid = 0, video_pid = 0 , audio_pid = 0; - - // check supplied params are valid - if (params->video_format >= MPEG_VIDEO_FORMAT_MAX) - return -EINVAL; - if (params->video_bitrate_mode >= MPEG_VIDEO_BITRATE_MODE_MAX) - return -EINVAL; - if (params->video_target_bitrate >= MPEG_VIDEO_TARGET_BITRATE_MAX) - return -EINVAL; - if (params->audio_bitrate >= MPEG_AUDIO_BITRATE_MAX) - return -EINVAL; - if (params->total_bitrate >= MPEG_TOTAL_BITRATE_MAX) - return -EINVAL; - if (params->video_bitrate_mode == MPEG_VIDEO_BITRATE_MODE_VBR) { - if (params->video_max_bitrate >= MPEG_VIDEO_MAX_BITRATE_MAX) - return -EINVAL; - if (params->video_target_bitrate >= params->video_max_bitrate) - return -EINVAL; - } - if (params->pmt_pid != 0) { - if (params->pmt_pid > MPEG_PID_MAX) - return -EINVAL; - pmt_pid = params->pmt_pid; - } else { - pmt_pid = cachedParams->pmt_pid; - } - if (params->pcr_pid != 0) { - if (params->pcr_pid > MPEG_PID_MAX) - return -EINVAL; - pcr_pid = params->pcr_pid; - } else { - pcr_pid = cachedParams->pcr_pid; - } - if (params->video_pid != 0) { - if (params->video_pid > MPEG_PID_MAX) - return -EINVAL; - video_pid = params->video_pid; - } else { - video_pid = cachedParams->video_pid; - } - if (params->audio_pid != 0) { - if (params->audio_pid > MPEG_PID_MAX) - return -EINVAL; - audio_pid = params->audio_pid; - } else { - audio_pid = cachedParams->audio_pid; - } - - // update cache - memcpy(cachedParams, params, sizeof(struct mpeg_params)); - cachedParams->pmt_pid = pmt_pid; - cachedParams->pcr_pid = pcr_pid; - cachedParams->video_pid = video_pid; - cachedParams->audio_pid = audio_pid; + /* check PIDs */ + if (params->ts_pid_pmt <= MPEG_PID_MAX) + h->params.ts_pid_pmt = params->ts_pid_pmt; + if (params->ts_pid_pcr <= MPEG_PID_MAX) + h->params.ts_pid_pcr = params->ts_pid_pcr; + if (params->ts_pid_video <= MPEG_PID_MAX) + h->params.ts_pid_video = params->ts_pid_video; + if (params->ts_pid_audio <= MPEG_PID_MAX) + h->params.ts_pid_audio = params->ts_pid_audio; + + /* check bitrate parameters */ + if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) || + (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) + h->params.vi_bitrate.mode = params->vi_bitrate.mode; + if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) + h->params.st_bitrate.target = params->st_bitrate.target; + if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) + h->params.vi_bitrate.target = params->vi_bitrate.target; + if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) + h->params.vi_bitrate.max = params->vi_bitrate.max; + if (params->au_bitrate.mode != V4L2_BITRATE_NONE) + h->params.au_bitrate.target = params->au_bitrate.target; + + /* range checks */ + if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) + h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) + h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) + h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; + if (h->params.au_bitrate.target <= 256) + h->params.au_bitrate.target = 256; + else + h->params.au_bitrate.target = 384; + + /* return actually used settings */ + *params = h->params; } -#endif // set bitrate saa6752hs_set_bitrate(client, &h->params); diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 6d3b8b4d1..312173d5c 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -16,13 +16,16 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) #include "i2c-compat.h" #include "id.h" -#include "saa6752hs.h" #else #include <media/id.h> -#include <media/saa6752hs.h> #endif #include "compat.h" +#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 +#define MPEG_VIDEO_MAX_BITRATE_MAX 27000 +#define MPEG_TOTAL_TARGET_BITRATE_MAX 27000 +#define MPEG_PID_MAX ((1 << 14) - 1) + /* Addresses to scan */ static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; @@ -245,7 +248,7 @@ static int saa6752hs_set_bitrate(struct i2c_client* client, // set the audio bitrate buf[0] = 0x94; - buf[1] = params->au_bitrate.target; + buf[1] = (256 == params->au_bitrate.target) ? 0 : 1; i2c_master_send(client, buf, 2); // set the total bitrate @@ -271,66 +274,46 @@ static int saa6752hs_init(struct i2c_client* client, // grab the previous set of parameters h = i2c_get_clientdata(client); -#if 0 /* TODO: verify parameters and update h->params */ - // check the bitrate parameters first if (params != NULL) { - unsigned int pmt_pid = 0, pcr_pid = 0, video_pid = 0 , audio_pid = 0; - - // check supplied params are valid - if (params->video_format >= MPEG_VIDEO_FORMAT_MAX) - return -EINVAL; - if (params->video_bitrate_mode >= MPEG_VIDEO_BITRATE_MODE_MAX) - return -EINVAL; - if (params->video_target_bitrate >= MPEG_VIDEO_TARGET_BITRATE_MAX) - return -EINVAL; - if (params->audio_bitrate >= MPEG_AUDIO_BITRATE_MAX) - return -EINVAL; - if (params->total_bitrate >= MPEG_TOTAL_BITRATE_MAX) - return -EINVAL; - if (params->video_bitrate_mode == MPEG_VIDEO_BITRATE_MODE_VBR) { - if (params->video_max_bitrate >= MPEG_VIDEO_MAX_BITRATE_MAX) - return -EINVAL; - if (params->video_target_bitrate >= params->video_max_bitrate) - return -EINVAL; - } - if (params->pmt_pid != 0) { - if (params->pmt_pid > MPEG_PID_MAX) - return -EINVAL; - pmt_pid = params->pmt_pid; - } else { - pmt_pid = cachedParams->pmt_pid; - } - if (params->pcr_pid != 0) { - if (params->pcr_pid > MPEG_PID_MAX) - return -EINVAL; - pcr_pid = params->pcr_pid; - } else { - pcr_pid = cachedParams->pcr_pid; - } - if (params->video_pid != 0) { - if (params->video_pid > MPEG_PID_MAX) - return -EINVAL; - video_pid = params->video_pid; - } else { - video_pid = cachedParams->video_pid; - } - if (params->audio_pid != 0) { - if (params->audio_pid > MPEG_PID_MAX) - return -EINVAL; - audio_pid = params->audio_pid; - } else { - audio_pid = cachedParams->audio_pid; - } - - // update cache - memcpy(cachedParams, params, sizeof(struct mpeg_params)); - cachedParams->pmt_pid = pmt_pid; - cachedParams->pcr_pid = pcr_pid; - cachedParams->video_pid = video_pid; - cachedParams->audio_pid = audio_pid; + /* check PIDs */ + if (params->ts_pid_pmt <= MPEG_PID_MAX) + h->params.ts_pid_pmt = params->ts_pid_pmt; + if (params->ts_pid_pcr <= MPEG_PID_MAX) + h->params.ts_pid_pcr = params->ts_pid_pcr; + if (params->ts_pid_video <= MPEG_PID_MAX) + h->params.ts_pid_video = params->ts_pid_video; + if (params->ts_pid_audio <= MPEG_PID_MAX) + h->params.ts_pid_audio = params->ts_pid_audio; + + /* check bitrate parameters */ + if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) || + (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) + h->params.vi_bitrate.mode = params->vi_bitrate.mode; + if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) + h->params.st_bitrate.target = params->st_bitrate.target; + if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) + h->params.vi_bitrate.target = params->vi_bitrate.target; + if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) + h->params.vi_bitrate.max = params->vi_bitrate.max; + if (params->au_bitrate.mode != V4L2_BITRATE_NONE) + h->params.au_bitrate.target = params->au_bitrate.target; + + /* range checks */ + if (h->params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) + h->params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) + h->params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; + if (h->params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) + h->params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; + if (h->params.au_bitrate.target <= 256) + h->params.au_bitrate.target = 256; + else + h->params.au_bitrate.target = 384; + + /* return actually used settings */ + *params = h->params; } -#endif // set bitrate saa6752hs_set_bitrate(client, &h->params); diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 18f974dd9..15a04db2c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-cards.c,v 1.39 2004/11/17 18:47:48 kraxel Exp $ + * $Id: saa7134-cards.c,v 1.40 2004/11/18 14:05:57 kraxel Exp $ * * device driver for philips saa7134 based TV cards * card-specific stuff. @@ -1678,6 +1678,10 @@ int saa7134_board_init1(struct saa7134_dev *dev) saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00040000, 0x00000000); break; } + if (dev->has_remote) + dev->irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 | + SAA7134_IRQ2_INTE_GPIO18A | + SAA7134_IRQ2_INTE_GPIO16 ); return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index d3c79cd35..e8e8df67e 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-core.c,v 1.16 2004/11/09 11:34:59 kraxel Exp $ + * $Id: saa7134-core.c,v 1.17 2004/11/18 14:05:57 kraxel Exp $ * * device driver for philips saa7134 based TV cards * driver core @@ -609,8 +609,8 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) SAA7134_IRQ_REPORT_GPIO18)) && dev->remote) saa7134_input_irq(dev); + } - }; if (10 == loop) { print_irqstatus(dev,loop,report,status); if (report & SAA7134_IRQ_REPORT_PE) { @@ -618,6 +618,13 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id, struct pt_regs *regs) printk(KERN_WARNING "%s/irq: looping -- " "clearing PE (parity error!) enable bit\n",dev->name); saa_clearl(SAA7134_IRQ2,SAA7134_IRQ2_INTE_PE); + } else if (report & (SAA7134_IRQ_REPORT_GPIO16 | + SAA7134_IRQ_REPORT_GPIO18)) { + /* disable gpio IRQs */ + printk(KERN_WARNING "%s/irq: looping -- " + "clearing GPIO enable bits\n",dev->name); + saa_clearl(SAA7134_IRQ2, (SAA7134_IRQ2_INTE_GPIO16 | + SAA7134_IRQ2_INTE_GPIO18)); } else { /* disable all irqs */ printk(KERN_WARNING "%s/irq: looping -- " @@ -692,20 +699,7 @@ static int saa7134_hwinit2(struct saa7134_dev *dev) /* enable IRQ's */ saa_writel(SAA7134_IRQ1, 0); - saa_writel(SAA7134_IRQ2, - SAA7134_IRQ2_INTE_GPIO18 | - SAA7134_IRQ2_INTE_GPIO18A | - SAA7134_IRQ2_INTE_GPIO16 | - SAA7134_IRQ2_INTE_SC2 | - SAA7134_IRQ2_INTE_SC1 | - SAA7134_IRQ2_INTE_SC0 | - /* SAA7134_IRQ2_INTE_DEC5 | FIXME: TRIG_ERR ??? */ - SAA7134_IRQ2_INTE_DEC3 | - SAA7134_IRQ2_INTE_DEC2 | - /* SAA7134_IRQ2_INTE_DEC1 | */ - SAA7134_IRQ2_INTE_DEC0 | - SAA7134_IRQ2_INTE_PE | - SAA7134_IRQ2_INTE_AR); + saa_writel(SAA7134_IRQ2, dev->irq2_mask); return 0; } @@ -928,6 +922,13 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, } /* initialize hardware #1 */ + dev->irq2_mask = + SAA7134_IRQ2_INTE_DEC3 | + SAA7134_IRQ2_INTE_DEC2 | + SAA7134_IRQ2_INTE_DEC1 | + SAA7134_IRQ2_INTE_DEC0 | + SAA7134_IRQ2_INTE_PE | + SAA7134_IRQ2_INTE_AR; saa7134_board_init1(dev); saa7134_hwinit1(dev); diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index dba969402..9d356f9ab 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-empress.c,v 1.5 2004/11/10 11:07:24 kraxel Exp $ + * $Id: saa7134-empress.c,v 1.6 2004/11/18 14:05:57 kraxel Exp $ * * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs] * @@ -59,16 +59,21 @@ MODULE_PARM_DESC(debug,"enable debug messages"); static void ts_reset_encoder(struct saa7134_dev* dev) { + if (!dev->empress_started) + return; + saa_writeb(SAA7134_SPECIAL_MODE, 0x00); msleep(10); saa_writeb(SAA7134_SPECIAL_MODE, 0x01); msleep(100); + dev->empress_started = 0; } static int ts_init_encoder(struct saa7134_dev* dev, void* arg) { ts_reset_encoder(dev); saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg); + dev->empress_started = 1; return 0; } @@ -97,7 +102,6 @@ static int ts_open(struct inode *inode, struct file *file) dev->empress_users++; file->private_data = dev; - ts_init_encoder(dev, NULL); err = 0; done: @@ -128,6 +132,9 @@ ts_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct saa7134_dev *dev = file->private_data; + if (!dev->empress_started) + ts_init_encoder(dev, NULL); + return videobuf_read_stream(&dev->empress_tsq, data, count, ppos, 0, file->f_flags & O_NONBLOCK); @@ -332,6 +339,25 @@ static struct video_device saa7134_empress_template = .minor = -1, }; +static void empress_signal_update(void* data) +{ + struct saa7134_dev* dev = (struct saa7134_dev*) data; + + if (dev->nosignal) { + dprintk("no video signal\n"); + ts_reset_encoder(dev); + } else { + dprintk("video signal acquired\n"); + ts_init_encoder(dev, NULL); + } +} + +static void empress_signal_change(struct saa7134_dev *dev) +{ + schedule_work(&dev->empress_workqueue); +} + + static int empress_init(struct saa7134_dev *dev) { int err; @@ -349,6 +375,8 @@ static int empress_init(struct saa7134_dev *dev) "%s empress (%s)", dev->name, saa7134_boards[dev->board].name); + INIT_WORK(&dev->empress_workqueue, empress_signal_update, (void*) dev); + err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER, empress_nr[dev->nr]); if (err < 0) { @@ -367,6 +395,8 @@ static int empress_init(struct saa7134_dev *dev) V4L2_FIELD_ALTERNATE, sizeof(struct saa7134_buf), dev); + + empress_signal_update(dev); return 0; } @@ -376,6 +406,7 @@ static int empress_fini(struct saa7134_dev *dev) if (NULL == dev->empress_dev) return 0; + flush_scheduled_work(); video_unregister_device(dev->empress_dev); dev->empress_dev = NULL; return 0; @@ -385,6 +416,7 @@ static struct saa7134_mpeg_ops empress_ops = { .type = SAA7134_MPEG_EMPRESS, .init = empress_init, .fini = empress_fini, + .signal_change = empress_signal_change, }; static int __init empress_register(void) diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index ef9323157..1b97267c8 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-video.c,v 1.19 2004/11/07 14:44:59 kraxel Exp $ + * $Id: saa7134-video.c,v 1.20 2004/11/18 14:05:57 kraxel Exp $ * * device driver for philips saa7134 based TV cards * video4linux video interface @@ -443,11 +443,10 @@ void res_free(struct saa7134_dev *dev, struct saa7134_fh *fh, unsigned int bits) static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm) { - int luma_control,sync_control,mux,nosignal; + int luma_control,sync_control,mux; dprintk("set tv norm = %s\n",norm->name); dev->tvnorm = norm; - nosignal = (0 == (saa_readb(SAA7134_STATUS_VIDEO1) & 0x03)); mux = card_in(dev,dev->ctl_input).vmux; luma_control = norm->luma_control; @@ -455,7 +454,7 @@ static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm) if (mux > 5) luma_control |= 0x80; /* svideo */ - if (noninterlaced || nosignal) + if (noninterlaced || dev->nosignal) sync_control |= 0x20; /* setup cropping */ @@ -2328,13 +2327,17 @@ void saa7134_irq_video_intl(struct saa7134_dev *dev) saa7134_tvaudio_do_scan(dev); if (!noninterlaced) saa_clearb(SAA7134_SYNC_CTRL, 0x20); + dev->nosignal = 0; } else { /* no video signal -> mute audio */ if (dev->ctl_automute) dev->automute = 1; saa7134_tvaudio_setmute(dev); saa_setb(SAA7134_SYNC_CTRL, 0x20); + dev->nosignal = 1; } + if (dev->mops && dev->mops->signal_change) + dev->mops->signal_change(dev); } void saa7134_irq_video_done(struct saa7134_dev *dev, unsigned long status) diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 00af97a9c..9ed25e47f 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.27 2004/11/04 11:03:52 kraxel Exp $ + * $Id: saa7134.h,v 1.28 2004/11/18 14:05:57 kraxel Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -374,6 +374,7 @@ struct saa7134_mpeg_ops { struct list_head next; int (*init)(struct saa7134_dev *dev); int (*fini)(struct saa7134_dev *dev); + void (*signal_change)(struct saa7134_dev *dev); }; /* global device status */ @@ -409,6 +410,7 @@ struct saa7134_dev { unsigned int tuner_type; unsigned int tda9887_conf; unsigned int gpio_value; + unsigned int irq2_mask; /* i2c i/o */ struct i2c_adapter i2c_adap; @@ -456,6 +458,7 @@ struct saa7134_dev { struct saa7134_input *hw_input; unsigned int hw_mute; int last_carrier; + int nosignal; /* SAA7134_MPEG_* */ struct saa7134_ts ts; @@ -466,6 +469,8 @@ struct saa7134_dev { struct video_device *empress_dev; struct videobuf_queue empress_tsq; unsigned int empress_users; + struct work_struct empress_workqueue; + int empress_started; /* SAA7134_MPEG_DVB only */ struct videobuf_dvb dvb; diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c index 6f3d6ace5..175a17271 100644 --- a/linux/drivers/media/video/video-buf-dvb.c +++ b/linux/drivers/media/video/video-buf-dvb.c @@ -1,5 +1,5 @@ /* - * $Id: video-buf-dvb.c,v 1.5 2004/11/07 13:17:15 kraxel Exp $ + * $Id: video-buf-dvb.c,v 1.6 2004/11/18 14:05:57 kraxel Exp $ * * some helper function for simple DVB cards which simply DMA the * complete transport stream and let the computer sort everything else @@ -35,7 +35,7 @@ module_param(debug, int, 0644); MODULE_PARM_DESC(debug,"enable debug messages"); #define dprintk(fmt, arg...) if (debug) \ - printk(KERN_DEBUG "%s/dvb: " fmt, dvb->name, ## arg) + printk(KERN_DEBUG "%s/dvb: " fmt, dvb->name , ## arg) /* ------------------------------------------------------------------ */ diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index f75722fd3..f3cac6fc3 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -281,10 +281,11 @@ enum v4l2_bitrate_mode { V4L2_BITRATE_VBR, /* variable bitrate */ }; struct v4l2_bitrate { + /* rates are specified in kbit/sec */ enum v4l2_bitrate_mode mode; - u32 min; - u32 target; - u32 max; + __u32 min; + __u32 target; /* use this one for CBR */ + __u32 max; }; enum v4l2_mpeg_streamtype { @@ -311,38 +312,38 @@ struct v4l2_mpeg_compression { struct v4l2_bitrate st_bitrate; /* transport streams */ - u16 ts_pid_pmt; - u16 ts_pid_audio; - u16 ts_pid_video; - u16 ts_pid_pcr; + __u16 ts_pid_pmt; + __u16 ts_pid_audio; + __u16 ts_pid_video; + __u16 ts_pid_pcr; /* program stream */ - u16 ps_size; - u16 reserved_1; /* align */ + __u16 ps_size; + __u16 reserved_1; /* align */ /* audio */ enum v4l2_mpeg_audiotype au_type; struct v4l2_bitrate au_bitrate; - u32 au_sample_rate; - u8 au_pesid; - u8 reserved_2[3]; /* align */ + __u32 au_sample_rate; + __u8 au_pesid; + __u8 reserved_2[3]; /* align */ /* 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; - u8 vi_pesid; - u8 reserved_3[3]; /* align */ + __u32 vi_frame_rate; + __u16 vi_frames_per_gop; + __u16 vi_bframes_count; + __u8 vi_pesid; + __u8 reserved_3[3]; /* align */ /* misc flags */ - u32 closed_gops:1; - u32 pulldown:1; - u32 reserved_4:30; /* align */ + __u32 closed_gops:1; + __u32 pulldown:1; + __u32 reserved_4:30; /* align */ /* I don't expect the above being perfect yet ;) */ - u32 reserved_5[8]; + __u32 reserved_5[8]; }; #endif |