diff options
author | Evgeny Plehov <EvgenyPlehov@ukr.net> | 2012-09-13 09:13:30 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-23 19:59:32 -0400 |
commit | 287cefd096b124874dc4d6d155f53547c0654860 (patch) | |
tree | c6ffeecb73b51ce3c8087c1dd73bd7c2727bd300 | |
parent | b072eee0345efd3edb582466c627364b5fa63a99 (diff) |
[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: Evgeny Plehov <EvgenyPlehov@ukr.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.c | 27 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.h | 7 | ||||
-rw-r--r-- | drivers/media/pci/pt1/va1j5jf8007s.c | 11 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 8 | ||||
-rw-r--r-- | include/linux/dvb/version.h | 2 |
5 files changed, 27 insertions, 28 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 2bc80b153c59..479a5e52cb0d 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c | |||
@@ -949,8 +949,7 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) | |||
949 | c->layer[i].segment_count = 0; | 949 | c->layer[i].segment_count = 0; |
950 | } | 950 | } |
951 | 951 | ||
952 | c->isdbs_ts_id = 0; | 952 | c->stream_id = NO_STREAM_ID_FILTER; |
953 | c->dvbt2_plp_id = 0; | ||
954 | 953 | ||
955 | switch (c->delivery_system) { | 954 | switch (c->delivery_system) { |
956 | case SYS_DVBS: | 955 | case SYS_DVBS: |
@@ -1021,8 +1020,8 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = { | |||
1021 | _DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 1, 0), | 1020 | _DTV_CMD(DTV_ISDBT_LAYERC_SEGMENT_COUNT, 1, 0), |
1022 | _DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 1, 0), | 1021 | _DTV_CMD(DTV_ISDBT_LAYERC_TIME_INTERLEAVING, 1, 0), |
1023 | 1022 | ||
1024 | _DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), | 1023 | _DTV_CMD(DTV_STREAM_ID, 1, 0), |
1025 | _DTV_CMD(DTV_DVBT2_PLP_ID, 1, 0), | 1024 | _DTV_CMD(DTV_DVBT2_PLP_ID_LEGACY, 1, 0), |
1026 | 1025 | ||
1027 | /* Get */ | 1026 | /* Get */ |
1028 | _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1), | 1027 | _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1), |
@@ -1386,11 +1385,11 @@ static int dtv_property_process_get(struct dvb_frontend *fe, | |||
1386 | case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: | 1385 | case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: |
1387 | tvp->u.data = c->layer[2].interleaving; | 1386 | tvp->u.data = c->layer[2].interleaving; |
1388 | break; | 1387 | break; |
1389 | case DTV_ISDBS_TS_ID: | 1388 | |
1390 | tvp->u.data = c->isdbs_ts_id; | 1389 | /* Multistream support */ |
1391 | break; | 1390 | case DTV_STREAM_ID: |
1392 | case DTV_DVBT2_PLP_ID: | 1391 | case DTV_DVBT2_PLP_ID_LEGACY: |
1393 | tvp->u.data = c->dvbt2_plp_id; | 1392 | tvp->u.data = c->stream_id; |
1394 | break; | 1393 | break; |
1395 | 1394 | ||
1396 | /* ATSC-MH */ | 1395 | /* ATSC-MH */ |
@@ -1787,11 +1786,11 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1787 | case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: | 1786 | case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: |
1788 | c->layer[2].interleaving = tvp->u.data; | 1787 | c->layer[2].interleaving = tvp->u.data; |
1789 | break; | 1788 | break; |
1790 | case DTV_ISDBS_TS_ID: | 1789 | |
1791 | c->isdbs_ts_id = tvp->u.data; | 1790 | /* Multistream support */ |
1792 | break; | 1791 | case DTV_STREAM_ID: |
1793 | case DTV_DVBT2_PLP_ID: | 1792 | case DTV_DVBT2_PLP_ID_LEGACY: |
1794 | c->dvbt2_plp_id = tvp->u.data; | 1793 | c->stream_id = tvp->u.data; |
1795 | break; | 1794 | break; |
1796 | 1795 | ||
1797 | /* ATSC-MH */ | 1796 | /* ATSC-MH */ |
diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h index db309db79bd6..33996a01cd63 100644 --- a/drivers/media/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb-core/dvb_frontend.h | |||
@@ -370,11 +370,8 @@ struct dtv_frontend_properties { | |||
370 | u8 interleaving; | 370 | u8 interleaving; |
371 | } layer[3]; | 371 | } layer[3]; |
372 | 372 | ||
373 | /* ISDB-T specifics */ | 373 | /* Multistream specifics */ |
374 | u32 isdbs_ts_id; | 374 | u32 stream_id; |
375 | |||
376 | /* DVB-T2 specifics */ | ||
377 | u32 dvbt2_plp_id; | ||
378 | 375 | ||
379 | /* ATSC-MH specifics */ | 376 | /* ATSC-MH specifics */ |
380 | u8 atscmh_fic_ver; | 377 | u8 atscmh_fic_ver; |
diff --git a/drivers/media/pci/pt1/va1j5jf8007s.c b/drivers/media/pci/pt1/va1j5jf8007s.c index d980dfb21e5e..1b637b74ef58 100644 --- a/drivers/media/pci/pt1/va1j5jf8007s.c +++ b/drivers/media/pci/pt1/va1j5jf8007s.c | |||
@@ -329,8 +329,8 @@ va1j5jf8007s_set_ts_id(struct va1j5jf8007s_state *state) | |||
329 | u8 buf[3]; | 329 | u8 buf[3]; |
330 | struct i2c_msg msg; | 330 | struct i2c_msg msg; |
331 | 331 | ||
332 | ts_id = state->fe.dtv_property_cache.isdbs_ts_id; | 332 | ts_id = state->fe.dtv_property_cache.stream_id; |
333 | if (!ts_id) | 333 | if (!ts_id || ts_id == NO_STREAM_ID_FILTER) |
334 | return 0; | 334 | return 0; |
335 | 335 | ||
336 | buf[0] = 0x8f; | 336 | buf[0] = 0x8f; |
@@ -356,8 +356,8 @@ va1j5jf8007s_check_ts_id(struct va1j5jf8007s_state *state, int *lock) | |||
356 | struct i2c_msg msgs[2]; | 356 | struct i2c_msg msgs[2]; |
357 | u32 ts_id; | 357 | u32 ts_id; |
358 | 358 | ||
359 | ts_id = state->fe.dtv_property_cache.isdbs_ts_id; | 359 | ts_id = state->fe.dtv_property_cache.stream_id; |
360 | if (!ts_id) { | 360 | if (!ts_id || ts_id == NO_STREAM_ID_FILTER) { |
361 | *lock = 1; | 361 | *lock = 1; |
362 | return 0; | 362 | return 0; |
363 | } | 363 | } |
@@ -587,7 +587,8 @@ static struct dvb_frontend_ops va1j5jf8007s_ops = { | |||
587 | .frequency_stepsize = 1000, | 587 | .frequency_stepsize = 1000, |
588 | .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO | | 588 | .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO | |
589 | FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | | 589 | FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | |
590 | FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO, | 590 | FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO | |
591 | FE_CAN_MULTISTREAM, | ||
591 | }, | 592 | }, |
592 | 593 | ||
593 | .read_snr = va1j5jf8007s_read_snr, | 594 | .read_snr = va1j5jf8007s_read_snr, |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index bb51edfc72a2..57e2b1763109 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -62,6 +62,7 @@ typedef enum fe_caps { | |||
62 | FE_CAN_8VSB = 0x200000, | 62 | FE_CAN_8VSB = 0x200000, |
63 | FE_CAN_16VSB = 0x400000, | 63 | FE_CAN_16VSB = 0x400000, |
64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ | 64 | FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */ |
65 | FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */ | ||
65 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ | 66 | FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */ |
66 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ | 67 | FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */ |
67 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ | 68 | FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */ |
@@ -338,9 +339,9 @@ struct dvb_frontend_event { | |||
338 | 339 | ||
339 | #define DTV_ISDBT_LAYER_ENABLED 41 | 340 | #define DTV_ISDBT_LAYER_ENABLED 41 |
340 | 341 | ||
341 | #define DTV_ISDBS_TS_ID 42 | 342 | #define DTV_STREAM_ID 42 |
342 | 343 | #define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID | |
343 | #define DTV_DVBT2_PLP_ID 43 | 344 | #define DTV_DVBT2_PLP_ID_LEGACY 43 |
344 | 345 | ||
345 | #define DTV_ENUM_DELSYS 44 | 346 | #define DTV_ENUM_DELSYS 44 |
346 | 347 | ||
@@ -436,6 +437,7 @@ enum atscmh_rs_code_mode { | |||
436 | ATSCMH_RSCODE_RES = 3, | 437 | ATSCMH_RSCODE_RES = 3, |
437 | }; | 438 | }; |
438 | 439 | ||
440 | #define NO_STREAM_ID_FILTER (~0U) | ||
439 | 441 | ||
440 | struct dtv_cmds_h { | 442 | struct dtv_cmds_h { |
441 | char *name; /* A display name for debugging purposes */ | 443 | char *name; /* A display name for debugging purposes */ |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 70c2c7edcc7d..20e5eac2ffd3 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 7 | 27 | #define DVB_API_VERSION_MINOR 8 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |