summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends
AgeCommit message (Collapse)Author
2011-05-20[media] cxd2820r: Update frontend capabilities to advertise QAM-256Steve Kerrison
This is supported in DVB-T2 mode, so added to the T/T2 frontend. Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] DVB: drxd_hard: handle new bandwidths by returning -EINVALAndreas Oberritter
drivers/media/dvb/frontends/drxd_hard.c: In function ‘DRX_Start’: drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch drivers/media/dvb/frontends/drxd_hard.c:2327: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch [mchehab@redhat.com: removed the status = status assignment after the switch] Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] DVB: Add basic API support for DVB-T2 and bump minor versionAndreas Oberritter
[steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined] Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] DiBxxxx: get rid of DMA buffer on stackOlivier Grenie
This patch removes the remaining on-stack buffer for USB DMA transfer. This patch also reduces the stack memory usage. Cc: stable@kernel.org Cc: Florian Mickler <florian@mickler.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-05-20[media] cxd2820r: switch automatically between DVB-T and DVB-T2Antti Palosaari
Remove old DVB-T2 freq module param and detect DVB-T/T2 automatically. Implementation is trial and error, if DVB-T does not lock try DVB-T2 and vice versa. That's done by replacing normal DVBFE_ALGO_SW with DVBFE_ALGO_CUSTOM which gives better control for tuning process. DVB-C still uses normal software ZigZag, DVBFE_ALGO_SW. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cxd2820r: whitespace fixAntti Palosaari
Make checkpatch.pl happy by fixing whitespaces introduced by commit 79e8b8e3b8cbf67130247a3f6d25732373fe2f34 Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cxd2820r: make C, T, T2 and core components as linked objectsSteve Kerrison
Signed-off-by: Steve Kerrison <steve@stevekerrison.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] Sony CXD2820R DVB-T/T2/C demodulator driverAntti Palosaari
It is very first DVB-T2 Linux driver! Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cx24116: make FW DL split more readableAntti Palosaari
Change firmware download split, which I introduced few patch earlier, a little bit to make it more readable as requested [1]. Anyhow, for some reason this seems to increase compiled binary size 52 bytes, on my AMD64 box, which is rather much for so small change. [1] http://www.spinics.net/lists/linux-media/msg31968.html Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cx24116: add config option to split firmware downloadAntti Palosaari
It is very rare I2C adapter hardware which can provide 32kB I2C write as one write. Add .i2c_wr_max option to set desired max packet size. Split transaction to smaller pieces according to that option. Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] STV0299 Register 02 on Opera1/Bsru6/z0194a/mantis_vp1033Malcolm Priestley
Bits 4 and 5 on register 02 should always be set to 1. Opera1/Bsru6/z0194a/mantis_vp1033 Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] STV0299 incorrect standby setting issues register 02 (MCR)Malcolm Priestley
Issues with Register 02 causing spurious channel locking from standby. Should have always bits 4 & 5 written to 1. Lower nibble not used in any current driver. Usage if necessary can be applied through initab to mcr_reg. stv0299 not out of standby before writing inittab. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] IX2505V Keep I2C gate control aliveMalcolm Priestley
Gate could close after first I2C message. On stv0288 it does. Keep 2nd and 3rd message I2C gate control alive. Remove unnecessary gate closing in this module. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] DVB, DiB9000: Fix leak in dib9000_attach()Jesper Juhl
If the second memory allocation in dib9000_attach() fails, we'll leak the memory allocated by the first. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] STV0288 Register 42 - Incorrect settingsMalcolm Priestley
Register 42 bits 2,3,6 and 7 should be set to 0. This gives difficult locking on some channels and may be compensated for by other methods. This affects any driver using the stv0288 frontend on the default or earda inittab. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] budget-ci: Add support for TT S-1500 with BSBE1-D01A tunerOliver Endriss
Add support for TT S-1500 with BSBE1-D01A tuner. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] cx24116.c - fix for wrong parameter descriptionHans Petter Selasky
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: use mutex instead of semaphoreMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] Remove the now obsolete drx397xDMauro Carvalho Chehab
This was replaced by Micronas drxd driver Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: CodingStyle cleanupsMauro Carvalho Chehab
There are still lots of 80-columns warnings and a few errors at some tables, but changing them would require more work and with probably not much gain. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: Don't use a macro for CHK_ERROR with a break insideMauro Carvalho Chehab
The macro is defined as: #define CHK_ERROR(s) if( (status = s)<0 ) break This sucks, as makes harder to debug if something got wrong and there are more than one level of loops. Also, violates CodingStyle. Fixed by this simple perl script: while (<>) { $f.=$_; }; $f=~ s,\n\#define CHK_ERROR[^\n]+\n,\n,; $f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g; $f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g; $f=~ s=(CHK_ERROR\(.*\,)\n\s+=\1 =g; $f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g; $f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g; $f=~ s=(CHK_ERROR\(.*)\s+(\,)\n\s+=\1\2 =g; $f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;,\n\1status = \2;\n\1if (status < 0)\n\1\tbreak;,g; print $f; Plus a few manual adjustments Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: Fix some CodingStyle issuesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: don't re-define u8/u16/u32 typesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd_map_firm.h: Remove unused linesMauro Carvalho Chehab
This file is big. It has 12000+ lines! Most of the defined stuff aren't used anyware inside the driver, so we can just remove most of the lines and still keep everything that have any interest for the driver. If anyone ever need the other devices, it will be stored at git logs, so it is easy to recover. The diff result is impressive: 1 files changed, 1013 insertions(+), 12694 deletions(-) rewrite drivers/media/dvb/frontends/drxd_map_firm.h (90%) As a sideback effect, drxd driver will likely compile faster, and checkpatch.pl can run on this file without taking (literally) hours. The code cleanup was done using this small script: $ for i in `perl -ne 'print "$1\n" if (m/define\s+([^\s+]+)/)' drxd_map_firm.h`; do if [ "`grep $i drivers/media/dvb/frontends/drxd*.[ch]`" != "" ] ; then echo $i; fi; done|sort|uniq >used_symbols $ grep -f used_symbols drxd_map_firm.h >defines And then deleting the old #define lines, replacing by "defines" file content. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd_map_firm.h: make checkpatch.pl happierMauro Carvalho Chehab
s/(define\s+[^\s]+)\s........../\1/ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: Run lindent across sourcesDevin Heitmueller
Take a first cleanup pass over the sources to bring them closer to the Linux coding style. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: move firmware to binary blobDevin Heitmueller
Abstract out the firmware for the drx-d so that it can be loaded by the request_firmware() interface. The firmware licensing permits free redistribution, and can be found here: http://kernellabs.com/firmware/drxd Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: provide ability to disable the i2c gate control functionDevin Heitmueller
If the tuner is not actually behind an i2c gate, using the i2c gate control function can wedge the i2c bus. Provide the ability to control on a per-board basis whether it should be used. Problem was noticed on the HVR-900 R2, where it resulted in the first tuning attempt succeeding, and then all subsequent attempts to access the xc3028 being treated as failures (including the call to sleep the tuner). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: provide ability to control rs byteDevin Heitmueller
Provide the ability for the board configuration to specify whether to insert the RS byte into the TS interconnect to the bridge, while not required for the ngene in fact is required for the em28xx. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20[media] drxd: add driver to Makefile and KconfigDevin Heitmueller
Add the drxd to the Makefile and Kconfig Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20drx: add initial drx-d driverRalph Metzler
These are the original drx-d sources, extracted from Ralph Metzler's GPL'd ngene driver. No modifications/cleanup have yet been made. In fact, no measures have been taken to see if the code even compiles. Signed-off-by Ralph Metzler <rjkm@metzlerbros.de> Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-22[media] STV0288 added full frontend statusMalcolm Priestley
status now returns FE_HAS_CARRIER FE_HAS_SIGNAL FE_HAS_VITERBI Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] stv0367: typo in function parameterDan Carpenter
The CellsCoeffs arrays are [3][6][5] not [2][6][5]. Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] stv0367: signedness bug in stv0367_get_tuner_freq()Dan Carpenter
We use err to store negative error codes so it should be signed. And if we return an error from stv0367_get_tuner_freq() that needs to be handled properly as well. (param->frequency is a u32). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] Zarlink zl10036 DVB-S: Fix mem leak in zl10036_attachJesper Juhl
On Thu, 17 Feb 2011, Matthias Schwarzott wrote: > On Sunday 06 February 2011, Jesper Juhl wrote: > > If the memory allocation to 'state' succeeds but we jump to the 'error' > > label before 'state' is assigned to fe->tuner_priv, then the call to > > 'zl10036_release(fe)' at the 'error:' label will not free 'state', but > > only what was previously assigned to 'tuner_priv', thus leaking the memory > > allocated to 'state'. > > There are may ways to fix this, including assigning the allocated memory > > directly to 'fe->tuner_priv', but I did not go for that since the > > additional pointer derefs are more expensive than the local variable, so I > > just added a 'kfree(state)' call. I guess the call to 'zl10036_release' > > might not even be needed in this case, but I wasn't sure, so I left it in. > > > Yeah, that call to zl10036_release can be completely eleminated. > Another thing is: jumping to the error label only makes sense when memory was > already allocated. So the jump in line 471 can be replaced by "return NULL", > as the other error handling before allocation: > if (NULL == config) { > printk(KERN_ERR "%s: no config specified", __func__); > goto error; > } > > I suggest to improve the patch to clean the code up when changing that. > > But I am fine with commiting this patch also if you do not want to change it. > Thank you for your feedback. It makes a lot of sense. Changing it is not a problem :) How about the updated patch below? If the memory allocation to 'state' succeeds but we jump to the 'error' label before 'state' is assigned to fe->tuner_priv, then the call to 'zl10036_release(fe)' at the 'error:' label will not free 'state', but only what was previously assigned to 'tuner_priv', thus leaking the memory allocated to 'state'. This patch fixes the leak and also does not jump to 'error:' before mem has been allocated but instead just returns. Also some small style cleanups. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] af9013: reimplement firmware downloadAntti Palosaari
Split FW download packages smarter way and bug free. Implementation is based of Andrea Merello's example he provided for tda18218 driver. Count remaining FW bytes down in loop instead of division and modulo combination used earlier. Thanks to: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] af9013: download FW earlier in attach()Antti Palosaari
Quick test shows that FW must be running before other checks so make it happen earlier. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] stv0367: implement uncorrected blocks counterAbylay Ospan
Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] stv0367: change default value for AGC registerAbylay Ospan
Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22[media] stv0367.c: fix compiler warningHans Verkuil
drivers/media/dvb/frontends/stv0367.c: In function 'stv0367ter_lock_algo': drivers/media/dvb/frontends/stv0367.c:1315:2: warning: cast from pointer to integer of different size Use %p to print addresses instead of 0x%x. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] ds3000: wrong hardware tune function implementedIgor M. Liplianin
It is taken from another tree, where it is modified. Patch to fix that Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] stv0900: Update status when LOCK is missedAbylay Ospan
Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] stv0900: speed up DVB-S searchingIgor M. Liplianin
Simptoms: After zapping DVB-S2 channel searching for DVB-S tooks long time. Now it takes less than a second. Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] dib9000: fix return type in dib9000_mbx_send_attr()Dan Carpenter
dib9000_mbx_send_attr() returns an int. It doesn't work to save negative error codes in an unsigned char, so I've made "ret" an int type. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] dib8000: fix small memory leak on errorDan Carpenter
kfree(state) if fe allocation fails. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] stv090x: handle allocation failuresDan Carpenter
kmalloc() can fail so check whether state->internal is NULL. append_internal() can return NULL on allocation failures so check that. Also if we hit the error condition later in the function then there is a memory leak and we need to call remove_dev() to fix it. Also Oliver Endriss pointed out an additional leak that I missed in the first version of this patch. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] cx88: add support for TeVii S464 PCI cardIgor M. Liplianin
The card uses ds3000 demod from Montage. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] ds3000: hardware tune algorithmIgor M. Liplianin
Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21[media] ds3000: add carrier offset calculationIgor M. Liplianin
Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>