Add break to stop us from following the default failure path even upon success.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Protect refcount changes and modifications to xc2028_list with a mutex.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cast v4l2_std_id variables to unsigned long long so they will printk properly.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix some missing spaces in errors that may be emitted during attach failure.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Issuing register reads as a separate address write and data read transactions
means that other I2C activity could occur in between and state could get out
of sync. Issue both the write and read in a single transaction so that the
i2c layer can prevent other users accessing the bus until we are complete.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The I2C macros have side effects and send_seq could cause a return from
a function with a mutex held. Change them to behave like real functions.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Now we know the zl10353's correct ADC clock, we can calculate the input
frequency registers correctly instead of just blindly setting them.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Issue FSM_GO instead of TUNER_GO if there is no tuner attached to the
secondary i2c bus.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The path to perform a read immediately after a write was not checking that
the address being read from was the same as the one that was written.
Handling this case correctly should mean that we now can handle more than
two i2c messages at a time.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Any i2c read request that was not immediately preceded by a write request was
incorrectly taking the write path. Add the capability to handle individual
read requests.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The i2c master_xfer routine should return a negative result if not all
transfers completed successfully.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Callers to cxusb_ctrl_msg currently do not receive any indication that their
transfer failed. Return the true return code from dvb_usb_generic_{rw,write}.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The saa7134-oss is deprecated for quite some time, it's the only remaining OSS
user outside of sound/oss/, and considering how few and what kind of
soundcards are left supported by OSS I hardly see any use cases left.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If tda827x_config hasn't been defined, exit the function.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The ability to read Hauppauge eeprom's was recently added to saa7134,
so we must build the tveeprom module.
Thanks to Matthias Schwarzott for pointing this out.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The HVR-900 requires the MTS version of the xc3028 firmware in order
to get any sound. The below patch selects this firmware variant on
HVR-900 cards, as well as splitting the HVR-950 into its own entry
(since I don't know if it uses the MTS variant and it will have to be
split off eventually anyway).
Signed-off-by: Aidan Thornton <makosoft@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
TM5600/TM6000 needs clock reset during firmware load. This patch adds the
capability of caling a callback method for this.
Also, avoids uneeded firmware loads.
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Removes uneeded parameters and adds an structure for passing the parameters
This patch is co-authored by Mauro Carvalho Chehab.
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Increased size of dev->eedata from 128 to 256, since the Hauppauge data begins
at byte 128. This has been tested on boards with smaller eeproms, and caused
no problems.
Added comments to distinguish between the various versions of the HVR1110.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
While there's no public API to define audio standard, adds a hack option for
select them. This is needed only for NICAM and A2 firmwares, since AM, BTSC and
EAIJ are already properly handled, on firmware version 2.7.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Make the driver less verbose by default. It adds a debug parameter to make the
driver more verbose.
Also, error messages were using KERN_ERR level, instead of KERN_INFO.
A few printk messages were reviewed to make them more clear.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some tuners, like xc3028, need to print error messages. Instead of declaring
local macros, create a tuner global macro for printing tuner errors.
To preserve CodingStyle on all tuner_macros, a few CodingStyle violations were
fixed at the other macros:
- lines with more than 80 columns
- two statements at the same line
The patch also removes the CodingStyle violation of having emacs declarations
inside de source code (CodingStyle chapter 18).
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Xceive 2028/3028 has a concept of scode/dcode.
Scode is a table of 16 values (each with 12 bytes i2c sequence).
Dcode is the entry of Scode table that should be used, given a certain
frequency.
The idea is that, depending on what frequency is selected, and according with a
country-based (or standard-based?) table, the Xceive should be "hacked" to
fine-tune that specific frequency.
By default, Scode=0 is used, for undefined frequencies. Also, Scode=0 seems to
be the most used value.
This patch adds the capability of selecting a scode. However, extra work will
be needed to allow auto-selecting the proper scode, for a given set of
frequencies.
I'm not sure what would be the proper way for implementing the dcode selection.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Firmware version 2.7 has other firmware types. This patch adds the capability
for the driver to work with those newer types.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adds a new image sensor to the sn9c102 driver.
Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add remote controller support for Leadtek Winfast DTV Dongle based on
DiB7700P, MT2060 and using last drivers (6040:6a79c243aecc), firmware
dvb-usb-dib0700-03-pre1.fw
Signed-off-by: Jaroslav Barton <djaara@djaara.net>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
With the conversion to the vidio_ioctl2, tvnorms array is not required anymore.
Also, removed some code from V4L1 time (VIDEO_MODE_foo), specied at the
non-used video_decoder.h.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There were some vestiges of an old V4L1 I2C driver that were called by em28xx.
This patch removes this dead code, and replaces videodev.h to videodev2.h
Now, this driver doesn't require V4L1 anymore.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Uses the newer ioctl handler at videodev. This patch also cleans up some
bad logic at the driver and do CodingStyle and other cleanups at the
resulting driver.
Also, since VIDIOCMBUF were not working, the V4L1 compat code were removed.
The compat code will eventually be re-inserted, if we find a clean way for
implementing compatibility with the old API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
On some situations, closing an streaming application and re-opening were
returning -EBUSY.
Uses the same locking schema also present on cx88.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Allows shared access support for em28xx. Just one userspace application is
allowed to get stream. The other(s) application(s) can change V4L2 controls,
set video standards, etc.
This patch were splited from Markus Rechberger's tree and backported to 2.6.17
by Pádraig Brady.
The original patch were ported to the latest em28xx version and had CodingStyle
corrected to solve the issues pointed by scripts/checkpatch.pl.
Thanks to Pádraig Brady <P@draigBrady.com> for pointing this.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L: Int if: Set slave's master before attach, remove master argument
The master also now gets its own pointer from slave's structure.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes some needlessly global debug variables static.
opera1.h became so small that I removed it.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the following needlessly global functions in
et61x251_core.c static:
- et61x251_read_reg()
- et61x251_i2c_try_read()
- et61x251_i2c_try_write()
- et61x251_i2c_read()
- et61x251_i2c_write()
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:
- cx8802_init_common()
- cx8802_fini_common()
- cx8802_suspend_common()
- cx8802_resume_common()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>