diff options
author | Michael Hunold <devnull@localhost> | 2003-06-03 13:07:01 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-06-03 13:07:01 +0000 |
commit | a9f1c290863f5aabdb9f36dfe7a1499ae05a9d45 (patch) | |
tree | 1aa18bc04b9c658202b16ad670bebac13c8b8689 /linux/drivers/media/common | |
parent | dfa0bc1ee855af7954733faad2a7593b04aa9768 (diff) | |
download | mediapointer-dvb-s2-a9f1c290863f5aabdb9f36dfe7a1499ae05a9d45.tar.gz mediapointer-dvb-s2-a9f1c290863f5aabdb9f36dfe7a1499ae05a9d45.tar.bz2 |
Here comes the "dvb-c analog module hack"
- if the analog module is detected, the saa7113 is initialized and
some more v4l2 ioctls are available. you can use "xawtv" now to
switch between "dvb" and "analog" input. when you are one the
"analog" input, you can tune in analog channels with the cursor
keys via v4l2.
currently, this is a big hack -- tuning is not mutually exclusive,
so "szap" and v4l2 tuning can interfere with each other. the
demodulator address is hardcoded to 0x09.
Other changes:
- changed the saa7146 ioctl parameters, give out the data of the
current device open "fh" (=> "file handle"), not the pointer to the
device structure "dev". It is "dev = fh->dev".
Some stuff does not work:
- analog audio does not work. does the msp3400 need to be reprogrammed?
- one field is "missing", so the picture is very bad and
capturing does not work neither. this needs to be investigated by
looking at the programming the windows driver uses for the saa7146
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r-- | linux/drivers/media/common/saa7146_video.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index a5cab8eac..3ee1cfa7c 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -226,8 +226,7 @@ int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f) } } -static -int start_preview(struct saa7146_fh *fh) +int saa7146_start_preview(struct saa7146_fh *fh) { struct saa7146_dev *dev = fh->dev; struct saa7146_vv *vv = dev->vv_data; @@ -273,13 +272,12 @@ int start_preview(struct saa7146_fh *fh) return 0; } -static -int stop_preview(struct saa7146_fh *fh) +int saa7146_stop_preview(struct saa7146_fh *fh) { struct saa7146_dev *dev = fh->dev; struct saa7146_vv *vv = dev->vv_data; - DEB_EE(("saa7146.o: stop_preview()\n")); + DEB_EE(("saa7146.o: saa7146_stop_preview()\n")); /* check if overlay is running */ if( 0 == vv->ov_data ) { @@ -342,8 +340,8 @@ int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f) if( vv->ov_data != NULL ) { if( fh == vv->ov_data->fh) { spin_lock_irqsave(&dev->slock,flags); - stop_preview(fh); - start_preview(fh); + saa7146_stop_preview(fh); + saa7146_start_preview(fh); spin_unlock_irqrestore(&dev->slock,flags); } } @@ -536,8 +534,8 @@ int set_control(struct saa7146_fh *fh, struct v4l2_control *c) if( 0 != vv->ov_data ) { if( fh == vv->ov_data->fh ) { spin_lock_irqsave(&dev->slock,flags); - stop_preview(fh); - start_preview(fh); + saa7146_stop_preview(fh); + saa7146_start_preview(fh); spin_unlock_irqrestore(&dev->slock,flags); } } @@ -764,12 +762,12 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int if( 0 != (dev->ext->ext_vv_data->ioctls[ee].flags & SAA7146_EXCLUSIVE) ) { DEB_D(("extension handles ioctl exclusive.\n")); - result = dev->ext->ext_vv_data->ioctl(dev, cmd, arg); + result = dev->ext->ext_vv_data->ioctl(fh, cmd, arg); return result; } if( 0 != (dev->ext->ext_vv_data->ioctls[ee].flags & SAA7146_BEFORE) ) { DEB_D(("extension handles ioctl before.\n")); - result = dev->ext->ext_vv_data->ioctl(dev, cmd, arg); + result = dev->ext->ext_vv_data->ioctl(fh, cmd, arg); if( -EAGAIN != result ) { return result; } @@ -985,7 +983,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int if( vv->ov_data != NULL ) { ov_fh = vv->ov_data->fh; - stop_preview(ov_fh); + saa7146_stop_preview(ov_fh); restart_overlay = 1; } @@ -1000,7 +998,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } if( 0 != restart_overlay ) { - start_preview(ov_fh); + saa7146_start_preview(ov_fh); } up(&dev->lock); @@ -1030,7 +1028,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } } spin_lock_irqsave(&dev->slock,flags); - err = start_preview(fh); + err = saa7146_start_preview(fh); spin_unlock_irqrestore(&dev->slock,flags); } else { if( vv->ov_data != NULL ) { @@ -1039,7 +1037,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int } } spin_lock_irqsave(&dev->slock,flags); - err = stop_preview(fh); + err = saa7146_stop_preview(fh); spin_unlock_irqrestore(&dev->slock,flags); } return err; @@ -1313,7 +1311,7 @@ void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *fi if( 0 != vv->ov_data ) { if( fh == vv->ov_data->fh ) { spin_lock_irqsave(&dev->slock,flags); - stop_preview(fh); + saa7146_stop_preview(fh); spin_unlock_irqrestore(&dev->slock,flags); } } @@ -1359,7 +1357,7 @@ ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos) if( vv->ov_data != NULL ) { ov_fh = vv->ov_data->fh; - stop_preview(ov_fh); + saa7146_stop_preview(ov_fh); restart_overlay = 1; } @@ -1371,7 +1369,7 @@ ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos) /* restart overlay if it was active before */ if( 0 != restart_overlay ) { - start_preview(ov_fh); + saa7146_start_preview(ov_fh); } return ret; @@ -1388,3 +1386,6 @@ struct saa7146_use_ops saa7146_video_uops = { }; EXPORT_SYMBOL_GPL(saa7146_video_uops); + +EXPORT_SYMBOL_GPL(saa7146_start_preview); +EXPORT_SYMBOL_GPL(saa7146_stop_preview); |