Antti Palosaari [Thu, 11 Feb 2010 00:33:12 +0000 (21:33 -0300)]
V4L/DVB: af901x: inform NXP TDA18218 tuner as know but not supported
There is no driver for new NXP TDA18218 tuner which is used by few recent
af9015 designs. af9015 uses number 179 as ID for that tuner. Inform this
tuner is not supported when device using that tuner is meet.
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Adds digital and analogue tv support for Dikom DK300 hybrid usb card.
Not working: remote controller
To be done: it seems that with the proposed patch the digital demodulator
remains activated if the tuner is switched from digital to analogue mode.
Workaround is to unplug and replug the device when switching from digital to
analogue. If someone can explain how to verify the gpio settings using the
usbsnoop, the above issue perhaps can be resolved.
Signed-off-by: Andrea Amorosi <Andrea.Amorosi76@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Klaas de Waal [Sun, 7 Feb 2010 17:09:16 +0000 (14:09 -0300)]
V4L/DVB: dst: fixes for DVB-C Twinhan VP2031
Remove check "state->dst_type == DST_DTYPE_IS_CABLE" in function
dst_get_tuna (around line 1352) to select the correct checksum
computation
Fill in the .caps field in struct dst_dvbc_ops (around line 1824) with
all the supported QAM modulation methods to match the capabilities of
the card as implemented in function dst_set_modulation (around line
502). Note that beginning with linux kernel version 2.6.32 the
modulation method is checked (by function
dvb_frontend_check_parameters in file
drivers/media/dvb/dvb-core/dvb_frontend.c) and thus tuning fails if
you use a modulation method that is not present in the .caps field.
This patch has been tested on a Twinhan VP2031A DVB-C card with the
2.6.32.2 kernel.
Signed-off-by: Klaas de Waal <klaas.de.waal@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young [Sat, 6 Feb 2010 13:58:41 +0000 (10:58 -0300)]
V4L/DVB: saa7134 can capture 720x480 when capturing NTSC
When capturing NTSC, the saa7134 can capture 720x480.
While doing Laserdisc captures using this card, I noticed that right side
was truncated/cropped. The highest geometry the driver allows is 704x480,
even though in Windows XP it is 720x480. This results in no cropping
and the same results as in Windows.
Tested on an AverMedia GO 007 FM Plus.
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB: using vmalloc requires include linux/vmalloc.h
After merging the scsi-post-merge tree, today's linux-next build (powerpc
allyesconfig) failed like this:
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_release_buffers':
drivers/media/dvb/ngene/ngene-core.c:1443: error: implicit declaration of function 'vfree'
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_get_buffers':
drivers/media/dvb/ngene/ngene-core.c:1454: error: implicit declaration of function 'vmalloc'
drivers/media/dvb/ngene/ngene-core.c:1454: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c:1461: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c:1467: warning: assignment makes pointer from integer without a cast
drivers/media/dvb/ngene/ngene-core.c: In function 'ngene_probe':
drivers/media/dvb/ngene/ngene-core.c:1836: warning: assignment makes pointer from integer without a cast
Oliver Endriss [Tue, 2 Feb 2010 01:01:31 +0000 (22:01 -0300)]
V4L/DVB: ngene: Adapt to current frontend drivers
Adapt to current stv090x + stv6110 drivers.
[mchehab@redhat.com: removed compilation hack added by me on a prev patch] Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sat, 23 Jan 2010 13:44:34 +0000 (14:44 +0100)]
V4L/DVB: hdpvr-video: cleanup signedness
The fifth parameter of usb_bulk_msg() is a pointer to signed
(see <linux/usb.h>) so also call this function with pointer to signed.
This will remove the following sparse warning (see "make C=1"):
* warning: incorrect type in argument 5 (different signedness)
expected int *actual_length
got unsigned int *<noident>
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Fri, 22 Jan 2010 15:10:55 +0000 (12:10 -0300)]
V4L/DVB: media: dvb/af9015, add hashes support
So as a final patch, add support for hash and one hash entry
for MSI digi vox mini II:
iManufacturer 1 Afatech
iProduct 2 DVB-T 2
iSerial 3 010101010600001
It is now handled with proper IR and key map tables.
Add af9015_setup structure to hold (right now only remote) setup
of distinct receivers.
Add af9015_setup_match for matching ids against tables.
This is for easier matching different kind of ids against tables
to obtain setups. Currently module parameters and usb vendor ids
are switched into and matched against tables. Hashes will follow.
This will be useful for matching of IR tables later.
We read the eeprom anyway for dumping. Switch the dumping to
print_hex_dump_bytes and compute hash above that by
hash = 0;
for (u32 VAL) in (eeprom):
hash *= GOLDEN_RATIO_PRIME_32
hash += VAL; // while preserving endinaness
The computation is moved earlier to the flow, namely from
af9015_af9013_frontend_attach to af9015_read_config, so that
we can access the sum in af9015_read_config already.
Márton Németh [Fri, 29 Jan 2010 20:30:53 +0000 (17:30 -0300)]
V4L/DVB: hdpvr-core: make module parameters local
The default_video_input and default_audio_input module parameters are
only used inside the hdpvr-core.c file so make them static.
This will remove the following sparse warnings (see "make C=1"):
* warning: symbol 'default_video_input' was not declared. Should it be static?
* warning: symbol 'default_audio_input' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Manu Abraham <manu@linuxtv.org> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/stv090x.c: In function 'stv090x_blind_search':
drivers/media/dvb/frontends/stv090x.c:1967: warning: 'coarse_fail' may be used uninitialized in this function
Cc: Manu Abraham <manu@linuxtv.org> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Manu Abraham <manu@linuxtv.org> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'cx18_alsa_announce_pcm_data':
drivers/media/video/cx18/cx18-alsa-pcm.c:82: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'
Cc: Andy Walls <awalls@radix.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Fri, 29 Jan 2010 20:42:17 +0000 (17:42 -0300)]
V4L/DVB: smsir: make local variables static
Make the file local parameters static.
This will remove the following sparse warnings (see "make C=1"):
* warning: symbol 'ir_pos' was not declared. Should it be static?
* warning: symbol 'ir_word' was not declared. Should it be static?
* warning: symbol 'ir_toggle' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sat, 30 Jan 2010 19:20:27 +0000 (16:20 -0300)]
V4L/DVB: cx18: Add missing serialization locks to cx18-dvb
Operations that manipulates the state of the encoder or global instance flags
and variables should be serialized. This adds some serialization locks that
have been missing from cx18-dvb. Since the DVB part of the CX23418 doesn't
affect the encoder, no one would likely have ever noticed a race in changing
card instance variables.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sat, 30 Jan 2010 18:50:51 +0000 (15:50 -0300)]
V4L/DVB: cx18: Fix memory leak in cx18-alsa starting of PCM captures
The cx18_open_id is normally dynamically allocated and stored in the
filp->private_data for v4l2 file operations. The cx18-alsa routines should
not dynamically allocate a cx18_open_id because they never store it anywhere
and never free it. This change fixes that and plugs a memory leak.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sat, 30 Jan 2010 18:28:22 +0000 (15:28 -0300)]
V4L/DVB: cx18: Add missing serialization locking to cx18-alsa
File operations that manipulate the state of the encoder, or video or audio
subdevices or some of the stream flags need to be serialized. Add the
serilization locks to cx18-alsa in a manner consistent with the locking for
the v4l2 file operations.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Tue, 26 Jan 2010 19:46:58 +0000 (16:46 -0300)]
V4L/DVB: dvb/bt8xx: Clean-up init and exit functions
The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.
Arnaud Patard [Mon, 25 Jan 2010 15:02:31 +0000 (12:02 -0300)]
V4L/DVB: Fix VIDIOC_QBUF compat ioctl32
When using VIDIOC_QBUF with memory type set to V4L2_MEMORY_MMAP, the
v4l2_buffer buffer gets unmodified on drivers like uvc (well, only
bytesused field is modified). Then some apps like gstreamer are reusing
the same buffer later to call munmap (eg passing the buffer "length"
field as 2nd parameter of munmap).
It's working fine on full 32bits but on 32bits systems with 64bit
kernel, the get_v4l2_buffer32() doesn't copy length/m.offset values and
then copy garbage to userspace in put_v4l2_buffer32().
This has for consequence things like that in the libv4l2 logs:
Márton Németh [Sat, 23 Jan 2010 06:58:20 +0000 (03:58 -0300)]
V4L/DVB: zoran: match parameter signedness of g_input_status
The second parameter of g_input_status operation in <media/v4l2-subdev.h>
is unsigned so also call it with unsigned paramter.
This will remove the following sparse warning (see "make C=1"):
* incorrect type in argument 2 (different signedness)
expected unsigned int [usertype] *status
got int *<noident>
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Wed, 18 Nov 2009 19:03:31 +0000 (16:03 -0300)]
V4L/DVB: firedtv: reduce memset()s
Before each FCP transdaction, the entire 512 bytes of the FCP frame were
cleared, then values filled in.
Clear only the bytes between filled-in bytes and end of the
- request frame, or
- response frame if data from a larger response will be needed, or
- whole frame if data from a variable length response will be taken.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Wed, 18 Nov 2009 19:03:03 +0000 (16:03 -0300)]
V4L/DVB: firedtv: remove check for interrupting signal
FCP transactions as well as CMP transactions were serialized with
mutex_lock_interruptible. It is extremely unlikly though that a signal
will arrive while a concurrent process holds the mutex. And even if one
does, the duration of a transaction is reasonably short (1.2 seconds if
all retries time out, usually much shorter).
Hence simplify the code to plain mutex_lock.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Wed, 18 Nov 2009 19:02:01 +0000 (16:02 -0300)]
V4L/DVB: firedtv: do not DMA-map stack addresses
This is a portability fix and reduces stack usage.
The DMA mapping API cannot map on-stack addresses, as explained in
Documentation/DMA-mapping.txt. Convert the two cases of on-stack packet
payload buffers in firedtv (payload of write requests in avc_write and
of lock requests in cmp_lock) to slab-allocated memory.
We use the 512 bytes sized FCP frame buffer in struct firedtv for this
purpose. Previously it held only incoming FCP responses, now it holds
pending FCP requests and is then overwriten by an FCP response from the
tuner subunit. Ditto for CMP lock requests and responses. Accesses to
the payload buffer are serialized by fdtv->avc_mutex.
As a welcome side effect, stack usage of the AV/C transaction functions
is reduced by 512 bytes.
Alas, avc_register_remote_control() is a special case: It previously
did not wait for a response. To fit better in with the other FCP
transactions, let it wait for an interim response.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
WARNING: drivers/media/video/cx18/cx18-alsa.o(.text+0x4de): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.
WARNING: drivers/media/video/cx18/built-in.o(.text+0x1c022): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.
WARNING: drivers/media/video/built-in.o(.text+0x28cc56): Section
mismatch in reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.
WARNING: drivers/media/built-in.o(.text+0x2d2432): Section mismatch in
reference from the function cx18_alsa_load() to the function
.init.text:snd_cx18_init()
The function cx18_alsa_load() references
the function __init snd_cx18_init().
This is often because cx18_alsa_load lacks a __init
annotation or the annotation of snd_cx18_init is wrong.
Antonio Ospite [Sun, 17 Jan 2010 06:42:14 +0000 (03:42 -0300)]
V4L/DVB: gspca - ov534: Fix end of frame handling
Fix a regression, introduced in the driver split, which made
the ov534 driver unusable.
Plus, the debug message should reflect that we discard also packets
beyond the expected frame size.
Hans de Goede [Wed, 13 Jan 2010 10:12:28 +0000 (07:12 -0300)]
V4L/DVB: gspca - zc3xx: Change the resolutions of some sensors
The sensors adcm2700, mc501cb and ov7620 cannot have the full height
permitted by the zc3xx bridges. This change removes 8 pixels at the
bottom of the images.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sat, 16 Jan 2010 16:41:43 +0000 (13:41 -0300)]
V4L/DVB: stv0900: make more local functions static
Some functions are only used locally so mark them static.
This will remove the following sparse warnings (see "make C=1"):
* symbol 'extract_mask_pos' was not declared. Should it be static?
* symbol 'stv0900_initialize' was not declared. Should it be static?
* symbol 'stv0900_get_mclk_freq' was not declared. Should it be static?
* symbol 'stv0900_set_mclk' was not declared. Should it be static?
* symbol 'stv0900_get_err_count' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sat, 16 Jan 2010 16:35:36 +0000 (13:35 -0300)]
V4L/DVB: stv0900: make local functions static
The functions stv0900_sw_algo() and stv0900_set_dvbs1_track_car_loop() are only used
locally so mark them static.
This will remove the following sparse warnings (see "make C=1"):
* symbol 'stv0900_sw_algo' was not declared. Should it be static?
* symbol 'stv0900_set_dvbs1_track_car_loop' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh [Sat, 16 Jan 2010 16:21:59 +0000 (13:21 -0300)]
V4L/DVB: cx231xx: cleanup dvb_attach() return value handling
Remove the following sparse error (see "make C=1"):
* error: incompatible types for operation (<)
left side has type struct dvb_frontend *
right side has type int
Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>