summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tea5767.c
AgeCommit message (Collapse)Author
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-11-01tea5767: remove unnecessary warningHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-11-04tuner: convert to bus-based I2C APIHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-10-19Add support for changing TEA5767_PLLREF_ENABLE via configMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-18Adds the capability of configuring tea5767 supportMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> tea5767 has several possible configurations. Before the patch, the driver were assuming the more common configuration. However, some newer cards, like MSI @nyware Master requires other configurations, like de-activating a gpio port and changing chip Xtal. This patch adds the capability of altering device configuration at runtime. This may also be used later to activate some features like auto-mute when signal is weak. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-31tea5767: add get_rf_strength and improve status reading efficiencyMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-08-27tea5767: convert from tuner sub-driver into dvb_frontend moduleMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Mike Isely <isely@pobox.com> Acked-by: Steven Toth <stoth@hauppauge.com> Acked-by: Patrick Boettcher <pb@linuxtv.org> Acked-by: Jarod Wilson <jwilson@redhat.com>
2007-08-21tuner: kill i2c_client interface to tuner sub-driversMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> To ease the conversion of the analog tuner sub-drivers into dvb_frontend style tuner modules, we must remove the i2c_client interface. dvb_frontend style tuner modules use i2c_transfer directly on the i2c_adapter. This change only alters the interface between tuner.ko and the tuner sub-drivers. The v4l2 / i2c_client interface to tuner.ko remains intact. This patch adds inline functions tuner_i2c_xfer_send, and tuner_i2c_xfer_recv, to replace i2c_master_send and i2c_master_recv inside the tuner sub-drivers. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Mike Isely <isely@pobox.com> Acked-by: Steven Toth <stoth@hauppauge.com> Acked-by: Patrick Boettcher <pb@linuxtv.org> Acked-by: Jarod Wilson <jwilson@redhat.com> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2007-08-21tuner: fix header file includes orderMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> kernel headers go above subsystem headers Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-06-26tuner: remove hardware-specific info from public headerMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Move internal structures and debug macros to drivers/media/video/tuner-driver.h Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-06-06tea5767: store tuning operations in tuner_operations structureMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Create static struct tuner_operations tea5767_tuner_ops for tea5767 tuning function callback pointers Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-06-06tuner: create struct tuner_operationsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Move tuner callback function pointers out of struct tuner, into struct tuner_operations. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-04-11Since we are not using CVS, $Id makes no sense anymoreMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-03Change all emails to the currently used one.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-15Separate tv & radio freqs, fix cb/freq transmit order for tuners that need this.Hans Verkuil
- Moved MSP_SET_MATRIX to v4l2-common.h - Fix typos and integer overflows in tea5767.c - Split old freq field into a tv_freq and a radio_freq. Prevents that a radio tuner is initialized with a tv frequency or vice versa. - When switching to radio mode initialize the tuner with the last used radio frequency (this was already done for the TV mode). As a result of these changes the tuner module now remembers the last set radio and TV frequencies, which is what you would expect to happen. - Move out of range frequencies to the closest valid frequency as per v4l2 API spec. - Fix incorrect initial radio frequency (multiplier is 16000, not 16) - Add boundary check for out of range frequencies. - Use new flag to check if the order of the CB and freq. depends on the last set frequency. That is needed for some tuners or you can get static as a result. The flag is added for those tuners where I know that the datasheet indicates that this is necessary. - For this new check use the last set div value, not the last frequency as radio frequencies are always much higher due to the 16000 multiplier. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-11Fixes some bad global variablesHans Verkuil
- debug global var is already used inside kernel, so renamed debug to tuner_debug for the tuner module Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-02convert diagnostics over to the new v4l2-common.h macros.Hans Verkuil
- convert diagnostics over to the new v4l2-common.h macros. - deprecated tuner_debug option, the new option is debug. - renamed cx25840_debug to debug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-28tea5767: move signal strength level to the 0-65535 rangeHans Verkuil
- Move signal strength level to the 0-65535 range as per V4L2 spec. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2005-12-25replace <media/i2c-compat.h> with "i2c-compat.h"Michael Krufky
-#include <media/i2c-compat.h> +#include "i2c-compat.h" Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-12-11Makes v4l compile under 2.4 kernelsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> kernel-sync - Makes V4L compile with kernel 2.4 - em28xx doesn't compile with 2.4 kernels. Additional work is necessary to make it compile. Thanks-to: Stefan Leichter <Stefan.Leichter@camLine.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-10-16- Whitespace Cleanups.Mauro Carvalho Chehab
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-08-17 * cx88-dvb.c: (lgdt330x_pll_set):Nickolay V. Shmyrev
* cx88-video.c: (video_release): * mt20xx.c: (microtune_init): * saa7134-video.c: (video_release): * tda8290.c: (standby), (tda8290_init): * tda9887.c: (tda9887_set_tvnorm), (tda9887_configure), (tda9887_command): * tea5767.c: (set_radio_freq), (tea5767_standby), (tea5767_tuner_init): * tuner-core.c: (set_addr), (check_mode), (set_mode), (tuner_command): * tuner-simple.c: (default_tuner_init): * tuner.h: - New tuner standby API.
2005-08-01 - tea5767 autodetection fixed.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-31Removed #if 1 from newer tea5767 code.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-27Renamed tuner #64. Cleaned Whitespace.Michael Krufky
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-07-27- tea5767_autodetection improved.Mauro Carvalho Chehab
Newer code works with CX88. Should be tested with other chipsets tea5767_tuner_init doesn't probe tuner anymore, allowing forcing tuner to 5767. - Debug messages simplified to allow printing on one 80 char line at newer I2C Recv option. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-27 - Add new parameter to help identify radio chipsets:Mauro Carvalho Chehab
show_i2c=1 will show 16 reading bytes from detected tuners. * tea5767.c: - Improved autodetection code commented. Sometimes, it doesn't work. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-26 - tea5767_autodetection improved. It requires more testing.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-15 - linux/version.h removed at linux-2.6.13-rc3-mm1.Mauro Carvalho Chehab
- Removed remaining trailing spaces. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-14 * tea5767.c:Mauro Carvalho Chehab
- Newer tea autodetection code is not stable. Restaured old behavior. * tuner-core.c: - new option no_autodetect to disable tuner autodetection codes. * cx88-cards.c: - There are newer PixelView Ultra cards without tea chips. Radio and addresses unset to allow autodetection. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-13 * tea5767.c:Mauro Carvalho Chehab
- Fixed newer tea autodetection code. * tuner-core.c: - unimplemented IOCTL msg now is clearer for developers. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-13 * tea5767.c:Mauro Carvalho Chehab
- Improved tea autodetection to avoid troubles with other tuners - Eliminated some precision small troubles - Some debug messages fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-07 * tuner-core.c,tea5767.c:Mauro Carvalho Chehab
- T_STANDBY now is tuner.mode instead of tuner.mode_mask. This way, mode_mask is changed only when calling set_type. Signed-Off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-06 * tuner-core.c, tea5767.c:Mauro Carvalho Chehab
- Corrected some bugs at radio, but radio still broken. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-05 Rename tuner structures fields. Move MD detection hack toNickolay V. Shmyrev
saa7134-cards.c
2005-07-02 * Make.config:Nickolay V. Shmyrev
- Fix check for newer kernel to compile dvb modules. * tea5767.c, tuner-core.c, tuner.h, tuner-simple.c, scripts/cardlist: - Cleanup code a bit * msp3400-old.c, vbi, tda9887.h: - Remove unused files
2005-06-30 - Fixed bugs at TEA5767 autodetection codeMauro Carvalho Chehab
- New debug code for identifying calls to set_type before I2C ok. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-30minor changes:Mauro Carvalho Chehab
- Idented according with Linux standards - less verbose when tuner_debug = 0 fixes: - check_mode debug msg fixed - out of range debug messages fixed - bug when changing mode in a multituner environment new features: - standby mode support implemented. It is used to disable a non used tuner. Currenlty implemented on tea5767. - new macro: set_type disables other tuner when changing mode. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-28 * cx88-core.c, cx88-dvb.c, cx88-input.c:Michael Krufky
* lgdt3302.c, lgdt3302_priv.h, or51132.c: * saa7134-cards.c, saa7134-core.c: * saa7134-dvb.c, saa7134-i2c.c, saa7134-oss.c: * saa7134-tvaudio.c, saa7134-video.c: * tda8290.c, tea5767.c, tuner-simple.c: - Clean up ALL whitespace using scripts/strip-trailing-whitespaces.sh Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-06-21 *tuner-core.c:Mauro Carvalho Chehab
- some tuner_info msgs will be generated only if insmod opt tuner_debug enabled. *tea5767.c: - tuner_info msgs will be generated only if insmod tuner option tuner_debug enabled. - some cleanups for better reading. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-19tea5767 autodetection code included. It uses the same approach as DScaler code.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-19 - Changing radio mode stereo/mono for tea5767 working.Mauro Carvalho Chehab
- is not clear at V4L1 API if VIDIOCSTUNER can change to mono. support for changing implemented anyway to allow radio st/mono switch. - Issue to solve: tea indicates stereo even when switched to mono. signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-19Added inicial support for changing radio mode stereo/mono for tea5767Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-15I2C API has changed on 2.6.12-rc6-mm1: I2C_CLIENT_INSMOD macro now doesn'tMauro Carvalho Chehab
require nor uses normal_i2c_range. A new define (CONFIG_USE_I2C_RANGE) is provided to provide compatibility. It is meant to be replaced by a kernel version test after aplyed to mainstream. This patch corrects it. High precision tunning on Radio is correclty supported. Some radio apps already uses it. There's an auto-detection process to check tuner range. Detailed info: * Make.config, Makefile, tuner-core.c: - CONFIG_TUNER_MULTI_I2C dropped from tuner-core.c and included on Make.config - included CONFIG_USE_I2C_RANGE for kernels that requires normal_i2c_range struct (only kernels after 2.6.12-rc6-mm1 doesn't require). * bt832.c, msp3400.c, saa6752hs.c, tda7432.c, tda9875.c, tda9887.c, tuner-core.c,tvaudio.c, tveeprom.c, - I2C range detection corrected to new behavior of 2.6.12-rc6-mm1 * cx88-video.c, tea5767, tuner-core.c: - V4L2_TUNER_CAP_LOW implemented according with V4L2 API for Radio. - tea5767 debug improved. * .bp/2.6/v4l-driver-doc - typo corrected. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-06-10Mostly corrected a bug when changing from audio <-> Tv mode and having ↵Mauro Carvalho Chehab
separated tuners. * tuner-core.c: - Improved debug for radio/TV tuner calls. - Corrected set radio/TV mode calls to change status go to both tuners. - Improved V4L2_TUNER_CAP_LOW support (tv_range hack) * tea5767.c: - Included a new debug message. * cx88-video.c: - Enabled V4L2_TUNER_CAP_LOW to radio.
2005-06-08Lots of change to provide an elegant way to select radio I2C address.Mauro Carvalho Chehab
It should be better tested and expanded to other *-cards.c. * cx88-cards.c, cx88-core.c, cx88-i2c.c, cx88-video.c, cx88.h, tea5767.c, tuner-core.c, tuner-simple.c, tuner.h: - Improved radio tuner support. - There is a new option to cx88 radio=xxx,xxx,xxx for radio adapters; - cx88-boards now specifies radio_type, tuner_addr and radio_addr - ADDR_UNSET macro means find default radio/video tuner
2005-06-07Add new cardsNickolay V. Shmyrev
Kworld/Tevion V-Stream Xpert TV-PVR 7134 ADS Instant TV PCI (PTV-350) saa713x Fix FlyTV FM mini Thanks to Fabrice Aeschbacher <fabrice.aeschbacher@laposte.net> and to hermann pitton <hermann.pitton@onlinehome.de>
2005-06-07tea5767.c improvements:Mauro Carvalho Chehab
- Frequency select now is correct for TEA5767_LOW_LO_32768 on PV Ultra Pro. There was a 175 Khz shift before this patch. - Frequency tunning on V4L is a multiple of 62,5 Khz, but for radio, it would be better to be multiple of 50Khz. This patch provides a table select closest increment at 50Khz step. Not every 50Khz step is possible (there are 4 not possible). There are an odd table and an even table for better usage in coutries with odd frequencies (99.1 105.3 ...) and even frequencies ( 99.0, 105.2). Even frequency table is commented. How to select table by software ? It is better to have a better way to specify frequencies at V4L2 API.
2005-06-06tea5767.c:Mauro Carvalho Chehab
- Implemented status dump information for debug - Signal strengh indication corrected - Mono/Stereo detection corrected tuner-core.c: - Implemented radio stereo indication according w/ V4L and V4L2 API
2005-06-05tea5767.c, Makefile, tuner-core.c, tuner-simple.c, tuner.h:Mauro Carvalho Chehab
- Support for radio chip tea5767hn included. - It is used on several TV+FM cards, like cards with Tvision tuners (maybe also Tenna?). - This chip is always at I2C address 0xC0.