summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
Commit message (Collapse)AuthorAgeFilesLines
* [media] tda18271-common: hold the I2C adapter during write transfersMauro Carvalho Chehab2012-10-071-33/+71
| | | | | | | | | | | | | | | | | | | | | | | The tda18271 datasheet says: "The image rejection calibration and RF tracking filter calibration must be launched exactly as described in the flowchart, otherwise bad calibration or even blocking of the TDA18211HD can result making it impossible to communicate via the I2C-bus." (yeah, tda18271 refers there to tda18211 - likely a typo at their datasheets) That likely explains why sometimes tda18271 stops answering. That is now happening more often on designs with drx-k chips, as the firmware is now loaded asyncrousnly there. While the above text doesn't explicitly tell that the I2C bus couldn't be used by other devices during such initialization, that seems to be a requirement there. So, let's explicitly use the I2C lock there, avoiding I2C bus share during those critical moments. Compile-tested only. Please test. Acked-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt2063: properly handle return error codesMauro Carvalho Chehab2012-10-062-22/+18
| | | | | | | | | | | | | | | | | | | | | | | Fix a series of warnings when compiled with W=1: drivers/media/tuners/mt2063.c: In function 'mt2063_setreg': drivers/media/tuners/mt2063.c:290:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] ... drivers/media/tuners/mt2063.c:2013:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/tuners/mt2063.c:2271:14: warning: no previous prototype for 'tuner_MT2063_SoftwareShutdown' [-Wmissing-prototypes] drivers/media/tuners/mt2063.c:2286:14: warning: no previous prototype for 'tuner_MT2063_ClearPowerMaskBits' [-Wmissing-prototypes] Several of those warnings are real bugs: the error status code used to be unsigned, but they're assigned to negative error codes. Fix it by using unsigned int. While here, comment the two power management functions, while we don't add a code there to properly handle tuner suspend/resume. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/tuners/mt2063.c: Removes useless kfree()Peter Senna Tschudin2012-10-061-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove useless kfree() and clean up code related to the removal. The semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ position p1,p2; expression x; @@ if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; } @unchanged exists@ position r.p1,r.p2; expression e <= r.x,x,e1; iterator I; statement S; @@ if (x@p1 == NULL) { ... when != I(x,...) S when != e = e1 when != e += e1 when != e -= e1 when != ++e when != --e when != e++ when != e-- when != &e kfree@p2(x); ... return ...; } @ok depends on unchanged exists@ position any r.p1; position r.p2; expression x; @@ ... when != true x@p1 == NULL kfree@p2(x); @depends on !ok && unchanged@ position r.p2; expression x; @@ *kfree@p2(x); // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: properly report read errors in tda18271_get_idMichael Krufky2012-10-021-1/+9
| | | | | | | | | Until now, if there is a read error in tda18271_get_id, the driver reports "Unknown device..." Instead, check the return value of tda18271_read_regs and display the appropriate error message. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: delay IR & RF calibration until init() if delay_cal is setMichael Krufky2012-10-022-0/+10
| | | | | | | | | | | if the configuration option 'delay_cal' is set, delay both IR & RF calibration until init() is called. both module option 'cal' or configuration option 'rf_cal_on_startup' will override this delay. it makes no sense to mix 'delay_cal' with 'rf_cal_on_startup' as these options conflict with each other. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: make 'low-power standby mode after attach' multi-instance safeMichael Krufky2012-10-011-3/+4
| | | | | | | | | | | | | Ensure that unnecessary features are powered down at the end of the attach() function on attach of the tuner's first instance. If the configuration requires the loop thru or xtout features, they will remain enabled. This must *only* be done after attaching the first instance of the tuner. If there are multiple instances of the tuner, the bridge driver will need to maintain power managament by itself. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: enter low-power standby mode at the end of tda18271_attach()Michael Krufky2012-10-011-0/+3
| | | | | | | | | | Ensure that unnecessary features are powered down at the end of the attach() function. If the configuration requires the loop thru or xtout features, they will remain enabled. Thanks to Antti Palosaari for noticing the additional power consumption. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc2580: use macro for 64 bit division and reminderGianluca Gennari2012-10-011-2/+1
| | | | | | | | | | | Fixes the following warnings on a 32 bit system with GCC 4.4.3 and kernel Ubuntu 2.6.32-43 32 bit: WARNING: "__udivdi3" [fc2580.ko] undefined! WARNING: "__umoddi3" [fc2580.ko] undefined! Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc2580: silence uninitialized variable warningGianluca Gennari2012-10-011-1/+1
| | | | | | | | | | fc2580.c: In function 'fc2580_set_params': fc2580.c:118: warning: 'ret' may be used uninitialized in this function Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc2580: define const as UL to silence a warningGianluca Gennari2012-10-011-1/+1
| | | | | | | | | | fc2580.c: In function 'fc2580_set_params': fc2580.c:150: warning: this decimal constant is unsigned only in ISO C90 Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] e4000: fix crash when attach failsAntti Palosaari2012-09-271-3/+4
| | | | | | | | | Callbacks were set even attach failed. This leads calling .release() in error case and resulted crash. Reported-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc2580: fix crash when attach failsAntti Palosaari2012-09-271-3/+4
| | | | | | | | | Callbacks were set even attach failed. This leads calling .release() in error case and resulted crash. Reported-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc2580: small improvements for chip id checkAntti Palosaari2012-09-271-1/+5
| | | | | | | | | * better readability * make checkpatch.pl happy * few bytes smaller binary footprint Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Support for Asus MyCinema U3100Mini PlusOliver Schinagl2012-09-271-1/+2
| | | | | | | | | | | | | | This is initial support for the Asus MyCinema U3100Mini Plus. The driver in its current form gets detected and loads properly. Scanning using dvbscan works without problems, Locking onto a channel using tzap also works fine. Only playback using tzap -r + mplayer was tested and was fully functional. It uses the af9035 USB Bridge chip, with an af9033 demodulator. The tuner used is the FCI FC2580. Signed-off-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tua9001: enter full power save on attachAntti Palosaari2012-09-271-0/+10
| | | | | | | | Disable RXEN and enable RESETN pins on attach to ensure chip is totally powered down after attach. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l2: remove experimental tag from a number of old driversHans Verkuil2012-09-261-3/+2
| | | | | | | | | | | | | | | | | | A number of old drivers still had the experimental tag. Time to remove it. It concerns the following drivers: VIDEO_TLV320AIC23B USB_STKWEBCAM VIDEO_CX18 VIDEO_CX18_ALSA VIDEO_ZORAN_AVS6EYES DVB_USB_AF9005 MEDIA_TUNER_TEA5761 VIDEO_NOON010PC30 This decision was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tua9001: use dev_foo loggingAntti Palosaari2012-09-231-9/+22
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tua9001: implement control pin callbacksAntti Palosaari2012-09-232-5/+81
| | | | | | | | There is three pins used for controlling that tuner. Implement those using frontend callback. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuners: add FCI FC2580 silicon tuner driverAntti Palosaari2012-09-235-0/+718
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/tuners/tda18271-common.c: removes unnecessary semicolonPeter Senna Tschudin2012-09-231-5/+5
| | | | | | | | removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mc44s803: implement get_if_frequency()Antti Palosaari2012-09-181-1/+8
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mxl5005s: implement get_if_frequency()Antti Palosaari2012-09-181-0/+11
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Elonics E4000 silicon tuner driverAntti Palosaari2012-09-185-0/+615
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18218: switch to Kernel loggingAntti Palosaari2012-09-152-26/+15
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18218: re-implement tda18218_wr_regs()Antti Palosaari2012-09-151-13/+11
| | | | | | | Old i2c message length splitting logic was faulty. Make it better. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] qt1010: remove debug register dumpAntti Palosaari2012-09-151-23/+0
| | | | | | | | | I didn't found easy way to handle register dump only when needed so remove it totally. It is quite useless and trivial function, every developer could write new one in few minutes when needed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] qt1010: convert for Kernel loggingAntti Palosaari2012-09-151-21/+19
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] qt1010: do not change frequency during initAntti Palosaari2012-09-151-1/+2
| | | | | | | | | Changing cached frequency during init is something no-no. Make it behave a little bit better. After that device could survive from suspend/resume when streaming is ongoing. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Kconfig: merge all customise options into just oneMauro Carvalho Chehab2012-08-211-50/+38
| | | | | | | | | | | | | | | | Instead of having 3 options to allow customizing the media sub-drivers (tuners, I2C drivers, frontends), merge all of them into just one. That simplifies the life for users, as they can just keep this untouched. Life for developers is also simpler, as there's now just one Kconfig item to remember, for the ancillary sub-drivers providing supports for chips that could change from one board design to another. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab2012-08-1370-0/+30389
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>