summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
Commit message (Collapse)AuthorAgeFilesLines
* [media] it913x: init tuner on attachBimow Chen2014-09-041-0/+6
| | | | | | | | | | | | | That register is needed to program very first in order to operate correctly. [crope@iki.fi: returned sequence back, removed sleep, moved reg write earlier to prevent populating tuner ops in case of failure] Cc: <stable@vger.kernel.org> # v3.15+ Signed-off-by: Bimow Chen <Bimow.Chen@ite.com.tw> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: always write at dmesg when it fails to upload firmwareMauro Carvalho Chehab2014-07-301-13/+27
| | | | | | | | On a normal condition, no errors should happen at xc5000 firmware upload is done. So, print at the dmesg if something bad happens. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: optimize firmware retry logicMauro Carvalho Chehab2014-07-301-35/+38
| | | | | | | | | | | | Currently, firmware retry logic keeps reading from FS every time during the retry logic. This is not needed. Instead, only release the firmware read after success. While here, make the non-debug messages less verbose, as it only matters to the user if the firmware was successfully loaded, or if some error happened. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: Don't try forever to load the firmwareMauro Carvalho Chehab2014-07-301-19/+21
| | | | | | | | | | With the current code, if something bad happens during the firmware init process, the device will keep trying forever, and removing it would cause an OOPS. Instead, try only a limited amount of time. If not, fails. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] Kconfig: fix tuners build warningsAntti Palosaari2014-07-251-1/+2
| | | | | | | | | | | | | | [next:master 7472/8702] warning: (USB_MSI2500) selects MEDIA_TUNER_MSI001 which has unmet direct dependencies ((MEDIA_ANALOG_TV_SUPPORT || ..) && ..) [next:master 7698/8702] warning: (MEDIA_TUNER && ..) selects MEDIA_TUNER_XC5000 which has unmet direct dependencies ((MEDIA_ANALOG_TV_SUPPORT || ..) && ..) Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc4000: Fix get_frequency()Mauro Carvalho Chehab2014-07-221-9/+11
| | | | | | | | | | | | | | | | | | | The programmed frequency on xc4000 is not the middle frequency, but the initial frequency on the bandwidth range. However, the DVB API works with the middle frequency. This works fine on set_frontend, as the device calculates the needed offset. However, at get_frequency(), the returned value is the initial frequency. That's generally not a big problem on most drivers, however, starting with changeset 6fe1099c7aec, the frequency drift is taken into account at dib7000p driver. This broke support for PCTV 340e, with uses dib7000p demod and xc4000 tuner. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: Fix get_frequency()Mauro Carvalho Chehab2014-07-221-10/+12
| | | | | | | | | The programmed frequency on xc5000 is not the middle frequency, but the initial frequency on the bandwidth range. However, the DVB API works with the middle frequency. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc4000: add module meta-tag with the firmware namesMauro Carvalho Chehab2014-07-221-0/+2
| | | | | | | | | This meta-tag is used by some distros to help them package the firmware and generate proper initrd images. So, add the firmware names there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc4000: Update firmware nameMauro Carvalho Chehab2014-07-221-5/+20
| | | | | | | | | | | The firmware name at: http://www.kernellabs.com/firmware/xc4000/ Is different from the one at the Kernel. Update it try first the new name, falling back to the previous one if the new name can't be found. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc4000: remove unnecessary break after gotoFabian Frederick2014-07-221-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: remove unnecessary break after gotoFabian Frederick2014-07-221-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc2028: remove unnecessary break after gotoFabian Frederick2014-07-221-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] r820t: remove unnecessary break after gotoFabian Frederick2014-07-221-1/+0
| | | | | | | Cc: Antti Palosaari <crope@iki.fi> Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] tuners/Kconfig: fix build when just DTV or SDR is enabledMauro Carvalho Chehab2014-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As reported by Kbuildtest: warning: (VIDEO_PVRUSB2 && VIDEO_TLG2300 && VIDEO_USBVISION && VIDEO_GO7007 && VIDEO_AU0828_V4L2 && VIDEO_CX231XX && VIDEO_TM6000 && VIDEO_EM28XX && VIDEO_IVTV && VIDEO_MXB && VIDEO_CX18 && VIDEO_CX23885 && VIDEO_CX88 && VIDEO_BT848 && VIDEO_SAA7134 && VIDEO_SAA7164) selects VIDEO_TUNER which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_TUNER) That happens when: # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y # CONFIG_MEDIA_RADIO_SUPPORT is not set # CONFIG_MEDIA_SDR_SUPPORT is not set CONFIG_VIDEO_AU0828_V4L2=y CONFIG_VIDEO_CX231XX=y CONFIG_VIDEO_TM6000=y CONFIG_VIDEO_EM28XX=y CONFIG_VIDEO_TUNER=y CONFIG_MEDIA_SUPPORT=y With means that we need to enable MEDIA_TUNER also when DTV is enabled. While the above config doesn't cover, if we enable SDR, the same error can also happen. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Add get_if_frequency callbackMatthias Schwarzott2014-07-211-0/+7
| | | | | | | | This is needed for PCTV 522e support. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Add support for spectral inversionMatthias Schwarzott2014-07-213-0/+9
| | | | | | | | This is needed for PCTV 522e support. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Use name si2157_ops instead of si2157_tuner_opsOlli Salonen2014-07-211-2/+2
| | | | | | | | | | | | | | | The struct prototype is defined at the beginning of the code as "si2157_ops" but the real struct is called "si2157_tuner_ops". This is causing the name to be empty on this info msg: si2157 16-0060: si2157: found a '' in cold state [crope@iki.fi: commit msg from Luis email reply] Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Cc: Luis Alves <ljalvs@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* msi001: move out of stagingAntti Palosaari2014-07-213-0/+507
| | | | | | | Move MSi001 driver from staging to drivers/media/tuners/. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: rework firmware download logic a little bitAntti Palosaari2014-07-141-50/+58
| | | | | | | | | Rework firmware selection / chip detection logic a little bit. Add missing release_firmware() to error path. Signed-off-by: Antti Palosaari <crope@iki.fi> Tested-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: advertise Si2158 A20 firmwareAntti Palosaari2014-07-141-0/+1
| | | | | | | | Driver uses that firmware. Add it module firmware list. Signed-off-by: Antti Palosaari <crope@iki.fi> Tested-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Set delivery system and bandwidth before tuningOlli Salonen2014-07-141-0/+31
| | | | | | | | | Tell used TV standard and bandwidth for tuner firmware. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Add support for Si2158 chipOlli Salonen2014-07-143-7/+73
| | | | | | | | | Add support for Si2158 A20 chip. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: Move chip initialization to si2157_initOlli Salonen2014-07-141-41/+30
| | | | | | | | | | Move chip initialization related code from si2157_set_params to si2157_init. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: add read data support for fw cmd funcAntti Palosaari2014-07-142-34/+43
| | | | | | | | We want also read data from firmware. Add support for it. Copied from si2168 driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] si2157: implement sleepAntti Palosaari2014-07-141-0/+11
| | | | | | | Implement sleep for power-management. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dvb-frontends: Add staticAlan2014-07-041-1/+1
| | | | | | | | | | | | Add static to tda m_* variables in the header. They don't need to be global. With some cleanup they could probably even be marked const. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=68191 Reported-by: Christian Schneider <christian@ch-sc.de> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: delay tuner sleep to 5 secondsMauro Carvalho Chehab2014-05-251-9/+34
| | | | | | | | | | Some drivers, like au0828 are very sensitive to tuner sleep and may break if the sleep happens too fast. Also, by keeping the tuner alive for a while could speedup tuning process during channel scan. So, change the logic to delay the actual sleep to 5 seconds after its command. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: Don't use whitespace before tabsMauro Carvalho Chehab2014-05-251-5/+5
| | | | | | | | | | | | | | | | | | | WARNING: please, no space before tabs +#define XC_PRODUCT_ID_FW_LOADED ^I0x1388$ WARNING: please, no space before tabs +#define DK_SECAM_A2LDK3 ^I13$ WARNING: please, no space before tabs +#define DK_SECAM_A2MONO ^I14$ WARNING: please, no space before tabs +#define FM_RADIO_INPUT2 ^I21$ WARNING: please, no space before tabs +#define FM_RADIO_INPUT1 ^I22$ Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: fix CamelCaseMauro Carvalho Chehab2014-05-251-69/+69
| | | | | | | | There are several CamelCase non-codingstyle compliances here. Fix them. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: Don't wrap msleep()Mauro Carvalho Chehab2014-05-251-10/+5
| | | | | | | | There's absolutely no reason to wrap msleep() call here. Just rename all occurences of xc_wait() with msleep() and remove the wrapper function. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc5000: get rid of positive error codesMauro Carvalho Chehab2014-05-251-56/+48
| | | | | | | Errors should also be negative and should follow the Kernel standards. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* Merge tag 'v3.15-rc6' into patchworkMauro Carvalho Chehab2014-05-212-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 3.15-rc6 * tag 'v3.15-rc6': (1314 commits) Linux 3.15-rc6 Btrfs: send, fix incorrect ref access when using extrefs Btrfs: fix EIO on reading file after ioctl clone works on it scripts/checksyscalls.sh: Make renameat optional asm-generic: Add renameat2 syscall ia64: add renameat2 syscall parisc: add renameat2 syscall m68k: add renameat2 syscall sysfs: make sure read buffer is zeroed ahci: imx: PLL clock needs 100us to settle down PCI: Wrong register used to check pending traffic target: fix memory leak on XCOPY random: fix BUG_ON caused by accounting simplification clk: tegra: Fix wrong value written to PLLE_AUX staging: rtl8723au: Do not reset wdev->iftype in netdev_close() ACPI / video: Revert native brightness quirk for ThinkPad T530 staging: rtl8723au: Use correct pipe type for USB interrupts crush: decode and initialize chooseleaf_vary_r libceph: fix corruption when using page_count 0 page in rbd arm64: fix pud_huge() for 2-level pagetables ...
| * [media] fc2580: fix tuning failure on 32-bit archAntti Palosaari2014-04-162-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | There was some frequency calculation overflows which caused tuning failure on 32-bit architecture. Use 64-bit numbers where needed in order to avoid calculation overflows. Thanks for the Finnish person, who asked remain anonymous, reporting, testing and suggesting the fix. Cc: <stable@vger.kernel.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] si2157: add copyright and licenseAntti Palosaari2014-04-233-0/+48
| | | | | | | | | | | | | | Add copyright and license for each file. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] si2157: extend frequency range for DVB-CAntti Palosaari2014-04-231-1/+1
| | | | | | | | | | | | | | | | | | DVB-C uses lower frequencies than DVB-T. Extend frequency range down to 110 MHz in order to support DVB-C. 110 - 862 MHz range is defined by NorDig Unified 2.2 specification. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* | [media] si2157: Silicon Labs Si2157 silicon tuner driverAntti Palosaari2014-04-235-0/+291
|/ | | | | | | | Silicon Labs Si2157 silicon tuner driver. Currently it supports only DVB-T. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] r820t: fix size and init valuesBenjamin Larsson2014-04-071-1/+2
| | | | | | | | | Correct the initialization values at the start of the function and use proper variable sizes to prevent overflow. Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc2028: add missing break to switchAntti Palosaari2014-04-061-0/+1
| | | | | | | | | | | | Coverity CID 1196501: Missing break in switch (MISSING_BREAK) I introduced that bug recently by commit 96a5b3a869e3dc7d55bf04a48a8dca8a4025787e. As a result, it will flood unintentionally error message to log. Reported-by: <scan-admin@coverity.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: make VIDEO_V4L2 dependency optionalAntti Palosaari2014-03-242-1/+7
| | | | | | | | | | | | | | | | | | That tuner driver is mainly for DVB API, but there is some V4L2 API controls for SDR usage. Make driver compile conditional so that V4L2 is not mandatory. Without the V4L2 support driver is build as a DVB only, without SDR controls. Fixes following errors reported by kbuild test robot: ERROR: "v4l2_ctrl_auto_cluster" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_new_std" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_init_class" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_free" [drivers/media/tuners/e4000.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: fix 32-bit build errorAntti Palosaari2014-03-141-2/+4
| | | | | | | | | | All error/warnings: drivers/built-in.o: In function `e4000_set_params': >> e4000.c:(.text+0x1219a1b): undefined reference to `__umoddi3' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: rename some variablesAntti Palosaari2014-03-142-167/+167
| | | | | | | | | Rename some variables. Change error status checks from (ret < 0) to (ret). No actual functionality changes. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: convert to Regmap APIAntti Palosaari2014-03-143-147/+68
| | | | | | | | | | That comes possible after driver was converted to kernel I2C model (I2C binding & proper I2C client with no gate control hack). All nasty low level I2C routines are now covered by regmap. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: get rid of DVB i2c_gate_ctrl()Antti Palosaari2014-03-141-82/+21
| | | | | | | | Gate control is now implemented by rtl2832 I2C adapter so we do not need proprietary DVB i2c_gate_ctrl() anymore. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: implement PLL lock v4l controlAntti Palosaari2014-03-142-1/+54
| | | | | | | | | Implement PLL lock control to get PLL lock flag status from tuner synthesizer. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: fix PLL calc to allow higher frequenciesAntti Palosaari2014-03-141-9/+5
| | | | | | | | | | | | | There was 32-bit overflow on VCO frequency calculation which blocks tuning to 1073 - 1104 MHz. Use 64 bit number in order to avoid VCO frequency overflow. After that fix device in question tunes to following range: 60 - 1104 MHz 1250 - 2207 MHz Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: implement controls via v4l2 control frameworkAntti Palosaari2014-03-143-5/+291
| | | | | | | | Implement gain and bandwidth controls using v4l2 control framework. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] e4000: convert DVB tuner to I2C driver modelAntti Palosaari2014-03-143-61/+80
| | | | | | | | | Driver conversion from proprietary DVB tuner model to more general I2C driver model. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc2028: silence compiler warningsAntti Palosaari2014-03-051-0/+3
| | | | | | | | | | | | | | | There is now new tuner types which are not handled on that switch-case. Print error if unknown tuner type is meet. drivers/media/tuners/tuner-xc2028.c: In function ‘generic_set_freq’: drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_ADC’ not handled in switch [-Wswitch] switch (new_type) { ^ drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_RF’ not handled in switch [-Wswitch] Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] tda18212: add support for ATSC and clearQAM on tda18272Mauro Carvalho Chehab2014-03-042-0/+14
| | | | | | | | | | tda18272 is programmed just like tda18212, but it also supports ClearQAM and ATSC. Add support for them. Tested with a Kworld UB435-Q on both 8VSB and 256QAM modes. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media, edac] Change my email addressMauro Carvalho Chehab2014-02-072-4/+4
| | | | | | | | There are several left overs with my old email address. Remove their occurrences and add myself at CREDITS, to allow people to be able to reach me on my new addresses. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
OpenPOWER on IntegriCloud