aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/drxk_hard.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-06-09[media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab1-1/+1
The DVB API was originally defined using typedefs. This is against Kernel CodingStyle, and there's no good usage here. While we can't remove its usage on userspace, we can avoid its usage in Kernelspace. So, let's do it. This patch was generated by this shell script: for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done While here, make CodingStyle fixes on the affected lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
2015-06-05[media] drxk: better handle errorsMauro Carvalho Chehab1-3/+4
As reported by smatch: drivers/media/dvb-frontends/drxk_hard.c:3277 dvbt_sc_command() warn: missing break? reassigning 'status' This is basically because the error handling logic there was crappy. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-08media: replace bellow -> belowMauro Carvalho Chehab1-1/+1
Bellow is yelling. Ok, sometimes the code is yells a lot, but but this is not the case there ;) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-25[media] DVB-frontends: Deletion of unnecessary checks before the function call "release_firmware"Markus Elfring1-2/+1
GIT_AUTHOR_DATE=1416472432 The release_firmware() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] drxk: Fix debug printksMauro Carvalho Chehab1-3/+3
This patch partially reverts 0fb220f2a5cb. What happened is that the conversion of debug messages to use pr_debug() was a bad idea, because one needing to debug would need to both enable debug level via a modprobe parameter, and then to enable the dynamic printk's. So, for now, let's use printk() directly at dprintk(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] drxk_hard: fix bad alignmentsMauro Carvalho Chehab1-1/+2
drivers/media/dvb-frontends/drxk_hard.c:2224:3-22: code aligned with following code on line 2227 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] drxk_hard: simplify test logicMauro Carvalho Chehab1-17/+17
instead of testing if it is false or true, just use if (!foo) or if (foo). That makes the code easier to read and shorter. Also, properly initialize booleans with true or false. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-14[media] drxk: remove the option to load firmware asynchronouslyMauro Carvalho Chehab1-18/+6
The option to load firmware asynchronously were added due to a requirement with a few versions of udev. It turns that this was a bad idea and caused regressions on drxk-based devices. So, we end by only letting the firmware to be loaded syncronously everywhere. So, let's remove the bad code. This patch partially reverts the changeset 8e30783b0b3. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-29[media] media_tree: Fix spelling errorsJonathan McCrohan1-9/+9
Fix various spelling errors in strings and comments throughout the media tree. The majority of these were found using Lucas De Marchi's codespell tool. [m.chehab@samsung.com: discard hunks with conflicts] Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17[media] drxk_hard: fix sparse warningsHans Verkuil1-2/+2
drivers/media/dvb-frontends/drxk_hard.c:1086:62: warning: Using plain integer as NULL pointer drivers/media/dvb-frontends/drxk_hard.c:2784:63: warning: Using plain integer as NULL pointer Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-06-08[media] drxk_hard: Remove most 80-cols checkpatch warningsMauro Carvalho Chehab1-131/+275
X-Patchwork-Delegate: mchehab@redhat.com There are a few cases where breaking the code into separate lines make it worse to read. However, on several places, breaking it to make checkpatch.pl happier is OK and improves code readability. So, break longer lines where that won't cause harm. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: remove needless parenthesisMauro Carvalho Chehab1-25/+25
X-Patchwork-Delegate: mchehab@redhat.com There are several places where: state->var = (some_var) The parenthesis there are doing nothing but making it harder to read and breaking the 80 columns soft limits. Just get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: use usleep_range()Mauro Carvalho Chehab1-9/+9
X-Patchwork-Delegate: mchehab@redhat.com Fixes the following checkpatch.pl warnings: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(10); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(1); Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: don't split strings across linesMauro Carvalho Chehab1-15/+15
X-Patchwork-Delegate: mchehab@redhat.com WARNING: quoted string split across lines #5416: FILE: media/dvb-frontends/drxk_hard.c:5416: + dprintk(1, "Could not set demodulator parameters. Make " + "sure qam_demod_parameter_count (%d) is correct for " WARNING: quoted string split across lines #5423: FILE: media/dvb-frontends/drxk_hard.c:5423: + dprintk(1, "Auto-probing the correct QAM demodulator command " + "parameters was successful - using %d parameters.\n", Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: use pr_info/pr_warn/pr_err/... macrosMauro Carvalho Chehab1-93/+89
X-Patchwork-Delegate: mchehab@redhat.com replace all occurrences of printk(KERN_* by pr_info/pr_warn/pr_err/pr_debug/pr_cont macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: Don't use CamelCaseMauro Carvalho Chehab1-1279/+1279
X-Patchwork-Delegate: mchehab@redhat.com Thare are lots of CamelCase warnings produced by checkpatch.pl. This weren't fixed at the time the driver got submitted due to the lack of manpower do to such cleanup. Now that I have one script that automates this task, cleans it. That makes the driver almost checkpatch-compliant, except for 80 column warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08[media] drxk_hard: don't re-implement log10Mauro Carvalho Chehab1-96/+8
X-Patchwork-Delegate: mchehab@redhat.com Log10 routine is already defined at dvb_math.h and provides a good enough approximation for 100 x log10(). So, instead of reinventing the wheel, use the already existing function. While here, don't use CamelCase on the function name. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-23[media] drxk_hard: Drop unused parameterJean Delvare1-3/+2
Last parameter of function GetLockStatus() isn't used so drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-22[media] drxk: fix CNR calculusMauro Carvalho Chehab1-1/+1
Changeset 8f3741e accidentally broke the CNR estimation. It should be calculated as "a + b - c". However, previously, the subtraction by c only occurred if SNR would be positive, due to a bad binding to DVBv3 API. This also fixes the following warning: drivers/media/dvb-frontends/drxk_hard.c:2556:6: warning: variable 'c' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Fix bogus signal strength indicatorMauro Carvalho Chehab1-30/+3
The DVBv3 signal strength indicator is bogus: it doesn't range from 0 to 65535 as it would be expected. Also, 0 means the max signal strength. Now that a better way to estimate it was added, use the new way. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: use a better calculus for RF strengthMauro Carvalho Chehab1-17/+109
The AZ6007 driver released by Terratec has a better way to estimate the signal strength, at CtrlSigStrength(). Port it to the driver. It should be noticed that there are two parameters there that are tuner-specific. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Add pre/post BER and PER/UCB statsMauro Carvalho Chehab1-12/+167
The original az6007 driver has the code to calculate such stats. Add it to the driver, reporting them via DVBv5 stats API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: remove dummy BER read codeMauro Carvalho Chehab1-16/+0
The BER code does nothing but filling it with zero. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-13Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-mediaLinus Torvalds1-19/+5
Pull media updates from Mauro Carvalho Chehab: - Missing MAINTAINERS entries were added for several drivers - Adds V4L2 support for DMABUF handling, allowing zero-copy buffer sharing between V4L2 devices and GPU - Got rid of all warnings when compiling with W=1 on x86 - Add a new driver for Exynos hardware (s3c-camif) - Several bug fixes, cleanups and driver improvements * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (243 commits) [media] omap3isp: Replace cpu_is_omap3630() with ISP revision check [media] omap3isp: Prepare/unprepare clocks before/after enable/disable [media] omap3isp: preview: Add support for 8-bit formats at the sink pad [media] omap3isp: Replace printk with dev_* [media] omap3isp: Find source pad from external entity [media] omap3isp: Configure CSI-2 phy based on platform data [media] omap3isp: Add PHY routing configuration [media] omap3isp: Add CSI configuration registers from control block to ISP resources [media] omap3isp: Remove unneeded module memory address definitions [media] omap3isp: Use monotonic timestamps for statistics buffers [media] uvcvideo: Fix control value clamping for unsigned integer controls [media] uvcvideo: Mark first output terminal as default video node [media] uvcvideo: Add VIDIOC_[GS]_PRIORITY support [media] uvcvideo: Return -ENOTTY for unsupported ioctls [media] uvcvideo: Set device_caps in VIDIOC_QUERYCAP [media] uvcvideo: Don't fail when an unsupported format is requested [media] uvcvideo: Return -EACCES when trying to access a read/write-only control [media] uvcvideo: Set error_idx properly for extended controls API failures [media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2 [media] fc2580: write some registers conditionally ...
2012-12-03treewide: Fix typos in various driversMasanari Iida1-1/+1
Fix typos in printk within various drivers. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-10-29[media] drxk_hard: fix the return code from an error handlerMauro Carvalho Chehab1-0/+1
While it is very unlikely, if the number of parameters for QAMDemodulatorCommand is not 2 or 4, status become undefined: /home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c: In function ‘QAMDemodulatorCommand’: /home/hans/work/build/v4l-dvb-git/drivers/media/dvb-frontends/drxk_hard.c:5452:5: warning: ‘status’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] drxk: get rid of some unused varsMauro Carvalho Chehab1-15/+0
drivers/media/dvb-frontends/drxk_hard.c:68:13: warning: 'IsA1WithPatchCode' defined but not used [-Wunused-function] drivers/media/dvb-frontends/drxk_hard.c:73:13: warning: 'IsA1WithRomCode' defined but not used [-Wunused-function] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25[media] drxk_hard: fix a few warningsMauro Carvalho Chehab1-4/+4
drivers/media/dvb-frontends/drxk_hard.c:68:6: warning: no previous prototype for 'IsA1WithPatchCode' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:73:6: warning: no previous prototype for 'IsA1WithRomCode' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:192:12: warning: no previous prototype for 'Frac28a' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:590:5: warning: no previous prototype for 'PowerUpDevice' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-25[media] drxk: Use the #define instead of hardcoded valuesMartin Blumenstingl1-2/+2
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-02drxk: allow loading firmware synchrousnouslyMauro Carvalho Chehab1-5/+15
Due to udev-182, the firmware load was changed to be async, as otherwise udev would give up of loading a firmware. Add an option to return to the previous behaviour, async firmware loads cause failures with the tda18271 driver. Antti tested it with the following hardware: Hauppauge WinTV HVR 930C MaxMedia UB425-TC PCTV QuatroStick nano (520e) Tested-by: Antti Palosaari <crope@iki.fi> Cc: stable@kernel.org # for Kernel 3.6 - please note that driver location has changed Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab1-0/+6637
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>