diff options
author | Athanasios Oikonomou <athoik@gmail.com> | 2017-12-16 15:23:38 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-19 15:08:12 +0300 |
commit | f9d79126195374c285035777b9d6abd24ceba363 (patch) | |
tree | 8ea97f93e3c1fb7d889f538e611b2eae8860d2a7 /drivers/media/dvb-core | |
parent | 2453887924c0c0b07927c864f605e61995384949 (diff) | |
download | linux-f9d79126195374c285035777b9d6abd24ceba363.tar.xz |
media: dvb_frontend: add physical layer scrambling support
This commit adds a new property DTV_SCRAMBLING_SEQUENCE_INDEX.
This 18 bit field, when present, carries the index of the DVB-S2 physical
layer scrambling sequence as defined in clause 5.5.4 of EN 302 307.
There is no explicit signalling method to convey scrambling sequence index
to the receiver. If S2 satellite delivery system descriptor is available
it can be used to read the scrambling sequence index (EN 300 468 table 41).
By default, gold scrambling sequence index 0 is used. The valid scrambling
sequence index range is from 0 to 262142.
Increase the DVB API version in order userspace to be aware of the changes.
Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
Acked-by: Ralph Metzler <rjkm@metzlerbros.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 12 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.h | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index ee3ea4dcd9c1..5547b9830bbc 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -982,6 +982,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) } c->stream_id = NO_STREAM_ID_FILTER; + c->scrambling_sequence_index = 0;/* default sequence */ switch (c->delivery_system) { case SYS_DVBS: @@ -1072,6 +1073,7 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { _DTV_CMD(DTV_STREAM_ID, 1, 0), _DTV_CMD(DTV_DVBT2_PLP_ID_LEGACY, 1, 0), + _DTV_CMD(DTV_SCRAMBLING_SEQUENCE_INDEX, 1, 0), _DTV_CMD(DTV_LNA, 1, 0), /* Get */ @@ -1417,6 +1419,11 @@ static int dtv_property_process_get(struct dvb_frontend *fe, tvp->u.data = c->stream_id; break; + /* Physical layer scrambling support */ + case DTV_SCRAMBLING_SEQUENCE_INDEX: + tvp->u.data = c->scrambling_sequence_index; + break; + /* ATSC-MH */ case DTV_ATSCMH_FIC_VER: tvp->u.data = fe->dtv_property_cache.atscmh_fic_ver; @@ -1900,6 +1907,11 @@ static int dtv_property_process_set(struct dvb_frontend *fe, c->stream_id = data; break; + /* Physical layer scrambling support */ + case DTV_SCRAMBLING_SEQUENCE_INDEX: + c->scrambling_sequence_index = data; + break; + /* ATSC-MH */ case DTV_ATSCMH_PARADE_ID: fe->dtv_property_cache.atscmh_parade_id = data; diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h index ace0c2fb26c2..2bc25f1e425b 100644 --- a/drivers/media/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb-core/dvb_frontend.h @@ -513,6 +513,8 @@ struct dvb_fe_events { * @layer.interleaving: per layer interleaving. * @stream_id: If different than zero, enable substream filtering, if * hardware supports (DVB-S2 and DVB-T2). + * @scrambling_sequence_index: Carries the index of the DVB-S2 physical layer + * scrambling sequence. * @atscmh_fic_ver: Version number of the FIC (Fast Information Channel) * signaling data (only ATSC-M/H) * @atscmh_parade_id: Parade identification number (only ATSC-M/H) @@ -591,6 +593,9 @@ struct dtv_frontend_properties { /* Multistream specifics */ u32 stream_id; + /* Physical Layer Scrambling specifics */ + u32 scrambling_sequence_index; + /* ATSC-MH specifics */ u8 atscmh_fic_ver; u8 atscmh_parade_id; |