The input subsystem checks if get_keycode works for a scan code. Due to that,
we need to return a valid value when there's some space at the table that
can be used by a scancode.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Implements handler for EVIOCGKEYCODE/EVIOCSKEYCODE via adding two new callbacks
to the input device.
Since on dvb-usb a scan code has 16 bits, to fulfill rc5 standard codes, the default
getkeycode/setkeycode input methods would require the driver to spend up to 64 Kb of
a sparse table. Instead, add two new callbacks to the event device.
With this, it is now possible to replace the keycode tables. There are, however, a few
implementation details at the current patch:
1) It will replace the existing device keytable, instead of creating an instance
of the data. This works. However, if two devices pointing to the same table
were connected, changing the IR table of one will also change the IR table for
the other (the solution for this one is simple: just kmalloc some memory);
2) In order to change the scan code, you need first to change the key to
KEY_RESERVED or KEY_UNKNOWN to free some space at the table (solution: allocate
some additional space for newer scan codes or allow dynamic table grow);
3) The table size cannot be extended. It would be easy to allow the table to
grow dynamically: just calling kmalloc(size+1); kfree(old). Yet, maybe we can
just create a bigger table with a fixed size, like for example a table with 128
entries. This should be enough even for a very big IR.
The current issues should be addressed on a later patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In order to be closer to V4L IR implementation, it is needed to replace
u8 custom, data
to:
u16 scan
This allows using non-rc5 mappings, like the 8 bit keycodes used on older
protocols. It will also allow future implementations of rc6 keystrokes
when needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Currently, V4L uses a scancode table whose index is the scancode and
the value is the keycode. While this works, it has some drawbacks:
1) It requires that the scancode to be at the range 00-7f;
2) keycodes should be masked on 7 bits in order for it to work;
3) due to the 7 bits approach, sometimes it is not possible to replace
the default keyboard to another one with a different encoding rule;
4) it is different than what is done with dvb-usb approach;
5) it requires a typedef for it to work. This is not a recommended
Linux CodingStyle.
This patch is part of a larger series of IR changes. It basically
replaces the IR_KEYTAB_TYPE tables by a structured table:
struct ir_scancode {
u16 scancode;
u32 keycode;
};
This is very close to what dvb does. So, a further integration with DVB
code will be easy.
While we've changed the tables, for now, the IR keycode handling is still
based on the old approach.
The only notable effect is the redution of about 35% of the ir-common
module size:
text data bss dec hex filename
6721 29208 4 35933 8c5d old/ir-common.ko
5756 18040 4 23800 5cf8 new/ir-common.ko
In thesis, we could be using above u8 for scancode, reducing even more the size
of the module, but defining it as u16 is more convenient, since, on dvb, each
scancode has up to 16 bits, and we currently have a few troubles with rc5, as their
scancodes are defined with more than 8 bits.
This patch itself shouldn't be doing any functional changes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- bad sensor power
- bad edge gain/threshold
- set back the auto gain
- light frequency filter inverted
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[mchehab@redhat.com: Fix a few wrong IR keymaps]
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch add support for RoverMedia TV Link Pro FM (LR138 REV:I) card
based on saa7134.
Signed-off-by: Eugene Yudin <Eugene.Yudin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support our new TV card based on xc5000 and saa7134.
Analog TV works well.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The patch introduces new snd_saa7134_capsrc_set (code taken from
snd_saa7134_capsrc_put) that updates also the ALSA capture controls during
snd_card_saa7134_capture_prepare and snd_saa7134_capsrc_put.
There can be much more work done in order to unify the control of the card
(now the card's capture source is tuned/switched in saa7134-video.c too), but
I don't have enough time. This work could be a starting point, but it can be
applied as-is too (it doesn't need any further work to make it working).
Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hello kernel developers.
I found a bug report from an user in launchpad. I just copy it here. It
includes patch.
I don't own the necessary hardware to test it but the patch looks
trivial.
I'm not subscribed to this list, so please CC me. Thanks!
Here is the text:
"""
remote control for my tv card doesnt work
I have Askey CPH03x TV Capturer.
When I load bttv module with "card=59" option which is proper for this
tv card,
I can watch tv with sound but my remote control doesnt work. There is no
ir
event in /proc/bus/input/device .
When bttv module is loaded with "card=137" option remote control works
very
well.
$ cat /proc/bus/input/devices
.......
........
: Bus=0001 Vendor=109e Product=0350 Version=0001
N: Name="bttv IR (card=137)"
P: Phys=pci-0000:00:0d.0/ir0
S: Sysfs=/devices/pci0000:00/0000:00:0d.0/input/input144
U: Uniq=
H: Handlers=kbd event6
B: EV=100003
B: KEY=2c0814 100004 0 0 0 4 2008000 2090 2001 1e0000 4400 0 ffc
Unfortunately there is no sound.
"""
https://bugs.launchpad.net/ubuntu/+bug/239733http://bugzilla.kernel.org/show_bug.cgi?id=11995
--
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The card is reported as YUAN High-Tech Development Co., Ltd STK7700D
[mchehab@redhat.com: fix merge conflicts and properly name USB PID]
Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: James A Webb <jamesawebb@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
applications tend to check the signal strength very often. This patch
enables users to select which AVC messages to log using a bitmask. In
addition, it also enables the possibility to debug application PMTs sent
to the driver. This will be usable since the CA support is still poorly
tested for lots of CAMs and CA systems.
Signed-off-by: Henrik Kurelid <henrik@kurelid.se>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
On certain master / slave dual tuner configurations, tuning performance
improves when the RF tracking filter calibration is performed sequentially.
This patch allows for the bridge driver to specify this behavior in the
configuration structure at attach-time.
The "cal" module option will continue to override this attach-time
configuration: set cal=0 to prevent RF tracking filter calibration
on startup, and set cal=1 to force it.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Reviewed-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
remove excess spacing from the tda_foo printk macros & line things up better
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Rename dprintk to tda_dprintk to be consistent with the other tda_foo macros.
Move KERN_DEBUG facility level to tda_dprintk.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
For the bandwidth to be less than 8 MHZ and greater than 6 MHZ is logically
impossible.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Added support to AverMedia Studio 505
[dougsland@redhat.com: fixed rejects and removed the change to add dk as default secam variant]
[mchehab@redhat.com: fix a few CodingStyle issues]
Signed-off-by: Vasiliy Temnikov <vaka@newmail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
KEY_CAMERA is already used for a long time with webcam drivers to take a picture.
On other media drivers, due to the lack of a snapshot button, random KEY codes
were sent, being KEY_SHUFFLE the most used one, probably due to cut-and-paste
from other remotes, since one of them uses the same key for snapshot and shuffle.
The better is to use KEY_CAMERA on all drivers solving this issue. This
follows the IR standard map as defined at:
http://linuxtv.org/wiki/index.php/Remote_Controllers
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Use standard definitions for channel controls, as defined at:
http://linuxtv.org/wiki/index.php/Remote_Controllers
While here, fix a few broken up/down/left/right mappings
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Each remote were using a different keycode for timeshift. Use the same
keycode for all of them, using the map as defined at:
http://linuxtv.org/wiki/index.php/Remote_Controllers
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are several IR's that were using IR to type a letter that it is
known by some random application. Instead, the better is to use
the standard definitions found at:
http://linuxtv.org/wiki/index.php/Remote_Controllers
And, if needed, submit a patch for the application to understand the
media keys.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
While we're still discussing it, let's point to the wiki page. In
the future, this should be added at V4L2 API spec DocBooks.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make Checkpatch tool happy:
-:2349: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
On all cases, it were just a blank line at the wrong place. Yet, fixing it is trivial
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The ir-keymaps.c has frequent additions. As people tend to copy an old
keyboard entry, a bad CodingStyle at an ancient entry may result on a
freshly bad CodingStyle patch.
So, better to fix the CodingStyle for the entire file.
This patch is the first of a series of patches fixing it, generated by
some perl magic plus manual handling.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds files to control si4713 devices.
Internal functions to control device properties
and initialization procedures are into these files.
Also, a v4l2 subdev interface is also exported.
This way other drivers can use this as v4l2 i2c subdevice.
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds files which creates the radio interface
for si4713 FM transmitter (modulator) devices.
In order to do the real access to device registers, this
driver uses the v4l2 subdev interface exported by si4713 i2c driver.
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds basic configurations for FM TX extended controls.
That includes controls names, menu strings, pointer identification,
type classification and flags configuration.
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The upcoming RDS encoder needs support for string controls. This patch
implements the core implementation.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
With the recent improvements we don't need to probe anymore, if we know
the i2c address of the receiver.
The address of the receiver for the remote with the gray buttons is not
confirmed anywhere, but it is very unlikely to see it on something else.
We want to have that information anyway.
BTW, those remaining still probing, please join.
Signed-off-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch removes an unneeded power management primitive.
Power management is automatically enabled as probe ends.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are several reasons:
- SAA7133/35 uses DDEP (DemDec Easy Programming mode), which works in 32kHz
only
- SAA7134 for TV mode uses DemDec mode (32kHz)
- Radio works in 32kHz only
- When recording 48kHz from Line1/Line2, switching of capture source to TV
means switching to 32kHz without any frequency translation
Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz>
Acked-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
I just happen to peek inside the PWC driver and did not like what I saw
there. Please consider applying the patch below.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It does matter to set explicitly gpio0 value in
cx88_board structure for TBS 8920 card.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Makes zl10353 a bit more DVB API compliant:
FE_READ_UNCORRECTED_BLOCKS - keep a counter of UNC blocks
FE_GET_FRONTEND - return last set frequency instead of zero
Signed-off-by: Aleksandr V. Piskunov <alexandr.v.piskunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The AVC protocol uses the same command for tuning and PID filtering and
since dvb-core uses a software zigzagging to do automatic retuning this
could cause all PID filters to be cleared. PID filter information is
now included in all DSD commands to the card.
Background:
There is a problem in the firedtv driver that causes recordings to stop
if the SW zigzag algorithm in dvb-core kicks in with a retune after the
application has set up the PID filters. Since tuning and setting PID
filters uses the same AVC command (DSD) and only the replace subfunction
is supported by the card, it is not possible to do a retune without
setting the PID filters. This means that the PID filtering has to be
sent in each tune.
This problem applies to C and T cards since S and S2 cards tune using a
vendor specific command. The patch corrects the problem by sending the
PID list in each tune. I have tested it on my T card with a good
result.
How to trigger problem: Zap to a channel and output AV to a file, e.g.
"tzap -c channels.conf SVT1 -r -o SVT1.ts". After a short while, pull
the antenna cable from the card. The lock on the channel will disappear
and the TS file will stop increasing in size. Wait a couple of seconds.
Replug the cable again. You will get a lock on the channel again, but
the TS file will never increase in size agains sinze no PIDS are
filtered.
Tested with kaffeine with DVB-T and DVB-C: Fixes retuning after antenna
was plugged out and back in with DVB-T. Does not fix this with DVB-C,
but also doesn't regress on DVB-C.
Signed-off-by: Henrik Kurelid <henrik@kurelid.se>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Attached is a patch which fixes tuning to low frequency channels with
stb0899+tda8261 cards like the KNC TV-Station DVB-S2.
The cause of the issue was a broken if construct, which should have been
an if/else if, so that the setting for the lowest matching frequency is
applied.
Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz
SR22000 failed most times and when it failed the communication between
driver and tda8261 was completely broken.
This problem disappears with the attached patch.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add new USB ID (1b80:e400) for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U).
The model number on the devices sticker label is "KW-DVB-T 399UR".
Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/
[mchehab@redhat.com: fix a merge conflict]
Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
It seems from other code that it is the dst_type field rather than the
type_flags field that contains values of the form DST_TYPE_IS...
The type_flags field contains values of the form DST_TYPE_HAS...
The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ struct dst_state E; @@
(
*E.type_flags ==
\( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
|
*E.type_flags !=
\( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
)
// </smpl>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds support for Humax/Coex DVB-T USB Stick 2.0 High Speed
which is a very popular tuner sold in Vietnam.
Tested with at least 3 tuners.
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The changeset 0b17d0ed that aded ASUSTeK P7131 Analog were using
7 spaces instead of tab, probably due to some bad cut-and-paste.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
On VIDEO_M52790 and USB_GSPCA_SN9C20X, instead of tab, it were
using 7 whitespaces at the beginning, probably due to some
cut-and-paste trouble.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Patch solves problem of missed keystrokes on some remote controls,
as reported on http://bugzilla.kernel.org/show_bug.cgi?id=9637 .
Signed-off-by: Andrzej Hajda <andrzej.hajda@wp.pl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The card includes Intel ce5039(Zarlink zl10039) tuner
and Intel ce6313 (Zarlink zl10313) demod.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The code from Jan D. Louw with some minor changes.
http://article.gmane.org/gmane.linux.drivers.dvb/38163
Tested with TeVii S630 DVB-S USB card by me (Igor)
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Thanks to Robert P.J. Day for finding this.
Thanks-to: Robert P.J. Day <rpjday@crashcourse.ca>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add support for the remote control that comes with the Cinergy Hybrid T USB XS
Thanks to Jelle de Jong for providing sample hardware to test with.
Cc: Jelle de Jong <jelledejong@powercraft.nl>
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
I updated and simplyfied patch from Zbynek Hrabovsky for recent kernel.
It enables autodetection of card, sound in analog TV , sound in FM radio
and switching between antenna and cable RF input. Radio tuner still
doesn't work, I don't even know how it works. Some guys wrote me that FM
radio works with TV tuner used instead of radio part (symlink video0 ->
radio0).
Cc: Gerd Knorr <kraxel@bytesex.org>
Signed-off-by: Vlastimil Labsky <vlasta.labsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
do_div requires an u64 as the first argument, not a s64.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Use unified lgs8gxx frontend instead of reverse engineered lgs8gl5 frontend.
After this patch, lgs8gl5 frontend could be mark as deprecated.
Future development should base on unified lgs8gxx frontend.
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Error handling code following a kmalloc should free the allocated data.
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
We have support for radio on saa7133/35/31e cards with tda8290/8275(a)
and 5.5MHz ceramic filter on the bridge chips since a while.
It was previously not tested, if this card supports it too, but the old
"ghost" radio with wrong filters doesn't work anymore.
Thanks go to Pham Thanh Nam and Laszlo Kustan for reporting it working
on that input.
Signed-off-by: hermann pitton <hermann-pitton@arcor.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Define correct tuner in config. Radio now works fine
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The structure and comments of the I2C part have been adopted to fit to the
USB part.
Some additional cleanups and precisements have been made to the version
detection and checking functionality to clearly separate HW/SW/FW version.
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch supports i2c interface of si470x. The i2c specific part
exists in radio-si470x-i2c.c file and the common part uses
radio-si470x-common.c file. The '#if defined' is inserted inevitably
because of parts used only si470x usb in the common file.
The current driver version doesn't support the RDS.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The si470x_disconnect_check is function to check disconnect state of
radio in common file. The function is implemented in each interface
file.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch is for using dev_* macro instead of printk.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch is a preceding work to add the i2c interface of si470x.
The si470x directory includes a common file and usb specific file and
header file.
The part unrelated with usb interface and i2c interface exists in
radio-si470x-common.c file, and The usb specific part exists in
radio-si470x-usb.c file.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[tobias.lorenz@gmx.net: Small changes, due to new include "linux/smp_lock.h"]
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds support for the STK7700D USB-DVB-Device.
lsusb identifies it as:
idVendor 0x1164 YUAN High-Tech Development Co., Ltd
idProduct 0x1efc
iProduct 2 STK7700D
The device is build into a Samsung R55-T5500 notebook.
Signed-off-by: Pete Hildebrandt <send2ph@googlemail.com>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Restructure the UVC descriptors parsing code to handle multiple streaming
interfaces. The driver now creates a uvc_video_chain instance for each chain
detected in the UVC control interface descriptors, and tries to register one
video device per streaming endpoint.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As a first step towards multiple streaming interfaces support, reorganize the
driver's data structures to cleanly separate video control and video streaming
data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L2 API (chapter 1.5) states that:
Drivers must implement all input ioctls when the device has one
or more inputs, all output ioctls when the device has one or more outputs.
When the device has any audio inputs or outputs the driver must set the
V4L2_CAP_AUDIO flag in the struct v4l2_capability returned by the
VIDIOC_QUERYCAP ioctl.
So, devices without audio input should return -EINVAL.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There are many lock imbalances in this driver. Fix all found.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There seems to be one superfluos unlock in a poll function. Remove it.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The irq handler will touch memory. Even in the error case some URBs may
complete. Thus no memory must be kfreed before all URBs are killed.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch adds support for Zilog Z8F0811 IR transceiver chips on
CX2341[68] based boards to ir-kbd-i2c for both the old i2c binding model
and the new i2c binding model.
Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch add support to the cx18 driver for setting up the
Z8F0811/Hauppauge IR Tx/Rx chip with the i2c binding model in newer
kernels.
Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch augments the init data passed by bridge drivers to
ir-kbd-i2c, so that the ir_type can be set explicitly, and so
ir-kbd-i2c internal get_key functions can be reused without
requiring symbols from ir-kbd-i2c in the bridge driver.
Signed-off-by: Andy Walls <awalls@radix.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Functions which are referenced by their address can't be inlined by
definition.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The au0828-dvb driver uses bulk usb transfers for digital transport,
but the debug reports, "iso xfer already running!\n".
Fix this to report bulk instead of isoc.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This prevents a loop if a permanent error occurs in usb_set_interface().
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The patches
gspca - vc032x: Add resolution 1280x1024 for sensor mi1310_soc.
gspca - vc032x: Webcam 041e:405b added and mi1310_soc updated.
will make the preview function not work, so I disable the 1280x1024 resolution
and revert back to the origin mi1310_soc settings.
And, using USB snoop tool on Windows to get the correct i2c commands to
turn on/off the LED flash.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* use i2c_w instead of reg_w
* return error on failure
* read the correct number of bytes
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
After the i2c subdev changes the ordering of initialization changed,
causing a total loss of previous GPIO settings and a loss of DTV.
The generic firmware loading routine has now changed to preserve
GPIO values if the device is cx23885 based (safety) and I've
moved the GPIO configuration from probe() into the cx23885 init
func which is a little clearer and fixes the bug.
Tested-by: Sohail Syyed <linuxtv@hubstar.net>
Reviewed-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Even devices without ac97 needs to call analog audio setup function, to
properly set xclk and mute/unmute.
Thanks to Angelo Cano <acano@fastmail.fm> for reporting and testing it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There is no point in defining I2C adapter IDs when no code is using
them. As this field might go away in the future, stop using it when
we don't need to.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Replace printing to magically sized temporary buffer with use
of KERN_CONT for continual printing of eeprom registers dump.
Since deb_info is defined as dprintk, which is conditionally defined
to printk without additional parameters, meaning that deb_info is equivalent
to direct printk (without adding KERN_ facility), we can use KERN_DEBUG and
KERN_CONT in there, eliminating the need for sprintf into temporary buffer
with not easily readable/magical size.
Though it's strange, that deb_info definition uses printk without KERN_
facility and callers don't use it either.
Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Remove the subdev_s_std() method from the GPIO subdev. It appears it was
used in the past to effect the switch back from radio mode to tuner mode,
but it had a side effect that is improper and against the V4L2 spec, when
you were not in radio mode. Whenever the video stanadrd was changed, the
GPIO audio mux was set back to the tuner audio input, even if you were set
to a Line In input.
Thanks to Ravi A. for doing the troubleshooting to point me right to the
problem.
Reported-by: Ravi A <asvravi@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Create card parameters array in SDMC DM1105 driver.
It is useful for cards with the same pci id, but different
tuners, lnb power control circuits, etc.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
At least one MT6227 model crashes when receiving a GET_DEF request on the
video probe control. As the various models can't be told apart based on the
descriptors, add a PROBE_DEF quirk to avoid sending the GET_DEF request and
enable the quirk for all models.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
. added code to print an error message when buffer is too small to hold frame
data, that is better than just a hard crash. Tested using MAX_FRAME_SIZE =
50000, lots of error messages appeared in /var/log/messages but no crash.
. removed line "f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;" in
zr364xx_vidioc_try_fmt_vid_cap, it should not be there.
. changes to improve performance (or at least not hurt it): removed some
unneeded debug messages; added macro FULL_DEBUG to enable debug messages in
performance critical places, this macro is disabled by default; removed "if
(frm->lpvbits == NULL)..." in zr364xx_read_video_callback because after
analisying the source code I concluded it will always results to false, so it
is not needed.
. some small code reorganization.
Signed-off-by: Lamarque V. Souza <lamarque@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch implements changing resolution in zr364xx_vidioc_s_fmt_vid_cap for
zr364xx driver. This version is synced with v4l-dvb as of 20/Jul/2009. Tested
with Creative PC-CAM 880.
OBS: I had to increase MAX_FRAME_SIZE to prevent a hard crash in my notebook
(caps lock blinking) when testing with mplayer, which automatically sets
resolution to the maximum (640x480). Maybe we should add code to auto-detect
frame size to prevent this kind of crash in the future.
Signed-off-by: Lamarque V. Souza <lamarque@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Add CAM presence checkout during CiMax init for NetUP card.
CAM presence checkout is needed after power on PC.
Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In automatic mode every stop event on SDA line ends repetition.
However, in NetUP Dual card on the same i2c bus we have several devices.
If someone using both adapters to lock simultaneously or working with CAM interface
during lock procedure, it lead to end repetition prematurely quite often.
Set stv0900 i2c repeater to manual mode prevents such situation.
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
cx23885: Add support for ATSC/QAM on Hauppauge HVR-1850
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
... improves readability and routes the calls through a specific single point.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The encoder driver has hardcoded GPIO bits set for the HVR1800, regardless
of whether it's being used by a HVR1800 or not. I've implemented some generic
GPIO manipulation routines and I'm calling them only when appropriate.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The dvb-pll code should do the same thing that
alps_tdee4_stv0297_tuner_set_params() was doing. Except the dvb-pll code
will check for tuner presence when attaching, while the old code didn't.
This tuner appears to not be behind the stv0297's I2C gate but is instead
on a different I2C adapter provided by the flexcop chip. The old code
would turn the I2C gate off each time the tuner was used. I've changed it
to turn the gate off when the tuner is attached and then disable the gate
control function. This should result in the gate staying off, which should
be even better.
[hverkuil@xs4all.nl: fix compile error]
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The code in skystar23_samsung_tbdu18132_tuner_set_params() and
samsung_tbmu24112_tuner_set_params() is equivalent to what the dvb-pll code
does. There could be an issue because the dvb-pll code will probe to check
for the tuner, while the previous code didn't do any checks.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The code in samsung_tdtc9251dh0_calc_regs() is equivalent to what dvb-pll's
code does.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
No datasheet, data take from code in flexcop driver. That code rounded
down the divisor rather than rounding to nearest, which was probably not
intentional and the dvb-pll code will round to nearest.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tuner parameters determined from code in flexcop driver. That code rounded
the divisor down instead of to the nearest value. This was probably not
intentional and the dvb-pll version will round to nearest.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tuner parameters taken from flexcop driver. This PLL has a 17 bit divisor
while the dvb-pll driver is designed for 15 bit divisors. It's not a
problem as 15 bits is enough for the tuner's entire range. But if a larger
range was wanted, it could be done by adding additional bands with the
extra divisor bits appearing as band switch bits.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
No datasheet, tuner data comes from code in flexcop driver. This tuner is
also used on the AVerTV 771 supported by the bttv driver, but that code
uses a different tuner configuration, which is surprising.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This patch implements V4L2_CAP_STREAMING for the zr364xx driver, by
converting the driver to use videobuf. This version is synced with v4l-dvb as
of 15/Jul/2009.
Tested with Creative PC-CAM 880.
It basically:
. implements V4L2_CAP_STREAMING using videobuf;
. re-implements V4L2_CAP_READWRITE using videobuf;
. copies cam->udev->product to the card field of the v4l2_capability struct.
That gives more information to the users about the webcam;
. moves the brightness setting code from before requesting a frame (in
read_frame) to the vidioc_s_ctrl ioctl. This way the brightness code is
executed only when the application requests a change in brightness and
not before every frame read;
. comments part of zr364xx_vidioc_try_fmt_vid_cap that says that Skype +
libv4l do not work.
This patch fixes zr364xx for applications such as mplayer,
Kopete+libv4l and Skype+libv4l can make use of the webcam that comes
with zr364xx chip.
Signed-off-by: Lamarque V. Souza <lamarque@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
[mchehab@redhat.com: fix the lack of linux/version.h]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Values for 'pid' range from 0 to 0x1fff. Therefore 'feed->pid' can never
be equal to both 'pid' and 0x2000. This makes the continue statement have
no effect.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
DMX_ADD_PID allows to add multiple PIDs to a transport stream filter
previously set up with DMX_SET_PES_FILTER and output=DMX_OUT_TSDEMUX_TAP.
DMX_REMOVE_PID is used to drop a PID from a filter.
These ioctls are to be used by readers of /dev/dvb/adapterX/demuxY. They
may be called at any time, i.e. before or after the first filter on the
shared file descriptor was started.
They make it possible to record multiple services without the need to de-
or re-multiplex TS packets.
To accomplish this, dmxdev_filter->feed.ts has been converted to a list
of struct dmxdev_feeds, each containing a PID value and a pointer to a
struct dmx_ts_feed.
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
In the past, some devices with saa711x had their parameters controlled
directly inside em28xx driver, instead of using their proper module for
it.
Due to that, the ac97 controls were mixed with saa711x ones.
Older patches removed all saa711x controls, but we still need to control
ac97 devices on em28xx, since we don't have a separate v4l2 device for
it.
The proper way to address is to create a separate ac97 v4l2 device.
While we don't have it, we should clean up the code to allow having a
better view of what is part of em28xx core code and what's due to ac97
control inside it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
As em28xx chip has nothing to do with volume/mute controls, rename those
controls to properly indicate that they control the companion AC97 chip
that it is inside the boards with this chip.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
lgs8gxx: add lgs8g75 demodulator support
Signed-off-by: David T.L. Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
- call a new subdriver function 'isoc_init' before chosing the first
alternate setting.
- call a new subdriver function 'isoc_nego' when submitting the URBs failed.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Only the back sensor (mi1320_soc) is usable.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
My initial change left the AVerMedia UtlraTV 1500MCE card entry out of the
list of cards to check during the probe. This change adds it to the
ivtv_card_list[].
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>