Commit Graph

22 Commits

Author SHA1 Message Date
Nikita Gerasimov d695eb5b3b media: rtl28xxu: add support for Sony CXD2837ER slave demod
Since 2018 some new revisions of RTL2832P based devices having
Sony CXD2837ER as a slave demodulator instead of Panasonic MN88473.
CXD2837ER handled in DVB_CXD2841ER module but it's has a lack of control.
So slave demod has to be reseted by GPIO0 before detecting to woke up
CXD2837ER.

Signed-off-by: Nikita Gerasimov <nikitych@yandex.ru>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05 03:21:45 -05:00
Antti Palosaari d18ca5b7ce [media] rtl28xxu: fix control message flaws
Add lock to prevent concurrent access for control message as control
message function uses shared buffer. Without the lock there may be
remote control polling which messes the buffer causing IO errors.
Increase buffer size and add check for maximum supported message
length.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=103391
Fixes: c56222a6b2 ("[media] rtl28xxu: move usb buffers to state")

Cc: <stable@vger.kernel.org> # 4.0+
Signed-off-by: Antti Palosaari <crope@iki.fi>
2015-10-22 15:48:27 -02:00
Olli Salonen 699dcffc52 [media] rtl2832: add support for GoTView MasterHD 3 USB tuner
GoTView MasterHD 3 is a DVB-T2/C USB 2.0 tuner.

It's based on the following components:
- USB bridge: RTL2832P (contains also DVB-T demodulator)
- Demodulator: Si2168-A30
- Tuner: Si2148-A20

The demodulator and the tuner will need firmwares. The Si2148 uses Si2158
firmware. Antti has the firmwares available for download:
http://palosaari.fi/linux/v4l-dvb/firmware/

Do note that for DVB-T either of the demodulators can be used. DVB-C and
DVB-T2 are only supported by the Si2168 demodulator. The driver will
register 2 frontends for the same adapter. Frontend 0 will be the RTL2832
demodulator and frontend 1 will be the Si2168 demodulator. The same
tuner is used for both.

As a consequence of the above, it's recommended to use application that
does implement proper DVBv5 support.

For some reason, the old I2C write method sporadically fails. Thus the
need for an option to only use the new I2C write method supported by the
RTL2832.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12 13:25:35 -03:00
Antti Palosaari c56222a6b2 [media] rtl28xxu: move usb buffers to state
Buffer needed for USB control message is small so move it to state
and get rid of alloc/free used for each control message.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03 16:24:49 -02:00
Antti Palosaari 9a02e8fdef [media] rtl28xxu: rename state variable 'priv' to 'dev'
I prefer dev over priv and I want keep all my drivers in line with
that.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03 16:23:58 -02:00
Antti Palosaari a2f7f220df [media] rtl28xxu: switch SDR module to platform driver
RTL2832 SDR module implements kernel platform driver. Change old
binding to that one.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03 16:16:17 -02:00
Antti Palosaari 77a2e76b85 [media] rtl28xxu: use rtl2832 demod callbacks accessing its resources
Switch demod resource use from exported symbols to callbacks its
provides.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-03 16:01:04 -02:00
Antti Palosaari c0ceac97d2 [media] rtl28xxu: use I2C binding for RTL2830 demod driver
rtl2830 driver supports now I2C model too. Start using it.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-02-02 17:48:20 -02:00
Antti Palosaari 83b2f84957 [media] rtl28xxu: switch rtl2832 demod attach to I2C binding
As rtl2832 driver support now I2C binding we will switch to that one.

Tested-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-01-27 10:57:18 -02:00
Antti Palosaari 473eadf32a [media] rtl28xxu: rename tuner I2C client pointer
Better to rename tuner I2C to something which clearly says it is
for tuner as there is now multiple different I2C clients used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 16:09:12 -02:00
Antti Palosaari fc694e444c [media] rtl28xxu: add support for Panasonic MN88473 slave demod
There is RTL2832P devices having extra MN88473 demodulator. This
patch add support for such configuration. Logically MN88473 slave
demodulator is connected to RTL2832 master demodulator, both I2C
bus and TS input. RTL2832 is integrated to RTL2832U and RTL2832P
chips. Chip version RTL2832P has extra TS interface for connecting
slave demodulator.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 16:08:47 -02:00
Antti Palosaari 80f189a1d0 [media] rtl28xxu: add support for Panasonic MN88472 slave demod
There is RTL2832P devices having extra MN88472 demodulator. This
patch add support for such configuration. Logically MN88472 slave
demodulator is connected to RTL2832 master demodulator, both I2C
bus and TS input. RTL2832 is integrated to RTL2832U and RTL2832P
chips. Chip version RTL2832P has extra TS interface for connecting
slave demodulator.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-21 16:05:10 -02:00
Antti Palosaari ae1f8453e8 [media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDR
RTL2832 driver provides muxed I2C adapters for tuner bus I2C gate
control. Pass those adapters to rtl2832_sdr and e4000 modules in order
to get rid of proprietary DVB .i2c_gate_ctrl() callback use.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:35:24 -03:00
Antti Palosaari 28fd31f82d [media] e4000: convert DVB tuner to I2C driver model
Driver conversion from proprietary DVB tuner model to more
general I2C driver model.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14 05:21:27 -03:00
Antti Palosaari 8b4cac1a12 [media] rtl28xxu: add RTL2832P + R828D support
RTL2832P is version of RTL2832U with extra TS interface.
As for now, we support only integrated RTL2832 demod.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-31 06:09:49 -02:00
Antti Palosaari f39fac3e40 [media] rtl28xxu: reimplement rtl2832u remote controller
Thanks to Rodrigo for original implementation!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08 21:55:38 -03:00
Rodrigo Tartajo 1e41413f98 [media] rtl2832u: restore ir remote control support
Hi,
This patch uses the driver from openpli[1] as a template to restore the remote control support.
I had to divert from the original to use the in kernel rc protocol decoder. The key repetition does,
not seem to work but I cant find the problem in the driver. As a raw rc provider, no key table is
hardcoded.
Rodrigo.
[1]: https://aur.archlinux.org/packages/dvb-usb-rtl2832u-openpli/?comments=all

Signed-off-by: Rodrigo Tartajo <rtarty@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-08 21:54:53 -03:00
Mauro Carvalho Chehab 6889ab2a25 [media] rtl28xxu: add support for Rafael Micro r820t
This tuner is used on some rtl2882 dongles. Add it to the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Antti Palosaari <crope@iki.fi>
2013-04-16 21:19:10 -03:00
Antti Palosaari ef37be1b4d [media] rtl28xxu: move rtl2832u tuner probing to .read_config()
Move rtl2832u tuner probing correct place.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-27 15:14:10 -03:00
Antti Palosaari 832cc7cdfb [media] rtl2832: separate tuner specific init from general
It is first step closer to support multiple tuners.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-23 17:31:57 -03:00
Antti Palosaari d89b9369e0 [media] dvb_usb_v2: use dvb_usb_dbg_usb_control_msg()
Convert drivers: au6610, ce6230, ec168, rtl28xxu for
dvb_usb_dbg_usb_control_msg() macro.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-09-15 11:35:59 -03:00
Mauro Carvalho Chehab 786baecfe7 [media] dvb-usb: move it to drivers/media/usb/dvb-usb
As media/dvb will be removed, move it to a proper place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:26:31 -03:00