* [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations and 64K transmission
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
@ 2018-01-22 17:13 ` Daniel Scheller
2018-03-06 13:17 ` Mauro Carvalho Chehab
2018-01-22 17:13 ` [PATCH v2 2/5] media: dvb_frontend: add DVB-S2X rolloff factors Daniel Scheller
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Daniel Scheller @ 2018-01-22 17:13 UTC (permalink / raw)
To: linux-media, mchehab, mchehab; +Cc: rascobie
From: Daniel Scheller <d.scheller@gmx.net>
Add 1/4 and 1/3 FEC ratios, 64/128/256-APSK S2X modulations and 64K
transmission mode. Update relevant doc items aswell.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
Documentation/media/frontend.h.rst.exceptions | 6 ++++++
include/uapi/linux/dvb/frontend.h | 13 +++++++++++++
2 files changed, 19 insertions(+)
diff --git a/Documentation/media/frontend.h.rst.exceptions b/Documentation/media/frontend.h.rst.exceptions
index f7c4df620a52..ae1148be0a39 100644
--- a/Documentation/media/frontend.h.rst.exceptions
+++ b/Documentation/media/frontend.h.rst.exceptions
@@ -84,6 +84,9 @@ ignore symbol APSK_16
ignore symbol APSK_32
ignore symbol DQPSK
ignore symbol QAM_4_NR
+ignore symbol APSK_64
+ignore symbol APSK_128
+ignore symbol APSK_256
ignore symbol SEC_VOLTAGE_13
ignore symbol SEC_VOLTAGE_18
@@ -117,6 +120,8 @@ ignore symbol FEC_AUTO
ignore symbol FEC_3_5
ignore symbol FEC_9_10
ignore symbol FEC_2_5
+ignore symbol FEC_1_4
+ignore symbol FEC_1_3
ignore symbol TRANSMISSION_MODE_AUTO
ignore symbol TRANSMISSION_MODE_1K
@@ -129,6 +134,7 @@ ignore symbol TRANSMISSION_MODE_C1
ignore symbol TRANSMISSION_MODE_C3780
ignore symbol TRANSMISSION_MODE_2K
ignore symbol TRANSMISSION_MODE_8K
+ignore symbol TRANSMISSION_MODE_64K
ignore symbol GUARD_INTERVAL_AUTO
ignore symbol GUARD_INTERVAL_1_128
diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
index 4f9b4551c534..227268a657cd 100644
--- a/include/uapi/linux/dvb/frontend.h
+++ b/include/uapi/linux/dvb/frontend.h
@@ -296,6 +296,8 @@ enum fe_spectral_inversion {
* @FEC_3_5: Forward Error Correction Code 3/5
* @FEC_9_10: Forward Error Correction Code 9/10
* @FEC_2_5: Forward Error Correction Code 2/5
+ * @FEC_1_4: Forward Error Correction Code 1/4
+ * @FEC_1_3: Forward Error Correction Code 1/3
*
* Please note that not all FEC types are supported by a given standard.
*/
@@ -313,6 +315,8 @@ enum fe_code_rate {
FEC_3_5,
FEC_9_10,
FEC_2_5,
+ FEC_1_4,
+ FEC_1_3,
};
/**
@@ -331,6 +335,9 @@ enum fe_code_rate {
* @APSK_32: 32-APSK modulation
* @DQPSK: DQPSK modulation
* @QAM_4_NR: 4-QAM-NR modulation
+ * @APSK_64: 64-APSK modulation
+ * @APSK_128: 128-APSK modulation
+ * @APSK_256: 256-APSK modulation
*
* Please note that not all modulations are supported by a given standard.
*
@@ -350,6 +357,9 @@ enum fe_modulation {
APSK_32,
DQPSK,
QAM_4_NR,
+ APSK_64,
+ APSK_128,
+ APSK_256,
};
/**
@@ -374,6 +384,8 @@ enum fe_modulation {
* Single Carrier (C=1) transmission mode (DTMB only)
* @TRANSMISSION_MODE_C3780:
* Multi Carrier (C=3780) transmission mode (DTMB only)
+ * @TRANSMISSION_MODE_64K:
+ * Transmission mode 64K
*
* Please note that not all transmission modes are supported by a given
* standard.
@@ -388,6 +400,7 @@ enum fe_transmit_mode {
TRANSMISSION_MODE_32K,
TRANSMISSION_MODE_C1,
TRANSMISSION_MODE_C3780,
+ TRANSMISSION_MODE_64K,
};
/**
--
2.13.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations and 64K transmission
2018-01-22 17:13 ` [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations " Daniel Scheller
@ 2018-03-06 13:17 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2018-03-06 13:17 UTC (permalink / raw)
To: Daniel Scheller; +Cc: mchehab, rascobie, Ralph Metzler, Jasmin J.
Hi Daniel,
Em Mon, 22 Jan 2018 18:13:42 +0100
Daniel Scheller <d.scheller.oss@gmail.com> escreveu:
> From: Daniel Scheller <d.scheller@gmx.net>
>
> Add 1/4 and 1/3 FEC ratios, 64/128/256-APSK S2X modulations and 64K
> transmission mode. Update relevant doc items aswell.
Please properly document DVB-S2X. You need to add something at
Documentation/media/uapi/dvb/fe_property_parameters.rst,
and Documentation/media/uapi/dvb/frontend-property-satellite-systems.rst
in order to properly describe DVB-S2X.
Please take a look at:
https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/dvb/fe_property_parameters.html
and:
https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/dvb/frontend-property-satellite-systems.html
Basically, for each DVB-S2X parameter, you should say what
values are valid.
Also, I'm not seeing a SYS_DVBS2X delivery system. If the idea is
not to create it, the documentation should state that SYS_DVBS2
should be used, and the Kernel should provide some way to allow
userspace to detect if the DVB-S2X parameters are valid or not.
As we're running out of DVB frontend caps flags, it means that
you need to also add a patch to this series implementing a
new way to query frontend capabilities.
Regards,
Mauro
>
> Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
> ---
> Documentation/media/frontend.h.rst.exceptions | 6 ++++++
> include/uapi/linux/dvb/frontend.h | 13 +++++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/Documentation/media/frontend.h.rst.exceptions b/Documentation/media/frontend.h.rst.exceptions
> index f7c4df620a52..ae1148be0a39 100644
> --- a/Documentation/media/frontend.h.rst.exceptions
> +++ b/Documentation/media/frontend.h.rst.exceptions
> @@ -84,6 +84,9 @@ ignore symbol APSK_16
> ignore symbol APSK_32
> ignore symbol DQPSK
> ignore symbol QAM_4_NR
> +ignore symbol APSK_64
> +ignore symbol APSK_128
> +ignore symbol APSK_256
>
> ignore symbol SEC_VOLTAGE_13
> ignore symbol SEC_VOLTAGE_18
> @@ -117,6 +120,8 @@ ignore symbol FEC_AUTO
> ignore symbol FEC_3_5
> ignore symbol FEC_9_10
> ignore symbol FEC_2_5
> +ignore symbol FEC_1_4
> +ignore symbol FEC_1_3
>
> ignore symbol TRANSMISSION_MODE_AUTO
> ignore symbol TRANSMISSION_MODE_1K
> @@ -129,6 +134,7 @@ ignore symbol TRANSMISSION_MODE_C1
> ignore symbol TRANSMISSION_MODE_C3780
> ignore symbol TRANSMISSION_MODE_2K
> ignore symbol TRANSMISSION_MODE_8K
> +ignore symbol TRANSMISSION_MODE_64K
>
> ignore symbol GUARD_INTERVAL_AUTO
> ignore symbol GUARD_INTERVAL_1_128
> diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
> index 4f9b4551c534..227268a657cd 100644
> --- a/include/uapi/linux/dvb/frontend.h
> +++ b/include/uapi/linux/dvb/frontend.h
> @@ -296,6 +296,8 @@ enum fe_spectral_inversion {
> * @FEC_3_5: Forward Error Correction Code 3/5
> * @FEC_9_10: Forward Error Correction Code 9/10
> * @FEC_2_5: Forward Error Correction Code 2/5
> + * @FEC_1_4: Forward Error Correction Code 1/4
> + * @FEC_1_3: Forward Error Correction Code 1/3
> *
> * Please note that not all FEC types are supported by a given standard.
> */
> @@ -313,6 +315,8 @@ enum fe_code_rate {
> FEC_3_5,
> FEC_9_10,
> FEC_2_5,
> + FEC_1_4,
> + FEC_1_3,
> };
>
> /**
> @@ -331,6 +335,9 @@ enum fe_code_rate {
> * @APSK_32: 32-APSK modulation
> * @DQPSK: DQPSK modulation
> * @QAM_4_NR: 4-QAM-NR modulation
> + * @APSK_64: 64-APSK modulation
> + * @APSK_128: 128-APSK modulation
> + * @APSK_256: 256-APSK modulation
> *
> * Please note that not all modulations are supported by a given standard.
> *
> @@ -350,6 +357,9 @@ enum fe_modulation {
> APSK_32,
> DQPSK,
> QAM_4_NR,
> + APSK_64,
> + APSK_128,
> + APSK_256,
> };
>
> /**
> @@ -374,6 +384,8 @@ enum fe_modulation {
> * Single Carrier (C=1) transmission mode (DTMB only)
> * @TRANSMISSION_MODE_C3780:
> * Multi Carrier (C=3780) transmission mode (DTMB only)
> + * @TRANSMISSION_MODE_64K:
> + * Transmission mode 64K
> *
> * Please note that not all transmission modes are supported by a given
> * standard.
> @@ -388,6 +400,7 @@ enum fe_transmit_mode {
> TRANSMISSION_MODE_32K,
> TRANSMISSION_MODE_C1,
> TRANSMISSION_MODE_C3780,
> + TRANSMISSION_MODE_64K,
> };
>
> /**
Thanks,
Mauro
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/5] media: dvb_frontend: add DVB-S2X rolloff factors
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations " Daniel Scheller
@ 2018-01-22 17:13 ` Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 3/5] media: dvb-frontends/stv0910: report FEC 1/4 and 1/3 in get_frontend() Daniel Scheller
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Scheller @ 2018-01-22 17:13 UTC (permalink / raw)
To: linux-media, mchehab, mchehab; +Cc: rascobie
From: Daniel Scheller <d.scheller@gmx.net>
Add 15%, 10% and 5% DVB-S2X rolloff factors. Also fix roloff typos.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
Documentation/media/frontend.h.rst.exceptions | 3 +++
drivers/media/dvb-core/dvb_frontend.c | 9 +++++++++
include/uapi/linux/dvb/frontend.h | 16 +++++++++++-----
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/Documentation/media/frontend.h.rst.exceptions b/Documentation/media/frontend.h.rst.exceptions
index ae1148be0a39..c1643ce93426 100644
--- a/Documentation/media/frontend.h.rst.exceptions
+++ b/Documentation/media/frontend.h.rst.exceptions
@@ -167,6 +167,9 @@ ignore symbol ROLLOFF_35
ignore symbol ROLLOFF_20
ignore symbol ROLLOFF_25
ignore symbol ROLLOFF_AUTO
+ignore symbol ROLLOFF_15
+ignore symbol ROLLOFF_10
+ignore symbol ROLLOFF_5
ignore symbol INVERSION_ON
ignore symbol INVERSION_OFF
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 722b86a43497..e5105c1783b8 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -2183,6 +2183,15 @@ static int dtv_set_frontend(struct dvb_frontend *fe)
break;
case SYS_DVBS2:
switch (c->rolloff) {
+ case ROLLOFF_5:
+ rolloff = 105;
+ break;
+ case ROLLOFF_10:
+ rolloff = 110;
+ break;
+ case ROLLOFF_15:
+ rolloff = 115;
+ break;
case ROLLOFF_20:
rolloff = 120;
break;
diff --git a/include/uapi/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h
index 227268a657cd..8bf1c63627a2 100644
--- a/include/uapi/linux/dvb/frontend.h
+++ b/include/uapi/linux/dvb/frontend.h
@@ -580,20 +580,26 @@ enum fe_pilot {
/**
* enum fe_rolloff - Rolloff factor
- * @ROLLOFF_35: Roloff factor: α=35%
- * @ROLLOFF_20: Roloff factor: α=20%
- * @ROLLOFF_25: Roloff factor: α=25%
- * @ROLLOFF_AUTO: Auto-detect the roloff factor.
+ * @ROLLOFF_35: Rolloff factor: α=35%
+ * @ROLLOFF_20: Rolloff factor: α=20%
+ * @ROLLOFF_25: Rolloff factor: α=25%
+ * @ROLLOFF_AUTO: Auto-detect the rolloff factor.
+ * @ROLLOFF_15: Rolloff factor: α=15%
+ * @ROLLOFF_10: Rolloff factor: α=10%
+ * @ROLLOFF_5: Rolloff factor: α=5%
*
* .. note:
*
- * Roloff factor of 35% is implied on DVB-S. On DVB-S2, it is default.
+ * Rolloff factor of 35% is implied on DVB-S. On DVB-S2, it is default.
*/
enum fe_rolloff {
ROLLOFF_35,
ROLLOFF_20,
ROLLOFF_25,
ROLLOFF_AUTO,
+ ROLLOFF_15,
+ ROLLOFF_10,
+ ROLLOFF_5,
};
/**
--
2.13.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/5] media: dvb-frontends/stv0910: report FEC 1/4 and 1/3 in get_frontend()
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 1/5] media: dvb_frontend: add FEC modes, S2X modulations " Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 2/5] media: dvb_frontend: add DVB-S2X rolloff factors Daniel Scheller
@ 2018-01-22 17:13 ` Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 4/5] media: dvb-frontends/stv0910: report S2 rolloff " Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 5/5] media: dvb-frontends/stv0910: report active delsys " Daniel Scheller
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Scheller @ 2018-01-22 17:13 UTC (permalink / raw)
To: linux-media, mchehab, mchehab; +Cc: rascobie
From: Daniel Scheller <d.scheller@gmx.net>
The first two missing FECs in the modcod2fec fe_code_rate table were 1/4
and 1/3. Add them as they're now defined by the API.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/dvb-frontends/stv0910.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index a2f7c0c1587f..de132a85e537 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -1562,7 +1562,7 @@ static int get_frontend(struct dvb_frontend *fe,
APSK_32,
};
const enum fe_code_rate modcod2fec[0x20] = {
- FEC_NONE, FEC_NONE, FEC_NONE, FEC_2_5,
+ FEC_NONE, FEC_1_4, FEC_1_3, FEC_2_5,
FEC_1_2, FEC_3_5, FEC_2_3, FEC_3_4,
FEC_4_5, FEC_5_6, FEC_8_9, FEC_9_10,
FEC_3_5, FEC_2_3, FEC_3_4, FEC_5_6,
--
2.13.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 4/5] media: dvb-frontends/stv0910: report S2 rolloff in get_frontend()
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
` (2 preceding siblings ...)
2018-01-22 17:13 ` [PATCH v2 3/5] media: dvb-frontends/stv0910: report FEC 1/4 and 1/3 in get_frontend() Daniel Scheller
@ 2018-01-22 17:13 ` Daniel Scheller
2018-01-22 17:13 ` [PATCH v2 5/5] media: dvb-frontends/stv0910: report active delsys " Daniel Scheller
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Scheller @ 2018-01-22 17:13 UTC (permalink / raw)
To: linux-media, mchehab, mchehab; +Cc: rascobie
From: Daniel Scheller <d.scheller@gmx.net>
Report the currently used S2 rolloff factor in get_frontend(). For
cosmetic reasons, also change all feroll_off occurences to fe_rolloff.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/dvb-frontends/stv0910.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index de132a85e537..7ab014cec56c 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -113,7 +113,7 @@ struct stv {
enum fe_stv0910_mod_cod mod_cod;
enum dvbs2_fectype fectype;
u32 pilots;
- enum fe_stv0910_roll_off feroll_off;
+ enum fe_stv0910_roll_off fe_rolloff;
int is_standard_broadcast;
int is_vcm;
@@ -541,7 +541,7 @@ static int get_signal_parameters(struct stv *state)
}
state->is_vcm = 0;
state->is_standard_broadcast = 1;
- state->feroll_off = FE_SAT_35;
+ state->fe_rolloff = FE_SAT_35;
}
return 0;
}
@@ -1300,14 +1300,14 @@ static int manage_matype_info(struct stv *state)
read_regs(state, RSTV0910_P2_MATSTR1 + state->regoff,
bbheader, 2);
- state->feroll_off =
+ state->fe_rolloff =
(enum fe_stv0910_roll_off)(bbheader[0] & 0x03);
state->is_vcm = (bbheader[0] & 0x10) == 0;
state->is_standard_broadcast = (bbheader[0] & 0xFC) == 0xF0;
} else if (state->receive_mode == RCVMODE_DVBS) {
state->is_vcm = 0;
state->is_standard_broadcast = 1;
- state->feroll_off = FE_SAT_35;
+ state->fe_rolloff = FE_SAT_35;
}
return 0;
}
@@ -1571,11 +1571,15 @@ static int get_frontend(struct dvb_frontend *fe,
FEC_3_4, FEC_4_5, FEC_5_6, FEC_8_9,
FEC_9_10
};
+ const enum fe_rolloff ro2ro[4] = {
+ ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_15,
+ };
read_reg(state, RSTV0910_P2_DMDMODCOD + state->regoff, &tmp);
mc = ((tmp & 0x7c) >> 2);
p->pilot = (tmp & 0x01) ? PILOT_ON : PILOT_OFF;
p->modulation = modcod2mod[mc];
p->fec_inner = modcod2fec[mc];
+ p->rolloff = ro2ro[state->fe_rolloff];
} else if (state->receive_mode == RCVMODE_DVBS) {
read_reg(state, RSTV0910_P2_VITCURPUN + state->regoff, &tmp);
switch (tmp & 0x1F) {
--
2.13.6
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 5/5] media: dvb-frontends/stv0910: report active delsys in get_frontend()
2018-01-22 17:13 [PATCH v2 0/5] Add FEC rates, S2X params and 64K transmission Daniel Scheller
` (3 preceding siblings ...)
2018-01-22 17:13 ` [PATCH v2 4/5] media: dvb-frontends/stv0910: report S2 rolloff " Daniel Scheller
@ 2018-01-22 17:13 ` Daniel Scheller
4 siblings, 0 replies; 7+ messages in thread
From: Daniel Scheller @ 2018-01-22 17:13 UTC (permalink / raw)
To: linux-media, mchehab, mchehab; +Cc: rascobie
From: Daniel Scheller <d.scheller@gmx.net>
Report the active delivery system based on the receive_mode state of the
demodulator.
Suggested-by: Richard Scobie <rascobie@slingshot.co.nz>
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
drivers/media/dvb-frontends/stv0910.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c
index 7ab014cec56c..6e6a70ad7354 100644
--- a/drivers/media/dvb-frontends/stv0910.c
+++ b/drivers/media/dvb-frontends/stv0910.c
@@ -1580,6 +1580,7 @@ static int get_frontend(struct dvb_frontend *fe,
p->modulation = modcod2mod[mc];
p->fec_inner = modcod2fec[mc];
p->rolloff = ro2ro[state->fe_rolloff];
+ p->delivery_system = SYS_DVBS2;
} else if (state->receive_mode == RCVMODE_DVBS) {
read_reg(state, RSTV0910_P2_VITCURPUN + state->regoff, &tmp);
switch (tmp & 0x1F) {
@@ -1603,6 +1604,7 @@ static int get_frontend(struct dvb_frontend *fe,
break;
}
p->rolloff = ROLLOFF_35;
+ p->delivery_system = SYS_DVBS;
}
if (state->receive_mode != RCVMODE_NONE) {
--
2.13.6
^ permalink raw reply related [flat|nested] 7+ messages in thread