Commit 287cefd0 authored by Evgeny Plehov's avatar Evgeny Plehov Committed by Mauro Carvalho Chehab

[media] dvb_frontend: add multistream support

Unify multistream support at the DVBAPI: several delivery systems
allow it. Yet, each one had its own name. So, instead of adding
a third version of this field, remove the per-standard naming,
unifying it into a common name.

The legacy code number can still be used by old applications.

Version increased to 5.8.

[mchehab@redhat.com: joined the va1j5jf007s patch, in order to
 avoid compilation breakage]
Signed-off-by: default avatarEvgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b072eee0
...@@ -949,8 +949,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) ...@@ -949,8 +949,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
c->layer[i].segment_count = 0; c->layer[i].segment_count = 0;
} }
c->isdbs_ts_id = 0; c->stream_id = NO_STREAM_ID_FILTER;
c->dvbt2_plp_id = 0;
switch (c->delivery_system) { switch (c->delivery_system) {
case SYS_DVBS: case SYS_DVBS:
...@@ -1021,8 +1020,8 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { ...@@ -1021,8 +1020,8 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {
_DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 1, 0), _DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 1, 0),
_DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 1, 0), _DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 1, 0),
_DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), _DTV_CMD(DTV_STREAM_ID, 1, 0),
_DTV_CMD(DTV_DVBT2_PLP_ID, 1, 0), _DTV_CMD(DTV_DVBT2_PLP_ID_LEGACY, 1, 0),
/* Get */ /* Get */
_DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1), _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1),
...@@ -1386,11 +1385,11 @@ static int dtv_property_process_get(struct dvb_frontend *fe, ...@@ -1386,11 +1385,11 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: case DTV_ISDBT_LAYERC_TIME_INTERLEAVING:
tvp->u.data = c->layer[2].interleaving; tvp->u.data = c->layer[2].interleaving;
break; break;
case DTV_ISDBS_TS_ID:
tvp->u.data = c->isdbs_ts_id; /* Multistream support */
break; case DTV_STREAM_ID:
case DTV_DVBT2_PLP_ID: case DTV_DVBT2_PLP_ID_LEGACY:
tvp->u.data = c->dvbt2_plp_id; tvp->u.data = c->stream_id;
break; break;
/* ATSC-MH */ /* ATSC-MH */
...@@ -1787,11 +1786,11 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1787,11 +1786,11 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: case DTV_ISDBT_LAYERC_TIME_INTERLEAVING:
c->layer[2].interleaving = tvp->u.data; c->layer[2].interleaving = tvp->u.data;
break; break;
case DTV_ISDBS_TS_ID:
c->isdbs_ts_id = tvp->u.data; /* Multistream support */
break; case DTV_STREAM_ID:
case DTV_DVBT2_PLP_ID: case DTV_DVBT2_PLP_ID_LEGACY:
c->dvbt2_plp_id = tvp->u.data; c->stream_id = tvp->u.data;
break; break;
/* ATSC-MH */ /* ATSC-MH */
......
...@@ -370,11 +370,8 @@ struct dtv_frontend_properties { ...@@ -370,11 +370,8 @@ struct dtv_frontend_properties {
u8 interleaving; u8 interleaving;
} layer[3]; } layer[3];
/* ISDB-T specifics */ /* Multistream specifics */
u32 isdbs_ts_id; u32 stream_id;
/* DVB-T2 specifics */
u32 dvbt2_plp_id;
/* ATSC-MH specifics */ /* ATSC-MH specifics */
u8 atscmh_fic_ver; u8 atscmh_fic_ver;
......
...@@ -329,8 +329,8 @@ va1j5jf8007s_set_ts_id(struct va1j5jf8007s_state *state) ...@@ -329,8 +329,8 @@ va1j5jf8007s_set_ts_id(struct va1j5jf8007s_state *state)
u8 buf[3]; u8 buf[3];
struct i2c_msg msg; struct i2c_msg msg;
ts_id = state->fe.dtv_property_cache.isdbs_ts_id; ts_id = state->fe.dtv_property_cache.stream_id;
if (!ts_id) if (!ts_id || ts_id == NO_STREAM_ID_FILTER)
return 0; return 0;
buf[0] = 0x8f; buf[0] = 0x8f;
...@@ -356,8 +356,8 @@ va1j5jf8007s_check_ts_id(struct va1j5jf8007s_state *state, int *lock) ...@@ -356,8 +356,8 @@ va1j5jf8007s_check_ts_id(struct va1j5jf8007s_state *state, int *lock)
struct i2c_msg msgs[2]; struct i2c_msg msgs[2];
u32 ts_id; u32 ts_id;
ts_id = state->fe.dtv_property_cache.isdbs_ts_id; ts_id = state->fe.dtv_property_cache.stream_id;
if (!ts_id) { if (!ts_id || ts_id == NO_STREAM_ID_FILTER) {
*lock = 1; *lock = 1;
return 0; return 0;
} }
...@@ -587,7 +587,8 @@ static struct dvb_frontend_ops va1j5jf8007s_ops = { ...@@ -587,7 +587,8 @@ static struct dvb_frontend_ops va1j5jf8007s_ops = {
.frequency_stepsize = 1000, .frequency_stepsize = 1000,
.caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO | .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO |
FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO |
FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO, FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
FE_CAN_MULTISTREAM,
}, },
.read_snr = va1j5jf8007s_read_snr, .read_snr = va1j5jf8007s_read_snr,
......
...@@ -62,6 +62,7 @@ typedef enum fe_caps { ...@@ -62,6 +62,7 @@ typedef enum fe_caps {
FE_CAN_8VSB = 0x200000, FE_CAN_8VSB = 0x200000,
FE_CAN_16VSB = 0x400000, FE_CAN_16VSB = 0x400000,
FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
...@@ -338,9 +339,9 @@ struct dvb_frontend_event { ...@@ -338,9 +339,9 @@ struct dvb_frontend_event {
#define DTV_ISDBT_LAYER_ENABLED 41 #define DTV_ISDBT_LAYER_ENABLED 41
#define DTV_ISDBS_TS_ID 42 #define DTV_STREAM_ID 42
#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
#define DTV_DVBT2_PLP_ID 43 #define DTV_DVBT2_PLP_ID_LEGACY 43
#define DTV_ENUM_DELSYS 44 #define DTV_ENUM_DELSYS 44
...@@ -436,6 +437,7 @@ enum atscmh_rs_code_mode { ...@@ -436,6 +437,7 @@ enum atscmh_rs_code_mode {
ATSCMH_RSCODE_RES = 3, ATSCMH_RSCODE_RES = 3,
}; };
#define NO_STREAM_ID_FILTER (~0U)
struct dtv_cmds_h { struct dtv_cmds_h {
char *name; /* A display name for debugging purposes */ char *name; /* A display name for debugging purposes */
......
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
#define _DVBVERSION_H_ #define _DVBVERSION_H_
#define DVB_API_VERSION 5 #define DVB_API_VERSION 5
#define DVB_API_VERSION_MINOR 7 #define DVB_API_VERSION_MINOR 8
#endif /*_DVBVERSION_H_*/ #endif /*_DVBVERSION_H_*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment