aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/usb/au0828/au0828-cards.c
AgeCommit message (Collapse)Author
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner
Based on 3 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-03[media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog()Mauro Carvalho Chehab
tveeprom_hauppauge_analog() used to need the I2C adapter in order to print debug messages. As it now uses pr_foo() facilities since commit 6037b3ca28f4 ("[media] tveeprom: print log messages using pr_foo()"), the first argument of the function is not needed anymore. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-27[media] media: Drop FSF's postal address from the source code filesSakari Ailus
Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
2016-03-31[media] au0828: disable tuner links and cache tuner/decoderMauro Carvalho Chehab
For au0828_enable_source() to work, the tuner links should be disabled and the tuner/decoder should be cached at au0828 struct. While here, put dev->decoder cache together with dev->tuner, as it makes easier to drop both latter if/when we move the enable routines to the V4L2 core. Fixes: 9822f4173f84 ('[media] au0828: use v4l2_mc_create_media_graph()') Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com> Tested-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-01-11[media] au0828: Cache the decoder info at au0828 dev structureMauro Carvalho Chehab
Instead of seeking for the decoder every time analog stream is started, cache it. This simplifies the code a little bit. Requested-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10[media] au0828: move dev->boards atribuition to happen earlierRafael Lourenço de Lima Chehab
The attribution of dev->boards occured too late, which would couse an OOPS in media controller registration. Signed-off-by: Rafael Lourenço de Lima Chehab <chehabrafael@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02[media] media: fix au0828 compile error from au0828_boards initializationShuah Khan
au0828 picked up UNSET from videobuf-core.h and fails to compile if videobuf-core.h isn't included. Change it to use -1U instead to fix the problem. drivers/media/usb/au0828/au0828-cards.c:47:17: error: ‘UNSET’ undeclared here (not in a function) .tuner_type = UNSET, Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-30[media] sound: simplify au0828 quirk tableMauro Carvalho Chehab
Add a macro to simplify au0828 quirk table. That makes easier to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828: fill tuner type on all boardsMauro Carvalho Chehab
This is used by the I2C code in order to slow down the speed to 20 kHz on devices with xc5000 or xc5000c. So, it needs to be filled for all devices that use either xc5000 or xc5000c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828: explicitly identify boards with analog TVMauro Carvalho Chehab
Right now, the au0828 driver uses .tuner to detect if analog tv is being used or not. By not filling .tuner fields at the board struct, the I2C core can't do decisions based on it. So, add a field to explicitly tell when analog TV is supported. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828-cards: remove a comment about i2c clock stretchingMauro Carvalho Chehab
This comment is already at the au0828-i2c where it belongs. So, remove it from a board's entry. It doesn't make any sense there, as we're setting the clock to 250kHz there, slowing it down only at the au0828-i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-08-21[media] au0828: use pr_foo macrosMauro Carvalho Chehab
Instead of using printk(KERN_foo, use pr_foo() macros. No functional changes. Note: we should do the same for dprintk(), but that would require to remove the dprintk levels. So, for now, let's not touch on it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] au0828: Enable IR for HVR-850Mauro Carvalho Chehab
HVR-850 also has a remote. Enable it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] au0828: add support for IR on HVR-950QMauro Carvalho Chehab
HVR-950Q uses an I2C remote controller at address 0x47 (7-bits notation). Add support for it. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] au0828: improve I2C speedMauro Carvalho Chehab
Commits 21dc61d3c0a4 and 7a1dd50b89d4 reduced the board I2C speed to 20 MHz by default, due to a I2C stretch issue: while xc5000 uses i2c stretch when a command is sent to it, au0828 doesn't support this feature. However, this is needed only for Xceive tuners. The other I2C devices can work at the max speed. So, revert the workarounds at board level, handling it at I2C level, only when talking with xc5000. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] au0828: fix i2c clock speed for DViCO FusionHDTV7Joonyoung Shim
DViCO FusionHDTV7 device that use au0828 can fail to communicate with xc5000 using i2c interface because of high i2c clock speed - i2c clock stretching bug. It causes to fail xc5000 firmware loading normally at the current driver. Already this problem fixed as changing to low i2c clock speed at HVR-950q device, also DViCO FusionHDTV7 device can solve it as using low i2c clock speed - 20KHz. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-02-28[media] au0828: rework GPIO management for HVR-950qDevin Heitmueller
Restructure the way we bring the various GPIOs out of reset. In particular: 1. we only need to setup the GPIOs as outputs once 2. there's no point in writing 0x40 to register 0x00 since that's the EEPROM write protect and already it's configured as an input 3. Separate out the act of enabling the power supply and bringing the tuner and demod out of reset. If you don't then the chip may not be properly enabled (as the power supply is still ramping up when the chip comes out of reset). This can result in probing failures. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2012-12-27[media] au0828: Replace memcpy with struct assignmentEzequiel Garcia
This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it's type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17[media] au0828: break au0828_card_setup() down into smaller functionsMichael Krufky
Pull the analog frontend setup code out of au0828_card_setup into its own seperate function, au0828_card_analog_fe_setup(). Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17[media] au0828: remove forced dependency of VIDEO_AU0828 on VIDEO_V4L2Michael Krufky
This patch removes the dependendency of VIDEO_AU0828 on VIDEO_V4L2 by creating a new Kconfig option, VIDEO_AU0828_V4L2, which enables analog video capture support and depends on VIDEO_V4L2 itself. With VIDEO_AU0828_V4L2 disabled, the driver will only support digital television and will not depend on the v4l2-core. With VIDEO_AU0828_V4L2 enabled, the driver will be built with the analog v4l2 support included. By default, the VIDEO_AU0828_V4L2 option will be set to Y, so as to preserve the original behavior. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17[media] au0828: update model matrix entries for 72261, 72271 & 72281Michael Krufky
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-17[media] au0828: add missing model 72281, usb id 2040:7270 to the model matrixMichael Krufky
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] au0828: get rid of warning: no previous prototypeMauro Carvalho Chehab
drivers/media/usb/au0828/au0828-cards.c:28:6: warning: no previous prototype for 'hvr950q_cs5340_audio' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:161:6: warning: no previous prototype for 'au0828_uninit_isoc' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:200:5: warning: no previous prototype for 'au0828_init_isoc' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:786:5: warning: no previous prototype for 'au0828_analog_stream_enable' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:813:6: warning: no previous prototype for 'au0828_analog_stream_reset' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:916:6: warning: no previous prototype for 'au0828_vid_buffer_timeout' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:940:6: warning: no previous prototype for 'au0828_vbi_buffer_timeout' [-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>