summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-avcore.c
AgeCommit message (Collapse)Author
2018-01-04media: replace all <spaces><tab> occurrencesMauro Carvalho Chehab
There are a lot of places where sequences of space/tabs are found. Get rid of all spaces before tabs. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-01-04media: fix usage of whitespaces and on indentationMauro Carvalho Chehab
On several places, whitespaces are being used for indentation, or even at the end of the line. Fix them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-05[media] cx231xx: don't return error on successMauro Carvalho Chehab
The cx231xx_set_agc_analog_digital_mux_select() callers expect it to return 0 or an error. Returning a positive value makes the first attempt to switch between analog/digital to fail. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2015-05-01[media] cx231xx: fix bad indentingMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-avcore.c:1598 cx231xx_set_DIF_bandpass() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:656 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:659 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:664 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:669 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:673 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-417.c:1164 cx231xx_initialize_codec() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: Improve the log messageMauro Carvalho Chehab
Unfortunately, on devices that have multiple interfaces, udev->dev points to the parent device (usb) instead of the cx231xx specific one. Due to that the logs don't look too nice, as they'll print messages as if they were produced by USB core: usb-1-2: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 7 interfaces Instead of using the name of the parent device, let's use the name of the first cx231xx interface for all cx231xx sub-modules. With this path, the logs will be nicer: cx231xx 1-2:1.1: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 7 interfaces Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: use dev_foo instead of printkMauro Carvalho Chehab
There are several places at cx231xx that uses printk without any special reason. Change all of them to use dev_foo(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: convert from pr_foo to dev_fooMauro Carvalho Chehab
Replace all pr_foo occurrences by dev_foo, as this is the recommended way for drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: Cleanup printk at the driverMauro Carvalho Chehab
There are lots of debug printks printed with pr_info. Also, the printk's data are not too coherent: - there are duplicated driver name at the print format; - function name format string differs from function to function; - long strings broken into multiple lines; - some printks just produce ugly reports, being almost useless as-is. Do a cleanup on that. Still, there are much to be done in order to do a better printk job on this driver, but, at least it will now be a way less verbose, if debug printks are disabled, and some logs might actually be useful. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: Fix identationMauro Carvalho Chehab
One of the identation blocks is wrong. Fix it. While here, replace pr_info by pr_debug inside such block and add the function name to the print messages, as otherwise they will not help much. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03[media] cx231xx: get rid of driver-defined printk macrosMauro Carvalho Chehab
It currently does just like what pr_foo() macros do. So, replace them. A deeper cleanup is needed, as there are lots of debug macros printed with pr_info. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-01[media] cx231xx: remove direct register PWR_CTL_EN modification that ↵Matthias Schwarzott
switches port3 The only remaining place that modifies the relevant bit is in function cx231xx_set_Colibri_For_LowIF Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx231xx: drop unconditional port3 switchingMatthias Schwarzott
All switching should be done by i2c mux adapters. Drop explicit dont_use_port_3 flag. Drop info message about switch. Only the removed code in start_streaming is questionable: It did switch the port_3 flag without accessing i2c in between. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] cx231xx: remember status of i2c port_3 switchMatthias Schwarzott
This is used later for is_tuner function that switches i2c behaviour for some tuners. [mchehab@osg.samsung.com: Fix CodingStyle on a multi-line comment] Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] usb drivers: use %zu instead of %zdMauro Carvalho Chehab
size_t is unsigned. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-03[media] cx231xx: fix sparse warningsHans Verkuil
drivers/media/usb/cx231xx/cx231xx-avcore.c:2226:15: warning: cast to restricted __le32 drivers/media/usb/cx231xx/cx231xx-avcore.c:2447:15: warning: cast to restricted __le32 drivers/media/usb/cx231xx/cx231xx-avcore.c:2475:15: warning: cast to restricted __le32 drivers/media/usb/cx231xx/cx231xx-avcore.c:2500:15: warning: cast to restricted __le32 drivers/media/usb/cx231xx/cx231xx-avcore.c:2647:18: warning: incorrect type in assignment (different base types) drivers/media/usb/cx231xx/cx231xx-avcore.c:2659:21: warning: cast to restricted __le32 drivers/media/usb/cx231xx/cx231xx-dvb.c:743:57: warning: Using plain integer as NULL pointer drivers/media/usb/cx231xx/cx231xx-dvb.c:776:57: warning: Using plain integer as NULL pointer Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-27[media] cx231xx: Add digital support for HVR 930c-HD model 1113xxMatthias Schwarzott
Add support for: [2040:b130] Hauppauge WinTV 930C-HD (model 1113xx) After loading the driver the first open to dvb device node fails. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-06-17[media] cx231xx: remove g_chip_identHans Verkuil
Remove g_chip_ident and replace it with g_chip_info. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-18[media] cx231xx : Add support for OTG102 aka EZGrabber2Matt Gomboc
Thanks for the response, I have done as you suggested. Below is an updated patch for the OTG102 device against http://git.linuxtv.org/hverkuil/media_tree.git/shortlog/refs/heads/cx231xx, kernel version 3.8. With further testing it appears the extra clauses in cx231xx-cards.c were not necessary (in static in cx231xx_init_dev and static int cx231xx_usb_probe), so those have been also been removed. Signed-off-by: Matt Gomboc <gomboc0@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] cx231xx: fix gpio big-endian problemsHans Verkuil
Tested on my big-endian ppc-based test machine. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] cx231xx: fix big-endian problemsHans Verkuil
Tested on my big-endian ppc-based test machine. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] cx231xx: fix tuner compliance issuesHans Verkuil
The g_tuner call wasn't passed on to the subdevices, g_frequency didn't check for invalid tuners and a low-level function that was expected to return 0 or a negative error returned a positive number instead, causing s_frequency to return bogus errors. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] cx231xx-avcore: get rid of a sophisticated do-nothing codeMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-avcore.c: In function 'cx231xx_capture_start': drivers/media/usb/cx231xx/cx231xx-avcore.c:2637:3: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] cx231xx: get rid of warning: no previous prototypeMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-avcore.c:1071:5: warning: no previous prototype for 'stopAudioFirmware' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-avcore.c:1076:5: warning: no previous prototype for 'restartAudioFirmware' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:689:6: warning: no previous prototype for 'cx231xx_reset_out' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:697:6: warning: no previous prototype for 'cx231xx_enable_OSC' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:701:6: warning: no previous prototype for 'cx231xx_sleep_s5h1432' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-i2c.c:75:5: warning: no previous prototype for 'cx231xx_i2c_send_bytes' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename most media/video usb drivers to media/usbMauro Carvalho Chehab
Rename all USB drivers with their own directory under drivers/media/video into drivers/media/usb and update the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>