This board has a s5h1409 demod, plus a xc30x8 tuner (probably, xc3018).
This patch adds proper support for radio, video, s-video, composite and ATSC.
However, support for radio and video depends on having s5h1409 i2c gate open,
otherwise, xc30x8 chip won't be visible.
For a better support, some rework is needed on cx88 driver, to allow adding
xc30x8 to i2c bus without sending i2c 0 byte reading to 0xc2 address.
Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com> for helping to figure
out the proper parameters for s5h1409 and the GPIO pins used by each
configuration.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix use of a non-int (size_t) being passed in a printf width field.
This benign issue has apparently been around for a long time, but went
undetected until now.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Update Kconfig for the hybrid devices recently converted
to use tuner-simple rather than dvb-pll.
dvb-bt8xx no longer uses dvb-pll at all, so remove all
references to dvb-pll within that driver.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are a number of different firmware versions and variants, shipped
together with boards.
This patch adds an extra parameter to the tuner-xc2028 to allow specifying for
an specific firmware name to be loaded. This helps to test for a firmware that
better fits some board.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
allow device-specific configuration of rf agc rf top and if top
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb and saa7134-dvb to use tuner-simple instead of dvb-pll
for Philips TUV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert saa7134-dvb to use tuner-simple instead of dvb-pll for Philips TD1316
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cxusb, cx88-dvb and saa7134-dvb to use tuner-simple instead of
dvb-pll for Philips FMD1216ME
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb, dvb-bt8xx, b2c2-flexcop, cxusb and cx23885 to use
tuner-simple instead of dvb-pll for LG TDVS-H06xF
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert dvb-bt8xx to use tuner-simple instead of dvb-pll for Philips FCV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson FE6600
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Microtune 4042 FI5
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert cx88-dvb to use tuner-simple instead of dvb-pll for Thomson DTT 761X
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add module options to tuner-simple, called "atv_input" and "dtv_input"
to specify which rf input to use on devices with multiple rf inputs.
If the module option is not specified, then the driver will autoselect
the rf input, as per previous behavior.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The video_dev parameter, on tuner-xc2028 were used to pass i2c private data to
tuner_callback. Since the driver already have a pointer to i2c_adap->algo_data,
uses this instead.
This parameter were used also as a magic number to idenfity if two drivers are
trying to register the same xc3028 tuner. This occurs with boards with DVB
support, where both DVB and V4L drivers will share the same tuner.
Instead of using the algo_data as a private number, after this patch, the
driver will use i2c_adap->dev, with seems more consistent.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adds a consistency check to avoid OOPS, if tuner_callback priv argument is
NULL. Also, simplifies callback codes on cx88.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The ISL6405 LNB supply is used on several Creatix / Medion cards. But only
the MD8800 needs its second section. So don't start it unless it is needed.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch fixes reported problems when trying to add a 9th device into a
system.
Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Tuner refactoring broke support of tuners with LNA configurations 1 and 2
for both, analog TV and DVB-T.
Additionally, this patch initializes the saa713x gpios defined by the gpiomask
at driver init to avoid undefined stated at dvb.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are some restrictions:
- The 2nd DVB-S section will only work if the 1st is configured for DVB-S too.
so "options saa7134-dvb use_frontend=0,1" won't work.
- Currently it is not possible to set the higher LNB supply voltages, so
14V instead of 13V in the 2nd section.
- It is not possibe to turn off the 2nd LNB supply independently.
This comes from the problem that the 2nd section can't access the i2c interface
of the LNB supply chip.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In the case of an access error to the high latency registers of
the audio DSP, the interface needs to be cleared, otherwise a cascade
of errors occurs.
This patch is closely modeled after a proposal by Mirek Slugen
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
TUNER_PHILIPS_ATSC is an ambiguous name for a tuner. Rename it to
TUNER_PHILIPS_FCV1236D to be more descriptive.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We currently do not have a method to enable instance staring if i2c adapter
is NULL, in the cases of dvb demods that write to the tuner directly using
calc_regs. Prevent possible wrong instance sharing for these cases until
a better solution can be found.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
flags used for spinlocks don't need to be initialized, except where the
compiler has no way to see, that the spin_unlock_irqrestore is only called
if the spin_lock_irqsave has been called before. Local variable
initialization doesn't have to be protected.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Make the dev member of the struct videobuf_queue of type "struct device *"
to avoid future problems. Also change the prototype of the
videobuf_queue_core_init() function.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
tuner-xc2028 needs to know when a DVB module is sharing the same analog tuner.
This is done by comparing a magic number that needs to be the same on analog
and on digital. To make easier, this magic number is a pointer to some data
struct.
With the previous code, two different pointers were using, causing a
miss-detection.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The dev element of the struct videobuf_queue is now of type struct device
implicitly. Fix left-over casts.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
TV reception ok. S-video and Composite not tested. Audio not tested.
IR not implemented yet.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
I have what looks like a Geovision GV-600 (or 650) card. It has a large
chip in the middle labeled
CONEXANT
FUSION 878A
25878-13
E345881.1
0312 TAIWAN
It has an audio connector coming out from a chip labeled
ATMEL
0242
AT89C2051-24PI
It is identified as follows on my Debian GNU/Linux Etch (kernel 2.6.18)
...
01:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:0a.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
...
01:0a.0 0400: 109e:036e (rev 11)
Subsystem: 008a:763c
Flags: bus master, medium devsel, latency 64, IRQ 58
Memory at dfffe000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2
01:0a.1 0480: 109e:0878 (rev 11)
Subsystem: 008a:763c
Flags: bus master, medium devsel, latency 64, IRQ 58
Memory at dffff000 (32-bit, prefetchable) [size=4K]
Capabilities: [44] Vital Product Data
Capabilities: [4c] Power Management version 2
It was being detected as a GENERIC UNKNOWN CARD both by the 2.6.18
kernel and the latest v4l-dvb drivers, but it did not work at all. The
card has sixteen (16) BNC video inputs, four of them on the board itself
and twelve on three daughter-cards. It has a single bt878 chip, no tuner
and what looks like and audio input. After doing some research I managed
to get only eight channels working by forcing card=125 and those DID NOT
match channels 0-7 on the card, and no audio.
Based on what was working for card=125, I added the card definition
block, added a specific muxsel routine and got the card working fully
with xawtv, where the sixteen channels show up as Composite0 to
Composite15, matching the channel labels in the card and daughter-cards.
I have made no efforts yet to get audio working, but would appreciate
any pointers.
Signed-off-by: Ernesto Hernández-Novich <emhn@usb.ve>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
poll_one allocated on stack struct poll_wqueues which is pretty big
structure (>500 bytes on x86_64). v4l1_compat_sync invokes poll_one
in a loop, so allocate struct poll_wqueues in v4l1_compat_sync (with
kmalloc) and pass it to poll_one.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
v4l_compat_translate_ioctl used 1376 bytes of stack (x86_64),
so split this 800 lines long function into ~20 small noinline functions;
the biggest function takes now 712 bytes (v4l1_compat_sync)
fix VIDIOCSWIN handler which printked wrong errors
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
fix most coding style violations found by checkpatch
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
simple_dvb_configure returns the actual tuned frequency to its caller, so
it must be declared as a u32 rather than an int. As a result, we will
return 0 to indicate a failure.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Enable digital tuning support within tuner-simple. This will allow for a
single tuner module to manage the hardware, without having dvb-pll loaded.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
if (priv->i2c_props.adap == NULL) then exit any function that would
send commands over the i2c bus. We allow drivers to attach without an
i2c adapter for cases where the dvb demod accesses the tuner directly
via calc_regs.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add entry points used for digital tuning via the dvb_frontend.
Share state data between multiple instances of the driver for hybrid
tuners.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert tda9887 to use the new hybrid_tuner_request_state and
hybrid_tuner_release_state macros to manage state sharing between
hybrid tuner instances.
Some ATSC/DVB cards need to put the analog demodulator into standby
before tuning digital. This patch allows us to attach the tda9887
driver to the digital side of the bridge driver and be able to put
it into standby without jeopardizing the analog demod driver's state.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The 6.5 MHz carrier was interpreted as SECAM-L even if SECAM-D/K was
selected.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are two tuner types: those for M/N standards and those for all others.
However, M/N standards are not always 60 Hz (PAL-N/Nc are 50 Hz), so rename
the module option accordingly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Allow options like pal=bgh, improve description of those options.
Add tunerhz option: 50=card has 50Hz tuner, 60=card has 60Hz tuner.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The q_io queue was never taken into account by the poll function. Thanks to
Andy Walls for finding this bug.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Improve hardware parameter negotiation between the camera host driver and
camera drivers. Parameters like horizontal and vertical synchronisation,
pixel clock polarity shall be set depending on capabilities of the
parties.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This saves an initialization and a comparison.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If dvb_attach fails, dev->dvb.frontend is NULL. This will produce an OOPS, as
reported.
Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 driver normally picks up the default video standard from the
eeprom on Hauppauge devices, but the OnAir HDTV and OnAir Creator are not
Hauppauge devices, and do not store this information in any eeprom.
These devices support NTSC/ATSC, so we should use NTSC by default when in
analog mode.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This change significantly rearranges pvr2_context level initialization
and operation:
1. A new kernel thread is set up for management of the context.
2. Destruction of the pvr2_context instance is moved into the kernel
thread. No other context is able to remove the instance; doing
this simplifies lock handling.
3. The callback into pvrusb2-main, which is used to trigger
initialization of each interface, is now issued from this kernel
thread. Previously it had been indirectly issued out of the work
queue thread in pvr2_hdw, which led to deadlock issues if the
interface needed to change a control setting (which in turn
requires dispatch of another work queue entry).
4. Callbacks into the interfaces (via the pvr2_channel structure) are
now issued strictly from this thread. The net result of this is
that such callback functions can now also safely operate driver
controls without deadlocking the work queue. (At the moment this
is not actually a problem, but I'm anticipating issues with this in
the future).
5. There is no longer any need for anyone to enter / exit the
pvr2_context structure. Implementation of the kernel thread here
allows this all to be internal now, simplifying other logic.
6. A very very longstanding issue involving a mutex deadlock between
the pvrusb2 driver and v4l should now be solved. The deadlock
involved the pvr2_context mutex and a globals-protecting mutex in
v4l. During initialization the driver would take the pvr2_context
mutex first then the v4l2 interface would register with v4l and
implicitly take the v4l mutex. Later when v4l would call back into
the driver, the two mutexes could possibly be taken in the opposite
order, a situation that can lead to deadlock. In practice this
really wasn't an issue unless a v4l app tried to start VERY early
after the driver appeared. However it still needed to be solved,
and with the use of the kernel thread relieving need for
pvr2_context mutex, the problem should be finally solved.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 tear-down logic was clearing two timers before stopping
its internal work queue. That left a tiny window open where the work
queue might run after the timers are stopped, possibly starting them
again. This could lead to dangling pointers and an oops. Solution:
Kill the work queue first, then delete the timers.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There is a callback that is issued to into pvr2_context from pvr2_hdw
after initialization is done. There was a probability that this
callback could get missed. Fixed.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Buffer size for printing pvrusb2 video standard strings was too small
before. This is cosmetic; the printing logic is not able to overrun a
too-short buffer.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 driver dynamically generates an enumeration of support
video standard combinations based on which video standard bits are
set. ATSC modes don't fall into this since they are by nature not
analog. The pvrusb2 driver has been warning about an inability to
classify ATSC standards. This change causes the classification
algorithm to ignore any ATSC standards (such things are better handled
elsewhere anyway).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 driver has used hardcoded logic to control the LED on the
device. However this is really Hauppauge-specific behavior. This
change defines a new device attribute for LED control and sets things
up appropriately for Hauppauge devices.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Most of this originates from Michael Krufky <mkrufky@linuxtv.org>;
these changes move LED control into separate functions. This is the
first step in new work to make LED control a device-specific attribute.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The encoder is not a part of the pipeline when in digital mode, so
streaming is OK in this case even when the encoder's firmware is not
loaded. Modify the driver core handling of this scenario to permit
streaming.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This is a major pvrusb2 change. The driver core has an algorithm that
is used to cleanly sequence the changes needed to enable / disable
video streaming. The algorithm had originally been written for analog
streaming, but when in digital mode the pipeline is considerably
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Unlike analog control, control of the digital side is not nearly as
uniform among different devices. So we have to specify the correct
digital control scheme as a new device attribute.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This code is actually part of a larger set from Mike Krufky
<mkrufky@linuxtv.org>, to support ATSC streaming from within the
pvrusb2 driver. More to come...
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Call pvr2_hdw_cmd_powerdown to power down the device
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>
Previously the pvrusb2 driver just started with the default input to
be "television". But if the device doesn't support an analog tuner
then this default must be different. New logic here selects a
reasonable default based on the actual valid set of available inputs.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
When an enumeration control is changed, the pvrusb2 driver assumed
that the enumeration values were continuous. That is no longer true;
this change allows for properly input validation even when not all
enumeration values are legal (which can happen with input selection
based on what the hardware supports).
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Now that the pvrusb2 driver can dynamically choose which inputs to
make available depending on the hardware, the enumeration of input
choices is no longer a contiguous range of integers. Unfortunately
this causes a problem in the v4l2 implementation since the input
enumeration requires continuity in the API. This change implements a
mapping in order to preserve the v4l2 interface requirement.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The v4l2 implementation in pvru2b2 must produce a sane answer when
asked, when the input choice is set to dtv.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This follows from defining the available inputs as device attributes.
This change causes the driver to adjust its list of inputs based on
those attributes. Now, for example, the FM radio will appear as a
choice only if the hardware supports an FM radio.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Different devices support different input types. Up until now we've
really been assuming that everyone has an analog tuner, an FM radio,
composite, and s-video inputs. But as we add other devices, these
assumptions are no longer true. The way to deal with this is to
define the available inputs as additional device attributes, so that
the driver can adjust its internal behavior accordingly.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The PixelView PlayTV card definition structure was missing initialization of
the tuner_addr and radio_addr fields. As a result it was impossible to have the
tuner initialized using parameters specified while loading the bttv.ko module.
This regression became visible after the v4l rearrangements introduced
somewhere around 2.6.15 kernel version.
The root cause for the tuner initialization failure is located in the
attach_inform function in the bttv-i2c.c file.
There at the very beginning the addr variable holding the tuner device address
is initialized with the value taken from the bttv_tvcards array.
For the PixelView PlayTV card the tuner address field (and the radio address as
well) was uninitialized, and thus equal 0. Later in that function execution of
the TUNER_SET_TYPE_ADDR tuner command is guarded with check for the tuner
address either equal ADDR_UNSET, or client->addr.
Since both are non-zero (the latter in case of the card owned by me at the
runtime is equal 0x61) the TUNER_SET_TYPE_ADDR command is not executed, and
consequently in the tuner_attach function in the tuner-core.c file call to
i2c_attach_client does not result in assigning the tuner type variable with the
requested value.
Providing initialization of the tuner_addr and radio_addr with ADDR_UNSET
values as it is already done for other tv cards defined in bttv-cards.c ensures
that the tuner initialization is done correctly, just as it used to be in the
2.6.14 kernel.
Signed-off-by: Wojciech Migda <wojtek.golf@interia.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix GPIO for FusionHDTV 7 Gold tv / s-video / composite input selection.
Fix card textual name to match other FusionHDTV device names.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ir_probe allocated struct i2c_client on stack;
it's pretty big structure, so allocate it with kzalloc
make checkstack output without this patch:
x059d ir_probe [ir-kbd-i2c]: 1000
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Avoid a deadlock where DQBUF is holding the vb_lock while waiting on a QBUF
which also needs the vb_lock. Reported by Hans Verkuil <hverkuil@xs4all.nl>.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Only attach cameras to the host interface for probing, then detach until
open. This allows platforms with several cameras on an interface,
physically supporting only one camera, to handle multiple cameras and
activate them selectively after initial probing. The first attach during
probe is needed to activate the host interface to be able to physically
communicate with cameras.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/dabusb.c:208:6: warning: symbol 'buffers' shadows an earlier one
drivers/media/video/dabusb.c:63:12: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
With this gpio, audio works properly.
Thanks to Daniel Fraga <fragabr@gmail.com> for helping on fixing the code for
Powerangel Real board.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This callback is specific to pci_nano, since supports only dvb. Renames it
to avoid future mistakes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds support for the following saa7134 xc3028 based boards:
132 -> AVerMedia Cardbus TV/Radio (E506R) [1461:f436]
133 -> AVerMedia Hybrid TV/Radio (A16D) [1461:f936]
134 -> Avermedia M115 [1461:a836]
135 -> Compro VideoMate T750 [185b:c900]
This is based on a original patch thanks to Markus Rechberger that added xc3028
gpio init code for the above boards.
This patch moves saa7134_tuner_callback to saa7134-cards, originally used only
by tda8290 DVB-S boards. The callback was made more generic to support other
tuners.
Currently, it supports both tda8290 and xc2028/xc3028 tuners. Added also the
basis for xc5000 tuner callback.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Only tm6000 needs to be aware when a frequency is being changed. This seems
to improve channel change detection. Other bridges don't need this.
So, better to discard any errors if this fails, and proceed changing the
channels.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It seems that on this board, the demodulator provides the pullup on the I2C
bus, which means that calling i2c_gate_ctrl crashes the bus. Turn this off
and the xc3028 can talk OK. Also fix some GPIO related settings that
became more clear through working on this.
Some changes made by Mauro Chehab to allow merging it with some
other xc3028 patches.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add support for tuning DVB-T channels on DViCO's FusionHDTV DVB-T Pro board.
The IR remote and analog tuner are not supported at this time.
Some changes made by Mauro Chehab to allow merging it with some other xc3028
patches.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch ports a patch from Markus Rechberger to work with tuner-xc2028.
It adds entries for several cx88 boards with xc2038/3028 tuners.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
load ir-kbd-i2c for IR remote control support on DViCO FusionHDTV 5 PCI nano
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
ATSC is known to work.
SVideo / Composite should work (I have no cable to test).
Analog tuner support does not work.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch addresses most issues pointed out by Russell and Erik, moves
recently introduced into pxa-regs.h camera-specific defines into
pxa_camera.c, removes dummy power-management functions, improves
function-naming, etc.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Only advertise pixel formats, that we actually can support in the
present configuration.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Received written ack from the dabusb author
that the firmware is BSD licensed.
As bonus clarify copyright holder.
Signed-off-by: maximilian attems <max@stro.at>
Acked-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The DMA timeout timer was started once for each set of DMA transfers,
but it should be started for each single DMA transfer.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
CROPCAP suggests that video capture supports cropping, but this is not the
case.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The existing yuv code limits output to the display area occupied by the
framebuffer. This patch allows the yuv output to be 'detached' via
V4L2_FBUF_FLAG_OVERLAY.
By default, the yuv output window will be restricted to the framebuffer
dimensions and the output position is relative to the top left corner of the
framebuffer. This matches the behaviour of previous versions.
If V4L2_FBUF_FLAG_OVERLAY is cleared, the yuv output will no longer be linked
to the framebuffer. The maximum dimensions are either 720x576 or 720x480
depending on the current broadcast standard, with the output position
relative to the top left corner of the display. The framebuffer itself can be
resized, moved and panned without affecting the yuv output.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The i2c driver code was once added for the out-of-tree ivtv driver,
but the ivtv driver hasn't used that for a long time so this code can
now be removed.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the needlessly global stk_camera_{suspend,resume}()
static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
simple_set_tv() creates a buffer with 4 elements, and calls
simple_std_setup(), passing &buffer[1]. This makes the 5th element of buffer to
be initialized to 0, overriding some area outside the buffer.
Also, simple_std_setup() receives a buffer as parameter, but the buffer is
just overriden after the call, so, it doesn't make much sense to pass it as a
parameter.
This patch removes buffer[] from the function call, creating, instead, a local
var to be used internally.
Thanks to Axel Rometsch <axel.rometsch@freenet.de> for pointing the issue.
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The I2C bus interface of the LNB supply sits behind the i2c gate of the
tda10086, so wrappers were necessary for the set_voltage functions.
For the time being, the board will show up as MD8800
Many thanks to Hermann Pitton for his help
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Support is not complete yet and untested.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Both camera drivers can function without GPIO support, in which case they
will only support the 10 bit data width mode. But the two respective switch
have to depend on CONFIG_GENERIC_GPIO. Additionally remove redundant
gpio_is_valid tests - they are repeated in bus_switch_request() functions.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Upon suggestion by David Brownell use a gpio_is_valid() predicate
instead of an explicit NO_GPIO macro. The respective patch to
include/asm-generic/gpio.h has been accepted upstream.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Continue to support the V4L2_CID_PRIVATE_BASE + 1 control in the ABI
- Report the same control as V4L2_CID_SHARPNESS
- Report the private control disabled via QUERYCTRL
Signed-off-by: Brandon Philips <bphilips@suse.de>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some dvb demodulators access the tuner directly without using i2c.
In these cases, i2c_adap may be NULL. This patch fixes
hybrid_tuner_request_state to allow for NULL i2c_adapters.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds a driver for the Quick Capture Interface on the PXA270.
It is based on the original driver from Intel, but has been re-worked
multiple times since then, now it also supports the V4L2 API. This patch
depends on a complementary patch, submitted to the ARM tree, providing
PXA270 camera platform bindings.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This driver provides an interface between platform-specific camera
busses and camera devices. It should be used if the camera is connected
not over a "proper" bus like PCI or USB, but over a special bus, like,
for example, the Quick Capture interface on PXA270 SoCs. Later it should
also be used for i.MX31 SoCs from Freescale. It can handle multiple
cameras and / or multiple busses, which can be used, e.g., in
stereo-vision applications.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Assign the number of instances remaining as the return value of
hybrid_tuner_release_state, in case there is any extra cleanup that
the tuner driver needs to do after an instance has been destroyed.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Store a pointer to the device name in the name field of
struct tuner_i2c_props, so that we can remove the
printk macros defined in tuner-i2c.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Create a macro implementing a standard method to share state amongst
multiple instances of a hybrid tuner object.
Also, prepare tuner_foo printk macros for the removal of PREFIX
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
I'd prefer to leave this here, but official CodingStyle
doesn't care what I think :-/
Remove the emacs format override block to comply with Kernel CodingStyle.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move the switch..case blocks with device-specific code from functions
simple_set_tv_freq and simple_set_radio_freq
...into three new functions:
simple_std_setup, simple_post_tune and simple_radio_bandswitch
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If simple_tuner_attach fails, set t->type to TUNER_ABSENT,
set t->mode_mask to T_UNINITIALIZED, and exit the set_type function.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch fully removes the dependency of tuner-core on
tuner-types.
There is no longer any need to pass struct tunertype in attach-time
config structure - instead pass the tuner type ID.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move tuner type ID check from tuner-core::set_type to simple_tuner_attach.
Since tuner-core forwards all attach requests to tuner-simple as the
default case, unless a specific attach function is specified in
set_type, this change is an appropriate cleanup.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
tuner-types is needed for tuner-simple, and does not need to be bound
to tuner-core. Any caller of tuner-simple, including tuner-core, needs
to pass a structure from tuner-types into tuner-simple at attach-time.
Export the two needed symbols from tuner-types for now, so that card-level
drivers can attach tuner-simple for hybrid dvb_frontend devices. We will
remove this dependency altogether as tuner refactoring phase 3 progresses.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
fix debug in simple_config_lookup to display frequency in MHz
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move some reuseable code out of simple_set_tv_freq into separate functions.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
dump_firm_type_and_int_freq() can become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the following needlessly global functions static:
- ivtv_yuv_next_free()
- ivtv_yuv_setup_frame()
- ivtv_yuv_udma_frame()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
free_irq() calls synchronize_irq() for you, so there is no need for
drivers to manually do the same thing (again). Thus, calls where
sync-irq immediately precedes free-irq can be simplified.
However, during this audit several bugs were noticed, where free-irq is
preceded by a "irq >= 0" check... but the sync-irq call is not covered
by the same check.
So, where sync-irq could not be eliminated completely, the missing check
was added.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial: (24 commits)
DOC: A couple corrections and clarifications in USB doc.
Generate a slightly more informative error msg for bad HZ
fix typo "is" -> "if" in Makefile
ext*: spelling fix prefered -> preferred
DOCUMENTATION: Use newer DEFINE_SPINLOCK macro in docs.
KEYS: Fix the comment to match the file name in rxrpc-type.h.
RAID: remove trailing space from printk line
DMA engine: typo fixes
Remove unused MAX_NODES_SHIFT
MAINTAINERS: Clarify access to OCFS2 development mailing list.
V4L: Storage class should be before const qualifier (sn9c102)
V4L: Storage class should be before const qualifier
sonypi: Storage class should be before const qualifier
intel_menlow: Storage class should be before const qualifier
DVB: Storage class should be before const qualifier
arm: Storage class should be before const qualifier
ALSA: Storage class should be before const qualifier
acpi: Storage class should be before const qualifier
firmware_sample_driver.c: fix coding style
MAINTAINERS: Add ati_remote2 driver
...
Fixed up trivial conflicts in firmware_sample_driver.c
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: Jesper Juhl <jesper.juhl@gmail.com>
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: Jesper Juhl <jesper.juhl@gmail.com>
None of these files use any of the functionality promised by
asm/semaphore.h. It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Fix broken build due to patch order dependency. A future patch requires
the lines that break the current build. Disable those lines for now.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'pci_id_updates' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (7497): pvrusb2: add new usb pid for 73xxx models
V4L/DVB (7496): pvrusb2: add new usb pid for 75xxx models
Now that it's in an own module it needs a MODULE_LICENSE.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Avoid minor model number warning when an OEM HVR1250 board is detected.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
On some models, the valid Hauppauge eeprom data begins at a different offset.
This patch avoid unfriendly 'corrupt' eeprom errors during driver load.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This reduces the memory footprint and removes the need to
manually configure each map, which lead to a bug where
the Fusion EXP 5 board broke for a while.
This also fixes digital support again for
the DViCO FusionHDTV5Express.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
We should check for proper index first
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
A number of the radio tuner ioctl functions are shared with the TV
tuner, these functions require a struct bttv_fh data structure to be
allocated and initialized.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are possible NULL pointer derefs in case of kzalloc fails so fix them.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In commit e6bafba5b4, a bug was fixed that
involved converting !x & y to !(x & y). The code below shows the same
pattern, and thus should perhaps be fixed in the same way.
This is not tested and clearly changes the semantics, so it is only
something to consider.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@ expression E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If a dma transfer is attempted for either yuv or framebuffer output, a missing
sg_init_table() call causes a kernel BUG in scatterlist.h if CONFIG_DEBUG_SG
is set.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are several parts of saa7134_board_init2() that calls tuner modules. We
should first load tuner, otherwise, the commands will fail.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch fixes the following compile error with
VIDEO_VIVI=y, VIDEO_DEV=m reported by Toralf Förster:
<-- snip -->
...
LD .tmp_vmlinux1
drivers/built-in.o: In function `vivi_release':
vivi.c:(.text+0x322f5): undefined reference to `video_unregister_device'
vivi.c:(.text+0x32337): undefined reference to `video_device_release'
drivers/built-in.o: In function `vivi_open':
vivi.c:(.text+0x32845): undefined reference to `v4l2_type_names'
drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1d20): undefined reference to `video_device_alloc'
vivi.c:(.init.text+0x1d48): undefined reference to `video_register_device'
drivers/built-in.o:(.rodata+0x1b40): undefined reference to
`video_ioctl2'drivers/built-in.o:(.data+0x140c): undefined reference to
`video_device_release'
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
As the result of a previous change that delayed the loading of the firmware,
the driver can sometimes report a bogus error regarding the yuv output filter
table not being found in the firmware. This patch moves the filter table
check to ensure it's only done after the firmware has been loaded.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
fixes sparse warning:
drivers/media/video/bt8xx/bttv-driver.c:3391:3: warning: Initializer entry defined twice
drivers/media/video/bt8xx/bttv-driver.c:3392:3: also defined here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This also has some coding style fixes.
Signed-off-by: Yuri Funduryan <yurifun@mail.ru>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Reviewed-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Thanks to Martin Michlmayr <tbm@cyrius.com> for reporting this issue:
The zoran driver fails to compile on the ARM Orion platform with:
In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric
constant
The reason is that drivers/media/video/zoran.h defines an enum with
GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in
include/asm-arm/arch-orion/orion.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There was a possible race condition in the increment/decrement of
the active device references counter.
Thanks to Trent Piepho (xyzzy@speakeasy.org) for bringing it up.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (e84619b174), missed
the line which set the appropriate overlay crop structure in the newly
allocated bttv_buffer. This then causes a divide error in the
bttv_calc_geo function.
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It currently isn't possible to open the frontend device of cx88-mpeg devices
(DVB or Blackbird) multiple times concurrently. (for instance, to attach a
signal monitoring tool while reading a stream, or to send a frequency change
ioctl) This patch fixes that condition.
Signed-off-by: Roland Stoll <roland@xindex.de>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Do away with the need to set tuner=63 on cx88xx with recent HVR-1300 boards
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some cards need the diseqc signal modulated, while some just need
the envelope to control the LNB supply.
This fixes Bug 9887
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
em28xx driver is capable of handling more than one usb device. However, isoc
transfers require a large amount of data to be transfered.
Before this patch, just one em28xx board were enough to allocate more than 50%
URBs:
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8
B: Alloc=480/800 us (60%), #Int= 0, #Iso= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
So, only one board could use an USB host at the same time. After the patch, it
is possible to use more than one em28xx at the same time, on the same usb host,
if the image size is slower or equal to 345600, since those images will
require about 30% of the URBs:
T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 8
B: Alloc=232/800 us (29%), #Int= 0, #Iso= 2
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
So, in thesis, after the patch, it would be possible to use up to 3 boards by
each usb host, if the devices are generating small images.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Improves audio configurations on em28xx:
- mutes audio before changing amux;
- adds a delay after setting audio src;
- waits up to 50ms for ac97 busy.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:276: warning: 'no_ac97' may be used uninitialized in this function
This looks like a genuine bug to me.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
'!' has a higher priority than '&': bitanding has no effect.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
videobuf functions at close() method already locks videobuf. It makes no sense
to keep the locking at empress close() method.
There is also a lock at open() method. I'm not sure if it is safe to remove the
locking there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the following needlessly global functions static:
- em28xx-core.c:em28xx_write_reg_bits()
- em28xx-video.c:em28xx_vdev_init()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the following needlessly global functions static:
- stk_sensor_outb()
- stk_sensor_inb()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
stk_camera_cleanup() can become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
tuner_list can become static - and it's anyway a way too generic name
for a global variable - see commit b00ef4b8d8
for a completely different global variable of the same name I just made
static...
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
saa7134-dvb: add missing dvb_attach around tda10046_attach
This patch adds a possibly missing dvb_attach for tda10046_attach.
This removes the hard dependency of saa7134-dvb on tda1004x module.
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch does fix potential NULL pointer dereference
due to logical typo error.
The issue is pointed out by
Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
CC: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Thanks to Angelo Lisco for his initial patch we missed and to
Ahmet Dogan Ugurel confirming such a device functional.
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>
This adds support for analog inputs and DVB-T.
Good sensitivity for DVB-T currently needs to use analog TV first.
DVB-S support is not yet completed, but is on the way.
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>
It also enumerates now the separate composite input at first
and adds mute ability to radio and external audio-in.
Many thanks to Daftcho Tabakov for reporting the flaws and testing.
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>
S-Video is unconfirmed, but likely correct.
The remote is not yet investigated.
Thanks go to Sioux for providing code and asking to fix the auto
detection.
Signed-off-by: sioux <sioux_it@libero.it>
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>
As pointed by Adrian Bunk, with I2C=m and VIDEO_DEV=y, videodev brokes.
This patch moves the functions that videodev needs from v4l2-common. It also
fixes some Kconfig changes.
After this patch, I2C=m / VIDEO_DEV=y will make v4l2 core statically linked
into kernel. v4l2-common will be m, and all V4L drivers will also be m.
This approach is very conservative, since it is possible to have V4L drivers
that don't need I2C or v4l2-common. The better is to map what drivers really
need v4l2-common, making them to select v4l2-common, and allowing the others to
be 'y', 'm' and 'n'.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch contains the scheduled removal of OSS drivers whose config
options have been removed in 2.6.23.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>