summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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] dib0700: remove notes from bringup of PCTV 340eDevin Heitmueller2011-07-271-62/+1
| | | | | | | | | Remove some inline comments I had written from when I was computing the proper dib7000p configuration to work with the xc4000. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> 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] dib0700: make PCTV 340e work!Devin Heitmueller2011-07-271-8/+9
| | | | | | | | | Fixup the PLL and AGC configs so that the 340e works (correcting errors I made when I did the original config blindly). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@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] dib0700: fixup PLL config for PCTV 340eDevin Heitmueller2011-07-271-1/+41
| | | | | | | | | | Based on a reference trace under Windows, reverse engineer the PLL config. Note that the xtal is not yet setup, and the timf cannot be determined yet because my reference trace doesn't actually achieve a signal lock. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@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: setup dib7000p AGC config for PCTV 340eDevin Heitmueller2011-07-271-5/+66
| | | | | | | Setup a proper AGC config for the 340e, based on the Windows USB trace 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] dib7000p: setup dev.parent for i2c master built into 7000pDevin Heitmueller2011-07-271-0/+5
| | | | | | | | | We need to set the dev.parent member on the dib7000p on its i2c master, or else calls to request_firmware() will hit an oops in 2.6.31. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: add a sleep before attempting to detect dib7000pDevin Heitmueller2011-07-271-0/+2
| | | | | | | | | Add a sleep since in some cases the dib7000p wasn't online when being probed. The optimal timing has not yet been determined. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: successfully connect to xc4000 over i2c for PCTV 340eDevin Heitmueller2011-07-271-8/+15
| | | | | | | | | Use the correct i2c bus to communicate with the tuner, and properly setup the reset GPIO and i2c address. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: properly setup GPIOs for PCTV 340eDevin Heitmueller2011-07-271-1/+63
| | | | | | | | | | | | Provide a frontend setup routine for the PCTV 340e which takes into account the specific GPIO setup of the board. Note that this patch does *not* take into account the xc4000 reset pin, which is attached to the dib7000. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: add USB id for PCTV 340eSEDevin Heitmueller2011-07-272-2/+8
| | | | | | | | | | Add the board profile for the PCTV 340eSE, since that's what I have here for development. [mchehab@redhat.com: rebased on the top of the current tree] Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib0700: add initial code for PCTV 340e by Davide FerriDavide Ferri2011-07-2710-0/+1245
| | | | | | | | | | | | 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] mt9v011: Fixed gain calculationJohannes Obermaier2011-07-271-11/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the gain calculation for this sensor is incorrect. It is only working for the first 127 values. The reason is, that the gain cannot be set directly by writing a value into the gain registers of the sensor. The gain register work this way (see datasheet page 24): bits 0 to 6 are called "initial gain". These are linear. But bits 7 and 8 ("analog multiplicative factors") and bits 9 and 10 ("digital multiplicative factors") work completely different: Each of these bits increase the gain by the factor 2. So if the bits 7-10 are 0011, 0110, 1100 or 0101 for example, the gain from bits 0-6 is multiplied by 4. The order of the bits 7-10 is not important for the resulting gain. (But there are some recommended values for low noise) The current driver doesn't do this correctly: If the current gain is 000 0111 1111 (127) and the gain is increased by 1, you would expect the image to become brighter. But the image is completly dark, because the new gain is 000 1000 0000 (128). This means: Initial gain of 0, multiplied by 2. The result is 0. This patch adds a new function which does the gain calculation and also fixes the same bug for red_balance and blue_balance. Additionally, the driver follows the recommendation from the datasheet, which says, that the gain should always be above 0x0020. Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Johannes Obermaier <johannes.obermaier@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9v011: Added exposure for mt9v011Johannes Obermaier2011-07-271-1/+21
| | | | | | | | | | | | | | | | There are problems when you use this camera/sensor in a very bright room or outside. The image is completely white, because it is overexposed. The driver uses a default value which is not suitable for all environments. This patch makes it possible to adjust the exposure time by youself. I found out by logging the i2c-data, that the windows driver for this sensor is doing this, too. I tested the camera on a sunny day and after adjusting the exposure time, I was able to see a very good image. Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Johannes Obermaier <johannes.obermaier@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mt9v011: Fixed incorrect value for the first valid columnJohannes Obermaier2011-07-271-1/+1
| | | | | | | | | | According to the datasheet (page 8), the first optical clear pixel-column is not at position 14. The correct/recommended value is 20. Without this patch there is a dark line on the left side of the image. Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Johannes Obermaier <johannes.obermaier@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc-core: fix winbond-cir issuesDavid Härdeman2011-07-271-16/+6
| | | | | | | | | | The conversion of winbond-cir to use rc-core seems to have missed a a few bits and pieces which were in my local tree. Kudos to Juan Jesús García de Soria Lucena <skandalfo@gmail.com> for noticing. [mchehab@redhat.com: fix two UTF-8 violations] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc/redrat3: dereferencing null pointerDan Carpenter2011-07-271-1/+1
| | | | | | | | | In the original code, if the allocation failed we dereference "rr3" when it was NULL. Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc: double unlock in rc_register_device()Dan Carpenter2011-07-271-1/+2
| | | | | | | | | | | If change_protocol() fails and we goto out_raw, then it calls unlock twice. I noticed that the other time we called change_protocol() we held the &dev->lock, so I changed it to hold it here too. Reviewed-by: Jarod Wilson <jarod@redhat.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: dvb_frontend: fix dtv_property_dump for DTV_DVBT2_PLP_IDAndreas Oberritter2011-07-271-1/+2
| | | | | | | | | - Add missing entry to array "dtv_cmds". - Set array size to DTV_MAX_COMMAND + 1 to avoid future off-by-ones. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] V4L/videobuf2-memops: use pr_debug for debug messagesUwe Kleine-König2011-07-271-3/+3
| | | | | | | Otherwise they clutter the dmesg buffer even on a production kernel. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb-usb.h function rc5_scanManoel Pinheiro2011-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The function "rc5_scan" in "dvb_usb.h" is returning invalid value. The value should be returned "u16" but is returning "u8". See example below in "drivers/media/dvb/dvb-usb/opera1.c": send_key = (send_key & 0xffff) | 0x0100; for (i = 0; i < ARRAY_SIZE(rc_map_opera1_table); i++) { if (rc5_scan(&rc_map_opera1_table[i]) == (send_key & 0xffff)) { *state = REMOTE_KEY_PRESSED; *event = rc_map_opera1_table[i].keycode; opst->last_key_pressed = rc_map_opera1_table[i].keycode; break; } opst->last_key_pressed = 0; } Signed-off-by: Manoel Pinheiro <pinusdtv@hotmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-sf16fmr2: convert to generic TEA575x interfaceOndrej Zary2011-07-272-390/+145
| | | | | | | | | | | | | Convert radio-sf16fmr2 to use generic TEA575x implementation. Most of the driver code goes away as SF16-FMR2 is basically just a TEA5757 tuner connected to ISA bus. The card can optionally be equipped with PT2254A volume control (equivalent of TC9154AP) - the volume setting is completely reworked (with balance control added) and tested. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx24113: Don't reuse core macro namesHans Petter Selasky2011-07-271-10/+10
| | | | | | | | The info and err macros are already defined by the USB stack. Rename these macros to avoid macro redefinition warnings. Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] itd1000: Don't reuse core macro namesHans Petter Selasky2011-07-271-14/+11
| | | | | | | | | | The dbg, warn and info macros are already defined by the USB stack. Rename these macros to avoid macro redefinition warnings. Refactor lineshift in printouts. Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] radio-si470x: fix memory leak in si470x_usb_driver_probe()Alexey Khoroshilov2011-07-271-1/+3
| | | | | | | | | radio->int_in_urb is not deallocated on error paths in si470x_usb_driver_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] media: Convert vmalloc/memset to vzallocJoe Perches2011-07-271-6/+2
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* dvb_net: Simplify the code if DVB NET is not definedMauro Carvalho Chehab2011-07-271-10/+3
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Make DVB NET configurable in the kernelHans Petter Selasky2011-07-273-2/+40
| | | | | Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tea575x: convert to control frameworkOndrej Zary2011-07-272-73/+39
| | | | | | | | | | | | Convert tea575x-tuner to use the new V4L2 control framework. Also add ext_init() callback that can be used by a card driver for additional initialization right before registering the video device (for SF16-FMR2). Also embed struct video_device to struct snd_tea575x to simplify the code. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Fix compile warning: Dereferencing type-punned pointer will break ↵Hans Petter Selasky2011-07-271-2/+2
| | | | | | | strict-aliasing rules Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: Document EACCES in VIDIOC_[GS]_CTRL and VIDIOC_{G, S, ↵Sakari Ailus2011-07-272-0/+14
| | | | | | | | | | | | | TRY}_EXT_CTRLS VIDIOC_S_CTRL and VIDIOC_S_EXT_CTRLS return EACCES when setting a read-only control VIDIOC_TRY_EXT_CTRLS when trying a read-only control and VIDIOC_G_CTRL and VIDIOC_G_EXT_CTRLS when getting a write-only control. Document this. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] videobuf_pages_to_sg: sglist[0] length problemNewson Edouard2011-07-271-2/+3
| | | | | | | | | On function videobuf_pages_to_sg the statement sg_set_page(&sglist[0], pages[0], PAGE_SIZE - offset, offset) will fail if size is less than PAGE_SIZE. Signed-off-by: Newson Edouard <newsondev@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx23885: restore flushes of cx23885_dev work itemsTejun Heo2011-07-271-0/+3
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] saa7164: poll mask set incorrectlyDan Carpenter2011-07-272-10/+2
| | | | | | | | | list_first_entry() always returns non-null here. I think the intent was to test whether there were any entries in the used list. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cxd2820r: correct missing error checksAntti Palosaari2011-07-271-0/+4
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Update several cardlistsMauro Carvalho Chehab2011-07-276-0/+12
| | | | | | | Several cardlist entries are missed. Fix them by running some script magic (about the same scripts we used to have at -hg tree). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: use the proper prefix for board namesMauro Carvalho Chehab2011-07-273-4/+4
| | | | | | | | | All boards use EM28xxx_BOARD, to identify that the macro refers to a card entry. So: EM2874_LEADERSHIP_ISDBT -> EM2874_BOARD_LEADERSHIP_ISDBT Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
OpenPOWER on IntegriCloud