dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1528 Commits

Author SHA1 Message Date
Hartmut Hackmann b8bc76d88f V4L/DVB (5322): Removed board naming code in saa7134-dvb
This is for better consistency with other drivers

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:39 -03:00
Hartmut Hackmann 1c4f76abb8 V4L/DVB (5321): Saa7134-dvb: initialize the dvb frontend in dvb_init
The hardware is completely initialized afterwards, especially the
tda10046 has its firmware - which is also necessary in analog mode
of some hybrid boards.
Calling the sleep function afterwards saves power and definitely puts
hybrid boards into analog mode without additional code elsewere.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:38 -03:00
Hartmut Hackmann 06be3035f9 V4L/DVB (5318): Fix tda8290 code for tda827x module
During tuner attach, the pointers to host dev structure
are not set yet, so the I2c adapter needs to be accessed differently.
This patch also does some minor cleanup in the saa7134-dvb module.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:36 -03:00
Michael Krufky 8ce47dad8e V4L/DVB (5317): Create tda827x dvb tuner module
The patch moves the tda827x dvb tuning code to a separate module

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:35 -03:00
Peter Missel 7c7fea669d V4L/DVB (5316): Add radio support for the Lifeview FlyDVB-T Duo
There are card variants supporting FM radio through tda8275.

Signed-off-by: Peter Missel <peter.missel@onlinehome.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:34 -03:00
Hartmut Hackmann 58ef4f924c V4L/DVB (5314): Added support for tda827x tuners with preamlifiers
This patch contains
- new tuning code for the tda827xa silicon tuner.
- controls the preamplifier of some boards with this tuner.
- support for the Philips Tiger S hybrid DVB-T reference design.
- reworked the saa7134-dvb modulue to get rid of most of the
  small board specific functions.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:32 -03:00
Hartmut Hackmann de956c1e0f V4L/DVB (5313): Added a config entry and a gpio function pointer to tuner struct
These entries mainly are to support configurations of the tda827x
silicon tuner with a preamplifier.
The values can be set throgh the attach inform or through
the extended TUNER_SET_TYPE_ADDR client call. The function pointer
will only be updated if the parameter is not NULL.
Since a typecast is necessary to set the pointer, i added a typedef for
this pointer (tuner_gpio_func_t) in tuner.h

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:31 -03:00
Hartmut Hackmann b819594622 V4L/DVB (5312): Saa713x: added a GPIO handler function
This function allows to set, clear and tristate the GPIO ports.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:30 -03:00
Hartmut Hackmann 1bb0e8667f V4L/DVB (5311): Tda1004x driver updates
There are the following changes:
- separate configuration of IF and GPIOs.
- set GPIOs before firmware load. This helps to avoid I2C address
  collisions.
- if desired invert GPIOs at sleep (automatic return to analog mode of card).
- added 3 tuner configuration bytes to config stuct.
- added i2c gate address to config struct.
- moved _state struct declaration to header file to make it accessible
  on board layer.
- added "conf_probed" to the state struct to allow i.e. probing for correct
  tuner version.
- changed firmware load mechanism to always:
  + check if already loaded
  + try to boot from eeprom
  + try downlad from host
- corrected name of tda10046 firmware image (backward compatible).

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:29 -03:00
Hans Verkuil 3434eb7e14 V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENT
VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be
used to detect which chips are on the board and based on that information
selected register dumps can be made, making it easy to debug complicated
media chips containing tens or hundreds of registers.
This ioctl replaces the internal VIDIOC_INT_G_CHIP_IDENT ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:27 -03:00
Markus Rechberger ced80c67cd V4L/DVB (5299): Added support for loading cx88-dvb and cx88-blackbird
Added support for loading cx88-dvb and cx88-blackbird

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:26 -03:00
Markus Rechberger 77b7477467 V4L/DVB (5298): Added support for deferred module requesting to cx88
added support for deferred module requesting to cx88

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:25 -03:00
Adrian Bunk 5948e52cee V4L/DVB (5294): Make pvr2_encoder_prep_config() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:24 -03:00
Hans Verkuil 045290b2a9 V4L/DVB (5290): Add support for VIDIOC_INT_G/S_STD_OUTPUT
Added VIDIOC_INT_G_STD_OUTPUT and VIDIOC_INT_S_STD_OUTPUT to allow drivers
to set the TV standard for video output separately from the video capture.
This is needed for cx23415 support where the decoder is separate from the
encoder and can have a different TV standard.
Modified the saa7127 module to listen to VIDIOC_INT_G/S_STD_OUTPUT instead
of VIDIOC_G/S_STD.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:22 -03:00
Hans Verkuil b2787845fb V4L/DVB (5289): Add support for video output overlays.
Add V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY support.
Also add support for local and global alpha overlays.
Add new field enums V4L2_FIELD_INTERLACED_TB and V4L2_FIELD_INTERLACED_BT.
These changes are needed to support the ivtv On Screen Display features.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:21 -03:00
Adrian Bunk 3bfb7398e2 V4L/DVB (5278): Bt8xx/: possible cleanups
This patch contains the following possible cleanups:
- remove the following unused global functions:
  - bttv-if.c: bttv_get_cardinfo()
  - bttv-if.c: bttv_get_id()
  - bttv-if.c: bttv_get_gpio_queue()
  - bttv-if.c: bttv_i2c_call()
- remove the following unused EXPORT_SYMBOL's:
  - bttv-gpio.c: bttv_sub_bus_type
  - bttv-gpio.c: bttv_gpio_inout
  - bttv-gpio.c: bttv_gpio_read
  - bttv-gpio.c: bttv_gpio_write
  - bttv-gpio.c: bttv_gpio_bits

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:20 -03:00
Hans Verkuil 5eee72e884 V4L/DVB (5268): Add support for three new MPEG controls.
Added V4L2_CID_MPEG_AUDIO_MUTE, V4L2_CID_MPEG_VIDEO_MUTE and
V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS controls together with
their implementation in the cx2341x module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:18 -03:00
Antoine Jacquet b7eee616ad V4L/DVB (5257): USB: add zr364xx V4L2 driver
This patch adds a V4L2 driver giving support for USB webcams based on the
zr364xx chipsets.

Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:43:17 -03:00
Jean Delvare 21b48a70f7 V4L/DVB (5421): Fix suspend/resume in msp3400 and tuner
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-27 08:45:55 -03:00
Hans Verkuil 3284b4e077 V4L/DVB (5415): Msp_attach must return 0 if no msp3400 was found.
Returning -1 causes the probe to stop, but it should just continue
instead.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-27 08:45:55 -03:00
Mauro Carvalho Chehab a9aaec4e83 V4L/DVB (5408): Fix SECAM handling on saa7115
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-27 08:45:54 -03:00
Al Viro 89952d133d [PATCH] misc NULL noise
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-14 15:27:49 -07:00
Michael Krufky af70dbd334 V4L/DVB (5260): Cx88-blackbird: allow usage of both 376836 and 262144 sized firmware images
This updates the cx88-blackbird driver to be able to use the new cx23416
firmware image released by Hauppauge Computer Works, while retaining
compatibility with the older firmware images.
cx2341x firmware can be downloaded at: http://dl.ivtvdriver.org/ivtv/firmware/

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-03 10:14:36 -02:00
Mike Isely 48dc30a148 V4L/DVB (5366): Pvrusb2: Fix compilation warning for amd64 builds (use %zu instead of %u)
Signed-off-by Mike Isely <isely@pobox.com>
Signed-off-by Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-03 10:14:34 -02:00
Hans Verkuil f3502b8a19 V4L/DVB (5305): Mark VIDIOC_DBG_S/G_REGISTER as experimental
Move VIDIOC_DBG_S/G_REGISTER from the internal ioctl list to the
public ioctls, but mark it as experimental for now.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Hans Verkuil ada6ecd2bf V4L/DVB (5271): Add VIDIOC_TRY_ENCODER_CMD and VIDIOC_ENCODER_CMD ioctls.
Add support for starting, stopping, pausing and resuming an MPEG (or similar
compressed stream) encoder.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Hans Verkuil db6eb5b334 V4L/DVB (5270): Add VIDIOC_G_ENC_INDEX ioctl
The VIDIOC_G_ENC_INDEX ioctl can obtain the MPEG index from an MPEG
encoder.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:46 -02:00
Jean Delvare b9109b7582 V4L/DVB (5258): Cafe_ccic: fix compiler warning
Fix the following warning:
drivers/media/video/cafe_ccic.c: In function `cafe_vidioc_reqbufs':
drivers/media/video/cafe_ccic.c:1197: warning: 'ret' might be used uninitialized in this function
Probably not a real bug, but the warning can be avoided easily.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:45 -02:00
Hans Verkuil f3d092b84a V4L/DVB (5304): Improve chip matching in v4l2_register
The chip matching in struct v4l2_register for VIDIOC_DBG_G/S_REGISTER 
was rather primitive. It could not be extended to other busses besides 
i2c and it lacked a way to.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:44 -02:00
Hans Verkuil d55c7aec66 V4L/DVB (5255): Fix cx25840 firmware loading.
Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced,
causing the firmware load to fail for the ivtv driver. The correct
sequence is to first attach the i2c client, then use the client's
device to load the firmware.
Acked-by: Mike Isely <isely@pobox.com>

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-01 13:09:44 -02:00
Marcel Siegert 4acf26703e V4L/DVB (5249): Fix compiler warning in vivi.c
The result of copy_to_user was not used, so the compiler complained
now a warning will be issued if copy_to_user fails.

Signed-off-by: Marcel Siegert <mws@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:32 -02:00
Mike Isely 90060d32ca V4L/DVB (5212): Pvrusb2: Be more forgiving about encoder firmware size
The pvrusb2 driver previously rejected encoder firmware whose size was
not a multiple of 8192.  But this is a false check because it's
possible to find cx23416 firmware whose size doesn't conform to this
limit.  So change the firmware loader implementation to be more
forgiving of the image size.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:20 -02:00
Mike Isely 201779f5c4 V4L/DVB (5210): Pvrusb2: Fix printk format typo
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:20 -02:00
Thierry MERLE 2a9f8b5d25 V4L/DVB (5206): Usbvision: set alternate interface modification
- usb alternate selection modified to get the biggest endpoint packet size.
- fix sysfs get values for brightness/contrast/hue/saturation

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:19 -02:00
Thierry MERLE 6f78e186fe V4L/DVB (5205): Usbvision: dynamic allocation for frames
- fix decoder route output
- dynamic frame buffer allocation

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:19 -02:00
Adrian Bunk c65eeaab1f V4L/DVB (5200): V4l_printk_ioctl_arg() is no longer used.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:18 -02:00
Adrian Bunk db406b5855 V4L/DVB (5199): Cx88-video.c: remove struct radionorms
This patch removes the unused struct radionorms.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:17 -02:00
Jonathan Corbet 3198cf676c V4L/DVB (5198): Cafe_ccic.c fix warning
Quiet a spurious gcc warning.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:17 -02:00
Richard Knutsson e8be02a34a V4L/DVB (5197): Convert to generic boolean-values
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:16 -02:00
Andrew Morton 7a9ca4a3f9 V4L/DVB (5196): VIDEO_BUF depends on PCI
m68k allmodconfig:
drivers/media/video/video-buf.c: In function 'videobuf_queue_pci':
drivers/media/video/video-buf.c:396: error: 'pci_map_sg' undeclared (first use in this function)
drivers/media/video/video-buf.c:396: error: (Each undeclared identifier is reported only once
drivers/media/video/video-buf.c:396: error: for each function it appears in.)
drivers/media/video/video-buf.c:399: error: 'pci_dma_sync_sg_for_cpu' undeclared (first use in this function)
drivers/media/video/video-buf.c:401: error: 'pci_unmap_sg' undeclared (first use in this function)
drivers/media/video/video-buf.c: In function 'videobuf_pci_dma_map':
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:16 -02:00
Hans Verkuil faeb4ab38f V4L/DVB (5183): Fix CC handling in VIDIOC_INT_G_VBI_DATA
When capturing a 60 Hz input the internal field ID is inverted. The
VIDIOC_INT_G_VBI_DATA didn't take that into account and so returned
XDS instead of CC and vice versa.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:14 -02:00
Hans Verkuil b7a01e723c V4L/DVB (5180): Fix cx2584x revision reporting.
Revisions >= 23 were always reported as revision 23.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:13 -02:00
Mike Isely 201f5c9caf V4L/DVB (5175): Pvrusb2: VIDIOC_DBG_[S|G]_REGISTER fixups
Support 64 bit register IDs internally.  Only allow root access to
this API (for both set and get).  Note that actual 64 bit access only
becomes possible once the definition for v4l2_register is updated, but
this change clears the way for it from the viewpoint of the pvrusb2
driver.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:13 -02:00
Mike Isely 6fe7d2c466 V4L/DVB (5174): Pvrusb2: video corruption fixes
Tweak the encoder setup in order to stop it from corrupting the video
data when there is a disruption in the data flow (e.g. a channel change).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:12 -02:00
Mike Isely c43000ef0c V4L/DVB (5173): Pvrusb2: encoder comm protocol cleanup
Update the implementation of the communication protocol for operating
the encoder, using updated knowledge about the encoder.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:12 -02:00
Mike Isely 567d7115b9 V4L/DVB (5172): Pvrusb2: Control protocol cleanup
Several special-case FX2 commands were being issued through
pvr2_write_u16() and pvr2_write_8(), but there's really nothing
special case about them.  These date from a very early time in the
driver development.  This patch removes these functions and replaces
their use with calls to pvr2_send_request.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:12 -02:00
Mike Isely edae96bd72 V4L/DVB (5170): Pvrusb2: Add boilerplate to new header file
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:11 -02:00
Michael Krufky 8d3643637e V4L/DVB (5169): Pvrusb2: Use macro names for FX2 commands
This is a maintainability cleanup; use nice names for all the FX2
commands instead of raw bytes.  This way we can easily find where we
issue FX commands.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:11 -02:00
Trent Piepho 05ad390724 V4L/DVB (5166): Remove obsolete alias defines of CONFIG_* settings
The out of tree v4l-dvb build system didn't always override the kernel's
configuration settings with v4l-dvb's settings correctly.  To work around
this, makefiles would define some new macro based on the setting of a
config variable.  e.g. the pwc Makefile would define CONFIG_PWC_DEBUG if
CONFIG_USB_PWC_DEBUG (which is defined via Kconfig) was set.
The v4l-dvb build system should now always override correctly, and this
is no longer necessary.  This patch gets ride of these extra defines and
just uses the CONFIG_* settings directly.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:11 -02:00
Trent Piepho 62d50addf0 V4L/DVB (5163): Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTER
Before, root privileges were only needed to set hardware registers, not
to read them.  On some hardware, reading from the wrong place at the
wrong time can hang the machine.  So, to be consistent, root privileges
are required to read registers on all hardware.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:10 -02:00
Trent Piepho e7b58f5259 V4L/DVB (5162): Change VIDIOC_DBG_[SG]_REGISTER ioctls' reg address to 64 bits
Maybe someday there will be a device with a register address space >
32-bits, or maybe an i2c device which uses a protocol > 4 bytes long to
address its registers.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:10 -02:00
Michael Schimek feaba7a96d V4L/DVB (5156): Fix: dma free is being called with wrong arguments
Functions buffer_release() in bttv-driver.c and
vbi_buffer_release() in bttv-vbi.c are ending with:
      bttv_dma_free(&fh->cap,fh->btv,buf);
 
For vbi it seems to be wrong. Both functions should end with:
 
      bttv_dma_free(q,fh->btv,buf);
Thanks to Peter Schlaf <peter.schlaf@web.de> for pointing this.

Signed-off-by: Michael H. Schimek <mschimek@gmx.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:08 -02:00
Mauro Carvalho Chehab b50e7fe993 V4L/DVB (5147): Make vivi driver to use vmalloced pointers
Before this patch, vivi were simulating a scatter gather DMA transfer.
While this is academic, showing how stuff really works on a real PCI 
device, this means a non-optimized code. 
There are only two memory models that vivi implements:
	1) kernel alloced memory. This is also used by read() method.
	   On this case, a vmalloc32 buffer is allocated at kernel;
	2) userspace allocated memory. This is used by most userspace apps.
	   video-buf will store this pointer.
	   a simple copy_to_user is enough to transfer data.
The third memory model scenario supported by video-buf is overlay mode. 
This model is not implemented on vivi and unlikely to be implemented on 
newer drivers, since now, most userspace apps do some post-processing 
(like de-interlacing).
After this patch, some cleanups may be done at video-buf.c to avoid 
allocating pages, when the driver doesn't need a PCI buffer. This is the 
case of vivi and usb drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:55 -02:00
Trent Piepho 52ebc763d8 V4L/DVB (5146): Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal only
The direct register access ioctls were defined as kernel internal only,
but they are very useful for debugging hardware from userspace and are
used as such.  Officially export them.

VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER 
Definition of ioctl and struct v4l2_register is moved from v4l2-common.h 
to videodev2.h.

Types used in struct v4l2_register are changed to the userspace 
exportable versions (u32 -> __u32, etc). 

Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move 
the check into the video_ioctl2() dispatcher so it doesn't need to be 
duplicated in each driver's call-back function. CAP_SYS_ADMIN check is 
added to pvrusb2 (which doesn't use video_ioctl2).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:55 -02:00
Trent Piepho dbbff48f39 V4L/DVB (5144): Restore VIDIOC_INT_[SG]_REGISTER calls
Add support for these ioctls to the video_ioctl2 system and the cx88
driver.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:54 -02:00
Mauro Carvalho Chehab 5cc1dd8c3d V4L/DVB (5117): Fix: VIDIOC_G_TUNER were returning an endless number of tuners
pvrusb2 have only one tuner inside. However, as it were not handling
index, a call to v4l-info were returning as if it were an infinite
number of tuners:
$ v4l-info|grep VIDIOC_G_TUNER |head -5
    VIDIOC_G_TUNER(0)
    VIDIOC_G_TUNER(1)
    VIDIOC_G_TUNER(2)
    VIDIOC_G_TUNER(3)
    VIDIOC_G_TUNER(4)

Acked-by: Mike Isely <isely@isely.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:48 -02:00
Mauro Carvalho Chehab 69b04f0dc1 V4L/DVB (5116): Remove some warnings when compiling on x86_64
pvrusb2-encoder.c: In function 'pvr2_encoder_cmd':
pvrusb2-encoder.c:195: warning: format '%u' expects
	type 'unsigned int', but argument 3 has type 'long unsigned int'
pvrusb2-encoder.c:205: warning: format '%u' expects
	type 'unsigned int', but argument 3 has type 'long unsigned int'
pvrusb2-encoder.c: In function 'pvr2_encoder_vcmd':
pvrusb2-encoder.c:303: warning: format '%u' expects
	type 'unsigned int', but argument 3 has type 'long unsigned int'

Acked-by: Mike Isely <isely@isely.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:47 -02:00
Heiko Baums 05eda24968 V4L/DVB (5114): Cx88: Add support for svideo/composite input of the Terratec Cinergy 1400 DVB-T
Adds support for the combined S-Video/Composite input of the
Terratec Cinergy 1400 DVB-T.

Signed-off-by: Heiko Baums <heiko@baums-on-web.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:47 -02:00
Marco Schluessler 4cbca185e9 V4L/DVB (5113): Adds video output routing
Nexus CA needs to use a different routing on saa7115 module.

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:47 -02:00
Michael Krufky 9de271e66d V4L/DVB (5111): Saa7134: add support for Terratec Cinergy HT PCI
Add support for Terratec Cinergy HT PCI

Signed-off-by: Giorgio Moscardi <software@sukkology.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:47 -02:00
Mauro Carvalho Chehab a4b662f736 V4L/DVB (5110): Keep the previous tvnorm default for cx88 and cx88-blackbird
The video_ioctl2 conversion replaced the default from NTSC to PAL_BG.
This broke cx88-blackbird. Probably, there are some badness at this
driver, not doing all required stuff to change video standard.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:46 -02:00
Mauro Carvalho Chehab b3c4ee7016 V4L/DVB (5109): Convert cx88-blackbird to use video_ioctl2
This patch finishes cx88-blackbird conversion to use video_ioctl2. Video
standards are generated automatically inside videodev.c. the big ioctl
parser is removed, using, instead, video_ioctl2.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:46 -02:00
Mauro Carvalho Chehab 7730bef9c5 V4L/DVB (5108): Remove_cx88_ioctl
cx88_ioctl were merged at the master ioctl handler on cx88-blackbird

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:46 -02:00
Mauro Carvalho Chehab 84f1b6783a V4L/DVB (5107): Use cx88_set_freq() on cx88-blackbird.c
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:45 -02:00
Mauro Carvalho Chehab 1571720c5e V4L/DVB (5106): Do some cleanups at cx88-blackbird
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:45 -02:00
Mauro Carvalho Chehab 23154f2f3b V4L/DVB (5105): Reorder some ioctl handlers
Reorder some ioctl handlers to make easy to convert to video_ioctl2

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:45 -02:00
Mauro Carvalho Chehab ed10b06d8d V4L/DVB (5104): Moved several stuff that were at cx88-video to cx88-blackbird.c
cx88-blackbird were using some ioctl handling that were previously on
cx88-video.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:44 -02:00
Mauro Carvalho Chehab 243d8c0fd0 V4L/DVB (5103): Fix vidioc_g_tuner handling
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:44 -02:00
Mauro Carvalho Chehab 63ab1bdc3b V4L/DVB (5102): make videodev to auto-generate standards
v4l2_tvnorm were meant to describe video standards and its names to V4L2 API.
However, this were doing by some static structures at the driver.

This patch changes the internals in a way that, at the driver, only a
v4l2_tvnorm (a 64 bit integer) should be filled, with all supported 
tvnorms. videodev will dynamically generate the proper API array
based on supported standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:44 -02:00
Mauro Carvalho Chehab e90311a198 V4L/DVB (5101): Renamed video_mux to cx88_video_mux
video_mux is renamed to cx88_video_mux to be exported to cx88-blackbird

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:44 -02:00
Mauro Carvalho Chehab 54da49f5a4 V4L/DVB (5100): Make cx88-blackbird to work again
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:43 -02:00
Mauro Carvalho Chehab c526ab91a2 V4L/DVB (5099): Uncommented NTSC/443 video standard
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:43 -02:00
Mauro Carvalho Chehab 1427f6b6b9 V4L/DVB (5098): Added support for V4L2_STD_NTSC_443
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:43 -02:00
Mauro Carvalho Chehab 8d87cb9f31 V4L/DVB (5097): Convert cx8800 driver to video_ioctl2 handler
video_ioctl2 handler provides V4L2 API parsing.
Using it makes the driver simpler, and isolates API parsing.
This allows future reusage of driver controls using other ways, like sysfs
and/or procfs and increases isolation of driver-specific handling from the
generic common ioctl processing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:42 -02:00
Pantelis Koukousoulas fd69496461 V4L/DVB (5095): Pvrusb2: Allow VIDIOC_S_FMT with -1 for resolution values
With the previous patch, mplayer started but was polling the video
device forever without any video actually coming out. Further analysis
showed that it does a VIDIOC_S_FMT with width and height set to -1 (!!!).
The code handling this only cares that both are lower than the minimum
range allowed so it ends up setting the size to 19x17 (!!) This pretty
much breaks the encoder here. Even if this breakage is yet another (TM)
result of my setup, setting the size to 19x17 by default would surprise
most users IMHO.
So, special case for -1 and interpret this to be a request for the
default size, please. Users can then set their favorite size both
through mplayer and through sysfs.
With this patch, mplayer finally works in pvr:// mode (not that we
really gain anything over operating it through sysfs with lirc,
sometime I might actually get off my lazy a** and contribute this
setup too)

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:42 -02:00
Pantelis Koukousoulas 848ed3ca2a V4L/DVB (5094): Pvrusb2: Introduce fake audio input selection
This should allow mplayer pvr:// to start. The trick is that no matter
what actual input we use under this "fake" one, it will be able to do
stereo :-)

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:42 -02:00
Mike Isely 606cf9caeb V4L/DVB (5093): Pvrusb2: Emit VIDIOC_S_TUNER correctly
Audio mode changes are not private to the audio chip - other I2C
modules need to see this as well.  And since the command in question
is VIDIOC_S_TUNER which is a standard v4l2 command, we really should
be broadcasting it out.  This change sets up a broadcast pathway for
VIDIOC_S_TUNER and also eliminates the now redundant code from the
audio chip handler.
This fix enables stereo reception for the FM radio

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:41 -02:00
Mike Isely 27c7b710a4 V4L/DVB (5092): Pvrusb2: Use ARRAY_SIZE wherever possible
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:41 -02:00
Mike Isely ca545f7c39 V4L/DVB (5091): Pvrusb2: Use kzalloc in place of kmalloc/memset pairs
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:41 -02:00
Ahmed S. Darwish eca8ebfc11 V4L/DVB (5090): Pvrusb2: A patch to use ARRAY_SIZE macro when appropriate
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:40 -02:00
Mike Isely c1c2680d92 V4L/DVB (5089): Pvrusb2: V4L EXT_CTRLS fixup
Attempts to enumerate or operate on a group of EXT_CTRLS where the
group size is zero is OK; don't fail on such operations.  At least one
application uses this to probe for the existence of this API so let it
succeed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:40 -02:00
Mike Isely af75453860 V4L/DVB (5088): Pvrusb2: Minor dead code / comment cleanups
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:40 -02:00
Mike Isely 293b5d94eb V4L/DVB (5087): Pvrusb2: Fix sizeof() calculation foul-up
This bug caused uninitalized data to be returned during a G_TUNER status poll.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:40 -02:00
Mike Isely 11fc76c9a8 V4L/DVB (5086): Pvrusb2: Fix missing break statement on VIDIOC_S_TUNER
The lack of a break statement in the handling of VIDIOC_S_TUNER caused
errors to result.  Fixed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:39 -02:00
Mike Isely 8433544ea9 V4L/DVB (5085): Pvrusb2: trace print added
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:39 -02:00
Mike Isely 644afdb9cc V4L/DVB (5084): Pvrusb2: Stop hardcoding frequency ranges
Rather than hardcoding frequency ranges everywhere, rely on
VIDIOC_G_TUNER results wherever we can.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:39 -02:00
Mike Isely 7c74e57e6f V4L/DVB (5083): Pvrusb2: Remove automodeswitch control
The automodeswitch control was a feature that enable automatic radio /
tv switching based on the selected frequency.  However since frequency
ranges can overlap and also since apparently in some cases it's
possible for the same frequency range to be both tv and radio in a
specific region, then this feature can't safely work.  So it's removed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:38 -02:00
Mike Isely fe23a2809d V4L/DVB (5082): Pvrusb2: Slight debug printing efficiency fixup
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:38 -02:00
Mike Isely 18103c57b0 V4L/DVB (5081): Pvrusb2: VIDIOC_G_TUNER cleanup
Clean up use of VIDIOC_G_TUNER; we now correctly gather info from all
the I2C client modules.  Also abide by V4L2_TUNER_CAP_LOW
appropriately.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:38 -02:00
Mike Isely af78a48b69 V4L/DVB (5080): Pvrusb2: Allow streaming from /dev/radioX
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:37 -02:00
Mike Isely 4b85dee6a0 V4L/DVB (5079): Pvrusb2: Use kzalloc instead of kmalloc+memset pairs
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:37 -02:00
Mike Isely 6710fb868b V4L/DVB (5078): Pvrusb2: It's safe to kfree() a null pointer
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:37 -02:00
Michael Schimek e5bd0260e7 V4L/DVB (5077): Bttv cropping support
Adds the missing VIDIOC_CROPCAP, G_CROP and S_CROP ioctls, permitting 
applications to capture or overlay a subsection of the picture or to 
extend the capture window beyond active video, into the VBI area and the 
horizontal blanking. VBI capturing can start and end on any line, 
including the picture area, and apps can capture different lines of each 
field and single fields.
For compatibility with existing applications, the open() function
resets the cropping and VBI capturing parameters and a VIDIOC_S_CROP
call is necessary to actually enable cropping. 
Regrettably in PAL-M, PAL-N, PAL-Nc and NTSC-JP mode the maximum image 
width will increase from 640 and 768 to 747 and 923 pixels respectively.
Like the VBI changes however, this should only affect applications which 
depend on former driver limitations, such as never getting more than 640 
pixels regardless of the requested width. 
Also, new freedoms require additional checks for conflicts and some 
applications may not expect an EBUSY error from the VIDIOC_QBUF and 
VIDIOCMCAPTURE ioctls. These errors should be rare though.
So far, the patch has been tested on a UP machine with a bt878 in PAL-
BGHI and NTSC-M mode using xawtv, tvtime, mplayer/mencoder, zapping/
libzvbi and these tools: http://zapping.sf.net/bttv-crop-test.tar.bz2
I'd be grateful about comments or bug reports.

Signed-off-by: Michael H. Schimek <mschimek@gmx.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:36 -02:00
Alexey Dobriyan 13071f0a58 V4L/DVB (5076): Cpia.c: buffer overflow
If assigned minor is 10 or greater, terminator will be put beyound the end.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:35 -02:00
Mike Isely c74e006268 V4L/DVB (5059): Pvrusb2: Be smarter about mode restoration
Switch back to the previous input selection when the radio device is
closed - but only do that if the current input selection is still the
radio (i.e. it appears that it hasn't been messed with).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:35 -02:00
Mike Isely cdef8bd8c6 V4L/DVB (5058): Pvrusb2: bug fix involving switch into radio mode
When the input is switched by opening /dev/radioX, we must also commit
that change into the driver core.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:35 -02:00
Mike Isely 16eb40d37d V4L/DVB (5057): Pvrusb2: Stream configuration cleanups
Clean up and tighten logic involving stream configuration.  This
mainly involves changes to pvrusb2-v4l2.c, where we better clarify how
we use the stream configuration enum and implement a cleaner means to
control streaming for a given device node.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:34 -02:00
Mike Isely f13ed249ed V4L/DVB (5056): Pvrusb2: Fix cut/paste bug in auto_mode_switch control
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:34 -02:00
Mike Isely 7a4a3770dd V4L/DVB (5054): Pvrusb2: cosmetic comment tweak
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:34 -02:00
Mike Isely 139eecf94c V4L/DVB (5053): Pvrusb2: Change default volume to something sane
The default volume of 65535 is too high.  Make is something smaller.
Note that this _only_ changes the default value.  Specifically, there
are no scaling or other more intrusive changes here.  I'm just sick of
constantly having to reduce the volume every time I plug in and test
the device!  (And unfortunately we can't do a better fix like scaling
the volume so that 65535 makes sense because doing so will screw up
any app - like MythTV - which expects the old scaling.)  Too bad V4L
controls don't have better defined ranges.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:34 -02:00
Mike Isely 62f5fdace7 V4L/DVB (5052): Pvrusb2: Remove stream claiming hack from /dev/radio
Trying to temporarily check that the stream is not claimed during open
of the radio device is at best a race condition.  What's to stop
another app from claiming the stream anyway the instant after the
check is done?  The implementation for this was dicey anyway.  So it's
removed.  The only "price" for this is that if /dev/radioX is opened
while streaming video, then the video stream is just going to switch
to radio mode anyway.  If a user does this, he gets what he expects...

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:33 -02:00
Mike Isely 1bde02891b V4L/DVB (5051): Pvrusb2: Better radio versus tv frequency handling
Separate track radio versus tv frequency so that when we switch modes
we can also switch to a sane frequency appropriate for the mode.  Also
implement logic to automate mode switching in certain cases.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:33 -02:00
Mike Isely 5549f54f46 V4L/DVB (5050): Pvrusb2: Newer frequency range checking
Implement new method for doing integer range checking, so that we can
more intelligently range-check radio and tv ranges at once.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:33 -02:00
Mike Isely 2083230084 V4L/DVB (5049): Pvrusb2: Enable radio mode for 24xxx devices
These changes implement correct audio routing for radio mode on a
24xxx device.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:32 -02:00
Mike Isely c0e69315ed V4L/DVB (5048): Pvrusb2: v4l2 API implementation frequency tweaks
Report and set correctly converted frequency to/from a V4L2 app.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:32 -02:00
Mike Isely f1382122ab V4L/DVB (5047): Pvrusb2: Fix tuning calculation when in radio mode
Frequency units in V4L2 are apparently different when in radio mode
compared to tv mode.  Why?  Who knows.  This change adapts the driver
appropriately - so that internally we always only deal in Hz and don't
have to muck with craziness like this.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:32 -02:00
Mike Isely 5a8a0a1642 V4L/DVB (5046): Pvrusb2: Fix tuner frequency calculation
A conversion from Hz to V4L frequency units was accidentally removed
by an earlier change.  Restore it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:31 -02:00
Mike Isely 0f0f257b7b V4L/DVB (5045): Pvrusb2: Fix heap corruption introduced by radio mods
We can't allocate v4l device structures in a block, since the v4l core
governs when each device actually gets freed.  This bug was introduced
as part of the core radio implementation.  Fix it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:31 -02:00
Mike Isely 5e6862cefe V4L/DVB (5044): Pvrusb2: Allow overriding vbi and radio device minor numbers
Support specification of vbi and radio device minor numbers in a
manner similar to the video device minor number.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:29 -02:00
Mike Isely f5156b06ac V4L/DVB (5043): Pvrusb2: video standard broadcast fix for radio mode
Ensure we don't accidentally broadcast the standard while in radio mode.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:24 -02:00
Mike Isely 98752102dc V4L/DVB (5042): Pvrusb2: Make units uniform when tracking tuning frequency
The initial radio implementation used different units for tuning when
in radio mode.  This changes everything to Hz.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:24 -02:00
Mike Isely 8079384eeb V4L/DVB (5041): Pvrusb2: Use separate enumeration for get/store of minor number
Use separate enum for get/store of minor number; we want pvr2_config
to go away eventually and since it really means something different,
don't use it here

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:24 -02:00
Mike Isely fd5a75fe00 V4L/DVB (5040): Pvrusb2: Use enumeration for minor number get / store code
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:23 -02:00
Pantelis Koukousoulas ae2b9e25fd V4L/DVB (5039): Pvrusb2: Implement /dev/radioX
The "main" V4L2 interface patch. This is yet very incomplete, incorrect and
probably inappropriate for inclusion as-is, but at least with this I 'm able
to tune and play radio through a V4L2 program (pvr-radio.c, a "thumb" version
of ivtv-radio.c with just the essentials).

Therefore, it kinda gives an idea of what is needed to support this, hm,
interface (partly used also by e.g., kradio). Please point out any mistakes
on this code. I 'm sure I 'm messing up some struct initialization somewhere
but currently I 'm too lazy to actually think this through until I complete
the functionality (e.g., handle the VIDIOC_S_STD, ENUMINPUT, etc ioctls
appropriately).

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:23 -02:00
Pantelis Koukousoulas 99cfdf5cc6 V4L/DVB (5038): Pvrusb2: Implement stream claim checking function
Add (and expose) a new function, pvr2_channel_check_stream_no_lock(), in
pvrusb2-context.c. This is hopefully the last V4L2 interface related patch
to change anything outside pvrusb2-v4l2.c.

We need this to implement the open() for the radio device. The reason is
that within the *enter_context() section of open() we need to ensure nobody
is streaming and if we cannot, we should cleanup after ourselves and return
 -EBUSY. We cannot just use claim_stream() because:

   1) That would cause a deadlock trying to re-acquire the context lock
   2) We only need to ensure that nobody is streaming. We don't need to
      actually acquire the stream.

Again, this is a kinda ugly patch. Feel free to improve.

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:23 -02:00
Pantelis Koukousoulas 2fdf3d9c94 V4L/DVB (5037): Pvrusb2: Implement multiple minor device number handling
This is the first patch in preparation of the V4L2/IVTV radio interface.
It does away with the assumption of only one minor per device. It also
adds a file to show the radio minor as well. This can be useful for a
program like pvr-radio.c (when it grows up), since this way it can search
for the minor of the /dev/radioX device it opened and use the video minor
of the same driver instance to get to the actual stream.

The implementation looks kinda ugly. Feel free to improve (that is the
reason behind separate patches anyway).

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:22 -02:00
Pantelis Koukousoulas 6fcb5b3ef7 V4L/DVB (5036): Pvrusb2: Fix for min/max control value checking
In the previous patch we exploited the get_{min,max}_value facility to adjust
min/max allowable frequencies on the fly, depending on tuner mode.

Unfortunately, this facility was not used inside the *sym_to_val() function
that translates what we echo to sysfs, which means we got an -ERANGE despite
asking for a frequency between what we read to be min/max.
This patch corrects this small omission.

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:22 -02:00
Pantelis Koukousoulas 25d8527a44 V4L/DVB (5035): Pvrusb2: Enable radio mode round #2
This is the logic that:
  a) Ensures /sys/class/pvrusb2/sn-*/ctl_frequency/{max,min}_val are
     "automagically" reset to sane values on each mode change.

  b) Allows tuning to a radio frequency by something like:
     echo `perl -e "print int(94.9*16000 + 0.5)"` \
       > /sys/class/pvrusb2/sn-*/ctl_input/cur_val


The trick was to take advantage of the already existing .get_{min,max}_value
function pointers in pvr2_ctrl, to "dynamically override" the hardcoded values
for min/max frequency at runtime.

For a moment I thought to dispose of the hardcoded MIN/MAX_FREQ and use the
hirange/lowrange fields of the v4l2_tuner struct instead, but then I see that
tuner-core.c kinda hardcodes these as well, so I decided to not bother.

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:22 -02:00
Pantelis Koukousoulas 275b2e283b V4L/DVB (5034): Pvrusb2: Enable radio mode round #1
This is the logic that supports switching modes via e.g.,
  echo radio > /sys/class/pvrusb2/sn-*/ctl_input/cur_val.

To do the mode switching we need to:
a) broadcast AUDC_SET_RADIO and
b) issue the CX2341X_ENC_MUTE_VIDEO command to the encoder. 

The first is done by adding a new pvr2_i2c_op and having it trigger on 
input change, the second by adding this command in pvr2_encoder_start() 
and requesting an encoder restart on input change by setting 
stale_subsys_mask appropriately. 

The clues about AUDC_SET_RADIO and CX2341X_ENC_MUTE_VIDEO were kindly 
provided by Hans Verkuil on the pvrusb2 mailing list. The idea to 
implement mode switching this way (on input change) is due to Mike Isely.

Why AUDC_SET_RADIO/VIDIOC_S_STD are used for switching? I can 't be sure, 
but I think this can be traced to a cornell student being the first to 
implement radio support in ivtv "as a different standard". I think the 
rest just evolved from there (it 's in the ivtv ML archives).

Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:21 -02:00
Mauro Carvalho Chehab 0b60051286 V4L/DVB (5074): Some fixes at stream waitqueue on vivi
There are several potential troubles on vivi waitqueue code:
- Watchdog timer should be reset at every received frame;
- Watchdog timer should be reset at the beginning of vivi_thread();
- Checks for errors when creating a newer thread with kernel_thread();
- Wake up vivi_thread() after creating it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:21 -02:00
Mauro Carvalho Chehab df3a710458 V4L/DVB (5073): Fix OOPS on some waitqueue conditions
If for some reason vivi_thread() fails, vivi will suffer an OOPS at
thread stop code, since waitqueue wouldn't be properly initializated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:21 -02:00
Mauro Carvalho Chehab 43db48d3d2 V4L/DVB (5068): Fix authorship references
Bill Dirks asked me to update his entries at kernel files, since
he change his e-mail.
I've also updated a few web broken links or obsolete info to the curent
sites where V4L drivers and API are being discussed currently.

CC: Bill Dirks <bill@thedirks.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:20 -02:00
Luca Risolia 2656312724 V4L/DVB (5064): ET61X251 driver updates.
- Implement audio ioctl's and VIDIOC_ENUM_FRAMESIZES
- Documentation updates
- Generic improvements

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:20 -02:00
Luca Risolia 7e3a066070 V4L/DVB (5063): ZC0301 driver updates.
- Implement audio ioctl's and VIDIOC_ENUM_FRAMESIZES
- Documentation updates
- Generic improvements

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:19 -02:00
Luca Risolia f327ebbd00 V4L/DVB (5062): SN9C102 driver updates
- Add support for SN9C105 and SN9C120
- Add some more USB device identifiers
- Add support for OV7660
- Implement audio ioctl's and VIDIOC_ENUM_FRAMESIZES
- Add preliminary support for 0x0c45/0x6007
- Documentation updates
- Generic improvements
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:19 -02:00
Michael Krufky 19790db00b V4L/DVB (5061): Bt8xx: add support for Ultraview DVB-T Lite
Ultraview DVB-T Lite is a clone of DViCO FusionHDTV DVB-T Lite

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:19 -02:00
Dwaine Garden de6a1b8edc V4L/DVB (5032): Improves some USBVision info messages
Replaces the info statements with printk(KERN_INFO statements.
This will cut down on the useless information which is showing up
 in the kernel messages log file.

Signed-off-by: Dwaine P. Garden <DwaineGarden@rogers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:18 -02:00
Dmitry Torokhov c190495681 V4L/DVB (5025): Cleanup: switch to using msecs_to_jiffies() on bttv
PS.: Part of the changes at the original patch were removed due to the changes
done at commit 52c14e794f6ce345343a6b8fc98ea4e0ba2dfce4

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:18 -02:00
Mariusz Kozlowski cededbfcbc V4L/DVB (5028): Tvmixer module_put cleanup
Removes redundant argument check for module_put()

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:18 -02:00
Mariusz Kozlowski ac32898930 V4L/DVB (5027): Cpia module_put cleanup
No need for redundant argument check for module_put()

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:17 -02:00
Mariusz Kozlowski 22071a42a1 V4L/DVB (5026): Pvrusb2-hdw kfree cleanup
Removes redundant argument check for kfree().

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:17 -02:00
Adrian Bunk 4a06b538d6 V4L/DVB (5018): Make usbvision_rvfree() static
usbvision_rvfree() can now become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:16 -02:00
Adrian Bunk c408a6f673 V4L/DVB (5017): DVB: fix compile error
This patch fixes the following compile error:
<--  snip  -->
...
  LD      drivers/media/video/built-in.o
drivers/media/video/saa7134/built-in.o:(.data+0x85ec): multiple definition of `ir_rc5_remote_gap'
drivers/media/video/bt8xx/built-in.o:(.data+0x734c): first defined here
drivers/media/video/saa7134/built-in.o:(.data+0x85f0): multiple definition of `ir_rc5_key_timeout'
drivers/media/video/bt8xx/built-in.o:(.data+0x7350): first defined here
make[4]: *** [drivers/media/video/built-in.o] Error 1
<--  snip  -->
Since this variables were needlessly global, this patch implements the
trivial fix of making them static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:16 -02:00
Juan Pablo Sormani c36c459a55 V4L/DVB (5015): Add support for more Encore TV cards
Signed-off-by: Juan Pablo Sormani <sorman@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:16 -02:00
Mauro Carvalho Chehab 95efa03bd6 V4L/DVB (5012a): Remove some unused code from kernel mainstream
There are some long time unused code under some media driver source files. 
There's no need of keeping it at mainstream.
Those unused code will remain available at V4L/DVB master tree and also at
kernel history.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:15 -02:00
Steven Walter d1158f469c V4L/DVB (4989): Saa7134: add support for the Encore ENL-TV
Add a board definition for the Encore ENL-TV card, and
adds its PCI subdevice to the ID table.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:14 -02:00
Hans Verkuil 75558ab92d V4L/DVB (4986): Removed unimplemented cx2341x API commands
The commands CX2341X_DEC_SET_AUDIO_OUTPUT, CX2341X_DEC_SET_AV_DELAY and
CX2341X_ENC_SET_3_2_PULLDOWN are not implemented in the Conexant firmware.
So these commands are removed. This also means that the V4L2_CID_MPEG_VIDEO_PULLDOWN
control in cx2341x.c and pvrusb2-hdw.c is removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:13 -02:00
Hermann Pitton 8387c66c7f V4L/DVB (4962): Add the Composite over S-Video input on the Asus P7131 Dual
This makes a second CVBS input available.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:12 -02:00
Hermann Pitton 9160723ed6 V4L/DVB (4961): Add support for the ASUS P7131 remote control
Besides adding the board specific code, this patch moves
the RC5 decoding code from bt8xx to ir-functions.c to make it available 
for all drivers.

Signed-off-by: Marc Fargas <telenieko.telenieko.com>
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:12 -02:00
Tobias Klauser c5a69d57eb Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17 20:11:19 +01:00
Tim Schmielau cd354f1ae7 [PATCH] remove many unneeded #includes of sched.h
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there.  Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.

To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.

Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm.  I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-14 08:09:54 -08:00
Jean Delvare 12a917f69d i2c: Declare more i2c_adapter parent devices
Declare the parent device of i2c_adapter devices each time we can
easily do so. It makes the i2c_adapter appear at the right place in
the device tree, rather than as a platform device.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: v4l-dvb-maintainer@linuxtv.org
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
2007-02-13 22:09:03 +01:00
Arjan van de Ven fa027c2a0a [PATCH] mark struct file_operations const 4
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

[akpm@sdl.org: dvb fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Robert P. J. Day aa58d61d18 [PATCH] Get rid of "double zeroing" of allocated pages
Simplify the few instances where a call to "get_zeroed_page()" is closely
followed by an unnecessary call to memset() to clear that page.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: chas williams <chas@cmf.nrl.navy.mil>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:31 -08:00
Al Viro 8a5ab4157b [PATCH] usbvision missing __user
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:06 -08:00
Greg Kroah-Hartman 64358164f5 USB: remove duplicate device id from zc0301
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Oleg Nesterov 419dd8378d V4L/DVB (5123): Buf_qbuf: fix: videobuf_queue->stream corruption and lockup
We are doing ->buf_prepare(buf) before adding buf to q->stream list. This
means that videobuf_qbuf() should not try to re-add a STATE_PREPARED buffer.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-23 22:00:21 -02:00
Mauro Carvalho Chehab 412297d31d V4L/DVB (5023): Fix compilation on ppc32 architecture
There's a problem, pointed by Meelis Roos <mroos@linux.ee>, that, on ppc32 arch,
with some gcc versions (noticed with prerelease 4.1.2 20061115), compilation 
fails, due the lack of __ucmpdi2 to do the required 64-bit comparision.
This patch takes some sugestions made by Andrew Morton <akpm@osdl.org>,
Stelian Pop <stelian@popies.net> and Segher Boessenkool <segher@kernel.crashing.org>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-15 16:33:51 -02:00
Michael Krufky 1323fbda13 V4L/DVB (5071): Tveeprom: autodetect LG TAPC G701D as tuner type 37
autodetect LG TAPC G701D as tuner type 37.
Thanks to Adonis Papas, for pointing out the missing autodetection
for this tuner.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-15 16:26:04 -02:00
Gerd Hoffmann 10329b962b V4L/DVB (5069): Fix bttv and friends on 64bit machines with lots of memory
We have a DMA32 zone now, lets use it to make sure the card
can reach the memory we have allocated for the video frame
buffers.

Signed-off-by: Gerds Hoffmann <kraxel@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-15 16:26:01 -02:00