summaryrefslogtreecommitdiffstats
path: root/drivers/media/common
Commit message (Collapse)AuthorAgeFilesLines
* [media] xc4000: make checkpatch.pl happyMauro Carvalho Chehab2011-07-272-72/+70
| | | | | | | | | | | | Solve the ./scripts/checkpatch.pl compliants for the patches that added xc4000 support, including a few changes at dib0700. While here, remove a few printk noise by converting some msgs into debug ones. Cc: Istvan Varga <istvan_v@mailbox.hu> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: removed card_typeistvan_v@mailbox.hu2011-07-272-45/+44
| | | | | | | | | Removed the use of 'card_type' from the tuner configuration structure, and replaced it with separate parameters to set board-specific configuration. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: check firmware versionistvan_v@mailbox.hu2011-07-271-9/+9
| | | | | | | | Enabled code to check if the version of the firmware reported by the hardware is correct after uploading it. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: code cleanupistvan_v@mailbox.hu2011-07-271-154/+118
| | | | | | | | | | | | | Various coding style changes: - removed unused / commented out code - changed C++ style comments to C format - renamed functions and variables that included upper case letters in the name - removed tabs from module parameter descriptions - replaced the use of XC_RESULT_* with standard error codes Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: detect also xc4100Istvan Varga2011-07-271-3/+7
| | | | | | | | | | Added code to detect the XC4100 chip, which is presumably an analog-only "value" version of the XC4000. It is not sure, however, if any devices using this have actually been produced and sold, so the patch may be unneeded. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: removed redundant tuner resetIstvan Varga2011-07-271-1/+3
| | | | | | | | | | This patch causes the tuner reset command to be ignored in the firmware code, since this only happens when the BASE/INIT1 firmware is loaded by check_firmware(), and in that case check_firmware() already calls the reset callback before starting to load the firmware. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: xc_tune_channel() cleanupIstvan Varga2011-07-271-10/+9
| | | | | | | Minor coding changes related to the xc_tune_channel() function. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: implemented analog TV and radioIstvan Varga2011-07-271-19/+100
| | | | | | | The following patch implements support for analog TV and FM radio. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: added audio_std module parameterIstvan Varga2011-07-271-0/+23
| | | | | | | | | The 'audio_std' module parameter makes it possible to fine tune some audio related aspects of the driver, like setting the exact audio standard (NICAM, A2, etc.) to be used for some video standards. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: setting registersIstvan Varga2011-07-271-12/+55
| | | | | | | | | | This patch implements setting the registers in xc4000_set_params() and xc4000_set_analog_params(). A new register is defined which enables filtering of the composite video output (this is needed to avoid bad picture quality with some boards). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: debug message improvementsIstvan Varga2011-07-271-23/+45
| | | | | | | | | | The following patch makes a few minor changes to the printing of debug messages, and reporting the tuner status. The 'debug' module parameter can now be set from 0 to 2 to control the verbosity of debug messages. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: firmware initializationIstvan Varga2011-07-271-20/+16
| | | | | | | | This patch fixes/cleans up the loading of the firmware file when the driver is loaded and initialized. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: implemented power managementIstvan Varga2011-07-271-5/+34
| | | | | | | | | | | The following patch implements the xc4000_sleep() function. The 'no_powerdown' module parameter is now interpreted differently: - 0 uses a device-specific default - 1 disables power management like before - 2 enables power management Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: added card_typeIstvan Varga2011-07-272-2/+20
| | | | | | | | | This patch adds support for selecting a card type in struct xc4000_config, to allow for implementing some card specific code in the driver. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: check_firmware() cleanupIstvan Varga2011-07-271-10/+5
| | | | | | | | | This patch makes the following fixes in check_firmware(): - there is only one BASE and INIT1 firmware for XC4000 - loading SCODE is needed also for FM radio Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: simplified load_scodeIstvan Varga2011-07-271-18/+8
| | | | | | | | Removed unused code from load_scode() (all SCODE firmwares are assumed to have the HAS_IF bit set). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: simplified seek_firmware()Istvan Varga2011-07-271-46/+25
| | | | | | | This patch simplifies the code in seek_firmware(). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: added firmware_name parameterIstvan Varga2011-07-271-5/+12
| | | | | | | | The firmware_name module parameter makes it possible to set the firmware file name. It defaults to "xc4000.fw" if not specified. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: fixed frequency errorIstvan Varga2011-07-271-2/+3
| | | | | | | | | The xc_get_frequency_error() function reported the frequency error incorrectly. The data read from the hardware is a signed integer, in 15625 Hz units. The attached patch fixes the bug. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: added mutexIstvan Varga2011-07-271-30/+50
| | | | | | | | This patch adds a mutex to xc4000_priv, to protect the driver from being accessed by multiple processes at the same time. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: added support for 7 MHz DVB-TIstvan Varga2011-07-271-2/+15
| | | | | | | The following patch implements support for DVB-T with 7 MHz bandwidth. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: updated standards tableIstvan Varga2011-07-271-32/+35
| | | | | | | | | | | | This patch makes the following changes to the standards table: - added 'u16 int_freq' to struct XC_TV_STANDARD (needed for analog TV and radio, 0 for DVB-T) - added new standard for SECAM-D/K video with PAL-D/K audio - the 'int_freq' values are now specified in the table - changed VideoMode for NTSC and PAL-B/G standards Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: code cleanupIstvan Varga2011-07-272-115/+45
| | | | | | | | | | This is the first of a set of patches that update the original xc4000 sources to my modified version. It removes some unused code, and makes a few minor formatting changes. [mchehab@redhat.com: re-add XC_TUNE_ANALOG/XC_TUNE_DIGITAL constants, to avoid compilation breakage] Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: Fix a few bad whitespaces on itMauro Carvalho Chehab2011-07-271-8/+8
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: cleanup dmesg loggingDevin Heitmueller2011-07-271-25/+6
| | | | | | | | Remove some printk() calls added during driver development, and demote some other messages to debug only (to reduce dmesg chatter). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: rename firmware image filenameDevin Heitmueller2011-07-271-1/+3
| | | | | | | | Give the xc4000 firmware filename a filename that makes more sense for public release. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: turn off debug logging by defaultDevin Heitmueller2011-07-271-1/+1
| | | | | | | | Don't dump debug into to dmesg by default (something I had enabled during bringup of the xc4000 driver). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: get rid of hard-coded 8MHz firmware configDevin Heitmueller2011-07-271-40/+51
| | | | | | | | Remove a hack I had put in to force the firmware to be 8MHz, now setting the firmware properly based on the target standard. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: handle dib0700 broken i2c stretchingDevin Heitmueller2011-07-271-5/+29
| | | | | | | | | It was confirmed by DibCom that i2c stretching is broken in the i2c master on the dib7700. So we need to put a hack into the xc4000 driver to not complain in certain very specific cases where we know i2c stretching occurs. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: use if_khz provided in xc4000_configDevin Heitmueller2011-07-271-5/+5
| | | | | | | | Remove hard-coded references to 5400, using the value passed in when the xc4000 is attached. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: continued cleanup of the firmware loading routineDevin Heitmueller2011-07-271-136/+44
| | | | | | | | | | Properly setup the standard firmware loading and scode loading, as well as getting rid of a ton of dead code. Note that I am getting a single i2c error when the standard firmware sets the video standard, but everything else seems to be loading properly now. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: add code to do standard and scode firmware loadingDevin Heitmueller2011-07-271-9/+332
| | | | | | | | | Add code to handle firmware blobs for the standard and scode. Note there appears to be some issue with loading the DTV8 standard firmware, probably related to direct/indirect mode. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: remove xc5000 firmware loading routineDevin Heitmueller2011-07-271-2/+0
| | | | | | | | | Since we use the xc3028 version of the firmware file parsing routine (which includes support for scodes and separate blobs), we can drop the xc5000 version of the code. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: remove XREG_BUSY code only supported in xc5000Devin Heitmueller2011-07-271-26/+0
| | | | | | | | | The xc4000 driver is based on the original xc5000 driver, and while the xc5000 supports the XREG_BUSY register, the xc4000 does not. So remove the code in question. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: properly set type for init1 firmwareDevin Heitmueller2011-07-271-1/+1
| | | | | | | | We need to set the firmware type properly in order to locate the init1 firmware. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: cut over to using xc5000 version for loading i2c sequencesDevin Heitmueller2011-07-271-90/+5
| | | | | | | | | | | | | The xc3028 version does i2c splitting in a different manner than xc4000 and xc5000, so reuse the xc5000 version of the routine (the key here being that xc4000 expects the first *two* bytes to be the same for splitting transactions. Doing it the xc3028 way was resulting in i2c errors partially through the firmware load. With this change, it would appear that the entire base firmware is being loaded successfully (product id now properly shows 0x0FA0). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc4000: pull in firmware management code from xc3028Devin Heitmueller2011-07-271-31/+393
| | | | | | | | | | | Switch over to using the firmware management routines from the tuner-xc2028, since that has support for scodes, etc. This code still requires signficant cleanup, and at this point the base firmware does not load properly (i2c write errors about 300 bytes in). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: add initial code for PCTV 340e by Davide FerriDavide Ferri2011-07-275-0/+1159
| | | | | | | | | | | | This is initial code written by Davide Ferri for the PCTV 340e, including a new xc4000 driver. I am checking in all the code unmodified, and making no assertions about its quality (other than confirming it compiles). [mchehab@redhat.com: rebased on the top of the current tree] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Davide Ferri <davidef1986@gmail.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: mxl5005s: handle new bandwidths by returning -EINVALAndreas Oberritter2011-05-201-0/+2
| | | | | | | | | | drivers/media/common/tuners/mxl5005s.c: In function ‘mxl5005s_set_params’: drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch drivers/media/common/tuners/mxl5005s.c:4016: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: add DVB-C supportAntti Palosaari2011-05-201-0/+4
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] NXP TDA18212HN silicon tuner driverAntti Palosaari2011-05-205-0/+366
| | | | | | | New silicon tuner driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] use pci_dev->revisionBjørn Mork2011-05-201-6/+1
| | | | | | | | | pci_setup_device() has saved the PCI revision in the pci_dev struct since Linux 2.6.23. Use it. Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] xc5000: Improve it to work better with 6MHz-spaced channelsMauro Carvalho Chehab2011-05-201-6/+26
| | | | | | | | | | | Brazil uses 6MHz-spaced channels. So, the nyquist filter for DVB-C should be different, otherwise, inter-channel interference may badly affect the device, and signal may not be properly decoded. On my tests here, without this patch, sometimes channels are seen, but, most of the time, PID filter returns with timeout. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2011-04-273-26/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (42 commits) [media] media: vb2: correct queue initialization order [media] media: vb2: fix incorrect v4l2_buffer->flags handling [media] s5p-fimc: Add support for the buffer timestamps and sequence [media] s5p-fimc: Fix bytesperline and plane payload setup [media] s5p-fimc: Do not allow changing format after REQBUFS [media] s5p-fimc: Fix FIMC3 pixel limits on Exynos4 [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheet [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheet [media] tda18271: fix bad calculation of main post divider byte [media] tda18271: prog_cal and prog_tab variables should be s32, not u8 [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init [media] omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails [media] v4l: Don't register media entities for subdev device nodes [media] omap3isp: Don't increment node entity use count when poweron fails [media] omap3isp: lane shifter support [media] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts [media] media: add missing 8-bit bayer formats and Y12 [media] v4l: add V4L2_PIX_FMT_Y12 format cx23885: Fix stv0367 Kconfig dependency [media] omap3isp: Use isp xclk defines ... Fix up trivial conflict (spelink errurs) in drivers/media/video/omap3isp/isp.c
| * [media] tda18271: update tda18271c2_rf_cal as per NXP's rev.04 datasheetMichael Krufky2011-04-191-4/+5
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: update tda18271_rf_band as per NXP's rev.04 datasheetMichael Krufky2011-04-191-2/+1
| | | | | | | | | | | | Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix bad calculation of main post divider byteMichael Krufky2011-04-191-10/+1
| | | | | | | | | | | | | | | | | | | | | | R_MPD bit 3 does not depend on analog vs. digital. Just use (0x7f & pd) directly from the values in the main pll table. Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: prog_cal and prog_tab variables should be s32, not u8Michael Krufky2011-04-191-10/+11
| | | | | | | | | | | | | | | | Fix type of prog_cal and prog_tab variables to avoid any possible calculation errors. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * [media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_initMichael Krufky2011-04-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | Misplaced parenthesis cause a calculation bug in tda18271_rf_tracking_filters_init Thanks to Stefan Sibiga for pointing this out. Cc: Stefan Sibiga <stefansibiga@yahoo.ca> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* | Fix common misspellingsLucas De Marchi2011-03-313-6/+6
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
OpenPOWER on IntegriCloud