Commit graph

10 commits

Author SHA1 Message Date
Abylay Ospan
6c77161a18 [media] support DVB-T2 for SONY CXD2841/54
bandwidth 1.7,5,6,7,8Mhz support for DVB-T2

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:15:12 -03:00
Mauro Carvalho Chehab
76344a3fc5 [media] ISDB-T retune and offset fix and DVB-C bw fix
now when new tuning parameters specified demod should retune.
Also ISDB-T frequency offset calculation added
(cxd2841er_get_carrier_offset_i).

While here, fix re-tune for DVB-C Annex A, using the desired
bandwidth, instead of using 8MHz.

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:13:50 -03:00
Abylay Ospan
4da093ce4e [media] Fix DVB-T frequency offset calculation
Fix offset calculation inside cxd2841er_get_carrier_offset_t
Now DVB-T should be tuned correctly

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:12:46 -03:00
Abylay Ospan
30ae3307ad [media] Sanity check when initializing DVB-S/S2 demodulator
Avoid error message:
cxd2841er_read_status_s(): invalid state 1
Always force demod to shutdown state before initializing

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:12:25 -03:00
Abylay Ospan
c5ea46dae9 [media] Add carrier offset calculation for DVB-T
Adding cxd2841er_get_carrier_offset_t to calculate DVB-T offset
for Sony demodulators CXD2841ER and CXD2854ER

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:11:59 -03:00
Abylay Ospan
83808c23e5 [media] Add support Sony CXD2854ER demodulator
CXD2854ER is identical to CXD2841ER except ISDB-T/S added.
New method 'cxd2841er_attach_i' is added
xtal frequency now configurable. Available options:
20.5MHz, 24MHz, 41MHz

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-06-07 12:08:12 -03:00
Mauro Carvalho Chehab
7e3e68bcfd [media] dvb_frontend: pass the props cache to get_frontend() as arg
Instead of using the DTV properties cache directly, pass the get
frontend data as an argument. For now, everything should remain
the same, but the next patch will prevent get_frontend to
affect the global cache.

This is needed because several drivers don't care enough to only
change the properties if locked. Due to that, calling
G_PROPERTY before locking on those drivers will make them to
never lock. Ok, those drivers are crap and should never be
merged like that, but the core should not rely that the drivers
would be doing the right thing.

Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-02-04 16:27:30 -02:00
Mauro Carvalho Chehab
d13a7b674a [media] cxd2841er: don't use variable length arrays
The Linux stack is short; we need to be able to count the number
of bytes used at stack on each function. So, we don't like to
use variable-length arrays, as complained by smatch:

	drivers/media/dvb-frontends/cxd2841er.c:205:19: warning: Variable length array is used.

The max usecase of the driver seems to be 15 bytes + 1 for the
register.

So, let's be safe and allocate 17 bytes for the write buffer.
This should be enough to cover all cases. If not, let's print
an error message.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11 15:37:10 -03:00
Mauro Carvalho Chehab
c8946c8d5a [media] cxd2841er: declare static functions as such
drivers/media/dvb-frontends/cxd2841er.c:992:5: warning: no previous prototype for 'cxd2841er_get_carrier_offset_t2' [-Wmissing-prototypes]
 int cxd2841er_get_carrier_offset_t2(
     ^
drivers/media/dvb-frontends/cxd2841er.c:1032:5: warning: no previous prototype for 'cxd2841er_get_carrier_offset_c' [-Wmissing-prototypes]
 int cxd2841er_get_carrier_offset_c(
     ^
drivers/media/dvb-frontends/cxd2841er.c:1360:5: warning: no previous prototype for 'cxd2841er_read_snr_t2' [-Wmissing-prototypes]
 int cxd2841er_read_snr_t2(struct cxd2841er_priv *priv, u32 *snr)
     ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11 15:08:47 -03:00
Kozlov Sergey
a6dc60ff12 [media] cxd2841er: Sony CXD2841ER DVB-S/S2/T/T2/C demodulator driver
Add DVB-C/T/T2/S/S2 demodulator frontend driver Sony CXD2841ER chip.

Signed-off-by: Kozlov Sergey <serjk@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-11 15:06:51 -03:00