summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
AgeCommit message (Collapse)Author
2011-10-31Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (348 commits) [media] pctv452e: Remove bogus code [media] adv7175: Make use of media bus pixel codes [media] media: vb2: fix incorrect return value [media] em28xx: implement VIDIOC_ENUM_FRAMESIZES [media] cx23885: Stop the risc video fifo before reconfiguring it [media] cx23885: Avoid incorrect error handling and reporting [media] cx23885: Avoid stopping the risc engine during buffer timeout [media] cx23885: Removed a spurious function cx23885_set_scale() [media] cx23885: v4l2 api compliance, set the audioset field correctly [media] cx23885: hook the audio selection functions into the main driver [media] cx23885: add generic functions for dealing with audio input selection [media] cx23885: fixes related to maximum number of inputs and range checking [media] cx23885: Initial support for the MPX-885 mini-card [media] cx25840: Ensure AUDIO6 and AUDIO7 trigger line-in baseband use [media] cx23885: Enable audio line in support from the back panel [media] cx23885: Allow the audio mux config to be specified on a per input basis [media] cx25840: Enable support for non-tuner LR1/LR2 audio inputs [media] cx23885: Name an internal i2c part and declare a bitfield by name [media] cx23885: Ensure VBI buffers timeout quickly - bugfix for vbi hangs during streaming [media] cx23885: remove channel dump diagnostics when a vbi buffer times out ... Fix up trivial conflicts in drivers/misc/altera-stapl/altera.c (header file rename vs add)
2011-10-11[media] stb0899: Fix slow and not locking DVB-S transponder(s)Lutz Sammer
In stb0899_status stb0899_check_data the first read of STB0899_VSTATUS could read old (from previous search) LOOP status bit and the search fails on a good frequency. With the patch more transponder could be locked and locks about 2* faster. Signed-off-by: Lutz Sammer<johns98@gmx.net> Reviewed-by: Manu Abraham<manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-10-08[media] it913x-fe changes to power up and down of tunerMalcolm Priestley
Currently the tuner is constantly powered causing these effects. 1. Remembering last tune channel causing corruptions of changing channel. 2. Causing corruption on other frontend. 3. Higher current in standby of demodulator with clock running. Power sequence now follows; Power Up Tuner on -> Frontend suspend off -> Tuner clk on Power Down Frontend suspend on -> Tuner clk off -> Tuner off Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-30[media] dib9000: release a lock on errorDan Carpenter
This lock should be released as well on the error path. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Patrick Boettcher <Patrick.Boettcher@dibcom.fr> Cc: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-27doc: fix broken referencesPaul Bolle
There are numerous broken references to Documentation files (in other Documentation files, in comments, etc.). These broken references are caused by typo's in the references, and by renames or removals of the Documentation files. Some broken references are simply odd. Fix these broken references, sometimes by dropping the irrelevant text they were part of. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-09-25[media] stv090x: set status bits when there is no lockGuy Martin
Currently, the stv090x driver only set the status bits to SCVYL when there is a lock. This patch set the right bits even if there is no lock. Signed-off-by: Guy Martin <gmsoft@tuxicoman.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-25[media] Increase a timeout, so that bad scheduling does not accidentially ↵Hans Petter Selasky
cause a timeout --HPS >From 18faaafc9cbbe478bb49023bbeae490149048560 Mon Sep 17 00:00:00 2001 Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-24[media] dvb: Add support for pctv452eIgor M. Liplianin
Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-23[media] it913x-fe: correct tuner settingstvboxspy
Correct tuner settings for more accuracy. This now makes the tuner section more compatible with other versions of the IT913X series. TODOs Version 2 chip Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] TT-budget S2-3200 cannot tune on HB13E DVBS2 transponderLutz Sammer
The FEC fix patch fixed locking on 11,681 Ghz, but not on 12,692 Ghz for me. Reviewed-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] STV0288 frontend provide wider carrier search and DVB-S2 drop out. ↵tvboxspy
resend The following patch provides wider carrier search. As with existing code search starts at MSB aligned. The boundary is widened to start at -9. In order to save time, if no carrier is detected at the start it advances to the next alignment until carrier is found. The stv0288 will detect a DVB-S2 carrier on all steps , a time out of 11 steps is introduced to drop out of the loop. In stv0288_set_symbol carrier and timing loops are restored to default values (inittab) before setting the symbol rate on each tune. A slight drift was noticed with full scan in the higher IF frequencies of each band. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] tda10071: change sleeps to more suitable onesAntti Palosaari
msleep() => usleep_range() Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] tda10071: do not download last byte of fwAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] tda10071: NXP TDA10071 DVB-S/S2 driverAntti Palosaari
NXP TDA10071 DVB-S/S2 demodulator & Conexant CX24118A tuner combo driver Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-21[media] a8293: Allegro A8293 SEC driverAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-06[media] drxd_hard: fix compiler warningsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-04[media] drxd: fix divide errorEdward Sheldrake
Fix division by zero in drxd triggered by running "femon" before any DVB tuning has been done (by "scandvb" or anything else). Signed-off-by: Edward Sheldrake <ejsheldrake@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] em28xx: don't sleep on disconnectChris Rankin
The DVB framework will try to power-down an adapter that no-one is using any more, but this assumes that the adapter is still connected to the machine. That's not always true for a USB adapter, so disable the sleep operations when the adapter has been physically unplugged. This prevents I2C write failures with error -19 from appearing occasionally in the dmesg log. Signed-off-by: Chris Rankin <rankincj@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] drivers/media: do not use EXTRA_CFLAGSArnaud Lacombe
Usage of these flags has been deprecated for nearly 4 years by: commit f77bf01425b11947eeb3b5b54685212c302741b8 Author: Sam Ravnborg <sam@neptun.(none)> Date: Mon Oct 15 22:25:06 2007 +0200 kbuild: introduce ccflags-y, asflags-y and ldflags-y Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command line use. By default, gmake(1) do not override command line setting, so this is likely to result in build failure or unexpected behavior. Replace their usage by Kbuild's `{as,cc,ld}flags-y'. Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: linux-media@vger.kernel.org Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] CXD2820R: Replace i2c message translation with repeater gate controlSteve Kerrison
This patch implements an i2c_gate_ctrl op for the cxd2820r. Thanks to Robert Schlabbach for identifying the register address and field to set. The old i2c intercept code that prefixed messages with a passthrough byte has been removed and the PCTV nanoStick T2 290e entry in em28xx-dvb has been updated appropriately. Tested for DVB-T2 use; I would appreciate it if somebody with DVB-C capabilities could test it as well - from inspection I cannot see any problems. This is patch v2. It fixes some schoolboy style errors and removes superfluous i2c entries in cxd2820r.h. Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Acked-by: Antti Palosaari <crope@iki.fi> Tested-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-09-03[media] dib9000: return error code on failureDan Carpenter
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>
2011-09-03[media] dib7000p: return error code on allocation failureDan Carpenter
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>
2011-09-03[media] dvb-core, tda18271c2dd: define get_if_frequency() callbackMauro Carvalho Chehab
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>
2011-08-27[media] ttusb2: add support for the dvb-t part of CT-3650 v3Jose Alberto Reguero
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>
2011-08-27[media] it913x_fe: frontend and tuner driver v1.05Malcolm Priestley
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>
2011-08-06[media] DiBcom: protect the I2C bufer accessPatrick Boettcher
This patch protects the I2C buffer access in order to manage concurrent access. This protection is done using mutex. Furthermore, for the dib9000, if a pid filtering command is received during the tuning, this pid filtering command is delayed to avoid any concurrent access issue. Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Florian Mickler <florian@mickler.org> Cc: stable@kernel.org Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr> Signed-off-by: Patrick Boettcher <Patrick.Boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-28[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHzMauro Carvalho Chehab
Currently, the driver assumes that all QAM carriers are spaced with 8MHz. This is wrong, and may decrease QoS on Countries like Brazil, that have DVB-C carriers with 6MHz-spaced. Fortunately, both ITU-T J-83 and EN 300 429 specifies a way to associate the symbol rate with the bandwidth needed for it. For ITU-T J-83 2007 annex A, the maximum symbol rate for 6 MHz is: 6 MHz / 1.15 = 5217391 Bauds For ITU-T J-83 2007 annex C, the maximum symbol rate for 6 MHz is: 6 MHz / 1.13 = 5309735 Bauds. As this tuner is currently used only for DRX-K, and it is currently hard-coded to annex A, I've opted to use the roll-off factor of 0.15, instead of 0.13. If we ever support annex C, the better would be to add a DVB S2API call to allow changing between Annex A and C, and add the 0.13 roll-off factor to it. This code is currently being used on other frontends, so I think we should later add a core function with this code, to warrant that it will be properly implemented everywhere. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] au8522: set signal field to 100% when signal presentDevin Heitmueller
The signal state field in G_TUNER is typically scaled from 0-100%. Since we don't know the signal level, we really would prefer the field to contain 100% than 1/256, which in many utilities (such as v4l2-ctl) rounds to 0% even when a signal is actually present. This patch makes the behavior consistent with other drivers. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix the logic that selects between DVB-C annex A and CMauro Carvalho Chehab
Fix the DRX-K logic that selects between DVB-C annex A and C Fix a typo where DVB-C annex type is set via setEnvParameters, but the driver, uses, instead, setParamParameters[2]. While here, cleans up the code, fixing a bad identation at the fallback code for other types of firmware, and put the multiple-line comments into the Linux CodingStyle. Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix read debug messageMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix error return code during drxk initMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Remove goto/break after returnMauro Carvalho Chehab
After return, we don't need any other statement to change the function flux ;) Reported-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix a bug at some switches that broke DVB-TMauro Carvalho Chehab
The error propagation changeset c23bf4402 broke the DVB-T code. The legacy way for propagate errors was: do { status = foo_func() if (status < 0) break; } while (0); return status; However, on a few places, it was doing: do { switch(foo) { case bar: status = foo_func() if (status < 0) break; break; } switch(foo2) { case bar: status = foo_func() if (status < 0) break; break; } ... } while (0); return (status) The inner error break were not working, as it were breaking only the switch, instead of the do. The solution used were to do a s/break/goto error/ at the inner breaks, but preserving the last break. Onfortunately, on a few switches, the replacement were applied also to the final break for the case statements. Fix the broken logic, by reverting them to break, where pertinent, in order to fix DVB-T support. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] Remove the double symbol increment hack from drxk_hardMauro Carvalho Chehab
Both ngene and ddbrige calls dvb_attach once for drxk_attach. The logic used there, and by tda18271c2dd driver is different from similar logic on other frontends. The right fix is to change them to use the same logic, but, while we don't do that, we need to patch em28xx-dvb in order to do cope with ngene/ddbridge magic. While here, document why drxk_t_release should do nothing. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] media, Micronas dvb-t: Fix mem leaks, don't needlessly zero mem, fix ↵Jesper Juhl
spelling In drivers/media/dvb/frontends/drxd_hard.c::load_firmware() I see 3 small issues: 1) When the 'fw' variable goes out of scope we'll leak the memory allocated to it by request_firmware() by neglecting to call release_firmware(). 2) After a successful request_firmware() we allocate fw->size bytes of memory using kzalloc() only to immediately overwrite all that memory with memcpy(), so asking for zeroed memory seems like wasted effort - just use kmalloc(). 3) In one of the error messages "no memory" lacks a space and is written as "nomemory". This patch fixes all 3 issues. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27tda18271c2dd: Fix compilation when module is not selectedMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] tda18271c2dd.h: Don't add the same symbol twiceMauro Carvalho Chehab
Should be folded with the next patch when sending upstream Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] dvb: don't cause missing symbols for drxk/tda18271c2ddMauro Carvalho Chehab
If those demods are unselected, but a bridge driver requires them, produce a runtime message, instead of missing symbols. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: remove a now unused variableMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Add a fallback method for QAM parameter settingMauro Carvalho Chehab
The QAM standard is set using this scu_command: SCU_RAM_COMMAND_STANDARD_QAM | SCU_RAM_COMMAND_CMD_DEMOD_SET_PARAM The driver implements a version that has 4 parameters, however, Terratec H5 needs to break this into two separate commands, otherwise, DVB-C doesn't work. With this fix, scan is now properly working and getting the channel list: >>> tune to: 609000000:INVERSION_AUTO:5217000:FEC_3_4:QAM_256 >>> tuning status == 0x00 >>> tuning status == 0x07 >>> tuning status == 0x1f 0x0093 0x0026: pmt_pid 0x0758 (null) -- SporTV2 (running, scrambled) 0x0093 0x0027: pmt_pid 0x0748 (null) -- SporTV (running, scrambled) 0x0093 0x0036: pmt_pid 0x0768 (null) -- FX (running, scrambled) 0x0093 0x0052: pmt_pid 0x0788 (null) -- The History Channel (running, scrambled) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Improve the scu_command error messageMauro Carvalho Chehab
Now, it outputs: [10927.639641] drxk: SCU_RESULT_INVPAR while sending cmd 0x0203 with params: [10927.646283] drxk: 02 00 00 00 10 00 07 00 03 02 .......... Better than ERROR -3. This happens with Terratec H5 firmware. It adds 2 new error conditions, and something useful to track what the heck is that. I suspect that the scu_command is dependent on the firmware revision. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Simplify the DVB-C set mode logicMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix driver removalMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Improves the UIO handlingMauro Carvalho Chehab
The driver is too limited: it assumes that UIO is used only for controlling the antenna, and that only UIO-1 is in usage. However, from Terratec H7 driver [1], 3 UIO's can be used. In fact, it seems that H7 needs to use all 3. So, make the code generic enough to handle the most complex scenario. For now, only antena GPIO can be specified, but is is easier now to add the other GPIO/UIO needs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Print detected configurationMauro Carvalho Chehab
DRX-K configuration is interesting when writing/testing new devices. Add an info line showing the discovered info. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Fix the antenna switch logicMauro Carvalho Chehab
Terratec H5 doesn't require to switch mode, but generates an error due to this logic. Also, GPIO's are board-dependent. So, add it at the board config struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: change mode before calling the set mode routinesMauro Carvalho Chehab
The set mode routines assume that state were changed to the new mode, otherwise, they'll fail. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Proper handle/propagate the error codesMauro Carvalho Chehab
This driver is very big and complex. An error happening in the middle of any initialization may cause the frontend to not work. So, it needs to properly propagate error codes internally and to userspace. Also, printing the error codes at the places it happened helps to discover were's a bug at the code. Before this change, a do { } while (0) loop and lots of breaks inside were used to propagate errors. While this works, if there are loops inside other loops, it could be easy to forget to add another break, causing the error to not abort the function. Also, as not all functions were reporting errors, it is hard to discover why something failed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Allow to disable I2C Bridge control switchMauro Carvalho Chehab
On em28xx, tda18271C2 is accessible when the i2c port is not touched. Touching on it breaks the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Add a parameter for the microcode nameMauro Carvalho Chehab
The microcode firmware provided on Terratec H5 seems to be different. Add a parameter to allow specifying a different firmware per-device. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>