summaryrefslogtreecommitdiff
path: root/drivers/media/dvb
AgeCommit message (Collapse)Author
2011-07-27[media] drxk: fix warning: ‘status’ may be used uninitialized in this ↵Mauro Carvalho Chehab
function One of the problems of the old CHECK_ERROR is that it was hiding the status parameter. Maybe due to that, on a few places, the return code might lead to return incorrect status: drivers/media/dvb/frontends/drxk_hard.c: In function ‘load_microcode.clone.0’: drivers/media/dvb/frontends/drxk_hard.c:1281: warning: ‘status’ may be used uninitialized in this function drivers/media/dvb/frontends/drxk_hard.c:1281: note: ‘status’ was declared here drivers/media/dvb/frontends/drxk_hard.c: In function ‘GetLockStatus’: drivers/media/dvb/frontends/drxk_hard.c:1792: warning: ‘status’ may be used uninitialized in this function drivers/media/dvb/frontends/drxk_hard.c: In function ‘Start.clone.7’: drivers/media/dvb/frontends/drxk_hard.c:1734: warning: ‘status’ may be used uninitialized in this function Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Return -EINVAL if an invalid bandwidth is usedMauro Carvalho Chehab
drivers/media/dvb/frontends/drxk_hard.c: In function ‘SetDVBT’: drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_5_MHZ’ not handled in switch drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_10_MHZ’ not handled in switch drivers/media/dvb/frontends/drxk_hard.c:3766: warning: enumeration value ‘BANDWIDTH_1_712_MHZ’ not handled in switch Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] tda18271c2dd: Remove the CHK_ERROR macroMauro Carvalho Chehab
The CHK_ERROR macro does a flow control, violating chapter 12 of the Documentation/CodingStyle. Doing flow controls inside macros is a bad idea, as it hides what's happening. It also hides the var "status" with is also a bad idea. The changes were done by this small perl script: my $blk=0; while (<>) { s/^\s+// if ($blk); $f =~ s/\s+$// if ($blk && /^\(/); $blk = 1 if (!m/\#/ && m/CHK_ERROR/); $blk=0 if ($blk && m/\;/); s/\n/ / if ($blk); $f.=$_; }; $f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g; print $f; And manually fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxk: Remove the CHK_ERROR macroMauro Carvalho Chehab
The CHK_ERROR macro does a flow control, violating chapter 12 of the Documentation/CodingStyle. Doing flow controls inside macros is a bad idea, as it hides what's happening. It also hides the var "status" with is also a bad idea. The changes were done by this small perl script: my $blk=0; while (<>) { s /^\s+// if ($blk); $f =~ s/\s+$// if ($blk && /^\(/); $blk = 1 if (!m/\#/ && m/CHK_ERROR/); $blk=0 if ($blk && m/\;/); s/\n/ / if ($blk); $f.=$_; }; $f=~ s,\n(\t+)CHK_ERROR\((.*)\)\;([^\n]*),\n\1status = \2;\3\n\1if (status < 0)\n\1\tbreak;,g; print $f; And manually fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxd/drxk: Don't export MulDiv32 symbolMauro Carvalho Chehab
/home/v4l/v4l/patchwork/drivers/media/dvb/frontends/drxk_hard.c:181: multiple definition of `MulDiv32' drivers/media/dvb/frontends/drxd.o:/home/v4l/v4l/patchwork/drivers/media/dvb/frontends/drxd_hard.c:236: first defined here Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Strip dummy packets inserted by the driverOliver Endriss
As the CI requires a continuous data stream, the driver inserts dummy packets when necessary. Do not pass these packets to userspace anymore. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Update for latest cxd2099Oliver Endriss
Modifications for latest cxd2099. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Support DuoFlex CT attached to CineS2 and SaTiX-S2Oliver Endriss
Support DuoFlex CT with Digital Devices CineS2 and Mystique SaTiX-S2. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Fix name of Digital Devices PCIe/miniPCIeOliver Endriss
Fix name of Digital Devices PCIe/miniPCIe. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Fix return code if no demux was foundOliver Endriss
Fix return code if no demux was found (cineS2_probe). Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Codingstyle fixesOliver Endriss
Codingstyle fixes Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] ngene: Support Digital Devices DuoFlex CTRalph Metzler
Support Digital Devices DuoFlex CT with ngene. Signed-off-by: Ralph Metzler <rmetzler@digitaldevices.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] DRX-K, TDA18271c2: Add build supportOliver Endriss
Add both drivers to Makefile and Kconfig. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] DRX-K: Tons of coding-style fixesOliver Endriss
Tons of coding-style fixes Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] DRX-K: Shrink size of drxk_map.hOliver Endriss
Deleted all unused symbold from drxk_map.h, which reduced the size from 1.1M to 37K! Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] DRX-K: Initial check-inRalph Metzler
Driver for the DRX-K DVB-C/T demodulator. Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] tda18271c2dd: Lots of coding-style fixesOliver Endriss
Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] tda18271c2dd: Initial check-inRalph Metzler
Driver for the NXP TDA18271c2 silicon tuner. Signed-off-by: Ralph Metzler <rjkm@metzlerbros.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] firedtv: change some -EFAULT returns to more fitting error codesStefan Richter
Mauro Carvalho Chehab wrote: > I'm validating if all drivers are behaving equally with respect to the > error codes returned to userspace, and double-checking with the API. > > On almost all places, -EFAULT code is used only to indicate when > copy_from_user/copy_to_user fails. However, firedtv uses a lot of > -EFAULT, where it seems to me that other error codes should be used > instead (like -EIO for bus transfer errors and -EINVAL/-ERANGE for > invalid/out of range parameters). This concerns only the CI (CAM) related code of firedtv of which I know little. Let's just pass through the error returns of lower level I/O code where applicable, and -EACCES (permission denied) when a seemingly valid but negative FCP response or an unknown-to-firedtv CA message is received. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Henrik Kurelid <henrik@kurelid.se> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] dvb-bt8xx: Don't return -EFAULT when a device is not foundMauro Carvalho Chehab
When a device (or their PCI structs) are not found, the error should be -ENODEV. -EFAULT is reserved for errors while copying arguments from/to userspace. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] nxt6000: i2c bus error should return -EIOMauro Carvalho Chehab
data from/to userspace. Don't mix it with I2C bus error (-EIO). Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] siano: bad parameter is -EINVAL and not -EFAULTMauro Carvalho Chehab
Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] drxd, siano: Remove unused include linux/version.hMauro Carvalho Chehab
Both drxd and siano drivers were including linux/version.h without any reason. Probably, this is due to some compatibility code that used to exist before having their support added into the Linux Kernel. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] dvb: remove unnecessary codeGreg Dietsche
remove unnecessary code that matches this coccinelle pattern if (...) return ret; return ret; Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] dvb-usb/technisat-usb2: don't use flush_scheduled_work()Tejun Heo
flush_scheduled_work() is deprecated and scheduled to be removed. technisat-usb2 already sync-cancels the only work item it uses and there's no reason for it to call flush_scheduled_work(). Don't use it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] frontends/s5h1420: Change: clock_settting to clock_settingJustin P. Mattock
Changes clock_settting to clock_setting. Note: This could be intentionally set this way from the beginning and/or is a typo. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] Remove unused definitions which can cause conflict with definitions ↵Hans Petter Selasky
in usb/ch9.h >From 0dd2949dfeae431ed4ffbd00fd14a10dc3747ad0 Mon Sep 17 00:00:00 2001 Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] xc4000: make checkpatch.pl happyMauro Carvalho Chehab
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>
2011-07-27[media] xc4000: removed card_typeistvan_v@mailbox.hu
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>
2011-07-27[media] dvb-usb/Kconfig: auto-select XC4000 tuner for dib0700istvan_v@mailbox.hu
Automatically select the xc4000 module for dib0700 if the tuner selection is not customized. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Cc: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] xc4000: code cleanupistvan_v@mailbox.hu
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>
2011-07-27[media] dib0700: remove notes from bringup of PCTV 340eDevin Heitmueller
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>
2011-07-27[media] dib0700: make PCTV 340e work!Devin Heitmueller
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>
2011-07-27[media] dib0700: fixup PLL config for PCTV 340eDevin Heitmueller
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>
2011-07-27[media] xc4000: setup dib7000p AGC config for PCTV 340eDevin Heitmueller
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>
2011-07-27[media] dib7000p: setup dev.parent for i2c master built into 7000pDevin Heitmueller
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>
2011-07-27[media] dib0700: add a sleep before attempting to detect dib7000pDevin Heitmueller
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>
2011-07-27[media] dib0700: successfully connect to xc4000 over i2c for PCTV 340eDevin Heitmueller
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>
2011-07-27[media] dib0700: properly setup GPIOs for PCTV 340eDevin Heitmueller
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>
2011-07-27[media] dib0700: add USB id for PCTV 340eSEDevin Heitmueller
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>
2011-07-27[media] dib0700: add initial code for PCTV 340e by Davide FerriDavide Ferri
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>
2011-07-27[media] DVB: dvb_frontend: fix dtv_property_dump for DTV_DVBT2_PLP_IDAndreas Oberritter
- 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>
2011-07-27[media] dvb-usb.h function rc5_scanManoel Pinheiro
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>
2011-07-27[media] cx24113: Don't reuse core macro namesHans Petter Selasky
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>
2011-07-27[media] itd1000: Don't reuse core macro namesHans Petter Selasky
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>
2011-07-27dvb_net: Simplify the code if DVB NET is not definedMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] Make DVB NET configurable in the kernelHans Petter Selasky
Signed-off-by: Hans Petter Selasky <hselasky@c2i.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cxd2820r: correct missing error checksAntti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cxd2820r: fix bitfieldsAntti Palosaari
error: dubious one-bit signed bitfield Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27[media] cxd2820r: malloc buffers instead of stackAntti Palosaari
kmalloc I2C buffers Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>