summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/af9035.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] af9035: new IDs: add support for PCTV 78e and PCTV 79eMalcolm Priestley2014-09-041-0/+4
| | | | | | | | | | | | | | add the following IDs USB_PID_PCTV_78E (0x025a) for PCTV 78e USB_PID_PCTV_79E (0x0262) for PCTV 79e For these it9135 devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: Antti Palosaari <crope@iki.fi> Cc: <stable@vger.kernel.org> # v3.14+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: override tuner for AVerMedia A835B devicesAntti Palosaari2014-07-261-0/+19
| | | | | | | | | Tuner ID set into EEPROM is wrong, which causes driver to select wrong tuner profile. That leads device non-working. Fix issue by overriding known bad tuner IDs with suitable default value. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] rc-core: document the protocol typeDavid Härdeman2014-07-241-4/+5
| | | | | | | | | | | | | | | Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: override tuner id when bad value set into eepromAntti Palosaari2014-07-041-7/+33
| | | | | | | | | | | | | Tuner ID set into EEPROM is wrong in some cases, which causes driver to select wrong tuner profile. That leads device non-working. Fix issue by overriding known bad tuner IDs with suitable default value. Thanks to MX-NET Telekomunikace s.r.o. for providing non-working DTV stick, that I could fix the bug! Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9033: Don't export functions for the hardware filterMauro Carvalho Chehab2014-03-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Exporting functions for hardware filter is a bad idea, as it breaks compilation if: CONFIG_DVB_USB_AF9035=y CONFIG_DVB_AF9033=m Because the PID filter function calls would be hardcoded at af9035. The same doesn't happen with af9033_attach() because the dvb_attach() doesn't hardcode it. Instead, it dynamically links it at runtime. However, calling dvb_attach() multiple times is problematic, as it increments module kref. So, the better is to pass one parameter for the af9033 module to fill the hardware filters, and then use it inside af9035. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: use af9033 PID filtersAntti Palosaari2014-03-151-51/+10Star
| | | | | | | | | | | PID filters are property of af9033 demod. Use PID filters from af9033 driver as it provides those now. Allow possible dual mode on USB 1.1 mode too as bandwidth could be just enough when filters are used on both frontends. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: use default i2c slave address for af9035 tooAntti Palosaari2014-02-241-8/+7Star
| | | | | | | | Some device vendors has forgotten set correct slave demod I2C address to eeprom. Use default I2C address when eeprom has no address at all. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Add remaining it913x dual ids to af9035Malcolm Priestley2014-02-241-0/+8
| | | | | | | | | | | | | | | | As follow on to patch af9035: Move it913x single devices to af9035 and patch 1. SNR is reported as db/10 values. All dual ids are added to af9035 and it913x driver disabled. it913x/it913x-fe removal patches to follow. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: add default 0x9135 slave I2C addressMalcolm Priestley2014-02-241-0/+8
| | | | | | | | | | | On some devices the vendor has not set EEPROM_2ND_DEMOD_ADDR. Checks tmp is not zero after call to get EEPROM_2ND_DEMOD_ADDR and sets the default slave address of 0x3a on 0x9135 devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Move it913x single devices to af9035Malcolm Priestley2014-02-241-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic v1 and v2 devices have been all tested. IDs tested USB_PID_ITETECH_IT9135 v1 & v2 USB_PID_ITETECH_IT9135_9005 v1 USB_PID_ITETECH_IT9135_9006 v2 Current Issues There is no signal on USB_PID_ITETECH_IT9135 v2 No SNR reported all devices. All single devices tune and scan fine. All remotes tested okay. Dual device failed to register second adapter USB_PID_KWORLD_UB499_2T_T09 It is not clear what the problem is at the moment. So only single IDs are transferred in this patch. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: add ID [2040:f900] Hauppauge WinTV-MiniStick 2Antti Palosaari2014-02-041-0/+2
| | | | | | | | | Add USB ID [2040:f900] for Hauppauge WinTV-MiniStick 2. Device is build upon IT9135 chipset. Tested-by: Stefan Becker <schtefan@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: unlock on error in af9035_i2c_master_xfer()Dan Carpenter2013-12-041-2/+5
| | | | | | | | | | | We introduced a couple new error paths which are missing unlocks. Fixes: 7760e148350b ('[media] af9035: Don't use dynamic static allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
* [media] af9035: fix broken I2C and USB I/OAntti Palosaari2013-12-041-4/+4
| | | | | | | | | | | There was three small buffer len calculation bugs which caused driver non-working. These are coming from recent commit: commit 7760e148350bf6df95662bc0db3734e9d991cb03 [media] af9035: Don't use dynamic static allocation Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
* [media] af9035: add [0413:6a05] Leadtek WinFast DTV Dongle DualAntti Palosaari2013-11-291-0/+2
| | | | | | | | | | It is IT9135 dual design. Thanks to Michael Piko for reporting that! Reported-by: Michael Piko <michael@piko.com.au> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Don't use dynamic static allocationMauro Carvalho Chehab2013-11-081-3/+26
| | | | | | | | | | | | | | Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/usb/dvb-usb-v2/af9035.c:142:1: warning: 'af9035_wr_regs' uses dynamic stack allocation [enabled by default] drivers/media/usb/dvb-usb-v2/af9035.c:305:1: warning: 'af9035_i2c_master_xfer' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer to be the max size of a control URB payload data (64 bytes). Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: correct TS mode handlingAntti Palosaari2013-06-091-6/+8
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: minor log writing changesAntti Palosaari2013-06-091-3/+3
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: make checkpatch.pl happy!Antti Palosaari2013-06-091-11/+13
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: implement I2C adapter read operationAntti Palosaari2013-06-091-2/+20
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: fix missing unlock on error in af9035_ctrl_msg()Wei Yongjun2013-03-261-8/+9
| | | | | | | | | | Add the missing unlock before return from function af9035_ctrl_msg() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] [PATH] enable dual tuner to Avermedia Twinstar in af9035 driverJose Alberto Reguero2013-03-231-0/+1
| | | | | | | This patch enable dual tuner for Avermedia Twinstar. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: style changes for remote controller pollingAntti Palosaari2013-03-211-10/+13
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: check I/O errors on IR pollingAntti Palosaari2013-03-211-3/+12
| | | | | | | Use more careful error checks. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: enable remote controller for IT9135 tooAntti Palosaari2013-03-211-4/+0Star
| | | | | | | There is no difference towards AF9035 remote controller, so enable it. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: set demod TS mode config in read_config()Antti Palosaari2013-03-211-5/+2Star
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: use already detected eeprom base addrAntti Palosaari2013-03-211-9/+9
| | | | | | | | eeprom memory mapped base address is detected at the very first. Use it everywhere. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: select firmware loader according to firmwareAntti Palosaari2013-03-211-5/+5
| | | | | | | | AF9035 and IT9135 supports two different firmware format. Select correct loader according to first byte of firmware file. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] it913x: get rid of it913x config structAntti Palosaari2013-03-211-17/+1Star
| | | | | | | We don't need it. Tuner ID and device address are enough. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: IT9135 dual tuner related changesAntti Palosaari2013-03-211-101/+100Star
| | | | | | | Now it supports IT9135 based dual tuner devices. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: basic support for IT9135 v2 chipsAntti Palosaari2013-03-211-13/+30
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: merge af9035 and it9135 eeprom read routinesAntti Palosaari2013-03-211-81/+58Star
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: USB1.1 support (== PID filters)Antti Palosaari2013-03-211-3/+82
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: [0ccd:0099] TerraTec Cinergy T Stick Dual RC (rev. 2)Antti Palosaari2013-03-211-1/+41
| | | | | | | | That same USB ID is used both AF9015 and AF9035 driver. iManufacturer is only thing we can select correct driver without a I/O. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: fix af9033 demod sampling frequencyAntti Palosaari2013-03-211-0/+1
| | | | | | | | ADC needs to be also multiplied to 2 as it9135. Fixes bug I introduced few commits ago. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: add auto configuration heuristic for it9135Antti Palosaari2013-03-211-33/+83
| | | | | | | | Detect automatically multiple chip versions and select configuration according to that. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: add support for 1st gen it9135Antti Palosaari2013-03-211-1/+23
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: do not use buffers from stack for usb_bulk_msg()Antti Palosaari2013-03-181-22/+22
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: add ID [0ccd:00aa] TerraTec Cinergy T Stick (rev. 2)Fabrizio Gazzato2013-03-141-0/+2
| | | | | | | | | This patch adds USB ID for alternative "Terratec Cinergy T Stick". Tested by a friend: works similarly to 0ccd:0093 version (af9035+tua9001) Signed-off-by: Fabrizio Gazzato <fabrizio.gazzato@gmail.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] dvb_usb_v2: use IS_ENABLED() macroAntti Palosaari2013-01-061-1/+1
| | | | | | | | | | | replace: #if defined(CONFIG_RC_CORE) || defined(CONFIG_RC_CORE_MODULE) with: #if IS_ENABLED(CONFIG_RC_CORE) Reported-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: make remote controller optionalAntti Palosaari2013-01-061-0/+4
| | | | | | | Do not compile remote controller when RC-core is disabled by Kconfig. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: print warning when firmware is badAntti Palosaari2013-01-061-0/+4
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0012: use config directly from the config structAntti Palosaari2013-01-061-2/+2
| | | | | | | | | No need to copy config to the driver state. Those are coming from the const struct and could be used directly. Signed-off-by: Antti Palosaari <crope@iki.fi> Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: add support for fc0012 dual tuner configurationAntti Palosaari2013-01-061-15/+41
| | | | | | | That adds support for AF9035 dual devices having FC0012 tuners. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] fc0012: use struct for driver configAntti Palosaari2013-01-061-2/+8
| | | | | | | | | | I need even more configuration options and overloading dvb_attach() for all those sounds quite stupid. Due to that switch struct and make room for new options. Signed-off-by: Antti Palosaari <crope@iki.fi> Acked-by: Hans-Frieder Vogt <hfvogt@gmx.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: dual mode related changesAntti Palosaari2013-01-061-44/+96
| | | | | | | Various small changes and fixes releated to dual mode. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: dual mode supportJose Alberto Reguero2013-01-061-47/+108
| | | | | | | | | | Adds initial support for af9035 dual mode designs. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> [crope@iki.fi: fix merge conflict] Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] af9035: support for Fitipower FC0012 tuner devicesAntti Palosaari2013-01-061-0/+26
| | | | | Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] rc-core: add separate defines for protocol bitmaps and numbersDavid Härdeman2012-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RC_TYPE_* defines are currently used both where a single protocol is expected and where a bitmap of protocols is expected. Functions like rc_keydown() and functions which add/remove entries to the keytable want a single protocol. Future userspace APIs would also benefit from numeric protocols (rather than bitmap ones). Keytables are smaller if they can use a small(ish) integer rather than a bitmap. Other functions or struct members (e.g. allowed_protos, enabled_protocols, etc) accept multiple protocols and need a bitmap. Using different types reduces the risk of programmer error. Using a protocol enum whereever possible also makes for a more future-proof user-space API as we don't need to worry about a sufficient number of bits being available (e.g. in structs used for ioctl() calls). The use of both a number and a corresponding bit is dalso one in e.g. the input subsystem as well (see all the references to set/clear bit when changing keytables for example). This patch separate the different usages in preparation for upcoming patches. Where a single protocol is expected, enum rc_type is used; where one or more protocol(s) are expected, something like u64 is used. The patch has been rewritten so that the format of the sysfs "protocols" file is no longer altered (at the loss of some detail). The file itself should probably be deprecated in the future though. Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Andy Walls <awalls@md.metrocast.net> Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Antti Palosaari <crope@iki.fi> Cc: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] drivers/media: Remove unnecessary semicolonPeter Senna Tschudin2012-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> [mchehab@redhat.com: some hunks got bitroted; applied only the ones that succeeds] Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> [crope@iki.fi: For my drivers a8293, af9013, af9015, af9035] Acked-by: Antti Palosaari <crope@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] Support for Asus MyCinema U3100Mini PlusOliver Schinagl2012-09-271-0/+27
| | | | | | | | | | | | | | This is initial support for the Asus MyCinema U3100Mini Plus. The driver in its current form gets detected and loads properly. Scanning using dvbscan works without problems, Locking onto a channel using tzap also works fine. Only playback using tzap -r + mplayer was tested and was fully functional. It uses the af9035 USB Bridge chip, with an af9033 demodulator. The tuner used is the FCI FC2580. Signed-off-by: Oliver Schinagl <oliver@schinagl.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>