summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] DVB: Add SYS_TURBO for north american turbo code FECAndreas Oberritter2011-09-032-0/+2
| | | | | Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib9000: return error code on failureDan Carpenter2011-09-031-1/+1
| | | | | | | The ret = -EIO needs to be before the goto. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dib7000p: return error code on allocation failureDan Carpenter2011-09-031-1/+1
| | | | | | | The goto needs to be moved after the assignment. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb-core, tda18271c2dd: define get_if_frequency() callbackMauro Carvalho Chehab2011-09-033-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tuners in general convert a high frequency carrier into an Intermediate Frequency (IF). Digital tuners like tda18271, xc3028, etc. generally allow changing the IF frequency, although they generally have recommented settings for the IF. Analog tuners, have a fixed IF frequency, that depends on the physical characteristics of some analog components. For digital tuners, it makes sense to have ways to configure IF, via the tuner's configuration structure, like what's done inside the tda18271-fe maps. The demods need to know what IF is used by the tuner, as it will need to convert internally from IF into baseband. Currently, the bridge driver needs to fill a per-demod configuration struct for it, or pass it via a dvb_attach parameter. The tda18271 datasheet recommends to use different IF's for different delivery system types and for different bandwidths. The DRX-K demod also needs to know the IF frequency in order to work, just like all other demods. However, as it accepts different delivery systems (DVB-C and DVB-T), the IF may change if the standard and/or bandwidth is changed. So, the usual procedure of passing it via a config struct doesn't work. One might try to code it as two separate IF frequencies, or even as a table in function of the delivery system and the bandwidth, but this will be messy. So, it is better and simpler to just add a new callback for it and require the tuners that can be used with MFE frontends like drx-k to implement a new callback to return the used IF. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Antti Palosaari <crope@iki.fi>
* [media] em28xx: add em28xx_ prefix to functionsJarod Wilson2011-09-031-30/+28Star
| | | | | | | | | | Makes it more straight-forward to follow stack traces if the functions don't have generic names. Using this as a crutch while trying to better understand the lockdep warnings I get when loading the em28xx driver. CC: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] redrat3: remove unused dev struct membersJarod Wilson2011-09-031-7/+0Star
| | | | | Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] videobuf2: Do not unconditionally map S/G buffers into kernel spaceJonathan Corbet2011-09-031-6/+0Star
| | | | | | | | | | | | | The one in-tree videobuf2-dma-sg driver (mmp-camera) has no need for a kernel-space mapping of the buffers; one suspects that most other drivers would not either. The videobuf2-dma-sg module does the right thing if buf->vaddr == NULL - it maps the buffer on demand if somebody needs it. So let's not map the buffer at allocation time; that will save a little CPU time and a lot of address space in the vmalloc range. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: dvb_frontend: update locking in dvb_frontend_{add, get_event}Andreas Oberritter2011-09-031-17/+7Star
| | | | | | | | | | | | | | - fepriv->parameters_out isn't protected by events->mtx, so move the call to fe->ops.get_frontend out of the locked area. - move the assignment of e->status into the locked area. - use direct assignment instead of memcpy. - use mutex_lock instead of mutex_lock_interruptible, because all code paths protected by this mutex won't block. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: dvb_frontend: clear stale events on FE_SET_FRONTENDAndreas Oberritter2011-09-031-0/+11
| | | | | | | the first event after an attempt to tune. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: dvb_frontend: avoid possible race condition on first eventAndreas Oberritter2011-09-031-1/+1
| | | | | | | enqueued before the frontend thread wakes up. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] DVB: dvb_frontend: fix stale parameters on initial frontend eventAndreas Oberritter2011-09-031-0/+7
| | | | | | | Modify it to use the data given by the user. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/video/hexium_gemini.c: delete useless initializationJulia Lawall2011-09-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete nontrivial initialization that is immediately overwritten by the result of an allocation function. The semantic match that makes this change is as follows: // <smpl> @@ type T; identifier i; expression e; @@ ( T i = \(0\|NULL\|ERR_PTR(...)\); | -T i = e; +T i; ) ... when != i i = \(kzalloc\|kcalloc\|kmalloc\)(...); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Don't try to use a non-existing interfaceMauro Carvalho Chehab2011-09-011-0/+6
| | | | | | | | | | | | | | | > [34883.426065] tm6000 #0: registered device video0 > [34883.430591] Trident TVMaster TM5600/TM6000/TM6010 USB2 board (Load status: 0) > [34883.437763] usbcore: registered new interface driver tm6000 > [34884.608372] BUG: unable to handle kernel NULL pointer dereference at 00000002 > [34884.615514] IP: [<f8c4ceea>] tm6000_reset+0xd7/0x11c [tm6000] The dev->int_in USB interfaces is used by some devices for the Remote Controller. Not all devices seem to define this interface, so, tm6000_reset should not try to set the interface to it on such devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Enable radio mode for Cinergy Hybrid XEThierry Reding2011-08-311-0/+5
| | | | | Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Enable audio clock in radio modeThierry Reding2011-08-311-0/+1
| | | | | Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Plug memory leak on PCM freeThierry Reding2011-08-311-0/+1
| | | | | | | | When releasing hardware resources, the DMA buffer allocated to the PCM device needs to be freed to prevent a memory leak. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Do not use video buffers in radio modeThierry Reding2011-08-311-8/+10
| | | | | | | | If the radio device is opened there is no need to initialize the video buffer queue because it is not used. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Execute lightweight reset on closeThierry Reding2011-08-313-0/+51
| | | | | | | | | | | When the last user closes the device, perform a lightweight reset of the device to bring it into a well-known state. Note that this is not always enough with the TM6010, which sometimes needs a hard reset to get into a working state again. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Initialize isochronous transfers only onceThierry Reding2011-08-311-6/+2Star
| | | | | | | | | This fixes a memory leak where isochronous buffers would be set up for each video buffer, while it is sufficient to set them up only once per device. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Properly count device usageThierry Reding2011-08-311-2/+3
| | | | | | | | | | When the USB device is disconnected, the device usage bit is not cleared properly. This leads to errors when a device is unplugged and replugged several times until all TM6000_MAXBOARDS bits are used and keeps the driver from binding to the device. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Add locking for USB transfersThierry Reding2011-08-313-1/+5
| | | | | | | | | This commit introduces the usb_lock mutex to ensure that a USB request always gets the proper response. While this is currently not really necessary it will become important as there are more users. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Rework standard register tablesThierry Reding2011-08-311-316/+294Star
| | | | | | | | | | This commit uses sentinel entries to terminate the TV standard register tables instead of hard-coding their size, allowing further entries to be added more easily. It is also more space-efficient if the tables have a varying number of entries. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Disable video interface in radio modeThierry Reding2011-08-311-1/+6
| | | | | | | | | Video data is useless in radio mode, so the corresponding interface can be safely disabled. This should reduce the amount of isochronous traffic noticeably. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Rename active interface registerThierry Reding2011-08-313-9/+11
| | | | | | | | The register ACTIVE_VIDEO_IF register should be named ACTIVE_IF since it controls more than just the video interface. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Flesh out the IRQ callbackThierry Reding2011-08-311-1/+13
| | | | | | | | This brings the IRQ callback implementation more in line with how other drivers do it. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Implement I2C flush callbackThierry Reding2011-08-312-5/+5
| | | | | Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Use correct input in radio modeThierry Reding2011-08-311-13/+15
| | | | | | | | | In radio mode, the correct input is rinput. The pseudo index 5 is used but cannot be used to index the vinput array because that only has 3 elements. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tm6000: Miscellaneous cleanupsThierry Reding2011-08-318-79/+59Star
| | | | | | | | This commit fixes a number of coding style issues as well as some issues reported by checkpatch and sparse. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner/xc2028: Fix frequency offset for radio modeMauro Carvalho Chehab2011-08-311-3/+8
| | | | | | | | | | | In radio mode, no frequency offset should be used. Instead of taking Thierry's patch that creates a separate function to calculate the digital offset, it seemed better to just keep everything at the same place. Reported-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tuner/xc2028: Add I2C flush callbackThierry Reding2011-08-312-0/+8
| | | | | | | | | | | | | When loading the firmware, complete each chunk by sending an I2C flush command to the frontend. Some devices like the tm6000 seem to require this to properly flush the I2C buffers. The current code in tm6000 executes the flush command once after each I2C transfer, which slows down the firmware loading especially when loading large BASE type images. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] omap3isp: ccdc: Use generic frame sync event instead of private ↵Sakari Ailus2011-08-293-8/+14
| | | | | | | | | | | | | | HS_VS event The ccdc block in the omap3isp produces events whenever it starts receiving a new frame. A private HS_VS event was used for this previously. Now, the generic V4L2_EVENT_FRAME_SYNC event is being used for the purpose. This patch also provides the frame sequence number to user space. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] v4l: events: Define V4L2_EVENT_FRAME_SYNCSakari Ailus2011-08-293-3/+47
| | | | | | | | | Define a frame sync event to tell user space when the reception of a frame starts. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ttusb2: add support for the dvb-t part of CT-3650 v3Jose Alberto Reguero2011-08-273-25/+110
| | | | | | Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] cx88: notch filter control fixesistvan_v@mailbox.hu2011-08-272-4/+1Star
| | | | | | | | | | | This patch reduces the number of available choices for the notch filter type control so that the standard-specific filter types cannot be selected. It is now limited to being either 0 (4xFsc, the default) or 1 (square pixel optimized). The patch also removes the initialization of this control from cx88_reset(), since that is already done by init_controls(), which is called by cx8800_initdev(). Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18212: Use standard logging, remove tda18212_priv.hJoe Perches2011-08-272-52/+23Star
| | | | | | | | Use the more current logging styles with pr_fmt. Remove now unnecessary private include. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] tda18271: Use printk extension %pVJoe Perches2011-08-272-28/+43
| | | | | | | | | | | | | | | | Deduplicate printk formats to save ~20KB text. $ size drivers/media/common/tuners/tda18271*o.* text data bss dec hex filename 10747 56 1920 12723 31b3 drivers/media/common/tuners/tda18271-common.o.new 18889 56 3112 22057 5629 drivers/media/common/tuners/tda18271-common.o.old 20561 204 4264 25029 61c5 drivers/media/common/tuners/tda18271-fe.o.new 31093 204 6000 37297 91b1 drivers/media/common/tuners/tda18271-fe.o.old 3681 6760 440 10881 2a81 drivers/media/common/tuners/tda18271-maps.o.new 5631 6760 680 13071 330f drivers/media/common/tuners/tda18271-maps.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: use logic or instead of sum numbersAntti Palosaari2011-08-271-13/+13
| | | | | | | Style issue. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9015: map remote for Leadtek WinFast DTV2000DSAntti Palosaari2011-08-271-0/+2
| | | | | | | | Thanks to Thomas Gutzler for reporting this. Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Thomas Gutzler <thomas.gutzler@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] em28xx: use MFE lock for PCTV nanoStick T2 290eAntti Palosaari2011-08-271-1/+6
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media/dvb/dvb-usb/usb-urb.c: adjust array indexJulia Lawall2011-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as // <smpl> @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { <... ar[ - e2 + e1 ] ...> } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Add support for new revision of KNC 1 DVB-C cards. Using tda10024 ↵Julian Scheel2011-08-273-0/+7
| | | | | | | instead of tda10023, which is compatible to tda10023 driver Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] get_dvb_firmware: Firmware extraction for IT9135 based devicesBenjamin Larsson2011-08-271-1/+22
| | | | | Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] it913x: Driver for Kworld UB499-2T (id 1b80:e409) v1.05Malcolm Priestley2011-08-274-0/+624
| | | | | | | | | | | | | | | Driver for Kworld UB499-2T (id 1b80:e409) The device driver has been named it913x, so that support for other family members can be added later. TODOs Firmware support for other it913x devices. Remote control support, there are two known types. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> [mchehab@redhat.com: Fix a merge conflict] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] it9137: Fimrware retrival information for Kworld UB499-2T T09 (id ↵Malcolm Priestley2011-08-271-0/+9
| | | | | | | | | | 1b80:e409) Firmware information for Kworld UB499-2T T09 based on IT913x series. This device uses file dvb-usb-it9137-01.fw. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] it913x_fe: frontend and tuner driver v1.05Malcolm Priestley2011-08-275-0/+1294
| | | | | | | | | | | | | | | | | Fronted and Tuner Driver for ITE IT913x Series with inital support for IT9137 integrated demodulator and tuner device. The driver is loosely based on AF9035 series. However, support is not intended for this device specificity. The IT9137 tuner has been tested on UHF bands, but VHF has only been simulated. Possible TODO the tuner sections may be separated from the main driver. All future devices should use the it913x_fe_script_loader for other tuner devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> [mchehab@redhat.com: Fix an issue at the Kconfig help] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] siano: apply debug flag to module levelDoron Cohen2011-08-275-13/+2Star
| | | | | | | | | | | | | Siano modules already had sms_dbg flag which is a module parameter which sets the debug mode so module prints messages to dmesg for debugging. The variable was static therefore apply only to the file which defines the module. In modules as smsmdtv.ko that contain a few files, the debug flag applied only for functions in that main file. flag was changed to be non-static and therefore can be accessed by all module files (although it is still not exported out of the module). Signed-off-by: Doron Cohen <doronc@siano-ms.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mceusb: update version, copyright, authorJarod Wilson2011-08-271-3/+8
| | | | | | | | Add note about recent updates coming from Microsoft's publicly available specs on Windows Media Center remotes and receivers/transmitters. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mceusb: report actual tx frequenciesJarod Wilson2011-08-271-5/+11
| | | | | | | | | | | | | | | | | | | | | | Rather than dumping out hex values, lets print the actual calculated frequency and period the hardware has been configured for. After this [ 2643.276215] mceusb 3-1:1.0: tx data: 9f 07 (length=2) [ 2643.276218] mceusb 3-1:1.0: Get carrier mode and freq [ 2643.277206] mceusb 3-1:1.0: rx data: 9f 06 01 42 (length=4) [ 2643.277209] mceusb 3-1:1.0: Got carrier of 37037 Hz (period 27us) Matches up perfectly with the table in Microsoft's docs. Of course, I've noticed on one of my devices that the MS-recommended default value of 1 for carrier pre-scaler and 66 for carrier period was butchered, and instead of converting 66 to hex (0x42 like above), they put in 0x66, so the hardware reports a default carrier of 24390Hz. Fortunately, I guess, this particular device is rx-only, but I wouldn't put it past other hw to screw up here too. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mceusb: flash LED (emu v2+ only) to signal end of initJarod Wilson2011-08-271-0/+14
| | | | | Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] mceusb: get misc port data from hardwareJarod Wilson2011-08-271-1/+39
| | | | | | | | | | | | | According to the specs, you can read the number of tx ports, number of rx sensors, which tx ports have cables plugged into them, and which rx sensors are active. In practice, most of my devices do seem to report sane values for tx ports and rx sensors (but not all -- one without any tx ports reports having them), and most report the active sensor correctly, but only one of eight reports cabled tx ports correctly. So for the most part, this is just for informational purposes. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>