提交 368d17e0 编写于 作者: L Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (33 commits)
  V4L/DVB (3604): V4l printk fix
  V4L/DVB (3599c): Whitespace cleanups under Documentation/video4linux
  V4L/DVB (3599b): Whitespace cleanups under drivers/media
  V4L/DVB (3599a): Move drivers/usb/media to drivers/media/video
  V4L/DVB (3599): Implement new routing commands for wm8775 and cs53l32a.
  V4L/DVB (3598): Add bit algorithm adapter for the Conexant CX2341X boards.
  V4L/DVB (3597): Vivi: fix warning: implicit declaration of function 'in_interrupt'
  V4L/DVB (3588): Remove VIDIOC_G/S_AUDOUT from msp3400
  V4L/DVB (3587): Always wake thread after routing change.
  V4L/DVB (3584): Implement V4L2_TUNER_MODE_LANG1_LANG2 audio mode
  V4L/DVB (3582): Implement correct msp3400 input/output routing
  V4L/DVB (3581): Add new media/msp3400.h header containing the routing macros
  V4L/DVB (3580): Last round of msp3400 cleanups before adding routing commands
  V4L/DVB (3579): Move msp_modus to msp3400-kthreads, add JP and KR std detection
  V4L/DVB (3578): Make scart definitions easier to handle
  V4L/DVB (3577): Cleanup audio input handling
  V4L/DVB (3575): Cxusb: fix i2c debug messages for bluebird devices
  V4L/DVB (3574): Cxusb: fix debug messages
  V4L/DVB (3573): Cxusb: remove FIXME: comment in bluebird_patch_dvico_firmware_download
  V4L/DVB (3572): Cxusb: conditionalize gpio write for the medion box
  ...
c-qcam - Connectix Color QuickCam video4linux kernel driver c-qcam - Connectix Color QuickCam video4linux kernel driver
Copyright (C) 1999 Dave Forrest <drf5n@virginia.edu> Copyright (C) 1999 Dave Forrest <drf5n@virginia.edu>
released under GNU GPL. released under GNU GPL.
1999-12-08 Dave Forrest, written with kernel version 2.2.12 in mind 1999-12-08 Dave Forrest, written with kernel version 2.2.12 in mind
...@@ -45,21 +45,21 @@ configuration. The appropriate flags are: ...@@ -45,21 +45,21 @@ configuration. The appropriate flags are:
CONFIG_PNP_PARPORT M for autoprobe.o IEEE1284 readback module CONFIG_PNP_PARPORT M for autoprobe.o IEEE1284 readback module
CONFIG_PRINTER_READBACK M for parport_probe.o IEEE1284 readback module CONFIG_PRINTER_READBACK M for parport_probe.o IEEE1284 readback module
CONFIG_VIDEO_DEV M for videodev.o video4linux module CONFIG_VIDEO_DEV M for videodev.o video4linux module
CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam module CONFIG_VIDEO_CQCAM M for c-qcam.o Color Quickcam module
With these flags, the kernel should compile and install the modules. With these flags, the kernel should compile and install the modules.
To record and monitor the compilation, I use: To record and monitor the compilation, I use:
(make zlilo ; \ (make zlilo ; \
make modules; \ make modules; \
make modules_install ; make modules_install ;
depmod -a ) &>log & depmod -a ) &>log &
less log # then a capital 'F' to watch the progress less log # then a capital 'F' to watch the progress
But that is my personal preference. But that is my personal preference.
2.2 Configuration 2.2 Configuration
The configuration requires module configuration and device The configuration requires module configuration and device
configuration. I like kmod or kerneld process with the configuration. I like kmod or kerneld process with the
/etc/modprobe.conf file so the modules can automatically load/unload as /etc/modprobe.conf file so the modules can automatically load/unload as
...@@ -68,7 +68,7 @@ using MAKEDEV, or need to be created. The following sections detail ...@@ -68,7 +68,7 @@ using MAKEDEV, or need to be created. The following sections detail
these procedures. these procedures.
2.1 Module Configuration 2.1 Module Configuration
Using modules requires a bit of work to install and pass the Using modules requires a bit of work to install and pass the
parameters. Understand that entries in /etc/modprobe.conf of: parameters. Understand that entries in /etc/modprobe.conf of:
...@@ -128,9 +128,9 @@ system (CONFIG_PROC_FS), the parallel printer support ...@@ -128,9 +128,9 @@ system (CONFIG_PROC_FS), the parallel printer support
(CONFIG_PRINTER), the IEEE 1284 system,(CONFIG_PRINTER_READBACK), you (CONFIG_PRINTER), the IEEE 1284 system,(CONFIG_PRINTER_READBACK), you
should be able to read some identification from your quickcam with should be able to read some identification from your quickcam with
modprobe -v parport modprobe -v parport
modprobe -v parport_probe modprobe -v parport_probe
cat /proc/parport/PORTNUMBER/autoprobe cat /proc/parport/PORTNUMBER/autoprobe
Returns: Returns:
CLASS:MEDIA; CLASS:MEDIA;
MODEL:Color QuickCam 2.0; MODEL:Color QuickCam 2.0;
...@@ -140,7 +140,7 @@ Returns: ...@@ -140,7 +140,7 @@ Returns:
and well. A common problem is that the current driver does not and well. A common problem is that the current driver does not
reliably detect a c-qcam, even though one is attached. In this case, reliably detect a c-qcam, even though one is attached. In this case,
modprobe -v c-qcam modprobe -v c-qcam
or or
insmod -v c-qcam insmod -v c-qcam
...@@ -152,16 +152,16 @@ video4linux mailing list and archive for more current information. ...@@ -152,16 +152,16 @@ video4linux mailing list and archive for more current information.
3.1 Checklist: 3.1 Checklist:
Can you get an image? Can you get an image?
v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppm v4lgrab >qcam.ppm ; wc qcam.ppm ; xv qcam.ppm
Is a working c-qcam connected to the port? Is a working c-qcam connected to the port?
grep ^ /proc/parport/?/autoprobe grep ^ /proc/parport/?/autoprobe
Do the /dev/video* files exist? Do the /dev/video* files exist?
ls -lad /dev/video ls -lad /dev/video
Is the c-qcam module loaded? Is the c-qcam module loaded?
modprobe -v c-qcam ; lsmod modprobe -v c-qcam ; lsmod
Does the camera work with alternate programs? cqcam, etc? Does the camera work with alternate programs? cqcam, etc?
...@@ -174,7 +174,7 @@ video4linux mailing list and archive for more current information. ...@@ -174,7 +174,7 @@ video4linux mailing list and archive for more current information.
isn't, you might try patching the c-qcam module to add a parport=xxx isn't, you might try patching the c-qcam module to add a parport=xxx
option as in the bw-qcam module so you can specify the parallel port: option as in the bw-qcam module so you can specify the parallel port:
insmod -v c-qcam parport=0 insmod -v c-qcam parport=0
And bypass the detection code, see ../../drivers/char/c-qcam.c and And bypass the detection code, see ../../drivers/char/c-qcam.c and
look for the 'qc_detect' code and call. look for the 'qc_detect' code and call.
...@@ -183,12 +183,12 @@ look for the 'qc_detect' code and call. ...@@ -183,12 +183,12 @@ look for the 'qc_detect' code and call.
this work is documented at the video4linux2 site listed below. this work is documented at the video4linux2 site listed below.
9.0 --- A sample program using v4lgrabber, 9.0 --- A sample program using v4lgrabber,
This program is a simple image grabber that will copy a frame from the This program is a simple image grabber that will copy a frame from the
first video device, /dev/video0 to standard output in portable pixmap first video device, /dev/video0 to standard output in portable pixmap
format (.ppm) Using this like: 'v4lgrab | convert - c-qcam.jpg' format (.ppm) Using this like: 'v4lgrab | convert - c-qcam.jpg'
produced this picture of me at produced this picture of me at
http://mug.sys.virginia.edu/~drf5n/extras/c-qcam.jpg http://mug.sys.virginia.edu/~drf5n/extras/c-qcam.jpg
-------------------- 8< ---------------- 8< ----------------------------- -------------------- 8< ---------------- 8< -----------------------------
...@@ -202,8 +202,8 @@ produced this picture of me at ...@@ -202,8 +202,8 @@ produced this picture of me at
* Use as: * Use as:
* v4lgrab >image.ppm * v4lgrab >image.ppm
* *
* Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org>
* Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c
* with minor modifications (Dave Forrest, drf5n@virginia.edu). * with minor modifications (Dave Forrest, drf5n@virginia.edu).
* *
*/ */
...@@ -225,55 +225,55 @@ produced this picture of me at ...@@ -225,55 +225,55 @@ produced this picture of me at
#define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \ #define READ_VIDEO_PIXEL(buf, format, depth, r, g, b) \
{ \ { \
switch (format) \ switch (format) \
{ \ { \
case VIDEO_PALETTE_GREY: \ case VIDEO_PALETTE_GREY: \
switch (depth) \ switch (depth) \
{ \ { \
case 4: \ case 4: \
case 6: \ case 6: \
case 8: \ case 8: \
(r) = (g) = (b) = (*buf++ << 8);\ (r) = (g) = (b) = (*buf++ << 8);\
break; \ break; \
\ \
case 16: \ case 16: \
(r) = (g) = (b) = \ (r) = (g) = (b) = \
*((unsigned short *) buf); \ *((unsigned short *) buf); \
buf += 2; \ buf += 2; \
break; \ break; \
} \ } \
break; \ break; \
\ \
\ \
case VIDEO_PALETTE_RGB565: \ case VIDEO_PALETTE_RGB565: \
{ \ { \
unsigned short tmp = *(unsigned short *)buf; \ unsigned short tmp = *(unsigned short *)buf; \
(r) = tmp&0xF800; \ (r) = tmp&0xF800; \
(g) = (tmp<<5)&0xFC00; \ (g) = (tmp<<5)&0xFC00; \
(b) = (tmp<<11)&0xF800; \ (b) = (tmp<<11)&0xF800; \
buf += 2; \ buf += 2; \
} \ } \
break; \ break; \
\ \
case VIDEO_PALETTE_RGB555: \ case VIDEO_PALETTE_RGB555: \
(r) = (buf[0]&0xF8)<<8; \ (r) = (buf[0]&0xF8)<<8; \
(g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \ (g) = ((buf[0] << 5 | buf[1] >> 3)&0xF8)<<8; \
(b) = ((buf[1] << 2 ) & 0xF8)<<8; \ (b) = ((buf[1] << 2 ) & 0xF8)<<8; \
buf += 2; \ buf += 2; \
break; \ break; \
\ \
case VIDEO_PALETTE_RGB24: \ case VIDEO_PALETTE_RGB24: \
(r) = buf[0] << 8; (g) = buf[1] << 8; \ (r) = buf[0] << 8; (g) = buf[1] << 8; \
(b) = buf[2] << 8; \ (b) = buf[2] << 8; \
buf += 3; \ buf += 3; \
break; \ break; \
\ \
default: \ default: \
fprintf(stderr, \ fprintf(stderr, \
"Format %d not yet supported\n", \ "Format %d not yet supported\n", \
format); \ format); \
} \ } \
} }
int get_brightness_adj(unsigned char *image, long size, int *brightness) { int get_brightness_adj(unsigned char *image, long size, int *brightness) {
long i, tot = 0; long i, tot = 0;
...@@ -324,40 +324,40 @@ int main(int argc, char ** argv) ...@@ -324,40 +324,40 @@ int main(int argc, char ** argv)
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
vpic.depth=6; vpic.depth=6;
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
vpic.depth=4; vpic.depth=4;
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
fprintf(stderr, "Unable to find a supported capture format.\n"); fprintf(stderr, "Unable to find a supported capture format.\n");
close(fd); close(fd);
exit(1); exit(1);
} }
} }
} }
} else { } else {
vpic.depth=24; vpic.depth=24;
vpic.palette=VIDEO_PALETTE_RGB24; vpic.palette=VIDEO_PALETTE_RGB24;
if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) { if(ioctl(fd, VIDIOCSPICT, &vpic) < 0) {
vpic.palette=VIDEO_PALETTE_RGB565; vpic.palette=VIDEO_PALETTE_RGB565;
vpic.depth=16; vpic.depth=16;
if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
vpic.palette=VIDEO_PALETTE_RGB555; vpic.palette=VIDEO_PALETTE_RGB555;
vpic.depth=15; vpic.depth=15;
if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
fprintf(stderr, "Unable to find a supported capture format.\n"); fprintf(stderr, "Unable to find a supported capture format.\n");
return -1; return -1;
} }
} }
} }
} }
buffer = malloc(win.width * win.height * bpp); buffer = malloc(win.width * win.height * bpp);
if (!buffer) { if (!buffer) {
fprintf(stderr, "Out of memory.\n"); fprintf(stderr, "Out of memory.\n");
exit(1); exit(1);
} }
do { do {
int newbright; int newbright;
read(fd, buffer, win.width * win.height * bpp); read(fd, buffer, win.width * win.height * bpp);
...@@ -365,8 +365,8 @@ int main(int argc, char ** argv) ...@@ -365,8 +365,8 @@ int main(int argc, char ** argv)
if (f) { if (f) {
vpic.brightness += (newbright << 8); vpic.brightness += (newbright << 8);
if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) { if(ioctl(fd, VIDIOCSPICT, &vpic)==-1) {
perror("VIDIOSPICT"); perror("VIDIOSPICT");
break; break;
} }
} }
} while (f); } while (f);
...@@ -381,7 +381,7 @@ int main(int argc, char ** argv) ...@@ -381,7 +381,7 @@ int main(int argc, char ** argv)
fputc(g>>8, stdout); fputc(g>>8, stdout);
fputc(b>>8, stdout); fputc(b>>8, stdout);
} }
close(fd); close(fd);
return 0; return 0;
} }
......
...@@ -87,7 +87,7 @@ hardware configuration of the parport. You can give the boot-parameter ...@@ -87,7 +87,7 @@ hardware configuration of the parport. You can give the boot-parameter
at the LILO-prompt or specify it in lilo.conf. I use the following at the LILO-prompt or specify it in lilo.conf. I use the following
append-line in lilo.conf: append-line in lilo.conf:
append="parport=0x378,7,3" append="parport=0x378,7,3"
See Documentation/parport.txt for more information about the See Documentation/parport.txt for more information about the
configuration of the parport and the values given above. Do not simply configuration of the parport and the values given above. Do not simply
...@@ -175,7 +175,7 @@ THANKS (in no particular order): ...@@ -175,7 +175,7 @@ THANKS (in no particular order):
- Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help - Manuel J. Petit de Gabriel <mpetit@dit.upm.es> for providing help
with Isabel (http://isabel.dit.upm.es/) with Isabel (http://isabel.dit.upm.es/)
- Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code - Bas Huisman <bhuism@cs.utwente.nl> for writing the initial parport code
- Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list - Jarl Totland <Jarl.Totland@bdc.no> for setting up the mailing list
and maintaining the web-server[3] and maintaining the web-server[3]
- Chris Whiteford <Chris@informinteractive.com> for fixes related to the - Chris Whiteford <Chris@informinteractive.com> for fixes related to the
1.02 firmware 1.02 firmware
......
...@@ -28,7 +28,7 @@ Iomega Buz: ...@@ -28,7 +28,7 @@ Iomega Buz:
* Philips saa7111 TV decoder * Philips saa7111 TV decoder
* Philips saa7185 TV encoder * Philips saa7185 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, saa7111, saa7185, zr36060, zr36067 videocodec, saa7111, saa7185, zr36060, zr36067
Inputs/outputs: Composite and S-video Inputs/outputs: Composite and S-video
Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps) Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 7 Card number: 7
...@@ -39,7 +39,7 @@ Linux Media Labs LML33: ...@@ -39,7 +39,7 @@ Linux Media Labs LML33:
* Brooktree bt819 TV decoder * Brooktree bt819 TV decoder
* Brooktree bt856 TV encoder * Brooktree bt856 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, bt819, bt856, zr36060, zr36067 videocodec, bt819, bt856, zr36060, zr36067
Inputs/outputs: Composite and S-video Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps) Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 5 Card number: 5
...@@ -50,7 +50,7 @@ Linux Media Labs LML33R10: ...@@ -50,7 +50,7 @@ Linux Media Labs LML33R10:
* Philips saa7114 TV decoder * Philips saa7114 TV decoder
* Analog Devices adv7170 TV encoder * Analog Devices adv7170 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, saa7114, adv7170, zr36060, zr36067 videocodec, saa7114, adv7170, zr36060, zr36067
Inputs/outputs: Composite and S-video Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps) Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 6 Card number: 6
...@@ -61,7 +61,7 @@ Pinnacle/Miro DC10(new): ...@@ -61,7 +61,7 @@ Pinnacle/Miro DC10(new):
* Philips saa7110a TV decoder * Philips saa7110a TV decoder
* Analog Devices adv7176 TV encoder * Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, saa7110, adv7175, zr36060, zr36067 videocodec, saa7110, adv7175, zr36060, zr36067
Inputs/outputs: Composite, S-video and Internal Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps) Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 1 Card number: 1
...@@ -84,7 +84,7 @@ Pinnacle/Miro DC10(old): * ...@@ -84,7 +84,7 @@ Pinnacle/Miro DC10(old): *
* Micronas vpx3220a TV decoder * Micronas vpx3220a TV decoder
* mse3000 TV encoder or Analog Devices adv7176 TV encoder * * mse3000 TV encoder or Analog Devices adv7176 TV encoder *
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067 videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps) Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 0 Card number: 0
...@@ -96,7 +96,7 @@ Pinnacle/Miro DC30: * ...@@ -96,7 +96,7 @@ Pinnacle/Miro DC30: *
* Micronas vpx3225d/vpx3220a/vpx3216b TV decoder * Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
* Analog Devices adv7176 TV encoder * Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit, Drivers to use: videodev, i2c-core, i2c-algo-bit,
videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067 videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps) Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 3 Card number: 3
...@@ -123,11 +123,11 @@ Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h) ...@@ -123,11 +123,11 @@ Note: use encoder=X or decoder=X for non-default i2c chips (see i2c-id.h)
The best know TV standards are NTSC/PAL/SECAM. but for decoding a frame that The best know TV standards are NTSC/PAL/SECAM. but for decoding a frame that
information is not enough. There are several formats of the TV standards. information is not enough. There are several formats of the TV standards.
And not every TV decoder is able to handle every format. Also the every And not every TV decoder is able to handle every format. Also the every
combination is supported by the driver. There are currently 11 different combination is supported by the driver. There are currently 11 different
tv broadcast formats all aver the world. tv broadcast formats all aver the world.
The CCIR defines parameters needed for broadcasting the signal. The CCIR defines parameters needed for broadcasting the signal.
The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,... The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,...
The CCIR says not much about about the colorsystem used !!! The CCIR says not much about about the colorsystem used !!!
And talking about a colorsystem says not to much about how it is broadcast. And talking about a colorsystem says not to much about how it is broadcast.
...@@ -136,18 +136,18 @@ The CCIR standards A,E,F are not used any more. ...@@ -136,18 +136,18 @@ The CCIR standards A,E,F are not used any more.
When you speak about NTSC, you usually mean the standard: CCIR - M using When you speak about NTSC, you usually mean the standard: CCIR - M using
the NTSC colorsystem which is used in the USA, Japan, Mexico, Canada the NTSC colorsystem which is used in the USA, Japan, Mexico, Canada
and a few others. and a few others.
When you talk about PAL, you usually mean: CCIR - B/G using the PAL When you talk about PAL, you usually mean: CCIR - B/G using the PAL
colorsystem which is used in many Countries. colorsystem which is used in many Countries.
When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystem When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystem
which is used in France, and a few others. which is used in France, and a few others.
There the other version of SECAM, CCIR - D/K is used in Bulgaria, China, There the other version of SECAM, CCIR - D/K is used in Bulgaria, China,
Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others. Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others.
The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used in The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used in
Egypt, Libya, Sri Lanka, Syrain Arab. Rep. Egypt, Libya, Sri Lanka, Syrain Arab. Rep.
The CCIR - I uses the PAL colorsystem, and is used in Great Britain, Hong Kong, The CCIR - I uses the PAL colorsystem, and is used in Great Britain, Hong Kong,
...@@ -158,30 +158,30 @@ and is used in Argentinia, Uruguay, an a few others ...@@ -158,30 +158,30 @@ and is used in Argentinia, Uruguay, an a few others
We do not talk about how the audio is broadcast ! We do not talk about how the audio is broadcast !
A rather good sites about the TV standards are: A rather good sites about the TV standards are:
http://www.sony.jp/ServiceArea/Voltage_map/ http://www.sony.jp/ServiceArea/Voltage_map/
http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/ http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/
and http://www.cabl.com/restaurant/channel.html and http://www.cabl.com/restaurant/channel.html
Other weird things around: NTSC 4.43 is a modificated NTSC, which is mainly Other weird things around: NTSC 4.43 is a modificated NTSC, which is mainly
used in PAL VCR's that are able to play back NTSC. PAL 60 seems to be the same used in PAL VCR's that are able to play back NTSC. PAL 60 seems to be the same
as NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it would as NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it would
be the same as NTSC 4.43. be the same as NTSC 4.43.
NTSC Combs seems to be a decoder mode where the decoder uses a comb filter NTSC Combs seems to be a decoder mode where the decoder uses a comb filter
to split coma and luma instead of a Delay line. to split coma and luma instead of a Delay line.
But I did not defiantly find out what NTSC Comb is. But I did not defiantly find out what NTSC Comb is.
Philips saa7111 TV decoder Philips saa7111 TV decoder
was introduced in 1997, is used in the BUZ and was introduced in 1997, is used in the BUZ and
can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM
Philips saa7110a TV decoder Philips saa7110a TV decoder
was introduced in 1995, is used in the Pinnacle/Miro DC10(new), DC10+ and was introduced in 1995, is used in the Pinnacle/Miro DC10(new), DC10+ and
can handle: PAL B/G, NTSC M and SECAM can handle: PAL B/G, NTSC M and SECAM
Philips saa7114 TV decoder Philips saa7114 TV decoder
was introduced in 2000, is used in the LML33R10 and was introduced in 2000, is used in the LML33R10 and
can handle: PAL B/G/D/H/I/N, PAL N, PAL M, NTSC M, NTSC 4.43 and SECAM can handle: PAL B/G/D/H/I/N, PAL N, PAL M, NTSC M, NTSC 4.43 and SECAM
Brooktree bt819 TV decoder Brooktree bt819 TV decoder
...@@ -206,7 +206,7 @@ was introduced in 1996, is used in the BUZ ...@@ -206,7 +206,7 @@ was introduced in 1996, is used in the BUZ
can generate: PAL B/G, NTSC M can generate: PAL B/G, NTSC M
Brooktree bt856 TV Encoder Brooktree bt856 TV Encoder
was introduced in 1994, is used in the LML33 was introduced in 1994, is used in the LML33
can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL-N (Argentina) can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL-N (Argentina)
Analog Devices adv7170 TV Encoder Analog Devices adv7170 TV Encoder
...@@ -221,9 +221,9 @@ ITT mse3000 TV encoder ...@@ -221,9 +221,9 @@ ITT mse3000 TV encoder
was introduced in 1991, is used in the DC10 old was introduced in 1991, is used in the DC10 old
can generate: PAL , NTSC , SECAM can generate: PAL , NTSC , SECAM
The adv717x, should be able to produce PAL N. But you find nothing PAL N The adv717x, should be able to produce PAL N. But you find nothing PAL N
specific in the registers. Seem that you have to reuse a other standard specific in the registers. Seem that you have to reuse a other standard
to generate PAL N, maybe it would work if you use the PAL M settings. to generate PAL N, maybe it would work if you use the PAL M settings.
========================== ==========================
...@@ -261,7 +261,7 @@ Here's my experience of using LML33 and Buz on various motherboards: ...@@ -261,7 +261,7 @@ Here's my experience of using LML33 and Buz on various motherboards:
VIA MVP3 VIA MVP3
Forget it. Pointless. Doesn't work. Forget it. Pointless. Doesn't work.
Intel 430FX (Pentium 200) Intel 430FX (Pentium 200)
LML33 perfect, Buz tolerable (3 or 4 frames dropped per movie) LML33 perfect, Buz tolerable (3 or 4 frames dropped per movie)
Intel 440BX (early stepping) Intel 440BX (early stepping)
LML33 tolerable. Buz starting to get annoying (6-10 frames/hour) LML33 tolerable. Buz starting to get annoying (6-10 frames/hour)
...@@ -438,52 +438,52 @@ importance of buffer sizes: ...@@ -438,52 +438,52 @@ importance of buffer sizes:
> -q 25 -b 128 : 24.655.992 > -q 25 -b 128 : 24.655.992
> -q 25 -b 256 : 25.859.820 > -q 25 -b 256 : 25.859.820
I woke up, and can't go to sleep again. I'll kill some time explaining why I woke up, and can't go to sleep again. I'll kill some time explaining why
this doesn't look strange to me. this doesn't look strange to me.
Let's do some math using a width of 704 pixels. I'm not sure whether the Buz Let's do some math using a width of 704 pixels. I'm not sure whether the Buz
actually use that number or not, but that's not too important right now. actually use that number or not, but that's not too important right now.
704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block; 704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;
3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block; 3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;
1024 bits per block. 100% in the new driver mean 1:2 compression; the maximum 1024 bits per block. 100% in the new driver mean 1:2 compression; the maximum
output becomes 512 bits per block. Actually 510, but 512 is simpler to use output becomes 512 bits per block. Actually 510, but 512 is simpler to use
for calculations. for calculations.
Let's say that we specify d1q50. We thus want 256 bits per block; times 3168 Let's say that we specify d1q50. We thus want 256 bits per block; times 3168
becomes 811008 bits; 101376 bytes per field. We're talking raw bits and bytes becomes 811008 bits; 101376 bytes per field. We're talking raw bits and bytes
here, so we don't need to do any fancy corrections for bits-per-pixel or such here, so we don't need to do any fancy corrections for bits-per-pixel or such
things. 101376 bytes per field. things. 101376 bytes per field.
d1 video contains two fields per frame. Those sum up to 202752 bytes per d1 video contains two fields per frame. Those sum up to 202752 bytes per
frame, and one of those frames goes into each buffer. frame, and one of those frames goes into each buffer.
But wait a second! -b128 gives 128kB buffers! It's not possible to cram But wait a second! -b128 gives 128kB buffers! It's not possible to cram
202752 bytes of JPEG data into 128kB! 202752 bytes of JPEG data into 128kB!
This is what the driver notice and automatically compensate for in your This is what the driver notice and automatically compensate for in your
examples. Let's do some math using this information: examples. Let's do some math using this information:
128kB is 131072 bytes. In this buffer, we want to store two fields, which 128kB is 131072 bytes. In this buffer, we want to store two fields, which
leaves 65536 bytes for each field. Using 3168 blocks per field, we get leaves 65536 bytes for each field. Using 3168 blocks per field, we get
20.68686868... available bytes per block; 165 bits. We can't allow the 20.68686868... available bytes per block; 165 bits. We can't allow the
request for 256 bits per block when there's only 165 bits available! The -q50 request for 256 bits per block when there's only 165 bits available! The -q50
option is silently overridden, and the -b128 option takes precedence, leaving option is silently overridden, and the -b128 option takes precedence, leaving
us with the equivalence of -q32. us with the equivalence of -q32.
This gives us a data rate of 165 bits per block, which, times 3168, sums up This gives us a data rate of 165 bits per block, which, times 3168, sums up
to 65340 bytes per field, out of the allowed 65536. The current driver has to 65340 bytes per field, out of the allowed 65536. The current driver has
another level of rate limiting; it won't accept -q values that fill more than another level of rate limiting; it won't accept -q values that fill more than
6/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to be 6/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to be
a safe bet. Personally, I think I would have lowered requested-bits-per-block a safe bet. Personally, I think I would have lowered requested-bits-per-block
by one, or something like that.) We can't use 165 bits per block, but have to by one, or something like that.) We can't use 165 bits per block, but have to
lower it again, to 6/8 of the available buffer space: We end up with 124 bits lower it again, to 6/8 of the available buffer space: We end up with 124 bits
per block, the equivalence of -q24. With 128kB buffers, you can't use greater per block, the equivalence of -q24. With 128kB buffers, you can't use greater
than -q24 at -d1. (And PAL, and 704 pixels width...) than -q24 at -d1. (And PAL, and 704 pixels width...)
The third example is limited to -q24 through the same process. The second The third example is limited to -q24 through the same process. The second
example, using very similar calculations, is limited to -q48. The only example, using very similar calculations, is limited to -q48. The only
example that actually grab at the specified -q value is the last one, which example that actually grab at the specified -q value is the last one, which
is clearly visible, looking at the file size. is clearly visible, looking at the file size.
-- --
......
...@@ -14,13 +14,13 @@ Hauppauge Win/TV pci (version 405): ...@@ -14,13 +14,13 @@ Hauppauge Win/TV pci (version 405):
Microchip 24LC02B or Microchip 24LC02B or
Philips 8582E2Y: 256 Byte EEPROM with configuration information Philips 8582E2Y: 256 Byte EEPROM with configuration information
I2C 0xa0-0xa1, (24LC02B also responds to 0xa2-0xaf) I2C 0xa0-0xa1, (24LC02B also responds to 0xa2-0xaf)
Philips SAA5246AGP/E: Videotext decoder chip, I2C 0x22-0x23 Philips SAA5246AGP/E: Videotext decoder chip, I2C 0x22-0x23
TDA9800: sound decoder TDA9800: sound decoder
Winbond W24257AS-35: 32Kx8 CMOS static RAM (Videotext buffer mem) Winbond W24257AS-35: 32Kx8 CMOS static RAM (Videotext buffer mem)
14052B: analog switch for selection of sound source 14052B: analog switch for selection of sound source
PAL: PAL:
TDA5737: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners TDA5737: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners
TSA5522: 1.4 GHz I2C-bus controlled synthesizer, I2C 0xc2-0xc3 TSA5522: 1.4 GHz I2C-bus controlled synthesizer, I2C 0xc2-0xc3
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- Start capturing by pressing "c" or by selecting it via a menu!!! - Start capturing by pressing "c" or by selecting it via a menu!!!
- The memory of some S3 cards is not recognized right: - The memory of some S3 cards is not recognized right:
First of all, if you are not using XFree-3.2 or newer, upgrade AT LEAST to First of all, if you are not using XFree-3.2 or newer, upgrade AT LEAST to
XFree-3.2A! This solved the problem for most people. XFree-3.2A! This solved the problem for most people.
...@@ -31,23 +31,23 @@ ...@@ -31,23 +31,23 @@
(mostly with Trio 64 but also with some others) (mostly with Trio 64 but also with some others)
Get the free demo version of Accelerated X from www.xinside.com and try Get the free demo version of Accelerated X from www.xinside.com and try
bttv with it. bttv seems to work with most S3 cards with Accelerated X. bttv with it. bttv seems to work with most S3 cards with Accelerated X.
Since I do not know much (better make that almost nothing) about VGA card Since I do not know much (better make that almost nothing) about VGA card
programming I do not know the reason for this. programming I do not know the reason for this.
Looks like XFree does something different when setting up the video memory? Looks like XFree does something different when setting up the video memory?
Maybe somebody can enlighten me? Maybe somebody can enlighten me?
Would be nice if somebody could get this to work with XFree since Would be nice if somebody could get this to work with XFree since
Accelerated X costs more than some of the grabber cards ... Accelerated X costs more than some of the grabber cards ...
Better linear frame buffer support for S3 cards will probably be in Better linear frame buffer support for S3 cards will probably be in
XFree 4.0. XFree 4.0.
- Grabbing is not switched off when changing consoles with XFree. - Grabbing is not switched off when changing consoles with XFree.
That's because XFree and some AcceleratedX versions do not send unmap That's because XFree and some AcceleratedX versions do not send unmap
events. events.
- Some popup windows (e.g. of the window manager) are not refreshed. - Some popup windows (e.g. of the window manager) are not refreshed.
Disable backing store by starting X with the option "-bs" Disable backing store by starting X with the option "-bs"
- When using 32 bpp in XFree or 24+8bpp mode in AccelX 3.1 the system - When using 32 bpp in XFree or 24+8bpp mode in AccelX 3.1 the system
......
...@@ -38,9 +38,9 @@ tolerate. ...@@ -38,9 +38,9 @@ tolerate.
------------------------ ------------------------
When using the 430FX PCI, the following rules will ensure When using the 430FX PCI, the following rules will ensure
compatibility: compatibility:
(1) Deassert REQ at the same time as asserting FRAME. (1) Deassert REQ at the same time as asserting FRAME.
(2) Do not reassert REQ to request another bus transaction until after (2) Do not reassert REQ to request another bus transaction until after
finish-ing the previous transaction. finish-ing the previous transaction.
......
Many thanks to: Many thanks to:
- Markus Schroeder <schroedm@uni-duesseldorf.de> for information on the Bt848 - Markus Schroeder <schroedm@uni-duesseldorf.de> for information on the Bt848
and tuner programming and his control program xtvc. and tuner programming and his control program xtvc.
- Martin Buck <martin-2.buck@student.uni-ulm.de> for his great Videotext - Martin Buck <martin-2.buck@student.uni-ulm.de> for his great Videotext
...@@ -16,7 +16,7 @@ Many thanks to: ...@@ -16,7 +16,7 @@ Many thanks to:
- MIRO for providing a free PCTV card and detailed information about the - MIRO for providing a free PCTV card and detailed information about the
components on their cards. (E.g. how the tuner type is detected) components on their cards. (E.g. how the tuner type is detected)
Without their card I could not have debugged the NTSC mode. Without their card I could not have debugged the NTSC mode.
- Hauppauge for telling how the sound input is selected and what components - Hauppauge for telling how the sound input is selected and what components
they do and will use on their radio cards. they do and will use on their radio cards.
Also many thanks for faxing me the FM1216 data sheet. Also many thanks for faxing me the FM1216 data sheet.
......
...@@ -131,17 +131,17 @@ Check Stereo: BASE <-- 0xd8 (current volume, stereo detect, ...@@ -131,17 +131,17 @@ Check Stereo: BASE <-- 0xd8 (current volume, stereo detect,
x=0xff ==> "not stereo", x=0xfd ==> "stereo detected" x=0xff ==> "not stereo", x=0xfd ==> "stereo detected"
Set Frequency: code = (freq*40) + 10486188 Set Frequency: code = (freq*40) + 10486188
foreach of the 24 bits in code, foreach of the 24 bits in code,
(from Least to Most Significant): (from Least to Most Significant):
to write a "zero" bit, to write a "zero" bit,
BASE <-- 0x01 (audio mute, no stereo detect, radio BASE <-- 0x01 (audio mute, no stereo detect, radio
disable, "zero" bit phase 1, tuner adjust) disable, "zero" bit phase 1, tuner adjust)
BASE <-- 0x03 (audio mute, no stereo detect, radio BASE <-- 0x03 (audio mute, no stereo detect, radio
disable, "zero" bit phase 2, tuner adjust) disable, "zero" bit phase 2, tuner adjust)
to write a "one" bit, to write a "one" bit,
BASE <-- 0x05 (audio mute, no stereo detect, radio BASE <-- 0x05 (audio mute, no stereo detect, radio
disable, "one" bit phase 1, tuner adjust) disable, "one" bit phase 1, tuner adjust)
BASE <-- 0x07 (audio mute, no stereo detect, radio BASE <-- 0x07 (audio mute, no stereo detect, radio
disable, "one" bit phase 2, tuner adjust) disable, "one" bit phase 2, tuner adjust)
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
...@@ -26,7 +26,7 @@ is called VIDEO_PALETTE_YUV422 (16 bpp). ...@@ -26,7 +26,7 @@ is called VIDEO_PALETTE_YUV422 (16 bpp).
A minimal test application (with source) is available from: A minimal test application (with source) is available from:
http://hem.fyristorg.com/mogul/w9966.html http://hem.fyristorg.com/mogul/w9966.html
The slow framerate is due to missing DMA ECP read support in the The slow framerate is due to missing DMA ECP read support in the
parport drivers. I might add working EPP support later. parport drivers. I might add working EPP support later.
Good luck! Good luck!
......
...@@ -2,7 +2,7 @@ Driver for Trust Computer Products Framegrabber, version 0.6.1 ...@@ -2,7 +2,7 @@ Driver for Trust Computer Products Framegrabber, version 0.6.1
------ --- ----- -------- -------- ------------ ------- - - - ------ --- ----- -------- -------- ------------ ------- - - -
- ZORAN ------------------------------------------------------ - ZORAN ------------------------------------------------------
Author: Pauline Middelink <middelin@polyware.nl> Author: Pauline Middelink <middelin@polyware.nl>
Date: 18 September 1999 Date: 18 September 1999
Version: 0.6.1 Version: 0.6.1
...@@ -115,7 +115,7 @@ After making/checking the devices do: ...@@ -115,7 +115,7 @@ After making/checking the devices do:
<n> is the cardtype of the card you have. The cardnumber can <n> is the cardtype of the card you have. The cardnumber can
be found in the source of zr36120. Look for tvcards. If your be found in the source of zr36120. Look for tvcards. If your
card is not there, please try if any other card gives some card is not there, please try if any other card gives some
response, and mail me if you got a working tvcard addition. response, and mail me if you got a working tvcard addition.
PS. <TVCard editors behold!) PS. <TVCard editors behold!)
Dont forget to set video_input to the number of inputs Dont forget to set video_input to the number of inputs
......
...@@ -50,5 +50,19 @@ config VIDEO_IR ...@@ -50,5 +50,19 @@ config VIDEO_IR
config VIDEO_TVEEPROM config VIDEO_TVEEPROM
tristate tristate
config USB_DABUSB
tristate "DABUSB driver"
depends on USB
---help---
A Digital Audio Broadcasting (DAB) Receiver for USB and Linux
brought to you by the DAB-Team
<http://wwwbode.cs.tum.edu/Par/arch/dab/>. This driver can be taken
as an example for URB-based bulk, control, and isochronous
transactions. URB's are explained in
<Documentation/usb/URB.txt>.
To compile this driver as a module, choose M here: the
module will be called dabusb.
endmenu endmenu
...@@ -50,14 +50,15 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits) ...@@ -50,14 +50,15 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits)
/********************************************************************************/ /********************************************************************************/
/* common dma functions */ /* common dma functions */
void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf) void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q,
struct saa7146_buf *buf)
{ {
DEB_EE(("dev:%p, buf:%p\n",dev,buf)); DEB_EE(("dev:%p, buf:%p\n",dev,buf));
BUG_ON(in_interrupt()); BUG_ON(in_interrupt());
videobuf_waiton(&buf->vb,0,0); videobuf_waiton(&buf->vb,0,0);
videobuf_dma_pci_unmap(dev->pci, &buf->vb.dma); videobuf_dma_unmap(q, &buf->vb.dma);
videobuf_dma_free(&buf->vb.dma); videobuf_dma_free(&buf->vb.dma);
buf->vb.state = STATE_NEEDS_INIT; buf->vb.state = STATE_NEEDS_INIT;
} }
......
...@@ -236,7 +236,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e ...@@ -236,7 +236,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
} }
if (buf->vb.size != size) if (buf->vb.size != size)
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
if (STATE_NEEDS_INIT == buf->vb.state) { if (STATE_NEEDS_INIT == buf->vb.state) {
buf->vb.width = llength; buf->vb.width = llength;
...@@ -247,7 +247,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e ...@@ -247,7 +247,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
saa7146_pgtable_free(dev->pci, &buf->pt[2]); saa7146_pgtable_free(dev->pci, &buf->pt[2]);
saa7146_pgtable_alloc(dev->pci, &buf->pt[2]); saa7146_pgtable_alloc(dev->pci, &buf->pt[2]);
err = videobuf_iolock(dev->pci,&buf->vb, NULL); err = videobuf_iolock(q,&buf->vb, NULL);
if (err) if (err)
goto oops; goto oops;
err = saa7146_pgtable_build_single(dev->pci, &buf->pt[2], buf->vb.dma.sglist, buf->vb.dma.sglen); err = saa7146_pgtable_build_single(dev->pci, &buf->pt[2], buf->vb.dma.sglist, buf->vb.dma.sglen);
...@@ -261,7 +261,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e ...@@ -261,7 +261,7 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,e
oops: oops:
DEB_VBI(("error out.\n")); DEB_VBI(("error out.\n"));
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
return err; return err;
} }
...@@ -301,7 +301,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) ...@@ -301,7 +301,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
struct saa7146_buf *buf = (struct saa7146_buf *)vb; struct saa7146_buf *buf = (struct saa7146_buf *)vb;
DEB_VBI(("vb:%p\n",vb)); DEB_VBI(("vb:%p\n",vb));
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
} }
static struct videobuf_queue_ops vbi_qops = { static struct videobuf_queue_ops vbi_qops = {
......
...@@ -1275,7 +1275,7 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -1275,7 +1275,7 @@ static int buffer_prepare(struct videobuf_queue *q,
buf->vb.field != field || buf->vb.field != field ||
buf->vb.field != fh->video_fmt.field || buf->vb.field != fh->video_fmt.field ||
buf->fmt != &fh->video_fmt) { buf->fmt != &fh->video_fmt) {
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
} }
if (STATE_NEEDS_INIT == buf->vb.state) { if (STATE_NEEDS_INIT == buf->vb.state) {
...@@ -1304,7 +1304,7 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -1304,7 +1304,7 @@ static int buffer_prepare(struct videobuf_queue *q,
saa7146_pgtable_alloc(dev->pci, &buf->pt[0]); saa7146_pgtable_alloc(dev->pci, &buf->pt[0]);
} }
err = videobuf_iolock(dev->pci,&buf->vb, &vv->ov_fb); err = videobuf_iolock(q,&buf->vb, &vv->ov_fb);
if (err) if (err)
goto oops; goto oops;
err = saa7146_pgtable_build(dev,buf); err = saa7146_pgtable_build(dev,buf);
...@@ -1318,7 +1318,7 @@ static int buffer_prepare(struct videobuf_queue *q, ...@@ -1318,7 +1318,7 @@ static int buffer_prepare(struct videobuf_queue *q,
oops: oops:
DEB_D(("error out.\n")); DEB_D(("error out.\n"));
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
return err; return err;
} }
...@@ -1363,7 +1363,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) ...@@ -1363,7 +1363,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
struct saa7146_buf *buf = (struct saa7146_buf *)vb; struct saa7146_buf *buf = (struct saa7146_buf *)vb;
DEB_CAP(("vbuf:%p\n",vb)); DEB_CAP(("vbuf:%p\n",vb));
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,q,buf);
} }
static struct videobuf_queue_ops video_qops = { static struct videobuf_queue_ops video_qops = {
......
...@@ -541,6 +541,7 @@ static struct usb_device_id flexcop_usb_table [] = { ...@@ -541,6 +541,7 @@ static struct usb_device_id flexcop_usb_table [] = {
{ USB_DEVICE(0x0af7, 0x0101) }, { USB_DEVICE(0x0af7, 0x0101) },
{ } { }
}; };
MODULE_DEVICE_TABLE (usb, flexcop_usb_table);
/* usb specific object needed to register this driver with the usb subsystem */ /* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver flexcop_usb_driver = { static struct usb_driver flexcop_usb_driver = {
......
obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o dst.o dst_ca.o
EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video -Idrivers/media/dvb/frontends EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video/bt8xx -Idrivers/media/dvb/frontends
...@@ -81,18 +81,19 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) ...@@ -81,18 +81,19 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
return -EAGAIN; return -EAGAIN;
if (num > 2) if (num > 2)
warn("more than 2 i2c messages at a time is not handled yet. TODO."); warn("more than two i2c messages at a time is not handled yet. TODO.");
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
switch (msg[i].addr) { if (d->udev->descriptor.idVendor == USB_VID_MEDION)
case 0x63: switch (msg[i].addr) {
cxusb_gpio_tuner(d,0); case 0x63:
break; cxusb_gpio_tuner(d,0);
default: break;
cxusb_gpio_tuner(d,1); default:
break; cxusb_gpio_tuner(d,1);
} break;
}
/* read request */ /* read request */
if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) { if (i+1 < num && (msg[i+1].flags & I2C_M_RD)) {
...@@ -108,7 +109,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) ...@@ -108,7 +109,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
break; break;
if (ibuf[0] != 0x08) if (ibuf[0] != 0x08)
deb_info("i2c read could have been failed\n"); deb_i2c("i2c read may have failed\n");
memcpy(msg[i+1].buf,&ibuf[1],msg[i+1].len); memcpy(msg[i+1].buf,&ibuf[1],msg[i+1].len);
...@@ -122,7 +123,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) ...@@ -122,7 +123,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
if (cxusb_ctrl_msg(d,CMD_I2C_WRITE, obuf, 2+msg[i].len, &ibuf,1) < 0) if (cxusb_ctrl_msg(d,CMD_I2C_WRITE, obuf, 2+msg[i].len, &ibuf,1) < 0)
break; break;
if (ibuf != 0x08) if (ibuf != 0x08)
deb_info("i2c write could have been failed\n"); deb_i2c("i2c write may have failed\n");
} }
} }
...@@ -410,7 +411,6 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, const ...@@ -410,7 +411,6 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, const
if (fw->data[BLUEBIRD_01_ID_OFFSET] == (USB_VID_DVICO & 0xff) && if (fw->data[BLUEBIRD_01_ID_OFFSET] == (USB_VID_DVICO & 0xff) &&
fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) { fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) {
/* FIXME: are we allowed to change the fw-data ? */
fw->data[BLUEBIRD_01_ID_OFFSET + 2] = udev->descriptor.idProduct + 1; fw->data[BLUEBIRD_01_ID_OFFSET + 2] = udev->descriptor.idProduct + 1;
fw->data[BLUEBIRD_01_ID_OFFSET + 3] = udev->descriptor.idProduct >> 8; fw->data[BLUEBIRD_01_ID_OFFSET + 3] = udev->descriptor.idProduct >> 8;
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
extern int dvb_usb_cxusb_debug; extern int dvb_usb_cxusb_debug;
#define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args) #define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args)
#define deb_i2c(args...) if (d->udev->descriptor.idVendor == USB_VID_MEDION) \
dprintk(dvb_usb_cxusb_debug,0x01,args)
/* usb commands - some of it are guesses, don't have a reference yet */ /* usb commands - some of it are guesses, don't have a reference yet */
#define CMD_I2C_WRITE 0x08 #define CMD_I2C_WRITE 0x08
......
...@@ -369,6 +369,11 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) ...@@ -369,6 +369,11 @@ static int av7110_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg)
fm_matrix = 0x3001; // stereo fm_matrix = 0x3001; // stereo
src = 0x0020; src = 0x0020;
break; break;
case V4L2_TUNER_MODE_LANG1_LANG2:
dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1_LANG2\n");
fm_matrix = 0x3000; // bilingual
src = 0x0020;
break;
case V4L2_TUNER_MODE_LANG1: case V4L2_TUNER_MODE_LANG1:
dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1\n"); dprintk(2, "VIDIOC_S_TUNER: V4L2_TUNER_MODE_LANG1\n");
fm_matrix = 0x3000; // mono fm_matrix = 0x3000; // mono
......
...@@ -16,31 +16,7 @@ config VIDEO_ADV_DEBUG ...@@ -16,31 +16,7 @@ config VIDEO_ADV_DEBUG
V4L devices. V4L devices.
In doubt, say N. In doubt, say N.
config VIDEO_BT848 source "drivers/media/video/bt8xx/Kconfig"
tristate "BT848 Video For Linux"
depends on VIDEO_DEV && PCI && I2C
select I2C_ALGOBIT
select FW_LOADER
select VIDEO_BTCX
select VIDEO_BUF
select VIDEO_IR
select VIDEO_TUNER
select VIDEO_TVEEPROM
select VIDEO_MSP3400
---help---
Support for BT848 based frame grabber/overlay boards. This includes
the Miro, Hauppauge and STB boards. Please read the material in
<file:Documentation/video4linux/bttv/> for more information.
To compile this driver as a module, choose M here: the
module will be called bttv.
config VIDEO_BT848_DVB
bool "DVB/ATSC Support for bt878 based TV cards"
depends on VIDEO_BT848 && DVB_CORE
select DVB_BT8XX
---help---
This adds support for DVB/ATSC cards based on the BT878 chip.
config VIDEO_SAA6588 config VIDEO_SAA6588
tristate "SAA6588 Radio Chip RDS decoder support on BT848 cards" tristate "SAA6588 Radio Chip RDS decoder support on BT848 cards"
...@@ -315,8 +291,6 @@ config VIDEO_HEXIUM_GEMINI ...@@ -315,8 +291,6 @@ config VIDEO_HEXIUM_GEMINI
source "drivers/media/video/cx88/Kconfig" source "drivers/media/video/cx88/Kconfig"
source "drivers/media/video/em28xx/Kconfig"
config VIDEO_OVCAMCHIP config VIDEO_OVCAMCHIP
tristate "OmniVision Camera Chip support" tristate "OmniVision Camera Chip support"
depends on VIDEO_DEV && I2C depends on VIDEO_DEV && I2C
...@@ -391,4 +365,234 @@ config VIDEO_SAA7127 ...@@ -391,4 +365,234 @@ config VIDEO_SAA7127
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called saa7127 module will be called saa7127
#
# USB Multimedia device configuration
#
menu "V4L USB devices"
depends on USB && VIDEO_DEV
source "drivers/media/video/em28xx/Kconfig"
config USB_VICAM
tristate "USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)"
depends on USB && VIDEO_DEV && EXPERIMENTAL
---help---
Say Y here if you have 3com homeconnect camera (vicam).
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Multimedia Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called vicam.
config USB_DSBR
tristate "D-Link USB FM radio support (EXPERIMENTAL)"
depends on USB && VIDEO_DEV && EXPERIMENTAL
---help---
Say Y here if you want to connect this type of radio to your
computer's USB port. Note that the audio is not digital, and
you must connect the line out connector to a sound card or a
set of speakers.
This driver uses the Video For Linux API. You must enable
(Y or M in config) Video For Linux (under Character Devices)
to use this driver. Information on this API and pointers to
"v4l" programs may be found at
<file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called dsbr100.
config USB_ET61X251
tristate "USB ET61X[12]51 PC Camera Controller support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want support for cameras based on Etoms ET61X151
or ET61X251 PC Camera Controllers.
See <file:Documentation/usb/et61x251.txt> for more informations.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" to use this driver.
To compile this driver as a module, choose M here: the
module will be called et61x251.
config USB_IBMCAM
tristate "USB IBM (Xirlink) C-it Camera support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want to connect a IBM "C-It" camera, also known as
"Xirlink PC Camera" to your computer's USB port. For more
information, read <file:Documentation/usb/ibmcam.txt>.
This driver uses the Video For Linux API. You must enable
(Y or M in config) Video For Linux (under Character Devices)
to use this driver. Information on this API and pointers to
"v4l" programs may be found at
<file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called ibmcam.
This camera has several configuration options which
can be specified when you load the module. Read
<file:Documentation/usb/ibmcam.txt> to learn more.
config USB_KONICAWC
tristate "USB Konica Webcam support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want support for webcams based on a Konica
chipset. This is known to work with the Intel YC76 webcam.
This driver uses the Video For Linux API. You must enable
(Y or M in config) Video For Linux (under Character Devices)
to use this driver. Information on this API and pointers to
"v4l" programs may be found at
<file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called konicawc.
config USB_OV511
tristate "USB OV511 Camera support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want to connect this type of camera to your
computer's USB port. See <file:Documentation/usb/ov511.txt> for more
information and for a list of supported cameras.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Character Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called ov511.
config USB_SE401
tristate "USB SE401 Camera support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want to connect this type of camera to your
computer's USB port. See <file:Documentation/usb/se401.txt> for more
information and for a list of supported cameras.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Multimedia Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called se401.
config USB_SN9C102
tristate "USB SN9C10x PC Camera Controller support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want support for cameras based on SONiX SN9C101,
SN9C102 or SN9C103 PC Camera Controllers.
See <file:Documentation/usb/sn9c102.txt> for more informations.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" to use this driver.
To compile this driver as a module, choose M here: the
module will be called sn9c102.
config USB_STV680
tristate "USB STV680 (Pencam) Camera support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want to connect this type of camera to your
computer's USB port. This includes the Pencam line of cameras.
See <file:Documentation/usb/stv680.txt> for more information and for
a list of supported cameras.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Multimedia Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called stv680.
config USB_W9968CF
tristate "USB W996[87]CF JPEG Dual Mode Camera support"
depends on USB && VIDEO_DEV && I2C && VIDEO_OVCAMCHIP
---help---
Say Y here if you want support for cameras based on OV681 or
Winbond W9967CF/W9968CF JPEG USB Dual Mode Camera Chips.
This driver has an optional plugin, which is distributed as a
separate module only (released under GPL). It allows to use higher
resolutions and framerates, but cannot be included in the official
Linux kernel for performance purposes.
See <file:Documentation/usb/w9968cf.txt> for more informations.
This driver uses the Video For Linux and the I2C APIs. It needs the
OmniVision Camera Chip support as well. You must say Y or M to
"Video For Linux", "I2C Support" and "OmniVision Camera Chip
support" to use this driver.
To compile this driver as a module, choose M here: the
module will be called w9968cf.
config USB_ZC0301
tristate "USB ZC0301 Image Processor and Control Chip support"
depends on USB && VIDEO_DEV
---help---
Say Y here if you want support for cameras based on the ZC0301
Image Processor and Control Chip.
See <file:Documentation/usb/zc0301.txt> for more informations.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" to use this driver.
To compile this driver as a module, choose M here: the
module will be called zc0301.
config USB_PWC
tristate "USB Philips Cameras"
depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these Philips & OEM
webcams:
* Philips PCA645, PCA646
* Philips PCVC675, PCVC680, PCVC690
* Philips PCVC720/40, PCVC730, PCVC740, PCVC750
* Askey VC010
* Logitech QuickCam Pro 3000, 4000, 'Zoom', 'Notebook Pro'
and 'Orbit'/'Sphere'
* Samsung MPC-C10, MPC-C30
* Creative Webcam 5, Pro Ex
* SOTEC Afina Eye
* Visionite VCS-UC300, VCS-UM100
The PCA635, PCVC665 and PCVC720/20 are not supported by this driver
and never will be, but the 665 and 720/20 are supported by other
drivers.
See <file:Documentation/usb/philips.txt> for more information and
installation instructions.
The built-in microphone is enabled by selecting USB Audio support.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Character Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called pwc.
endmenu # V4L USB devices
endmenu endmenu
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
# Makefile for the video capture/playback device drivers. # Makefile for the video capture/playback device drivers.
# #
bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \
bttv-input.o
zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o zoran-objs := zr36120.o zr36120_i2c.o zr36120_mem.o
zr36067-objs := zoran_procfs.o zoran_device.o \ zr36067-objs := zoran_procfs.o zoran_device.o \
zoran_driver.o zoran_card.o zoran_driver.o zoran_card.o
...@@ -15,8 +12,8 @@ msp3400-objs := msp3400-driver.o msp3400-kthreads.o ...@@ -15,8 +12,8 @@ msp3400-objs := msp3400-driver.o msp3400-kthreads.o
obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o compat_ioctl32.o obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o compat_ioctl32.o
obj-$(CONFIG_VIDEO_BT848) += bttv.o tvaudio.o \ obj-$(CONFIG_VIDEO_BT848) += bt8xx/
tda7432.o tda9875.o ir-kbd-i2c.o obj-$(CONFIG_VIDEO_BT848) += tvaudio.o tda7432.o tda9875.o ir-kbd-i2c.o
obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o obj-$(CONFIG_SOUND_TVMIXER) += tvmixer.o
obj-$(CONFIG_VIDEO_ZR36120) += zoran.o obj-$(CONFIG_VIDEO_ZR36120) += zoran.o
...@@ -68,4 +65,23 @@ obj-$(CONFIG_VIDEO_CX25840) += cx25840/ ...@@ -68,4 +65,23 @@ obj-$(CONFIG_VIDEO_CX25840) += cx25840/
obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o obj-$(CONFIG_VIDEO_SAA711X) += saa7115.o
obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o obj-$(CONFIG_VIDEO_SAA7127) += saa7127.o
et61x251-objs := et61x251_core.o et61x251_tas5130d1b.o
zc0301-objs := zc0301_core.o zc0301_pas202bcb.o
obj-$(CONFIG_USB_DABUSB) += dabusb.o
obj-$(CONFIG_USB_DSBR) += dsbr100.o
obj-$(CONFIG_USB_OV511) += ov511.o
obj-$(CONFIG_USB_SE401) += se401.o
obj-$(CONFIG_USB_STV680) += stv680.o
obj-$(CONFIG_USB_W9968CF) += w9968cf.o
obj-$(CONFIG_USB_SN9C102) += sn9c102/
obj-$(CONFIG_USB_ET61X251) += et61x251/
obj-$(CONFIG_USB_PWC) += pwc/
obj-$(CONFIG_USB_ZC0301) += zc0301/
obj-$(CONFIG_USB_IBMCAM) += usbvideo/
obj-$(CONFIG_USB_KONICAWC) += usbvideo/
obj-$(CONFIG_USB_VICAM) += usbvideo/
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
/* /*
* adv7170 - adv7170, adv7171 video encoder driver version 0.0.1 * adv7170 - adv7170, adv7171 video encoder driver version 0.0.1
* *
* Copyright (C) 2002 Maxim Yevtyushkin <max@linuxmedialabs.com> * Copyright (C) 2002 Maxim Yevtyushkin <max@linuxmedialabs.com>
* *
* Based on adv7176 driver by: * Based on adv7176 driver by:
* *
* Copyright (C) 1998 Dave Perks <dperks@ibm.net> * Copyright (C) 1998 Dave Perks <dperks@ibm.net>
* Copyright (C) 1999 Wolfgang Scherr <scherr@net4you.net> * Copyright (C) 1999 Wolfgang Scherr <scherr@net4you.net>
...@@ -173,7 +173,7 @@ adv7170_write_block (struct i2c_client *client, ...@@ -173,7 +173,7 @@ adv7170_write_block (struct i2c_client *client,
static const unsigned char init_NTSC[] = { static const unsigned char init_NTSC[] = {
0x00, 0x10, // MR0 0x00, 0x10, // MR0
0x01, 0x20, // MR1 0x01, 0x20, // MR1
0x02, 0x0e, // MR2 RTC control: bits 2 and 1 0x02, 0x0e, // MR2 RTC control: bits 2 and 1
0x03, 0x80, // MR3 0x03, 0x80, // MR3
0x04, 0x30, // MR4 0x04, 0x30, // MR4
0x05, 0x00, // Reserved 0x05, 0x00, // Reserved
...@@ -196,7 +196,7 @@ static const unsigned char init_NTSC[] = { ...@@ -196,7 +196,7 @@ static const unsigned char init_NTSC[] = {
0x16, 0x00, // CGMS_WSS_0 0x16, 0x00, // CGMS_WSS_0
0x17, 0x00, // CGMS_WSS_1 0x17, 0x00, // CGMS_WSS_1
0x18, 0x00, // CGMS_WSS_2 0x18, 0x00, // CGMS_WSS_2
0x19, 0x00, // Teletext Ctl 0x19, 0x00, // Teletext Ctl
}; };
static const unsigned char init_PAL[] = { static const unsigned char init_PAL[] = {
...@@ -381,7 +381,7 @@ static unsigned short normal_i2c[] = ...@@ -381,7 +381,7 @@ static unsigned short normal_i2c[] =
}; };
static unsigned short ignore = I2C_CLIENT_END; static unsigned short ignore = I2C_CLIENT_END;
static struct i2c_client_address_data addr_data = { static struct i2c_client_address_data addr_data = {
.normal_i2c = normal_i2c, .normal_i2c = normal_i2c,
.probe = &ignore, .probe = &ignore,
......
/* /*
* adv7175 - adv7175a video encoder driver version 0.0.3 * adv7175 - adv7175a video encoder driver version 0.0.3
* *
* Copyright (C) 1998 Dave Perks <dperks@ibm.net> * Copyright (C) 1998 Dave Perks <dperks@ibm.net>
...@@ -233,7 +233,7 @@ adv7175_command (struct i2c_client *client, ...@@ -233,7 +233,7 @@ adv7175_command (struct i2c_client *client,
sizeof(init_common)); sizeof(init_common));
adv7175_write(client, 0x07, TR0MODE | TR0RST); adv7175_write(client, 0x07, TR0MODE | TR0RST);
adv7175_write(client, 0x07, TR0MODE); adv7175_write(client, 0x07, TR0MODE);
break; break;
case ENCODER_GET_CAPABILITIES: case ENCODER_GET_CAPABILITIES:
{ {
...@@ -399,7 +399,7 @@ static unsigned short normal_i2c[] = ...@@ -399,7 +399,7 @@ static unsigned short normal_i2c[] =
}; };
static unsigned short ignore = I2C_CLIENT_END; static unsigned short ignore = I2C_CLIENT_END;
static struct i2c_client_address_data addr_data = { static struct i2c_client_address_data addr_data = {
.normal_i2c = normal_i2c, .normal_i2c = normal_i2c,
.probe = &ignore, .probe = &ignore,
......
...@@ -161,39 +161,39 @@ void iic(int n, unsigned long addr, unsigned long data1, unsigned long data2, ...@@ -161,39 +161,39 @@ void iic(int n, unsigned long addr, unsigned long data1, unsigned long data2,
{ {
int i; int i;
/* Slave Address */ /* Slave Address */
ar_outl(addr, PLDI2CDATA); ar_outl(addr, PLDI2CDATA);
wait_for_vsync(); wait_for_vsync();
/* Start */ /* Start */
ar_outl(1, PLDI2CCND); ar_outl(1, PLDI2CCND);
wait_acknowledge(); wait_acknowledge();
/* Transfer data 1 */ /* Transfer data 1 */
ar_outl(data1, PLDI2CDATA); ar_outl(data1, PLDI2CDATA);
wait_for_vsync(); wait_for_vsync();
ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN); ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN);
wait_acknowledge(); wait_acknowledge();
/* Transfer data 2 */ /* Transfer data 2 */
ar_outl(data2, PLDI2CDATA); ar_outl(data2, PLDI2CDATA);
wait_for_vsync(); wait_for_vsync();
ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN); ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN);
wait_acknowledge(); wait_acknowledge();
if (n == 3) { if (n == 3) {
/* Transfer data 3 */ /* Transfer data 3 */
ar_outl(data3, PLDI2CDATA); ar_outl(data3, PLDI2CDATA);
wait_for_vsync(); wait_for_vsync();
ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN); ar_outl(PLDI2CSTEN_STEN, PLDI2CSTEN);
wait_acknowledge(); wait_acknowledge();
} }
/* Stop */ /* Stop */
for (i = 0; i < 100; i++) for (i = 0; i < 100; i++)
cpu_relax(); cpu_relax();
ar_outl(2, PLDI2CCND); ar_outl(2, PLDI2CCND);
ar_outl(2, PLDI2CCND); ar_outl(2, PLDI2CCND);
while (ar_inl(PLDI2CSTS) & PLDI2CSTS_BB) while (ar_inl(PLDI2CSTS) & PLDI2CSTS_BB)
cpu_relax(); cpu_relax();
...@@ -204,24 +204,24 @@ void init_iic(void) ...@@ -204,24 +204,24 @@ void init_iic(void)
{ {
DEBUG(1, "init_iic:\n"); DEBUG(1, "init_iic:\n");
/* /*
* ICU Setting (iic) * ICU Setting (iic)
*/ */
/* I2C Setting */ /* I2C Setting */
ar_outl(0x0, PLDI2CCR); /* I2CCR Disable */ ar_outl(0x0, PLDI2CCR); /* I2CCR Disable */
ar_outl(0x0300, PLDI2CMOD); /* I2CMOD ACK/8b-data/7b-addr/auto */ ar_outl(0x0300, PLDI2CMOD); /* I2CMOD ACK/8b-data/7b-addr/auto */
ar_outl(0x1, PLDI2CACK); /* I2CACK ACK */ ar_outl(0x1, PLDI2CACK); /* I2CACK ACK */
/* I2C CLK */ /* I2C CLK */
/* 50MH-100k */ /* 50MH-100k */
if (freq == 75) { if (freq == 75) {
ar_outl(369, PLDI2CFREQ); /* BCLK = 75MHz */ ar_outl(369, PLDI2CFREQ); /* BCLK = 75MHz */
} else if (freq == 50) { } else if (freq == 50) {
ar_outl(244, PLDI2CFREQ); /* BCLK = 50MHz */ ar_outl(244, PLDI2CFREQ); /* BCLK = 50MHz */
} else { } else {
ar_outl(244, PLDI2CFREQ); /* default: BCLK = 50MHz */ ar_outl(244, PLDI2CFREQ); /* default: BCLK = 50MHz */
} }
ar_outl(0x1, PLDI2CCR); /* I2CCR Enable */ ar_outl(0x1, PLDI2CCR); /* I2CCR Enable */
} }
/************************************************************************** /**************************************************************************
...@@ -253,7 +253,7 @@ static inline void wait_for_vertical_sync(int exp_line) ...@@ -253,7 +253,7 @@ static inline void wait_for_vertical_sync(int exp_line)
/* /*
* check HCOUNT because we cannot check vertical sync. * check HCOUNT because we cannot check vertical sync.
*/ */
for (; tmout >= 0; tmout--) { for (; tmout >= 0; tmout--) {
l = ar_inl(ARVHCOUNT); l = ar_inl(ARVHCOUNT);
if (l == exp_line) if (l == exp_line)
...@@ -562,8 +562,8 @@ static void ar_interrupt(int irq, void *dev, struct pt_regs *regs) ...@@ -562,8 +562,8 @@ static void ar_interrupt(int irq, void *dev, struct pt_regs *regs)
/* operations for interlace mode */ /* operations for interlace mode */
if ( line_count < (AR_HEIGHT_VGA/2) ) /* even line */ if ( line_count < (AR_HEIGHT_VGA/2) ) /* even line */
line_number = (line_count << 1); line_number = (line_count << 1);
else /* odd line */ else /* odd line */
line_number = line_number =
(((line_count - (AR_HEIGHT_VGA/2)) << 1) + 1); (((line_count - (AR_HEIGHT_VGA/2)) << 1) + 1);
} else { } else {
line_number = line_count; line_number = line_count;
...@@ -651,7 +651,7 @@ static int ar_initialize(struct video_device *dev) ...@@ -651,7 +651,7 @@ static int ar_initialize(struct video_device *dev)
cr |= ARVCR1_NORMAL; cr |= ARVCR1_NORMAL;
ar_outl(cr, ARVCR1); ar_outl(cr, ARVCR1);
/* /*
* Initialize IIC so that CPU can communicate with AR LSI, * Initialize IIC so that CPU can communicate with AR LSI,
* and send boot commands to AR LSI. * and send boot commands to AR LSI.
*/ */
...@@ -846,7 +846,7 @@ static int __init ar_init(void) ...@@ -846,7 +846,7 @@ static int __init ar_init(void)
* so register video device as a frame grabber type. * so register video device as a frame grabber type.
* device is named "video[0-64]". * device is named "video[0-64]".
* video_register_device() initializes h/w using ar_initialize(). * video_register_device() initializes h/w using ar_initialize().
*/ */
if (video_register_device(ar->vdev, VFL_TYPE_GRABBER, video_nr) != 0) { if (video_register_device(ar->vdev, VFL_TYPE_GRABBER, video_nr) != 0) {
/* return -1, -ENFILE(full) or others */ /* return -1, -ENFILE(full) or others */
printk("arv: register video (Colour AR) failed.\n"); printk("arv: register video (Colour AR) failed.\n");
......
/* /*
* bt819 - BT819A VideoStream Decoder (Rockwell Part) * bt819 - BT819A VideoStream Decoder (Rockwell Part)
* *
* Copyright (C) 1999 Mike Bernson <mike@mlb.org> * Copyright (C) 1999 Mike Bernson <mike@mlb.org>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Modifications for LML33/DC10plus unified driver * Modifications for LML33/DC10plus unified driver
* Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx> * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
* *
* Changes by Ronald Bultje <rbultje@ronald.bitfreak.net> * Changes by Ronald Bultje <rbultje@ronald.bitfreak.net>
* - moved over to linux>=2.4.x i2c protocol (9/9/2002) * - moved over to linux>=2.4.x i2c protocol (9/9/2002)
* *
...@@ -206,9 +206,9 @@ bt819_init (struct i2c_client *client) ...@@ -206,9 +206,9 @@ bt819_init (struct i2c_client *client)
Bug in the bt819 stepping on my board? Bug in the bt819 stepping on my board?
*/ */
0x14, 0x00, /* 0x14 Vertial Scaling lsb */ 0x14, 0x00, /* 0x14 Vertial Scaling lsb */
0x16, 0x07, /* 0x16 Video Timing Polarity 0x16, 0x07, /* 0x16 Video Timing Polarity
ACTIVE=active low ACTIVE=active low
FIELD: high=odd, FIELD: high=odd,
vreset=active high, vreset=active high,
hreset=active high */ hreset=active high */
0x18, 0x68, /* 0x18 AGC Delay */ 0x18, 0x68, /* 0x18 AGC Delay */
...@@ -497,7 +497,7 @@ static unsigned short normal_i2c[] = { ...@@ -497,7 +497,7 @@ static unsigned short normal_i2c[] = {
}; };
static unsigned short ignore = I2C_CLIENT_END; static unsigned short ignore = I2C_CLIENT_END;
static struct i2c_client_address_data addr_data = { static struct i2c_client_address_data addr_data = {
.normal_i2c = normal_i2c, .normal_i2c = normal_i2c,
.probe = &ignore, .probe = &ignore,
......
/* /*
* bt856 - BT856A Digital Video Encoder (Rockwell Part) * bt856 - BT856A Digital Video Encoder (Rockwell Part)
* *
* Copyright (C) 1999 Mike Bernson <mike@mlb.org> * Copyright (C) 1999 Mike Bernson <mike@mlb.org>
...@@ -285,7 +285,7 @@ bt856_command (struct i2c_client *client, ...@@ -285,7 +285,7 @@ bt856_command (struct i2c_client *client,
static unsigned short normal_i2c[] = { I2C_BT856 >> 1, I2C_CLIENT_END }; static unsigned short normal_i2c[] = { I2C_BT856 >> 1, I2C_CLIENT_END };
static unsigned short ignore = I2C_CLIENT_END; static unsigned short ignore = I2C_CLIENT_END;
static struct i2c_client_address_data addr_data = { static struct i2c_client_address_data addr_data = {
.normal_i2c = normal_i2c, .normal_i2c = normal_i2c,
.probe = &ignore, .probe = &ignore,
......
config VIDEO_BT848
tristate "BT848 Video For Linux"
depends on VIDEO_DEV && PCI && I2C
select I2C_ALGOBIT
select FW_LOADER
select VIDEO_BTCX
select VIDEO_BUF
select VIDEO_IR
select VIDEO_TUNER
select VIDEO_TVEEPROM
select VIDEO_MSP3400
---help---
Support for BT848 based frame grabber/overlay boards. This includes
the Miro, Hauppauge and STB boards. Please read the material in
<file:Documentation/video4linux/bttv/> for more information.
To compile this driver as a module, choose M here: the
module will be called bttv.
config VIDEO_BT848_DVB
bool "DVB/ATSC Support for bt878 based TV cards"
depends on VIDEO_BT848 && DVB_CORE
select DVB_BT8XX
---help---
This adds support for DVB/ATSC cards based on the BT878 chip.
#
# Makefile for the video capture/playback device drivers.
#
bttv-objs := bttv-driver.o bttv-cards.o bttv-if.o \
bttv-risc.o bttv-vbi.o bttv-i2c.o bttv-gpio.o \
bttv-input.o
obj-$(CONFIG_VIDEO_BT848) += bttv.o
EXTRA_CFLAGS += -I$(src)/..
EXTRA_CFLAGS += -I$(srctree)/drivers/media/dvb/dvb-core
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <media/audiochip.h>
#include <media/v4l2-common.h> #include <media/v4l2-common.h>
#include "bttv.h" #include "bttv.h"
...@@ -39,7 +38,7 @@ ...@@ -39,7 +38,7 @@
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* Addresses to scan */ /* Addresses to scan */
static unsigned short normal_i2c[] = { I2C_BT832_ALT1>>1, I2C_BT832_ALT2>>1, static unsigned short normal_i2c[] = { I2C_ADDR_BT832_ALT1>>1, I2C_ADDR_BT832_ALT2>>1,
I2C_CLIENT_END }; I2C_CLIENT_END };
I2C_CLIENT_INSMOD; I2C_CLIENT_INSMOD;
......
...@@ -36,13 +36,15 @@ ...@@ -36,13 +36,15 @@
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include "bttvp.h" #include "bttvp.h"
#include <media/v4l2-common.h> #include <media/v4l2-common.h>
#include <media/tvaudio.h>
#include <media/msp3400.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include "rds.h" #include <media/rds.h>
unsigned int bttv_num; /* number of Bt848s in use */ unsigned int bttv_num; /* number of Bt848s in use */
...@@ -926,45 +928,98 @@ video_mux(struct bttv *btv, unsigned int input) ...@@ -926,45 +928,98 @@ video_mux(struct bttv *btv, unsigned int input)
static char *audio_modes[] = { static char *audio_modes[] = {
"audio: tuner", "audio: radio", "audio: extern", "audio: tuner", "audio: radio", "audio: extern",
"audio: intern", "audio: off" "audio: intern", "audio: mute"
}; };
static int static int
audio_mux(struct bttv *btv, int mode) audio_mux(struct bttv *btv, int input, int mute)
{ {
int val,mux,i2c_mux,signal; int gpio_val, signal;
struct v4l2_control ctrl;
struct i2c_client *c;
gpio_inout(bttv_tvcards[btv->c.type].gpiomask, gpio_inout(bttv_tvcards[btv->c.type].gpiomask,
bttv_tvcards[btv->c.type].gpiomask); bttv_tvcards[btv->c.type].gpiomask);
signal = btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC; signal = btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC;
switch (mode) { btv->mute = mute;
case AUDIO_MUTE: btv->audio = input;
btv->audio |= AUDIO_MUTE;
break; /* automute */
case AUDIO_UNMUTE: mute = mute || (btv->opt_automute && !signal && !btv->radio_user);
btv->audio &= ~AUDIO_MUTE;
break; if (mute)
case AUDIO_TUNER: gpio_val = bttv_tvcards[btv->c.type].gpiomute;
case AUDIO_RADIO: else
case AUDIO_EXTERN: gpio_val = bttv_tvcards[btv->c.type].gpiomux[input];
case AUDIO_INTERN:
btv->audio &= AUDIO_MUTE; gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpio_val);
btv->audio |= mode;
}
i2c_mux = mux = (btv->audio & AUDIO_MUTE) ? AUDIO_OFF : btv->audio;
if (btv->opt_automute && !signal && !btv->radio_user)
mux = AUDIO_OFF;
val = bttv_tvcards[btv->c.type].audiomux[mux];
gpio_bits(bttv_tvcards[btv->c.type].gpiomask,val);
if (bttv_gpio) if (bttv_gpio)
bttv_gpio_tracking(btv,audio_modes[mux]); bttv_gpio_tracking(btv, audio_modes[mute ? 4 : input]);
if (!in_interrupt()) if (in_interrupt())
bttv_call_i2c_clients(btv,AUDC_SET_INPUT,&(i2c_mux)); return 0;
ctrl.id = V4L2_CID_AUDIO_MUTE;
ctrl.value = btv->mute;
bttv_call_i2c_clients(btv, VIDIOC_S_CTRL, &ctrl);
c = btv->i2c_msp34xx_client;
if (c) {
struct v4l2_routing route;
/* Note: the inputs tuner/radio/extern/intern are translated
to msp routings. This assumes common behavior for all msp3400
based TV cards. When this assumption fails, then the
specific MSP routing must be added to the card table.
For now this is sufficient. */
switch (input) {
case TVAUDIO_INPUT_RADIO:
route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1,
MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART);
break;
case TVAUDIO_INPUT_EXTERN:
route.input = MSP_INPUT(MSP_IN_SCART_1, MSP_IN_TUNER_1,
MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART);
break;
case TVAUDIO_INPUT_INTERN:
/* Yes, this is the same input as for RADIO. I doubt
if this is ever used. The only board with an INTERN
input is the BTTV_BOARD_AVERMEDIA98. I wonder how
that was tested. My guess is that the whole INTERN
input does not work. */
route.input = MSP_INPUT(MSP_IN_SCART_2, MSP_IN_TUNER_1,
MSP_DSP_OUT_SCART, MSP_DSP_OUT_SCART);
break;
case TVAUDIO_INPUT_TUNER:
default:
route.input = MSP_INPUT_DEFAULT;
break;
}
route.output = MSP_OUTPUT_DEFAULT;
c->driver->command(c, VIDIOC_INT_S_AUDIO_ROUTING, &route);
}
c = btv->i2c_tvaudio_client;
if (c) {
struct v4l2_routing route;
route.input = input;
route.output = 0;
c->driver->command(c, VIDIOC_INT_S_AUDIO_ROUTING, &route);
}
return 0; return 0;
} }
static inline int
audio_mute(struct bttv *btv, int mute)
{
return audio_mux(btv, btv->audio, mute);
}
static inline int
audio_input(struct bttv *btv, int input)
{
return audio_mux(btv, input, btv->mute);
}
static void static void
i2c_vidiocschan(struct bttv *btv) i2c_vidiocschan(struct bttv *btv)
{ {
...@@ -1023,8 +1078,8 @@ set_input(struct bttv *btv, unsigned int input) ...@@ -1023,8 +1078,8 @@ set_input(struct bttv *btv, unsigned int input)
} else { } else {
video_mux(btv,input); video_mux(btv,input);
} }
audio_mux(btv,(input == bttv_tvcards[btv->c.type].tuner ? audio_input(btv,(input == bttv_tvcards[btv->c.type].tuner ?
AUDIO_TUNER : AUDIO_EXTERN)); TVAUDIO_INPUT_TUNER : TVAUDIO_INPUT_EXTERN));
set_tvnorm(btv,btv->tvnorm); set_tvnorm(btv,btv->tvnorm);
i2c_vidiocschan(btv); i2c_vidiocschan(btv);
} }
...@@ -1236,10 +1291,10 @@ static int set_control(struct bttv *btv, struct v4l2_control *c) ...@@ -1236,10 +1291,10 @@ static int set_control(struct bttv *btv, struct v4l2_control *c)
case V4L2_CID_AUDIO_MUTE: case V4L2_CID_AUDIO_MUTE:
if (c->value) { if (c->value) {
va.flags |= VIDEO_AUDIO_MUTE; va.flags |= VIDEO_AUDIO_MUTE;
audio_mux(btv, AUDIO_MUTE); audio_mute(btv, 1);
} else { } else {
va.flags &= ~VIDEO_AUDIO_MUTE; va.flags &= ~VIDEO_AUDIO_MUTE;
audio_mux(btv, AUDIO_UNMUTE); audio_mute(btv, 0);
} }
break; break;
...@@ -1397,7 +1452,7 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh, ...@@ -1397,7 +1452,7 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh,
free_btres(btv,fh,RESOURCE_OVERLAY); free_btres(btv,fh,RESOURCE_OVERLAY);
if (NULL != old) { if (NULL != old) {
dprintk("switch_overlay: old=%p state is %d\n",old,old->vb.state); dprintk("switch_overlay: old=%p state is %d\n",old,old->vb.state);
bttv_dma_free(btv, old); bttv_dma_free(&fh->cap,btv, old);
kfree(old); kfree(old);
} }
dprintk("switch_overlay: done\n"); dprintk("switch_overlay: done\n");
...@@ -1407,7 +1462,8 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh, ...@@ -1407,7 +1462,8 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh,
/* ----------------------------------------------------------------------- */ /* ----------------------------------------------------------------------- */
/* video4linux (1) interface */ /* video4linux (1) interface */
static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf, static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
struct bttv_buffer *buf,
const struct bttv_format *fmt, const struct bttv_format *fmt,
unsigned int width, unsigned int height, unsigned int width, unsigned int height,
enum v4l2_field field) enum v4l2_field field)
...@@ -1450,7 +1506,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf, ...@@ -1450,7 +1506,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf,
/* alloc risc memory */ /* alloc risc memory */
if (STATE_NEEDS_INIT == buf->vb.state) { if (STATE_NEEDS_INIT == buf->vb.state) {
redo_dma_risc = 1; redo_dma_risc = 1;
if (0 != (rc = videobuf_iolock(btv->c.pci,&buf->vb,&btv->fbuf))) if (0 != (rc = videobuf_iolock(q,&buf->vb,&btv->fbuf)))
goto fail; goto fail;
} }
...@@ -1462,7 +1518,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf, ...@@ -1462,7 +1518,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf,
return 0; return 0;
fail: fail:
bttv_dma_free(btv,buf); bttv_dma_free(q,btv,buf);
return rc; return rc;
} }
...@@ -1486,7 +1542,7 @@ buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, ...@@ -1486,7 +1542,7 @@ buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
struct bttv_fh *fh = q->priv_data; struct bttv_fh *fh = q->priv_data;
return bttv_prepare_buffer(fh->btv, buf, fh->fmt, return bttv_prepare_buffer(q,fh->btv, buf, fh->fmt,
fh->width, fh->height, field); fh->width, fh->height, field);
} }
...@@ -1510,7 +1566,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) ...@@ -1510,7 +1566,7 @@ static void buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb)
struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
struct bttv_fh *fh = q->priv_data; struct bttv_fh *fh = q->priv_data;
bttv_dma_free(fh->btv,buf); bttv_dma_free(&fh->cap,fh->btv,buf);
} }
static struct videobuf_queue_ops bttv_video_qops = { static struct videobuf_queue_ops bttv_video_qops = {
...@@ -1653,7 +1709,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) ...@@ -1653,7 +1709,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
return -EINVAL; return -EINVAL;
mutex_lock(&btv->lock); mutex_lock(&btv->lock);
audio_mux(btv, (v->flags&VIDEO_AUDIO_MUTE) ? AUDIO_MUTE : AUDIO_UNMUTE); audio_mute(btv, (v->flags&VIDEO_AUDIO_MUTE) ? 1 : 0);
bttv_call_i2c_clients(btv,cmd,v); bttv_call_i2c_clients(btv,cmd,v);
/* card specific hooks */ /* card specific hooks */
...@@ -1822,7 +1878,8 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg) ...@@ -1822,7 +1878,8 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va); bttv_call_i2c_clients(btv, VIDIOCGAUDIO, &va);
if (t->audmode == V4L2_TUNER_MODE_MONO) if (t->audmode == V4L2_TUNER_MODE_MONO)
va.mode = VIDEO_SOUND_MONO; va.mode = VIDEO_SOUND_MONO;
else if (t->audmode == V4L2_TUNER_MODE_STEREO) else if (t->audmode == V4L2_TUNER_MODE_STEREO ||
t->audmode == V4L2_TUNER_MODE_LANG1_LANG2)
va.mode = VIDEO_SOUND_STEREO; va.mode = VIDEO_SOUND_STEREO;
else if (t->audmode == V4L2_TUNER_MODE_LANG1) else if (t->audmode == V4L2_TUNER_MODE_LANG1)
va.mode = VIDEO_SOUND_LANG1; va.mode = VIDEO_SOUND_LANG1;
...@@ -2496,7 +2553,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, ...@@ -2496,7 +2553,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
field = (vm->height > bttv_tvnorms[btv->tvnorm].sheight/2) field = (vm->height > bttv_tvnorms[btv->tvnorm].sheight/2)
? V4L2_FIELD_INTERLACED ? V4L2_FIELD_INTERLACED
: V4L2_FIELD_BOTTOM; : V4L2_FIELD_BOTTOM;
retval = bttv_prepare_buffer(btv,buf, retval = bttv_prepare_buffer(&fh->cap,btv,buf,
format_by_palette(vm->format), format_by_palette(vm->format),
vm->width,vm->height,field); vm->width,vm->height,field);
if (0 != retval) if (0 != retval)
...@@ -2528,8 +2585,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file, ...@@ -2528,8 +2585,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
retval = -EIO; retval = -EIO;
/* fall through */ /* fall through */
case STATE_DONE: case STATE_DONE:
videobuf_dma_pci_sync(btv->c.pci,&buf->vb.dma); videobuf_dma_sync(&fh->cap,&buf->vb.dma);
bttv_dma_free(btv,buf); bttv_dma_free(&fh->cap,btv,buf);
break; break;
default: default:
retval = -EINVAL; retval = -EINVAL;
...@@ -3162,8 +3219,8 @@ static int radio_open(struct inode *inode, struct file *file) ...@@ -3162,8 +3219,8 @@ static int radio_open(struct inode *inode, struct file *file)
file->private_data = btv; file->private_data = btv;
bttv_call_i2c_clients(btv,AUDC_SET_RADIO,&btv->tuner_type); bttv_call_i2c_clients(btv,AUDC_SET_RADIO,NULL);
audio_mux(btv,AUDIO_RADIO); audio_input(btv,TVAUDIO_INPUT_RADIO);
mutex_unlock(&btv->lock); mutex_unlock(&btv->lock);
return 0; return 0;
...@@ -3749,7 +3806,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs) ...@@ -3749,7 +3806,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
bttv_irq_switch_video(btv); bttv_irq_switch_video(btv);
if ((astat & BT848_INT_HLOCK) && btv->opt_automute) if ((astat & BT848_INT_HLOCK) && btv->opt_automute)
audio_mux(btv, -1); audio_mute(btv, btv->mute); /* trigger automute */
if (astat & (BT848_INT_SCERR|BT848_INT_OCERR)) { if (astat & (BT848_INT_SCERR|BT848_INT_OCERR)) {
printk(KERN_INFO "bttv%d: %s%s @ %08x,",btv->c.nr, printk(KERN_INFO "bttv%d: %s%s @ %08x,",btv->c.nr,
...@@ -4050,7 +4107,7 @@ static int __devinit bttv_probe(struct pci_dev *dev, ...@@ -4050,7 +4107,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
bt848_contrast(btv,32768); bt848_contrast(btv,32768);
bt848_hue(btv,32768); bt848_hue(btv,32768);
bt848_sat(btv,32768); bt848_sat(btv,32768);
audio_mux(btv,AUDIO_MUTE); audio_mute(btv, 1);
set_input(btv,0); set_input(btv,0);
} }
......
...@@ -302,6 +302,10 @@ static int attach_inform(struct i2c_client *client) ...@@ -302,6 +302,10 @@ static int attach_inform(struct i2c_client *client)
if (!client->driver->command) if (!client->driver->command)
return 0; return 0;
if (client->driver->id == I2C_DRIVERID_MSP3400)
btv->i2c_msp34xx_client = client;
if (client->driver->id == I2C_DRIVERID_TVAUDIO)
btv->i2c_tvaudio_client = client;
if (btv->tuner_type != UNSET) { if (btv->tuner_type != UNSET) {
struct tuner_setup tun_setup; struct tuner_setup tun_setup;
......
...@@ -509,11 +509,11 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc, ...@@ -509,11 +509,11 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
} }
void void
bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf) bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf)
{ {
BUG_ON(in_interrupt()); BUG_ON(in_interrupt());
videobuf_waiton(&buf->vb,0,0); videobuf_waiton(&buf->vb,0,0);
videobuf_dma_pci_unmap(btv->c.pci, &buf->vb.dma); videobuf_dma_unmap(q, &buf->vb.dma);
videobuf_dma_free(&buf->vb.dma); videobuf_dma_free(&buf->vb.dma);
btcx_riscmem_free(btv->c.pci,&buf->bottom); btcx_riscmem_free(btv->c.pci,&buf->bottom);
btcx_riscmem_free(btv->c.pci,&buf->top); btcx_riscmem_free(btv->c.pci,&buf->top);
......
...@@ -96,7 +96,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q, ...@@ -96,7 +96,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q,
return -EINVAL; return -EINVAL;
if (STATE_NEEDS_INIT == buf->vb.state) { if (STATE_NEEDS_INIT == buf->vb.state) {
if (0 != (rc = videobuf_iolock(btv->c.pci, &buf->vb, NULL))) if (0 != (rc = videobuf_iolock(q, &buf->vb, NULL)))
goto fail; goto fail;
if (0 != (rc = vbi_buffer_risc(btv,buf,fh->lines))) if (0 != (rc = vbi_buffer_risc(btv,buf,fh->lines)))
goto fail; goto fail;
...@@ -109,7 +109,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q, ...@@ -109,7 +109,7 @@ static int vbi_buffer_prepare(struct videobuf_queue *q,
return 0; return 0;
fail: fail:
bttv_dma_free(btv,buf); bttv_dma_free(q,btv,buf);
return rc; return rc;
} }
...@@ -136,7 +136,7 @@ static void vbi_buffer_release(struct videobuf_queue *q, struct videobuf_buffer ...@@ -136,7 +136,7 @@ static void vbi_buffer_release(struct videobuf_queue *q, struct videobuf_buffer
struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb); struct bttv_buffer *buf = container_of(vb,struct bttv_buffer,vb);
dprintk("free %p\n",vb); dprintk("free %p\n",vb);
bttv_dma_free(fh->btv,buf); bttv_dma_free(&fh->cap,fh->btv,buf);
} }
struct videobuf_queue_ops bttv_vbi_qops = { struct videobuf_queue_ops bttv_vbi_qops = {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/i2c.h> #include <linux/i2c.h>
#include <media/ir-common.h> #include <media/ir-common.h>
#include <media/ir-kbd-i2c.h> #include <media/ir-kbd-i2c.h>
#include <media/i2c-addr.h>
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
/* exported by bttv-cards.c */ /* exported by bttv-cards.c */
...@@ -168,25 +169,6 @@ ...@@ -168,25 +169,6 @@
#define BTTV_BOARD_HAUPPAUGE_IMPACTVCB 0x8f #define BTTV_BOARD_HAUPPAUGE_IMPACTVCB 0x8f
#define BTTV_BOARD_MACHTV_MAGICTV 0x90 #define BTTV_BOARD_MACHTV_MAGICTV 0x90
/* i2c address list */
#define I2C_TSA5522 0xc2
#define I2C_TDA7432 0x8a
#define I2C_BT832_ALT1 0x88
#define I2C_BT832_ALT2 0x8a // alternate setting
#define I2C_TDA8425 0x82
#define I2C_TDA9840 0x84
#define I2C_TDA9850 0xb6 /* also used by 9855,9873 */
#define I2C_TDA9874 0xb0 /* also used by 9875 */
#define I2C_TDA9875 0xb0
#define I2C_HAUPEE 0xa0
#define I2C_STBEE 0xae
#define I2C_VHX 0xc0
#define I2C_MSP3400 0x80
#define I2C_MSP3400_ALT 0x88
#define I2C_TEA6300 0x80 /* also used by 6320 */
#define I2C_DPL3518 0x84
#define I2C_TDA9887 0x86
/* more card-specific defines */ /* more card-specific defines */
#define PT2254_L_CHANNEL 0x10 #define PT2254_L_CHANNEL 0x10
#define PT2254_R_CHANNEL 0x08 #define PT2254_R_CHANNEL 0x08
...@@ -252,7 +234,8 @@ struct tvcard ...@@ -252,7 +234,8 @@ struct tvcard
unsigned int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO unsigned int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO
u32 gpiomask; u32 gpiomask;
u32 muxsel[16]; u32 muxsel[16];
u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */ u32 gpiomux[4]; /* Tuner, Radio, external, internal */
u32 gpiomute; /* GPIO mute setting */
u32 gpiomask2; /* GPIO MUX mask */ u32 gpiomask2; /* GPIO MUX mask */
/* i2c audio flags */ /* i2c audio flags */
......
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <linux/device.h> #include <linux/device.h>
#include <media/video-buf.h> #include <media/video-buf.h>
#include <media/audiochip.h>
#include <media/tuner.h> #include <media/tuner.h>
#include <media/tveeprom.h> #include <media/tveeprom.h>
#include <media/ir-common.h> #include <media/ir-common.h>
...@@ -190,7 +189,8 @@ int bttv_buffer_activate_video(struct bttv *btv, ...@@ -190,7 +189,8 @@ int bttv_buffer_activate_video(struct bttv *btv,
struct bttv_buffer_set *set); struct bttv_buffer_set *set);
int bttv_buffer_activate_vbi(struct bttv *btv, int bttv_buffer_activate_vbi(struct bttv *btv,
struct bttv_buffer *vbi); struct bttv_buffer *vbi);
void bttv_dma_free(struct bttv *btv, struct bttv_buffer *buf); void bttv_dma_free(struct videobuf_queue *q, struct bttv *btv,
struct bttv_buffer *buf);
/* overlay handling */ /* overlay handling */
int bttv_overlay_risc(struct bttv *btv, struct bttv_overlay *ov, int bttv_overlay_risc(struct bttv *btv, struct bttv_overlay *ov,
...@@ -298,6 +298,8 @@ struct bttv { ...@@ -298,6 +298,8 @@ struct bttv {
int i2c_state, i2c_rc; int i2c_state, i2c_rc;
int i2c_done; int i2c_done;
wait_queue_head_t i2c_queue; wait_queue_head_t i2c_queue;
struct i2c_client *i2c_msp34xx_client;
struct i2c_client *i2c_tvaudio_client;
/* video4linux (1) */ /* video4linux (1) */
struct video_device *video_dev; struct video_device *video_dev;
...@@ -320,6 +322,7 @@ struct bttv { ...@@ -320,6 +322,7 @@ struct bttv {
/* video state */ /* video state */
unsigned int input; unsigned int input;
unsigned int audio; unsigned int audio;
unsigned int mute;
unsigned long freq; unsigned long freq;
int tvnorm,hue,contrast,bright,saturation; int tvnorm,hue,contrast,bright,saturation;
struct v4l2_framebuffer fbuf; struct v4l2_framebuffer fbuf;
......
...@@ -150,7 +150,7 @@ static int qc_calibrate(struct qcam_device *q) ...@@ -150,7 +150,7 @@ static int qc_calibrate(struct qcam_device *q)
static struct qcam_device *qcam_init(struct parport *port) static struct qcam_device *qcam_init(struct parport *port)
{ {
struct qcam_device *q; struct qcam_device *q;
q = kmalloc(sizeof(struct qcam_device), GFP_KERNEL); q = kmalloc(sizeof(struct qcam_device), GFP_KERNEL);
if(q==NULL) if(q==NULL)
return NULL; return NULL;
...@@ -158,16 +158,16 @@ static struct qcam_device *qcam_init(struct parport *port) ...@@ -158,16 +158,16 @@ static struct qcam_device *qcam_init(struct parport *port)
q->pport = port; q->pport = port;
q->pdev = parport_register_device(port, "bw-qcam", NULL, NULL, q->pdev = parport_register_device(port, "bw-qcam", NULL, NULL,
NULL, 0, NULL); NULL, 0, NULL);
if (q->pdev == NULL) if (q->pdev == NULL)
{ {
printk(KERN_ERR "bw-qcam: couldn't register for %s.\n", printk(KERN_ERR "bw-qcam: couldn't register for %s.\n",
port->name); port->name);
kfree(q); kfree(q);
return NULL; return NULL;
} }
memcpy(&q->vdev, &qcam_template, sizeof(qcam_template)); memcpy(&q->vdev, &qcam_template, sizeof(qcam_template));
mutex_init(&q->lock); mutex_init(&q->lock);
q->port_mode = (QC_ANY | QC_NOTSET); q->port_mode = (QC_ANY | QC_NOTSET);
...@@ -236,12 +236,12 @@ static int qc_waithand(struct qcam_device *q, int val) ...@@ -236,12 +236,12 @@ static int qc_waithand(struct qcam_device *q, int val)
while (!((status = read_lpstatus(q)) & 8)) while (!((status = read_lpstatus(q)) & 8))
{ {
/* 1000 is enough spins on the I/O for all normal /* 1000 is enough spins on the I/O for all normal
cases, at that point we start to poll slowly cases, at that point we start to poll slowly
until the camera wakes up. However, we are until the camera wakes up. However, we are
busy blocked until the camera responds, so busy blocked until the camera responds, so
setting it lower is much better for interactive setting it lower is much better for interactive
response. */ response. */
if(runs++>maxpoll) if(runs++>maxpoll)
{ {
msleep_interruptible(5); msleep_interruptible(5);
...@@ -255,12 +255,12 @@ static int qc_waithand(struct qcam_device *q, int val) ...@@ -255,12 +255,12 @@ static int qc_waithand(struct qcam_device *q, int val)
while (((status = read_lpstatus(q)) & 8)) while (((status = read_lpstatus(q)) & 8))
{ {
/* 1000 is enough spins on the I/O for all normal /* 1000 is enough spins on the I/O for all normal
cases, at that point we start to poll slowly cases, at that point we start to poll slowly
until the camera wakes up. However, we are until the camera wakes up. However, we are
busy blocked until the camera responds, so busy blocked until the camera responds, so
setting it lower is much better for interactive setting it lower is much better for interactive
response. */ response. */
if(runs++>maxpoll) if(runs++>maxpoll)
{ {
msleep_interruptible(5); msleep_interruptible(5);
...@@ -282,17 +282,17 @@ static unsigned int qc_waithand2(struct qcam_device *q, int val) ...@@ -282,17 +282,17 @@ static unsigned int qc_waithand2(struct qcam_device *q, int val)
{ {
unsigned int status; unsigned int status;
int runs=0; int runs=0;
do do
{ {
status = read_lpdata(q); status = read_lpdata(q);
/* 1000 is enough spins on the I/O for all normal /* 1000 is enough spins on the I/O for all normal
cases, at that point we start to poll slowly cases, at that point we start to poll slowly
until the camera wakes up. However, we are until the camera wakes up. However, we are
busy blocked until the camera responds, so busy blocked until the camera responds, so
setting it lower is much better for interactive setting it lower is much better for interactive
response. */ response. */
if(runs++>maxpoll) if(runs++>maxpoll)
{ {
msleep_interruptible(5); msleep_interruptible(5);
...@@ -321,7 +321,7 @@ static int qc_detect(struct qcam_device *q) ...@@ -321,7 +321,7 @@ static int qc_detect(struct qcam_device *q)
lastreg = reg = read_lpstatus(q) & 0xf0; lastreg = reg = read_lpstatus(q) & 0xf0;
for (i = 0; i < 500; i++) for (i = 0; i < 500; i++)
{ {
reg = read_lpstatus(q) & 0xf0; reg = read_lpstatus(q) & 0xf0;
if (reg != lastreg) if (reg != lastreg)
...@@ -357,7 +357,7 @@ static int qc_detect(struct qcam_device *q) ...@@ -357,7 +357,7 @@ static int qc_detect(struct qcam_device *q)
static void qc_reset(struct qcam_device *q) static void qc_reset(struct qcam_device *q)
{ {
switch (q->port_mode & QC_FORCE_MASK) switch (q->port_mode & QC_FORCE_MASK)
{ {
case QC_FORCE_UNIDIR: case QC_FORCE_UNIDIR:
q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR; q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_UNIDIR;
...@@ -370,7 +370,7 @@ static void qc_reset(struct qcam_device *q) ...@@ -370,7 +370,7 @@ static void qc_reset(struct qcam_device *q)
case QC_ANY: case QC_ANY:
write_lpcontrol(q, 0x20); write_lpcontrol(q, 0x20);
write_lpdata(q, 0x75); write_lpdata(q, 0x75);
if (read_lpdata(q) != 0x75) { if (read_lpdata(q) != 0x75) {
q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR; q->port_mode = (q->port_mode & ~QC_MODE_MASK) | QC_BIDIR;
} else { } else {
...@@ -398,8 +398,8 @@ static void qc_reset(struct qcam_device *q) ...@@ -398,8 +398,8 @@ static void qc_reset(struct qcam_device *q)
static int qc_setscanmode(struct qcam_device *q) static int qc_setscanmode(struct qcam_device *q)
{ {
int old_mode = q->mode; int old_mode = q->mode;
switch (q->transfer_scale) switch (q->transfer_scale)
{ {
case 1: case 1:
q->mode = 0; q->mode = 0;
...@@ -412,7 +412,7 @@ static int qc_setscanmode(struct qcam_device *q) ...@@ -412,7 +412,7 @@ static int qc_setscanmode(struct qcam_device *q)
break; break;
} }
switch (q->bpp) switch (q->bpp)
{ {
case 4: case 4:
break; break;
...@@ -421,7 +421,7 @@ static int qc_setscanmode(struct qcam_device *q) ...@@ -421,7 +421,7 @@ static int qc_setscanmode(struct qcam_device *q)
break; break;
} }
switch (q->port_mode & QC_MODE_MASK) switch (q->port_mode & QC_MODE_MASK)
{ {
case QC_BIDIR: case QC_BIDIR:
q->mode += 1; q->mode += 1;
...@@ -430,10 +430,10 @@ static int qc_setscanmode(struct qcam_device *q) ...@@ -430,10 +430,10 @@ static int qc_setscanmode(struct qcam_device *q)
case QC_UNIDIR: case QC_UNIDIR:
break; break;
} }
if (q->mode != old_mode) if (q->mode != old_mode)
q->status |= QC_PARAM_CHANGE; q->status |= QC_PARAM_CHANGE;
return 0; return 0;
} }
...@@ -451,7 +451,7 @@ static void qc_set(struct qcam_device *q) ...@@ -451,7 +451,7 @@ static void qc_set(struct qcam_device *q)
/* Set the brightness. Yes, this is repetitive, but it works. /* Set the brightness. Yes, this is repetitive, but it works.
* Shorter versions seem to fail subtly. Feel free to try :-). */ * Shorter versions seem to fail subtly. Feel free to try :-). */
/* I think the problem was in qc_command, not here -- bls */ /* I think the problem was in qc_command, not here -- bls */
qc_command(q, 0xb); qc_command(q, 0xb);
qc_command(q, q->brightness); qc_command(q, q->brightness);
...@@ -502,13 +502,13 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[]) ...@@ -502,13 +502,13 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[])
unsigned int hi2, lo2; unsigned int hi2, lo2;
static int state = 0; static int state = 0;
if (buffer == NULL) if (buffer == NULL)
{ {
state = 0; state = 0;
return 0; return 0;
} }
switch (q->port_mode & QC_MODE_MASK) switch (q->port_mode & QC_MODE_MASK)
{ {
case QC_BIDIR: /* Bi-directional Port */ case QC_BIDIR: /* Bi-directional Port */
write_lpcontrol(q, 0x26); write_lpcontrol(q, 0x26);
...@@ -517,7 +517,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[]) ...@@ -517,7 +517,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[])
write_lpcontrol(q, 0x2e); write_lpcontrol(q, 0x2e);
lo2 = (qc_waithand2(q, 0) >> 1); lo2 = (qc_waithand2(q, 0) >> 1);
hi2 = (read_lpstatus(q) >> 3) & 0x1f; hi2 = (read_lpstatus(q) >> 3) & 0x1f;
switch (q->bpp) switch (q->bpp)
{ {
case 4: case 4:
buffer[0] = lo & 0xf; buffer[0] = lo & 0xf;
...@@ -544,7 +544,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[]) ...@@ -544,7 +544,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[])
write_lpcontrol(q, 0xe); write_lpcontrol(q, 0xe);
hi = (qc_waithand(q, 0) & 0xf0) >> 4; hi = (qc_waithand(q, 0) & 0xf0) >> 4;
switch (q->bpp) switch (q->bpp)
{ {
case 4: case 4:
buffer[0] = lo; buffer[0] = lo;
...@@ -552,7 +552,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[]) ...@@ -552,7 +552,7 @@ static inline int qc_readbytes(struct qcam_device *q, char buffer[])
ret = 2; ret = 2;
break; break;
case 6: case 6:
switch (state) switch (state)
{ {
case 0: case 0:
buffer[0] = (lo << 2) | ((hi & 0xc) >> 2); buffer[0] = (lo << 2) | ((hi & 0xc) >> 2);
...@@ -604,13 +604,13 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l ...@@ -604,13 +604,13 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
int shift=8-q->bpp; int shift=8-q->bpp;
char invert; char invert;
if (q->mode == -1) if (q->mode == -1)
return -ENXIO; return -ENXIO;
qc_command(q, 0x7); qc_command(q, 0x7);
qc_command(q, q->mode); qc_command(q, q->mode);
if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR)
{ {
write_lpcontrol(q, 0x2e); /* turn port around */ write_lpcontrol(q, 0x2e); /* turn port around */
write_lpcontrol(q, 0x26); write_lpcontrol(q, 0x26);
...@@ -618,7 +618,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l ...@@ -618,7 +618,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
write_lpcontrol(q, 0x2e); write_lpcontrol(q, 0x2e);
(void) qc_waithand(q, 0); (void) qc_waithand(q, 0);
} }
/* strange -- should be 15:63 below, but 4bpp is odd */ /* strange -- should be 15:63 below, but 4bpp is odd */
invert = (q->bpp == 4) ? 16 : 63; invert = (q->bpp == 4) ? 16 : 63;
...@@ -629,15 +629,15 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l ...@@ -629,15 +629,15 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
q->transfer_scale; q->transfer_scale;
transperline = (transperline + divisor - 1) / divisor; transperline = (transperline + divisor - 1) / divisor;
for (i = 0, yield = yieldlines; i < linestotrans; i++) for (i = 0, yield = yieldlines; i < linestotrans; i++)
{ {
for (pixels_read = j = 0; j < transperline; j++) for (pixels_read = j = 0; j < transperline; j++)
{ {
bytes = qc_readbytes(q, buffer); bytes = qc_readbytes(q, buffer);
for (k = 0; k < bytes && (pixels_read + k) < pixels_per_line; k++) for (k = 0; k < bytes && (pixels_read + k) < pixels_per_line; k++)
{ {
int o; int o;
if (buffer[k] == 0 && invert == 16) if (buffer[k] == 0 && invert == 16)
{ {
/* 4bpp is odd (again) -- inverter is 16, not 15, but output /* 4bpp is odd (again) -- inverter is 16, not 15, but output
must be 0-15 -- bls */ must be 0-15 -- bls */
...@@ -653,7 +653,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l ...@@ -653,7 +653,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
pixels_read += bytes; pixels_read += bytes;
} }
(void) qc_readbytes(q, NULL); /* reset state machine */ (void) qc_readbytes(q, NULL); /* reset state machine */
/* Grabbing an entire frame from the quickcam is a lengthy /* Grabbing an entire frame from the quickcam is a lengthy
process. We don't (usually) want to busy-block the process. We don't (usually) want to busy-block the
processor for the entire frame. yieldlines is a module processor for the entire frame. yieldlines is a module
...@@ -666,7 +666,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l ...@@ -666,7 +666,7 @@ static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long l
} }
} }
if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR) if ((q->port_mode & QC_MODE_MASK) == QC_BIDIR)
{ {
write_lpcontrol(q, 2); write_lpcontrol(q, 2);
write_lpcontrol(q, 6); write_lpcontrol(q, 6);
...@@ -687,7 +687,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -687,7 +687,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
{ {
struct video_device *dev = video_devdata(file); struct video_device *dev = video_devdata(file);
struct qcam_device *qcam=(struct qcam_device *)dev; struct qcam_device *qcam=(struct qcam_device *)dev;
switch(cmd) switch(cmd)
{ {
case VIDIOCGCAP: case VIDIOCGCAP:
...@@ -762,7 +762,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -762,7 +762,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
return -EINVAL; return -EINVAL;
if(p->depth!=4 && p->depth!=6) if(p->depth!=4 && p->depth!=6)
return -EINVAL; return -EINVAL;
/* /*
* Now load the camera. * Now load the camera.
*/ */
...@@ -790,11 +790,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -790,11 +790,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
return -EINVAL; return -EINVAL;
if(vw->width<80||vw->width>320) if(vw->width<80||vw->width>320)
return -EINVAL; return -EINVAL;
qcam->width = 320; qcam->width = 320;
qcam->height = 240; qcam->height = 240;
qcam->transfer_scale = 4; qcam->transfer_scale = 4;
if(vw->width>=160 && vw->height>=120) if(vw->width>=160 && vw->height>=120)
{ {
qcam->transfer_scale = 2; qcam->transfer_scale = 2;
...@@ -808,11 +808,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -808,11 +808,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
mutex_lock(&qcam->lock); mutex_lock(&qcam->lock);
qc_setscanmode(qcam); qc_setscanmode(qcam);
mutex_unlock(&qcam->lock); mutex_unlock(&qcam->lock);
/* We must update the camera before we grab. We could /* We must update the camera before we grab. We could
just have changed the grab size */ just have changed the grab size */
qcam->status |= QC_PARAM_CHANGE; qcam->status |= QC_PARAM_CHANGE;
/* Ok we figured out what to use from our wide choice */ /* Ok we figured out what to use from our wide choice */
return 0; return 0;
} }
...@@ -853,9 +853,9 @@ static ssize_t qcam_read(struct file *file, char __user *buf, ...@@ -853,9 +853,9 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
struct qcam_device *qcam=(struct qcam_device *)v; struct qcam_device *qcam=(struct qcam_device *)v;
int len; int len;
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
mutex_lock(&qcam->lock); mutex_lock(&qcam->lock);
qc_reset(qcam); qc_reset(qcam);
/* Update the camera parameters if we need to */ /* Update the camera parameters if we need to */
...@@ -863,13 +863,13 @@ static ssize_t qcam_read(struct file *file, char __user *buf, ...@@ -863,13 +863,13 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
qc_set(qcam); qc_set(qcam);
len=qc_capture(qcam, buf,count); len=qc_capture(qcam, buf,count);
mutex_unlock(&qcam->lock); mutex_unlock(&qcam->lock);
parport_release(qcam->pdev); parport_release(qcam->pdev);
return len; return len;
} }
static struct file_operations qcam_fops = { static struct file_operations qcam_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = video_exclusive_open, .open = video_exclusive_open,
...@@ -905,11 +905,11 @@ static int init_bwqcam(struct parport *port) ...@@ -905,11 +905,11 @@ static int init_bwqcam(struct parport *port)
qcam=qcam_init(port); qcam=qcam_init(port);
if(qcam==NULL) if(qcam==NULL)
return -ENODEV; return -ENODEV;
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
qc_reset(qcam); qc_reset(qcam);
if(qc_detect(qcam)==0) if(qc_detect(qcam)==0)
{ {
parport_release(qcam->pdev); parport_release(qcam->pdev);
...@@ -920,9 +920,9 @@ static int init_bwqcam(struct parport *port) ...@@ -920,9 +920,9 @@ static int init_bwqcam(struct parport *port)
qc_calibrate(qcam); qc_calibrate(qcam);
parport_release(qcam->pdev); parport_release(qcam->pdev);
printk(KERN_INFO "Connectix Quickcam on %s\n", qcam->pport->name); printk(KERN_INFO "Connectix Quickcam on %s\n", qcam->pport->name);
if(video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr)==-1) if(video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr)==-1)
{ {
parport_unregister_device(qcam->pdev); parport_unregister_device(qcam->pdev);
...@@ -1013,7 +1013,7 @@ static int __init init_bw_qcams(void) ...@@ -1013,7 +1013,7 @@ static int __init init_bw_qcams(void)
printk("Connectix Quickcam max-poll was above 5000. Using 5000.\n"); printk("Connectix Quickcam max-poll was above 5000. Using 5000.\n");
maxpoll = 5000; maxpoll = 5000;
} }
if (yieldlines < 1) { if (yieldlines < 1) {
printk("Connectix Quickcam yieldlines was less than 1. Using 1.\n"); printk("Connectix Quickcam yieldlines was less than 1. Using 1.\n");
yieldlines = 1; yieldlines = 1;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* *
* The parport parameter controls which parports will be scanned. * The parport parameter controls which parports will be scanned.
* Scanning all parports causes some printers to print a garbage page. * Scanning all parports causes some printers to print a garbage page.
* -- March 14, 1999 Billy Donahue <billy@escape.com> * -- March 14, 1999 Billy Donahue <billy@escape.com>
* *
* Fixed data format to BGR, added force_rgb parameter. Added missing * Fixed data format to BGR, added force_rgb parameter. Added missing
* parport_unregister_driver() on module removal. * parport_unregister_driver() on module removal.
...@@ -88,7 +88,7 @@ static inline unsigned int qcam_ready2(struct qcam_device *qcam) ...@@ -88,7 +88,7 @@ static inline unsigned int qcam_ready2(struct qcam_device *qcam)
return (parport_read_data(qcam->pport) & 0x1)?1:0; return (parport_read_data(qcam->pport) & 0x1)?1:0;
} }
static unsigned int qcam_await_ready1(struct qcam_device *qcam, static unsigned int qcam_await_ready1(struct qcam_device *qcam,
int value) int value)
{ {
unsigned long oldjiffies = jiffies; unsigned long oldjiffies = jiffies;
...@@ -98,7 +98,7 @@ static unsigned int qcam_await_ready1(struct qcam_device *qcam, ...@@ -98,7 +98,7 @@ static unsigned int qcam_await_ready1(struct qcam_device *qcam,
if (qcam_ready1(qcam) == value) if (qcam_ready1(qcam) == value)
return 0; return 0;
/* If the camera didn't respond within 1/25 second, poll slowly /* If the camera didn't respond within 1/25 second, poll slowly
for a while. */ for a while. */
for (i = 0; i < 50; i++) for (i = 0; i < 50; i++)
{ {
...@@ -123,7 +123,7 @@ static unsigned int qcam_await_ready2(struct qcam_device *qcam, int value) ...@@ -123,7 +123,7 @@ static unsigned int qcam_await_ready2(struct qcam_device *qcam, int value)
if (qcam_ready2(qcam) == value) if (qcam_ready2(qcam) == value)
return 0; return 0;
/* If the camera didn't respond within 1/25 second, poll slowly /* If the camera didn't respond within 1/25 second, poll slowly
for a while. */ for a while. */
for (i = 0; i < 50; i++) for (i = 0; i < 50; i++)
{ {
...@@ -157,12 +157,12 @@ static int qcam_write_data(struct qcam_device *qcam, unsigned int data) ...@@ -157,12 +157,12 @@ static int qcam_write_data(struct qcam_device *qcam, unsigned int data)
unsigned int idata; unsigned int idata;
parport_write_data(qcam->pport, data); parport_write_data(qcam->pport, data);
idata = qcam_read_data(qcam); idata = qcam_read_data(qcam);
if (data != idata) if (data != idata)
{ {
printk(KERN_WARNING "cqcam: sent %x but received %x\n", data, printk(KERN_WARNING "cqcam: sent %x but received %x\n", data,
idata); idata);
return 1; return 1;
} }
return 0; return 0;
} }
...@@ -193,12 +193,12 @@ static int qc_detect(struct qcam_device *qcam) ...@@ -193,12 +193,12 @@ static int qc_detect(struct qcam_device *qcam)
no device was found". Fix this one day. */ no device was found". Fix this one day. */
if (qcam->pport->probe_info[0].class == PARPORT_CLASS_MEDIA if (qcam->pport->probe_info[0].class == PARPORT_CLASS_MEDIA
&& qcam->pport->probe_info[0].model && qcam->pport->probe_info[0].model
&& !strcmp(qcam->pdev->port->probe_info[0].model, && !strcmp(qcam->pdev->port->probe_info[0].model,
"Color QuickCam 2.0")) { "Color QuickCam 2.0")) {
printk(KERN_DEBUG "QuickCam: Found by IEEE1284 probe.\n"); printk(KERN_DEBUG "QuickCam: Found by IEEE1284 probe.\n");
return 1; return 1;
} }
if (probe < 2) if (probe < 2)
return 0; return 0;
...@@ -206,11 +206,11 @@ static int qc_detect(struct qcam_device *qcam) ...@@ -206,11 +206,11 @@ static int qc_detect(struct qcam_device *qcam)
/* look for a heartbeat */ /* look for a heartbeat */
ostat = stat = parport_read_status(qcam->pport); ostat = stat = parport_read_status(qcam->pport);
for (i=0; i<250; i++) for (i=0; i<250; i++)
{ {
mdelay(1); mdelay(1);
stat = parport_read_status(qcam->pport); stat = parport_read_status(qcam->pport);
if (ostat != stat) if (ostat != stat)
{ {
if (++count >= 3) return 1; if (++count >= 3) return 1;
ostat = stat; ostat = stat;
...@@ -226,11 +226,11 @@ static int qc_detect(struct qcam_device *qcam) ...@@ -226,11 +226,11 @@ static int qc_detect(struct qcam_device *qcam)
count = 0; count = 0;
ostat = stat = parport_read_status(qcam->pport); ostat = stat = parport_read_status(qcam->pport);
for (i=0; i<250; i++) for (i=0; i<250; i++)
{ {
mdelay(1); mdelay(1);
stat = parport_read_status(qcam->pport); stat = parport_read_status(qcam->pport);
if (ostat != stat) if (ostat != stat)
{ {
if (++count >= 3) return 1; if (++count >= 3) return 1;
ostat = stat; ostat = stat;
...@@ -247,7 +247,7 @@ static void qc_reset(struct qcam_device *qcam) ...@@ -247,7 +247,7 @@ static void qc_reset(struct qcam_device *qcam)
parport_write_control(qcam->pport, 0x8); parport_write_control(qcam->pport, 0x8);
mdelay(1); mdelay(1);
parport_write_control(qcam->pport, 0xc); parport_write_control(qcam->pport, 0xc);
mdelay(1); mdelay(1);
} }
/* Reset the QuickCam and program for brightness, contrast, /* Reset the QuickCam and program for brightness, contrast,
...@@ -258,7 +258,7 @@ static void qc_setup(struct qcam_device *q) ...@@ -258,7 +258,7 @@ static void qc_setup(struct qcam_device *q)
qc_reset(q); qc_reset(q);
/* Set the brightness. */ /* Set the brightness. */
qcam_set(q, 11, q->brightness); qcam_set(q, 11, q->brightness);
/* Set the height and width. These refer to the actual /* Set the height and width. These refer to the actual
CCD area *before* applying the selected decimation. */ CCD area *before* applying the selected decimation. */
...@@ -272,12 +272,12 @@ static void qc_setup(struct qcam_device *q) ...@@ -272,12 +272,12 @@ static void qc_setup(struct qcam_device *q)
/* Set contrast and white balance. */ /* Set contrast and white balance. */
qcam_set(q, 0x19, q->contrast); qcam_set(q, 0x19, q->contrast);
qcam_set(q, 0x1f, q->whitebal); qcam_set(q, 0x1f, q->whitebal);
/* Set the speed. */ /* Set the speed. */
qcam_set(q, 45, 2); qcam_set(q, 45, 2);
} }
/* Read some bytes from the camera and put them in the buffer. /* Read some bytes from the camera and put them in the buffer.
nbytes should be a multiple of 3, because bidirectional mode gives nbytes should be a multiple of 3, because bidirectional mode gives
us three bytes at a time. */ us three bytes at a time. */
...@@ -383,7 +383,7 @@ static long qc_capture(struct qcam_device *q, char __user *buf, unsigned long le ...@@ -383,7 +383,7 @@ static long qc_capture(struct qcam_device *q, char __user *buf, unsigned long le
if (qcam_set(q, 7, (q->mode | (is_bi_dir?1:0)) + 1)) if (qcam_set(q, 7, (q->mode | (is_bi_dir?1:0)) + 1))
return -EIO; return -EIO;
lines = q->height; lines = q->height;
pixelsperline = q->width; pixelsperline = q->width;
bitsperxfer = (is_bi_dir) ? 24 : 8; bitsperxfer = (is_bi_dir) ? 24 : 8;
...@@ -499,7 +499,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -499,7 +499,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
{ {
struct video_device *dev = video_devdata(file); struct video_device *dev = video_devdata(file);
struct qcam_device *qcam=(struct qcam_device *)dev; struct qcam_device *qcam=(struct qcam_device *)dev;
switch(cmd) switch(cmd)
{ {
case VIDIOCGCAP: case VIDIOCGCAP:
...@@ -574,7 +574,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -574,7 +574,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
*/ */
if (p->depth != 24 || p->palette != VIDEO_PALETTE_RGB24) if (p->depth != 24 || p->palette != VIDEO_PALETTE_RGB24)
return -EINVAL; return -EINVAL;
/* /*
* Now load the camera. * Now load the camera.
*/ */
...@@ -584,7 +584,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -584,7 +584,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
mutex_lock(&qcam->lock); mutex_lock(&qcam->lock);
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
qc_setup(qcam); qc_setup(qcam);
parport_release(qcam->pdev); parport_release(qcam->pdev);
mutex_unlock(&qcam->lock); mutex_unlock(&qcam->lock);
return 0; return 0;
...@@ -601,11 +601,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -601,11 +601,11 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
return -EINVAL; return -EINVAL;
if(vw->width<80||vw->width>320) if(vw->width<80||vw->width>320)
return -EINVAL; return -EINVAL;
qcam->width = 80; qcam->width = 80;
qcam->height = 60; qcam->height = 60;
qcam->mode = QC_DECIMATION_4; qcam->mode = QC_DECIMATION_4;
if(vw->width>=160 && vw->height>=120) if(vw->width>=160 && vw->height>=120)
{ {
qcam->width = 160; qcam->width = 160;
...@@ -627,7 +627,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file, ...@@ -627,7 +627,7 @@ static int qcam_do_ioctl(struct inode *inode, struct file *file,
qcam->mode = QC_BILLIONS | QC_DECIMATION_1; qcam->mode = QC_BILLIONS | QC_DECIMATION_1;
} }
#endif #endif
/* Ok we figured out what to use from our /* Ok we figured out what to use from our
wide choice */ wide choice */
mutex_lock(&qcam->lock); mutex_lock(&qcam->lock);
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
...@@ -676,7 +676,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf, ...@@ -676,7 +676,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
mutex_lock(&qcam->lock); mutex_lock(&qcam->lock);
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
/* Probably should have a semaphore against multiple users */ /* Probably should have a semaphore against multiple users */
len = qc_capture(qcam, buf,count); len = qc_capture(qcam, buf,count);
parport_release(qcam->pdev); parport_release(qcam->pdev);
mutex_unlock(&qcam->lock); mutex_unlock(&qcam->lock);
return len; return len;
...@@ -707,7 +707,7 @@ static struct video_device qcam_template= ...@@ -707,7 +707,7 @@ static struct video_device qcam_template=
static struct qcam_device *qcam_init(struct parport *port) static struct qcam_device *qcam_init(struct parport *port)
{ {
struct qcam_device *q; struct qcam_device *q;
q = kmalloc(sizeof(struct qcam_device), GFP_KERNEL); q = kmalloc(sizeof(struct qcam_device), GFP_KERNEL);
if(q==NULL) if(q==NULL)
return NULL; return NULL;
...@@ -718,14 +718,14 @@ static struct qcam_device *qcam_init(struct parport *port) ...@@ -718,14 +718,14 @@ static struct qcam_device *qcam_init(struct parport *port)
q->bidirectional = (q->pport->modes & PARPORT_MODE_TRISTATE)?1:0; q->bidirectional = (q->pport->modes & PARPORT_MODE_TRISTATE)?1:0;
if (q->pdev == NULL) if (q->pdev == NULL)
{ {
printk(KERN_ERR "c-qcam: couldn't register for %s.\n", printk(KERN_ERR "c-qcam: couldn't register for %s.\n",
port->name); port->name);
kfree(q); kfree(q);
return NULL; return NULL;
} }
memcpy(&q->vdev, &qcam_template, sizeof(qcam_template)); memcpy(&q->vdev, &qcam_template, sizeof(qcam_template));
mutex_init(&q->lock); mutex_init(&q->lock);
...@@ -766,11 +766,11 @@ static int init_cqcam(struct parport *port) ...@@ -766,11 +766,11 @@ static int init_cqcam(struct parport *port)
qcam = qcam_init(port); qcam = qcam_init(port);
if (qcam==NULL) if (qcam==NULL)
return -ENODEV; return -ENODEV;
parport_claim_or_block(qcam->pdev); parport_claim_or_block(qcam->pdev);
qc_reset(qcam); qc_reset(qcam);
if (probe && qc_detect(qcam)==0) if (probe && qc_detect(qcam)==0)
{ {
parport_release(qcam->pdev); parport_release(qcam->pdev);
...@@ -782,7 +782,7 @@ static int init_cqcam(struct parport *port) ...@@ -782,7 +782,7 @@ static int init_cqcam(struct parport *port)
qc_setup(qcam); qc_setup(qcam);
parport_release(qcam->pdev); parport_release(qcam->pdev);
if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr)==-1) if (video_register_device(&qcam->vdev, VFL_TYPE_GRABBER, video_nr)==-1)
{ {
printk(KERN_ERR "Unable to register Colour QuickCam on %s\n", printk(KERN_ERR "Unable to register Colour QuickCam on %s\n",
...@@ -792,9 +792,9 @@ static int init_cqcam(struct parport *port) ...@@ -792,9 +792,9 @@ static int init_cqcam(struct parport *port)
return -ENODEV; return -ENODEV;
} }
printk(KERN_INFO "video%d: Colour QuickCam found on %s\n", printk(KERN_INFO "video%d: Colour QuickCam found on %s\n",
qcam->vdev.minor, qcam->pport->name); qcam->vdev.minor, qcam->pport->name);
qcams[num_cams++] = qcam; qcams[num_cams++] = qcam;
return 0; return 0;
......
此差异已折叠。
此差异已折叠。
...@@ -381,7 +381,7 @@ struct cpia2_fh { ...@@ -381,7 +381,7 @@ struct cpia2_fh {
struct camera_data { struct camera_data {
/* locks */ /* locks */
struct semaphore busy_lock; /* guard against SMP multithreading */ struct mutex busy_lock; /* guard against SMP multithreading */
struct v4l2_prio_state prio; struct v4l2_prio_state prio;
/* camera status */ /* camera status */
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#define __CS8420_H__ #define __CS8420_H__
/* Initialization Sequence */ /* Initialization Sequence */
static __u8 init8420[] = { static __u8 init8420[] = {
1, 0x01, 2, 0x02, 3, 0x00, 4, 0x46, 1, 0x01, 2, 0x02, 3, 0x00, 4, 0x46,
5, 0x24, 6, 0x84, 18, 0x18, 19, 0x13, 5, 0x24, 6, 0x84, 18, 0x18, 19, 0x13,
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/videodev2.h> #include <linux/videodev2.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <media/audiochip.h>
#include <media/v4l2-common.h> #include <media/v4l2-common.h>
#include "cx25840.h" #include "cx25840.h"
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册