summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-simple.c
AgeCommit message (Collapse)Author
2008-03-16tuner-simple: add module options to specify rf inputMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-03-15tuner: rename TUNER_PHILIPS_ATSC to TUNER_PHILIPS_FCV1236DMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-03-15tuner-simple: warn if tuner can't be probed during attachMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-03-09tuner-simple: fix return value of simple_dvb_configureMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-02-10tuner-simple: enable digital tuning support for Philips TD1316Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-02-03tuner-simple: use separate inputs for vsb and qam on tuv1236d & fcv1236dMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-03tuner-simple: enable digital tuning support for Philips FMD1216MEMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-02-03tuner-simple: add init and sleep methodsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> taken from dvb-pll Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-17tuner-simple: do not send i2c commands if there is no i2c adapterMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-01-27tuner-simple: add basic support for digital tuning of hybrid devicesMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-02-24From: Mauro Carvalho Chehab <mchehab@infradead.org>Mauro Carvalho Chehab
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>
2008-02-02remove PREFIX from users of tuner_foo printk macrosMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-01-26tuner-simple: move device-specific code into three separate functionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-01-29tuner: remove dependency of tuner-core on tuner-typesMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-01-28tuner: move tuner type ID check to simple_tuner_attachMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.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>
2008-01-27tuner-simple: display frequency in MHzMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> fix debug in simple_config_lookup to display frequency in MHz Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-01-27tuner-simple: create separate t_params and ranges lookup functionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Move some reuseable code out of simple_set_tv_freq into separate functions. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-11-03tuner-simple: whitespace / comments / codingstyle cleanupsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
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-18Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIGMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Currently, the only tuner-specific device that allows special configurations is tda9887. However, tea5767 also may require some special configurations (for example, to specify a different Xtal freq). This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl (TUNER_SET_CONFIG). The newer one allows specifying what tuner is appliable to a configuration set, and allows an arbitrary configuration struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-31tuner-simple: 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-27tuner-simple: 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> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
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-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.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-08-11tuner: move last_div to tuner-simple private dataMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> tuner-simple is the only sub-driver that uses last_div, so we can free up two bytes of memory for all other tuners, by moving this into tuner-simple's private data area. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-08-03tuner: Better tuner radio supportTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add radio support for the Thomson DTT7612 tuner. This tuner uses a different 1st intermediate frequency than the other radio tuners supported (a lot of NTSC radio tuners probably need this change too). Add a new tuner-simple parameter, radio_if. It selects the 1st IF used for radio reception. The radio frequency setting code in tuner-simple now uses this field, instead of a special case select() block for each tuner with radio support. The tuner parameters for tuners that used a 33.3 MHz RIF now set radio_if to 1 in tuner-types.c. The Thomson DTT7612 gets radio_if = 2, also add has_tda9887 = 1 and fm_gain_normal = 1. Add some defines for tda9887 bits that control IF setting in radio mode. Add a new tda9887 config option, TDA9887_RIF_41_3, that selects a 41.3 MHz radio IF. Fix the way tda9887 radio options work. The driver was modifying the default radio mode config templates based on the TDA9887_XXXX flags. This means that _all_ tuners would get the same settings. If you had a one tuner than used TDA9887_GAIN_NORMAL and one that didn't, both would get the setting. Now the tda9987 driver just checks if tuner mode is radio and then applies the config settings directly to the data being sent, just like how all the TV mode settings already work. The PLL setting math is made a little more accurate. And a grammar error in a printk is fixed. Signed-off-by: Trent Piepho <xyzzy@speakeasy.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-06tuner-simple: store tuning operations in tuner_operations structureMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Create static struct tuner_operations simple_tuner_ops for tuner-simple 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>
2007-05-21Correct aliases for STD/L and STD/LcMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some macros were using very weird names, like PAL/L (this std doesn't exist). Fixing it. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-21Tuner-simple.c add suport for SECAM-BG with FI1216MFMauro Carvalho Chehab
From: matthieu castet <castet.matthieu@free.fr> allow to use SECAM-BG with the FI1216MF tuner. The selection is done with the secam=B module argument. The default behaviour should be the same as before. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-04Added the capability of selecting fm gain by tunerMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some tuners require using cGainNormal instead of cGainLow for high sensibility on FM reception. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-03Fix broken TUNER_LG_NTSC_TAPE radio supportHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The TUNER_LG_NTSC_TAPE is identical in all respects to the TUNER_PHILIPS_FM1236_MK3. So use the params struct for the Philips tuner. Also add this LG_NTSC_TAPE tuner to the switches where radio specific parameters are set so it behaves like a TUNER_PHILIPS_FM1236_MK3. This change fixes the radio support for this tuner (the wrong bandswitch byte was used). Thanks to Andy Walls <cwalls@radix.net> for finding this bug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-08-24tda9887: add configuration setting for L standard PLL gatingTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add a tuner config parameter for TDA9887, default_pll_gating_18, that changes the L standard PLL gating value from 36% to 0% (datasheet says 0%, tda9887 code says 18%). Turn this on for Microtune 4049FM5, as recomended by tuner datasheet. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-12Offset parameter permission were 0x666, instead of 0x664Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Although not dangerous, it may allow a normal user with access to a machine to untune a TV channel. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-25Remove of couple of useless linesTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> A buffer was set just before an if block, and then again in both branches of the if. Obvious coding error. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-17Set the Auxiliary Byte when tuning LG H06xF in analog modeMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> With the LG H06xF tuners, an auxiliary byte must be sent after the standard four-byte i2c sequence. The code that does this is currently in the wrong place, causing random bytes to be written to the tuner over i2c in the set_type function. This patch moves this code from set_type to default_set_tv_freq. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-06-25Add tda9887-specific tuner configurationHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Many tda9887 settings depend on the chosen tuner. Expand the tuner parameters to include these tda9887 settings. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-20Whitespace cleanupsMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.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-03-09imported patch tenna_xxx5.patchMauro Carvalho Chehab
2006-01-30show debug info for tuners trying to use unsupported video standardsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> With tuner_debug enabled, if a tuner tries to use a video standard that doesn't have a matching tuner_params defined, the IFPCoff value and tuner number will be displayed, and the default tuner_params entry will be used. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-30use default tuner_params if desired_type not availableMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> If a given tuner definition contains more than one tuner_params array members, it will try to select the appropriate tuner_params based on the video standard in use. If there is no tuner_params defined for the current video standard, it will select the default, tuner_params[0] Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-30update tuner commentsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Right now, all tuners are using the first tuner_params[] array element for analog mode. We are now ready to begin merging similar tuner definitions together, such that each tuner definition will have a tuner_params struct for each available video standard. The tuner_params[] array element will be chosen based on the video standard in use. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-29tuner_dbg will show tuner param and range selectedMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> - tuner_dbg will show tuner param and range selected Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-29allow multiple tuner params in each tuner definitionMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> - allow multiple tuner params in each tuner definition. - the correct tuner_params element will be chosen based on current video standard. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-29move video std detection to top of set_tv_freq functionMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> - move video std detection to top of set_tv_freq function - we must detect video std first, so that we can choose the correct tuner_params Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-01-23move config byte from tuner_params to tuner_range struct.Michael Krufky
- move config byte from tuner_params to tuner_range struct. - dvb tuners must be able to set different config byte for each range. Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2006-01-23rename cb variable names in tuner structures for global consistencyMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@m1k.net>